(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("@angular/core"), require("@angular/common"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("@angular/animations"), require("tabby-core"), require("tabby-settings"), require("fs"), require("rxjs"), require("readline"), require("path"), require("stream"), require("os"));
	else if(typeof define === 'function' && define.amd)
		define(["@angular/core", "@angular/common", "@angular/forms", "@ng-bootstrap/ng-bootstrap", "ngx-toastr", "@angular/animations", "tabby-core", "tabby-settings", "fs", "rxjs", "readline", "path", "stream", "os"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("@angular/core"), require("@angular/common"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("@angular/animations"), require("tabby-core"), require("tabby-settings"), require("fs"), require("rxjs"), require("readline"), require("path"), require("stream"), require("os")) : factory(root["@angular/core"], root["@angular/common"], root["@angular/forms"], root["@ng-bootstrap/ng-bootstrap"], root["ngx-toastr"], root["@angular/animations"], root["tabby-core"], root["tabby-settings"], root["fs"], root["rxjs"], root["readline"], root["path"], root["stream"], root["os"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(global, (__WEBPACK_EXTERNAL_MODULE__860__, __WEBPACK_EXTERNAL_MODULE__4358__, __WEBPACK_EXTERNAL_MODULE__7182__, __WEBPACK_EXTERNAL_MODULE__9765__, __WEBPACK_EXTERNAL_MODULE__6523__, __WEBPACK_EXTERNAL_MODULE__1448__, __WEBPACK_EXTERNAL_MODULE__7650__, __WEBPACK_EXTERNAL_MODULE__3700__, __WEBPACK_EXTERNAL_MODULE__2947__, __WEBPACK_EXTERNAL_MODULE__3961__, __WEBPACK_EXTERNAL_MODULE__4902__, __WEBPACK_EXTERNAL_MODULE__3911__, __WEBPACK_EXTERNAL_MODULE__7748__, __WEBPACK_EXTERNAL_MODULE__4234__) => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 88
/*!***************************************************!*\
  !*** ../node_modules/object-is/implementation.js ***!
  \***************************************************/
(module) {

"use strict";


var numberIsNaN = function (value) {
  return value !== value;
};
module.exports = function is(a, b) {
  if (a === 0 && b === 0) {
    return 1 / a === 1 / b;
  }
  if (a === b) {
    return true;
  }
  if (numberIsNaN(a) && numberIsNaN(b)) {
    return true;
  }
  return false;
};

/***/ },

/***/ 142
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/zcrc.js ***!
  \********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


const CRC32_MOD = __webpack_require__(/*! crc-32 */ 3651);
var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zerror */ 3478), __webpack_require__(/*! ./encode */ 6248));

//----------------------------------------------------------------------
// BEGIN adapted from crc-js by Johannes Rudolph

var _crctab;
const crc_width = 16,
  crc_polynomial = 0x1021,
  crc_castmask = 0xffff,
  crc_msbmask = 1 << crc_width - 1;
function _compute_crctab() {
  _crctab = new Array(256);
  var divident_shift = crc_width - 8;
  for (var divident = 0; divident < 256; divident++) {
    var currByte = divident << divident_shift & crc_castmask;
    for (var bit = 0; bit < 8; bit++) {
      if ((currByte & crc_msbmask) !== 0) {
        currByte <<= 1;
        currByte ^= crc_polynomial;
      } else {
        currByte <<= 1;
      }
    }
    _crctab[divident] = currByte & crc_castmask;
  }
}

// END adapted from crc-js by Johannes Rudolph
//----------------------------------------------------------------------

function _updcrc(cp, crc) {
  if (!_crctab) _compute_crctab();
  return _crctab[crc >> 8 & 255] ^ (255 & crc) << 8 ^ cp;
}
function __verify(expect, got) {
  var err;
  if (expect.join() !== got.join()) {
    throw new Zmodem.Error("crc", got, expect);
  }
}

//TODO: use external implementation(s)
Zmodem.CRC = {
  //https://www.lammertbies.nl/comm/info/crc-calculation.html
  //CRC-CCITT (XModem)

  /**
   * Deduce a given set of octet values’ CRC16, as per the CRC16
   * variant that ZMODEM uses (CRC-CCITT/XModem).
   *
   * @param {Array} octets - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @returns {Array} crc - The CRC, expressed as an array of octet values.
   */
  crc16: function crc16(octet_nums) {
    var crc = octet_nums[0];
    for (var b = 1; b < octet_nums.length; b++) {
      crc = _updcrc(octet_nums[b], crc);
    }
    crc = _updcrc(0, _updcrc(0, crc));

    //a big-endian 2-byte sequence
    return Zmodem.ENCODELIB.pack_u16_be(crc);
  },
  /**
   * Deduce a given set of octet values’ CRC32.
   *
   * @param {Array} octets - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @returns {Array} crc - The CRC, expressed as an array of octet values.
   */
  crc32: function crc32(octet_nums) {
    return Zmodem.ENCODELIB.pack_u32_le(CRC32_MOD.buf(octet_nums) >>> 0 //bit-shift to get unsigned
    );
  },
  /**
   * Verify a given set of octet values’ CRC16.
   * An exception is thrown on failure.
   *
   * @param {Array} bytes_arr - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @param {Array} crc - The CRC to check against, expressed as
   *      an array of octet values.
   */
  verify16: function verify16(bytes_arr, got) {
    return __verify(this.crc16(bytes_arr), got);
  },
  /**
   * Verify a given set of octet values’ CRC32.
   * An exception is thrown on failure.
   *
   * @param {Array} bytes_arr - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @param {Array} crc - The CRC to check against, expressed as
   *      an array of octet values.
   */
  verify32: function verify32(bytes_arr, crc) {
    try {
      __verify(this.crc32(bytes_arr), crc);
    } catch (err) {
      err.input = bytes_arr.slice(0);
      throw err;
    }
  }
};

/***/ },

/***/ 161
/*!**************************************************************!*\
  !*** ./src/components/searchPanel.component.scss?ngResource ***!
  \**************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./searchPanel.component.scss?ngResource */ 8093);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 204
/*!****************************************************************************!*\
  !*** ./src/components/colorSchemeSettingsForMode.component.pug?ngResource ***!
  \****************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemeSettingsForMode.component.pug?ngResource */ 8201);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 438
/*!**************************************************!*\
  !*** ../app/node_modules/function-bind/index.js ***!
  \**************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 8862);
module.exports = Function.prototype.bind || implementation;

/***/ },

/***/ 442
/*!*********************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/getUrl.js ***!
  \*********************************************************/
(module) {

"use strict";


module.exports = function (url, options) {
  if (!options) {
    options = {};
  }
  if (!url) {
    return url;
  }
  url = String(url.__esModule ? url.default : url);

  // If url is already wrapped in quotes, remove them
  if (/^['"].*['"]$/.test(url)) {
    url = url.slice(1, -1);
  }
  if (options.hash) {
    url += options.hash;
  }

  // Should url be wrapped?
  // See https://drafts.csswg.org/css-values-3/#urls
  if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
    return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
  }
  return url;
};

/***/ },

/***/ 474
/*!************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemePreview.component.pug?ngResource ***!
  \************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"preview\" [style.font-family]=\"getPreviewFontFamily()\" [style.font-size]=\"(fontPreview ? config.store.terminal.fontSize : 11) + &quot;px&quot;\" [style.font-weight]=\"config.store.terminal.fontWeight\" [style.background-color]=\"scheme.background\" [style.color]=\"scheme.foreground\" [style.font-feature-settings]=\"'&quot;liga&quot; ' + config.store.terminal.ligatures ? 1 : 0\" [style.font-variant-ligatures]=\"config.store.terminal.ligatures ? &quot;initial&quot; : &quot;none&quot;\"\u003E\n  \u003Cdiv\u003E\u003Cspan [style.color]=\"scheme.colors[2]\"\u003Ejohn\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[6]\"\u003E@\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[4]\"\u003Edoe-pc\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[1]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E$\u003C\u002Fstrong\u003E\u003Cspan\u003E ls\u003C\u002Fspan\u003E\u003Cspan [style.background-color]=\"scheme.cursor\"\u003E&nbsp;\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[3]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E Documents\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root&nbsp;\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[0]\" [style.background]=\"scheme.colors[2]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EDownloads\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root&nbsp;\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[0]\" [style.background]=\"scheme.colors[8]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EPictures\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[12]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E Music\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[2]\"\u003E 実行可能ファイル\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[6]\"\u003E sym\u003C\u002Fspan\u003E\u003Cspan\u003E -\u003E\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[1]\"\u003E link\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E\u003Cstrong [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EIcons:\u003C\u002Fstrong\u003E\u003Cspan\u003E   \u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003Cspan\u003E\u003Cspan\u003E &nbsp;\u003C\u002Fspan\u003E\u003Cspan [style.background-color]=\"scheme.colors[1]\" [style.color]=\"scheme.colors[0]\"\u003E Powerline&nbsp;\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[1]\"\u003E\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 582
/*!*******************************************!*\
  !*** ./node_modules/ansi-colors/index.js ***!
  \*******************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);

/* eslint-disable no-control-regex */
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g;
const hasColor = () => {
  if (typeof process !== 'undefined') {
    return process.env.FORCE_COLOR !== '0';
  }
  return false;
};
const create = () => {
  const colors = {
    enabled: hasColor(),
    visible: true,
    styles: {},
    keys: {}
  };
  const ansi = style => {
    let open = style.open = `\u001b[${style.codes[0]}m`;
    let close = style.close = `\u001b[${style.codes[1]}m`;
    let regex = style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g');
    style.wrap = (input, newline) => {
      if (input.includes(close)) input = input.replace(regex, close + open);
      let output = open + input + close;
      // see https://github.com/chalk/chalk/pull/92, thanks to the
      // chalk contributors for this fix. However, we've confirmed that
      // this issue is also present in Windows terminals
      return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output;
    };
    return style;
  };
  const wrap = (style, input, newline) => {
    return typeof style === 'function' ? style(input) : style.wrap(input, newline);
  };
  const style = (input, stack) => {
    if (input === '' || input == null) return '';
    if (colors.enabled === false) return input;
    if (colors.visible === false) return '';
    let str = '' + input;
    let nl = str.includes('\n');
    let n = stack.length;
    if (n > 0 && stack.includes('unstyle')) {
      stack = [...new Set(['unstyle', ...stack])].reverse();
    }
    while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl);
    return str;
  };
  const define = (name, codes, type) => {
    colors.styles[name] = ansi({
      name,
      codes
    });
    let keys = colors.keys[type] || (colors.keys[type] = []);
    keys.push(name);
    Reflect.defineProperty(colors, name, {
      configurable: true,
      enumerable: true,
      set(value) {
        colors.alias(name, value);
      },
      get() {
        let color = input => style(input, color.stack);
        Reflect.setPrototypeOf(color, colors);
        color.stack = this.stack ? this.stack.concat(name) : [name];
        return color;
      }
    });
  };
  define('reset', [0, 0], 'modifier');
  define('bold', [1, 22], 'modifier');
  define('dim', [2, 22], 'modifier');
  define('italic', [3, 23], 'modifier');
  define('underline', [4, 24], 'modifier');
  define('inverse', [7, 27], 'modifier');
  define('hidden', [8, 28], 'modifier');
  define('strikethrough', [9, 29], 'modifier');
  define('black', [30, 39], 'color');
  define('red', [31, 39], 'color');
  define('green', [32, 39], 'color');
  define('yellow', [33, 39], 'color');
  define('blue', [34, 39], 'color');
  define('magenta', [35, 39], 'color');
  define('cyan', [36, 39], 'color');
  define('white', [37, 39], 'color');
  define('gray', [90, 39], 'color');
  define('grey', [90, 39], 'color');
  define('bgBlack', [40, 49], 'bg');
  define('bgRed', [41, 49], 'bg');
  define('bgGreen', [42, 49], 'bg');
  define('bgYellow', [43, 49], 'bg');
  define('bgBlue', [44, 49], 'bg');
  define('bgMagenta', [45, 49], 'bg');
  define('bgCyan', [46, 49], 'bg');
  define('bgWhite', [47, 49], 'bg');
  define('blackBright', [90, 39], 'bright');
  define('redBright', [91, 39], 'bright');
  define('greenBright', [92, 39], 'bright');
  define('yellowBright', [93, 39], 'bright');
  define('blueBright', [94, 39], 'bright');
  define('magentaBright', [95, 39], 'bright');
  define('cyanBright', [96, 39], 'bright');
  define('whiteBright', [97, 39], 'bright');
  define('bgBlackBright', [100, 49], 'bgBright');
  define('bgRedBright', [101, 49], 'bgBright');
  define('bgGreenBright', [102, 49], 'bgBright');
  define('bgYellowBright', [103, 49], 'bgBright');
  define('bgBlueBright', [104, 49], 'bgBright');
  define('bgMagentaBright', [105, 49], 'bgBright');
  define('bgCyanBright', [106, 49], 'bgBright');
  define('bgWhiteBright', [107, 49], 'bgBright');
  colors.ansiRegex = ANSI_REGEX;
  colors.hasColor = colors.hasAnsi = str => {
    colors.ansiRegex.lastIndex = 0;
    return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str);
  };
  colors.alias = (name, color) => {
    let fn = typeof color === 'string' ? colors[color] : color;
    if (typeof fn !== 'function') {
      throw new TypeError('Expected alias to be the name of an existing color (string) or a function');
    }
    if (!fn.stack) {
      Reflect.defineProperty(fn, 'name', {
        value: name
      });
      colors.styles[name] = fn;
      fn.stack = [name];
    }
    Reflect.defineProperty(colors, name, {
      configurable: true,
      enumerable: true,
      set(value) {
        colors.alias(name, value);
      },
      get() {
        let color = input => style(input, color.stack);
        Reflect.setPrototypeOf(color, colors);
        color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack;
        return color;
      }
    });
  };
  colors.theme = custom => {
    if (!isObject(custom)) throw new TypeError('Expected theme to be an object');
    for (let name of Object.keys(custom)) {
      colors.alias(name, custom[name]);
    }
    return colors;
  };
  colors.alias('unstyle', str => {
    if (typeof str === 'string' && str !== '') {
      colors.ansiRegex.lastIndex = 0;
      return str.replace(colors.ansiRegex, '');
    }
    return '';
  });
  colors.alias('noop', str => str);
  colors.none = colors.clear = colors.noop;
  colors.stripColor = colors.unstyle;
  colors.symbols = __webpack_require__(/*! ./symbols */ 7603);
  colors.define = define;
  return colors;
};
module.exports = create();
module.exports.create = create;

/***/ },

/***/ 613
/*!*****************************************!*\
  !*** ../node_modules/isobject/index.js ***!
  \*****************************************/
(module) {

"use strict";
/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



module.exports = function isObject(val) {
  return val != null && typeof val === 'object' && Array.isArray(val) === false;
};

/***/ },

/***/ 658
/*!***********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
  \***********************************************************************/
(module) {

"use strict";


/* istanbul ignore next  */
function insertStyleElement(options) {
  var element = document.createElement("style");
  options.setAttributes(element, options.attributes);
  options.insert(element, options.options);
  return element;
}
module.exports = insertStyleElement;

/***/ },

/***/ 681
/*!***********************************************!*\
  !*** ../app/node_modules/is-weakmap/index.js ***!
  \***********************************************/
(module) {

"use strict";


var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;
var exported;
if (!$WeakMap) {
  /** @type {import('.')} */
  // eslint-disable-next-line no-unused-vars
  exported = function isWeakMap(x) {
    // `WeakMap` is not present in this environment.
    return false;
  };
}
var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$mapHas) {
  /** @type {import('.')} */
  // eslint-disable-next-line no-unused-vars
  exported = function isWeakMap(x) {
    // `WeakMap` does not have a `has` method
    return false;
  };
}

/** @type {import('.')} */
module.exports = exported || function isWeakMap(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $mapHas.call(x, $mapHas);
    if ($setHas) {
      try {
        $setHas.call(x, $setHas);
      } catch (e) {
        return true;
      }
    }
    // @ts-expect-error TS can't figure out that $WeakMap is always truthy here
    return x instanceof $WeakMap; // core-js workaround, pre-v3
  } catch (e) {}
  return false;
};

/***/ },

/***/ 701
/*!*****************************************!*\
  !*** ./node_modules/zmodem.js/index.js ***!
  \*****************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


Object.assign(module.exports, __webpack_require__(/*! ./src/zsentry */ 3769));

/***/ },

/***/ 711
/*!*******************************************************************!*\
  !*** ../app/node_modules/call-bind-apply-helpers/functionCall.js ***!
  \*******************************************************************/
(module) {

"use strict";


/** @type {import('./functionCall')} */
module.exports = Function.prototype.call;

/***/ },

/***/ 743
/*!**************************************************!*\
  !*** ../app/node_modules/math-intrinsics/min.js ***!
  \**************************************************/
(module) {

"use strict";


/** @type {import('./min')} */
module.exports = Math.min;

/***/ },

/***/ 799
/*!*********************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorPicker.component.scss?ngResource ***!
  \*********************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{display:inline-block}div{width:32px;height:32px;box-shadow:0 1px 1px rgba(0,0,0,.5);border:none;margin:5px 10px 5px 0;border-radius:2px;text-align:center;font-weight:bold;font-size:17px;display:inline-block;color:#fff;line-height:31px;text-shadow:0 1px 1px rgba(0,0,0,.5)}", "",{"version":3,"sources":["webpack://./src/components/colorPicker.component.scss"],"names":[],"mappings":"AAAA,MACI,oBAAA,CAGJ,IACI,UAAA,CACA,WAAA,CACA,mCAAA,CACA,WAAA,CACA,qBAAA,CACA,iBAAA,CACA,iBAAA,CACA,gBAAA,CACA,cAAA,CACA,oBAAA,CACA,UAAA,CACA,gBAAA,CACA,oCAAA","sourcesContent":[":host {\n    display: inline-block;\n}\n\ndiv {\n    width: 32px;\n    height: 32px;\n    box-shadow: 0 1px 1px rgba(0,0,0,.5);\n    border: none;\n    margin: 5px 10px 5px 0;\n    border-radius: 2px;\n    text-align: center;\n    font-weight: bold;\n    font-size: 17px;\n    display: inline-block;\n    color: #fff;\n    line-height: 31px;\n    text-shadow: 0 1px 1px rgba(0,0,0,.5);\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 803
/*!*****************************************************!*\
  !*** ./node_modules/hexer/chunked_hex_transform.js ***!
  \*****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var util = __webpack_require__(/*! util */ 9023);
var HexTransform = __webpack_require__(/*! ./hex_transform */ 7840);
function ChunkedHexTransform(options) {
  if (!(this instanceof ChunkedHexTransform)) {
    return new ChunkedHexTransform(options);
  }
  // istanbul ignore next
  if (!options) options = {};
  HexTransform.call(this, options);
  var self = this;
  if (typeof options.header === 'function') {
    self.header = options.header;
  } else if (typeof options.header === 'object') {
    self.header = simpleHeader(options.header);
  } else if (typeof options.header === 'string') {
    self.header = simpleHeader({
      label: options.header
    });
  } else {
    self.header = simpleHeader();
  }
  self.chunkNum = 0;
}
util.inherits(ChunkedHexTransform, HexTransform);
ChunkedHexTransform.prototype._transform = function transform(chunk, encoding, done) {
  var self = this;
  // istanbul ignore next
  if (self.totalOffset) {
    self.reset();
  }
  ++self.chunkNum;
  var header = self.header(self.chunkNum, chunk);
  if (header.length) {
    self.push(header);
  }
  HexTransform.prototype._transform.call(self, chunk, encoding, function subDone(err) {
    self.reset();
    done(err);
  });
};
function simpleHeader(opts) {
  opts = opts || {};
  var fmt = '-- ';
  if (opts.label) fmt += opts.label + ' ';
  fmt += 'chunk[%s] length: %s (0x%s)\n';
  return function header(chunkNum, chunk) {
    var len = chunk.length;
    var hexlen = len.toString(16);
    return util.format(fmt, chunkNum, len, hexlen);
  };
}
module.exports = ChunkedHexTransform;

/***/ },

/***/ 830
/*!********************************!*\
  !*** ./src/icons/arrow-up.svg ***!
  \********************************/
(module) {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"arrow-up\" class=\"svg-inline--fa fa-arrow-up\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path fill=\"currentColor\" d=\"M379.8 225.7C376.7 229.3 372.3 231.1 368 231.1c-3.844 0-7.703-1.426-10.77-4.31L208 86.12v377.3c0 9.171-7.156 16.59-15.1 16.59S176 472.6 176 463.4V86.12l-149.2 140.7C20.25 232.1 10.14 232.5 4.156 225.7C-1.781 218.9-1.297 208.4 5.234 202.2l176-165.9c6.094-5.768 15.44-5.768 21.53 0l176 165.9C385.3 208.4 385.8 218.9 379.8 225.7z\"></path></svg>"

/***/ },

/***/ 860
/*!********************************!*\
  !*** external "@angular/core" ***!
  \********************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__860__;

/***/ },

/***/ 882
/*!*********************************************************************!*\
  !*** ./src/components/colorSchemeSelector.component.pug?ngResource ***!
  \*********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemeSelector.component.pug?ngResource */ 6925);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 893
/*!************************************************************!*\
  !*** ./node_modules/@xterm/addon-webgl/lib/addon-webgl.js ***!
  \************************************************************/
(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, () => (() => {
  "use strict";

  var e = {
      965: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.GlyphRenderer = void 0;
        const s = i(374),
          r = i(509),
          o = i(855),
          n = i(859),
          a = i(381),
          h = 11,
          l = h * Float32Array.BYTES_PER_ELEMENT;
        let c,
          d = 0,
          _ = 0,
          u = 0;
        class g extends n.Disposable {
          constructor(e, t, i) {
            super(), this._terminal = e, this._gl = t, this._dimensions = i, this._activeBuffer = 0, this._vertices = {
              count: 0,
              attributes: new Float32Array(0),
              attributesBuffers: [new Float32Array(0), new Float32Array(0)]
            };
            const o = this._gl;
            void 0 === r.TextureAtlas.maxAtlasPages && (r.TextureAtlas.maxAtlasPages = Math.min(32, (0, s.throwIfFalsy)(o.getParameter(o.MAX_TEXTURE_IMAGE_UNITS))), r.TextureAtlas.maxTextureSize = (0, s.throwIfFalsy)(o.getParameter(o.MAX_TEXTURE_SIZE))), this._program = (0, s.throwIfFalsy)((0, a.createProgram)(o, "#version 300 es\nlayout (location = 0) in vec2 a_unitquad;\nlayout (location = 1) in vec2 a_cellpos;\nlayout (location = 2) in vec2 a_offset;\nlayout (location = 3) in vec2 a_size;\nlayout (location = 4) in float a_texpage;\nlayout (location = 5) in vec2 a_texcoord;\nlayout (location = 6) in vec2 a_texsize;\n\nuniform mat4 u_projection;\nuniform vec2 u_resolution;\n\nout vec2 v_texcoord;\nflat out int v_texpage;\n\nvoid main() {\n  vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);\n  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n  v_texpage = int(a_texpage);\n  v_texcoord = a_texcoord + a_unitquad * a_texsize;\n}", function (e) {
              let t = "";
              for (let i = 1; i < e; i++) t += ` else if (v_texpage == ${i}) { outColor = texture(u_texture[${i}], v_texcoord); }`;
              return `#version 300 es\nprecision lowp float;\n\nin vec2 v_texcoord;\nflat in int v_texpage;\n\nuniform sampler2D u_texture[${e}];\n\nout vec4 outColor;\n\nvoid main() {\n  if (v_texpage == 0) {\n    outColor = texture(u_texture[0], v_texcoord);\n  } ${t}\n}`;
            }(r.TextureAtlas.maxAtlasPages))), this.register((0, n.toDisposable)(() => o.deleteProgram(this._program))), this._projectionLocation = (0, s.throwIfFalsy)(o.getUniformLocation(this._program, "u_projection")), this._resolutionLocation = (0, s.throwIfFalsy)(o.getUniformLocation(this._program, "u_resolution")), this._textureLocation = (0, s.throwIfFalsy)(o.getUniformLocation(this._program, "u_texture")), this._vertexArrayObject = o.createVertexArray(), o.bindVertexArray(this._vertexArrayObject);
            const h = new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]),
              c = o.createBuffer();
            this.register((0, n.toDisposable)(() => o.deleteBuffer(c))), o.bindBuffer(o.ARRAY_BUFFER, c), o.bufferData(o.ARRAY_BUFFER, h, o.STATIC_DRAW), o.enableVertexAttribArray(0), o.vertexAttribPointer(0, 2, this._gl.FLOAT, !1, 0, 0);
            const d = new Uint8Array([0, 1, 2, 3]),
              _ = o.createBuffer();
            this.register((0, n.toDisposable)(() => o.deleteBuffer(_))), o.bindBuffer(o.ELEMENT_ARRAY_BUFFER, _), o.bufferData(o.ELEMENT_ARRAY_BUFFER, d, o.STATIC_DRAW), this._attributesBuffer = (0, s.throwIfFalsy)(o.createBuffer()), this.register((0, n.toDisposable)(() => o.deleteBuffer(this._attributesBuffer))), o.bindBuffer(o.ARRAY_BUFFER, this._attributesBuffer), o.enableVertexAttribArray(2), o.vertexAttribPointer(2, 2, o.FLOAT, !1, l, 0), o.vertexAttribDivisor(2, 1), o.enableVertexAttribArray(3), o.vertexAttribPointer(3, 2, o.FLOAT, !1, l, 2 * Float32Array.BYTES_PER_ELEMENT), o.vertexAttribDivisor(3, 1), o.enableVertexAttribArray(4), o.vertexAttribPointer(4, 1, o.FLOAT, !1, l, 4 * Float32Array.BYTES_PER_ELEMENT), o.vertexAttribDivisor(4, 1), o.enableVertexAttribArray(5), o.vertexAttribPointer(5, 2, o.FLOAT, !1, l, 5 * Float32Array.BYTES_PER_ELEMENT), o.vertexAttribDivisor(5, 1), o.enableVertexAttribArray(6), o.vertexAttribPointer(6, 2, o.FLOAT, !1, l, 7 * Float32Array.BYTES_PER_ELEMENT), o.vertexAttribDivisor(6, 1), o.enableVertexAttribArray(1), o.vertexAttribPointer(1, 2, o.FLOAT, !1, l, 9 * Float32Array.BYTES_PER_ELEMENT), o.vertexAttribDivisor(1, 1), o.useProgram(this._program);
            const u = new Int32Array(r.TextureAtlas.maxAtlasPages);
            for (let e = 0; e < r.TextureAtlas.maxAtlasPages; e++) u[e] = e;
            o.uniform1iv(this._textureLocation, u), o.uniformMatrix4fv(this._projectionLocation, !1, a.PROJECTION_MATRIX), this._atlasTextures = [];
            for (let e = 0; e < r.TextureAtlas.maxAtlasPages; e++) {
              const t = new a.GLTexture((0, s.throwIfFalsy)(o.createTexture()));
              this.register((0, n.toDisposable)(() => o.deleteTexture(t.texture))), o.activeTexture(o.TEXTURE0 + e), o.bindTexture(o.TEXTURE_2D, t.texture), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_WRAP_S, o.CLAMP_TO_EDGE), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_WRAP_T, o.CLAMP_TO_EDGE), o.texImage2D(o.TEXTURE_2D, 0, o.RGBA, 1, 1, 0, o.RGBA, o.UNSIGNED_BYTE, new Uint8Array([255, 0, 0, 255])), this._atlasTextures[e] = t;
            }
            o.enable(o.BLEND), o.blendFunc(o.SRC_ALPHA, o.ONE_MINUS_SRC_ALPHA), this.handleResize();
          }
          beginFrame() {
            return !this._atlas || this._atlas.beginFrame();
          }
          updateCell(e, t, i, s, r, o, n, a) {
            this._updateCell(this._vertices.attributes, e, t, i, s, r, o, n, a);
          }
          _updateCell(e, t, i, s, r, n, a, l, g) {
            d = (i * this._terminal.cols + t) * h, s !== o.NULL_CELL_CODE && void 0 !== s ? this._atlas && (c = l && l.length > 1 ? this._atlas.getRasterizedGlyphCombinedChar(l, r, n, a, !1) : this._atlas.getRasterizedGlyph(s, r, n, a, !1), _ = Math.floor((this._dimensions.device.cell.width - this._dimensions.device.char.width) / 2), r !== g && c.offset.x > _ ? (u = c.offset.x - _, e[d] = -(c.offset.x - u) + this._dimensions.device.char.left, e[d + 1] = -c.offset.y + this._dimensions.device.char.top, e[d + 2] = (c.size.x - u) / this._dimensions.device.canvas.width, e[d + 3] = c.size.y / this._dimensions.device.canvas.height, e[d + 4] = c.texturePage, e[d + 5] = c.texturePositionClipSpace.x + u / this._atlas.pages[c.texturePage].canvas.width, e[d + 6] = c.texturePositionClipSpace.y, e[d + 7] = c.sizeClipSpace.x - u / this._atlas.pages[c.texturePage].canvas.width, e[d + 8] = c.sizeClipSpace.y) : (e[d] = -c.offset.x + this._dimensions.device.char.left, e[d + 1] = -c.offset.y + this._dimensions.device.char.top, e[d + 2] = c.size.x / this._dimensions.device.canvas.width, e[d + 3] = c.size.y / this._dimensions.device.canvas.height, e[d + 4] = c.texturePage, e[d + 5] = c.texturePositionClipSpace.x, e[d + 6] = c.texturePositionClipSpace.y, e[d + 7] = c.sizeClipSpace.x, e[d + 8] = c.sizeClipSpace.y)) : e.fill(0, d, d + h - 1 - 2);
          }
          clear() {
            const e = this._terminal,
              t = e.cols * e.rows * h;
            this._vertices.count !== t ? this._vertices.attributes = new Float32Array(t) : this._vertices.attributes.fill(0);
            let i = 0;
            for (; i < this._vertices.attributesBuffers.length; i++) this._vertices.count !== t ? this._vertices.attributesBuffers[i] = new Float32Array(t) : this._vertices.attributesBuffers[i].fill(0);
            this._vertices.count = t, i = 0;
            for (let t = 0; t < e.rows; t++) for (let s = 0; s < e.cols; s++) this._vertices.attributes[i + 9] = s / e.cols, this._vertices.attributes[i + 10] = t / e.rows, i += h;
          }
          handleResize() {
            const e = this._gl;
            e.useProgram(this._program), e.viewport(0, 0, e.canvas.width, e.canvas.height), e.uniform2f(this._resolutionLocation, e.canvas.width, e.canvas.height), this.clear();
          }
          render(e) {
            if (!this._atlas) return;
            const t = this._gl;
            t.useProgram(this._program), t.bindVertexArray(this._vertexArrayObject), this._activeBuffer = (this._activeBuffer + 1) % 2;
            const i = this._vertices.attributesBuffers[this._activeBuffer];
            let s = 0;
            for (let t = 0; t < e.lineLengths.length; t++) {
              const r = t * this._terminal.cols * h,
                o = this._vertices.attributes.subarray(r, r + e.lineLengths[t] * h);
              i.set(o, s), s += o.length;
            }
            t.bindBuffer(t.ARRAY_BUFFER, this._attributesBuffer), t.bufferData(t.ARRAY_BUFFER, i.subarray(0, s), t.STREAM_DRAW);
            for (let e = 0; e < this._atlas.pages.length; e++) this._atlas.pages[e].version !== this._atlasTextures[e].version && this._bindAtlasPageTexture(t, this._atlas, e);
            t.drawElementsInstanced(t.TRIANGLE_STRIP, 4, t.UNSIGNED_BYTE, 0, s / h);
          }
          setAtlas(e) {
            this._atlas = e;
            for (const e of this._atlasTextures) e.version = -1;
          }
          _bindAtlasPageTexture(e, t, i) {
            e.activeTexture(e.TEXTURE0 + i), e.bindTexture(e.TEXTURE_2D, this._atlasTextures[i].texture), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t.pages[i].canvas), e.generateMipmap(e.TEXTURE_2D), this._atlasTextures[i].version = t.pages[i].version;
          }
          setDimensions(e) {
            this._dimensions = e;
          }
        }
        t.GlyphRenderer = g;
      },
      742: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.RectangleRenderer = void 0;
        const s = i(374),
          r = i(859),
          o = i(310),
          n = i(381),
          a = 8 * Float32Array.BYTES_PER_ELEMENT;
        class h {
          constructor() {
            this.attributes = new Float32Array(160), this.count = 0;
          }
        }
        let l = 0,
          c = 0,
          d = 0,
          _ = 0,
          u = 0,
          g = 0,
          v = 0;
        class f extends r.Disposable {
          constructor(e, t, i, o) {
            super(), this._terminal = e, this._gl = t, this._dimensions = i, this._themeService = o, this._vertices = new h(), this._verticesCursor = new h();
            const l = this._gl;
            this._program = (0, s.throwIfFalsy)((0, n.createProgram)(l, "#version 300 es\nlayout (location = 0) in vec2 a_position;\nlayout (location = 1) in vec2 a_size;\nlayout (location = 2) in vec4 a_color;\nlayout (location = 3) in vec2 a_unitquad;\n\nuniform mat4 u_projection;\n\nout vec4 v_color;\n\nvoid main() {\n  vec2 zeroToOne = a_position + (a_unitquad * a_size);\n  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n  v_color = a_color;\n}", "#version 300 es\nprecision lowp float;\n\nin vec4 v_color;\n\nout vec4 outColor;\n\nvoid main() {\n  outColor = v_color;\n}")), this.register((0, r.toDisposable)(() => l.deleteProgram(this._program))), this._projectionLocation = (0, s.throwIfFalsy)(l.getUniformLocation(this._program, "u_projection")), this._vertexArrayObject = l.createVertexArray(), l.bindVertexArray(this._vertexArrayObject);
            const c = new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]),
              d = l.createBuffer();
            this.register((0, r.toDisposable)(() => l.deleteBuffer(d))), l.bindBuffer(l.ARRAY_BUFFER, d), l.bufferData(l.ARRAY_BUFFER, c, l.STATIC_DRAW), l.enableVertexAttribArray(3), l.vertexAttribPointer(3, 2, this._gl.FLOAT, !1, 0, 0);
            const _ = new Uint8Array([0, 1, 2, 3]),
              u = l.createBuffer();
            this.register((0, r.toDisposable)(() => l.deleteBuffer(u))), l.bindBuffer(l.ELEMENT_ARRAY_BUFFER, u), l.bufferData(l.ELEMENT_ARRAY_BUFFER, _, l.STATIC_DRAW), this._attributesBuffer = (0, s.throwIfFalsy)(l.createBuffer()), this.register((0, r.toDisposable)(() => l.deleteBuffer(this._attributesBuffer))), l.bindBuffer(l.ARRAY_BUFFER, this._attributesBuffer), l.enableVertexAttribArray(0), l.vertexAttribPointer(0, 2, l.FLOAT, !1, a, 0), l.vertexAttribDivisor(0, 1), l.enableVertexAttribArray(1), l.vertexAttribPointer(1, 2, l.FLOAT, !1, a, 2 * Float32Array.BYTES_PER_ELEMENT), l.vertexAttribDivisor(1, 1), l.enableVertexAttribArray(2), l.vertexAttribPointer(2, 4, l.FLOAT, !1, a, 4 * Float32Array.BYTES_PER_ELEMENT), l.vertexAttribDivisor(2, 1), this._updateCachedColors(o.colors), this.register(this._themeService.onChangeColors(e => {
              this._updateCachedColors(e), this._updateViewportRectangle();
            }));
          }
          renderBackgrounds() {
            this._renderVertices(this._vertices);
          }
          renderCursor() {
            this._renderVertices(this._verticesCursor);
          }
          _renderVertices(e) {
            const t = this._gl;
            t.useProgram(this._program), t.bindVertexArray(this._vertexArrayObject), t.uniformMatrix4fv(this._projectionLocation, !1, n.PROJECTION_MATRIX), t.bindBuffer(t.ARRAY_BUFFER, this._attributesBuffer), t.bufferData(t.ARRAY_BUFFER, e.attributes, t.DYNAMIC_DRAW), t.drawElementsInstanced(this._gl.TRIANGLE_STRIP, 4, t.UNSIGNED_BYTE, 0, e.count);
          }
          handleResize() {
            this._updateViewportRectangle();
          }
          setDimensions(e) {
            this._dimensions = e;
          }
          _updateCachedColors(e) {
            this._bgFloat = this._colorToFloat32Array(e.background), this._cursorFloat = this._colorToFloat32Array(e.cursor);
          }
          _updateViewportRectangle() {
            this._addRectangleFloat(this._vertices.attributes, 0, 0, 0, this._terminal.cols * this._dimensions.device.cell.width, this._terminal.rows * this._dimensions.device.cell.height, this._bgFloat);
          }
          updateBackgrounds(e) {
            const t = this._terminal,
              i = this._vertices;
            let s,
              r,
              n,
              a,
              h,
              l,
              c,
              d,
              _,
              u,
              g,
              v = 1;
            for (s = 0; s < t.rows; s++) {
              for (n = -1, a = 0, h = 0, l = !1, r = 0; r < t.cols; r++) c = (s * t.cols + r) * o.RENDER_MODEL_INDICIES_PER_CELL, d = e.cells[c + o.RENDER_MODEL_BG_OFFSET], _ = e.cells[c + o.RENDER_MODEL_FG_OFFSET], u = !!(67108864 & _), (d !== a || _ !== h && (l || u)) && ((0 !== a || l && 0 !== h) && (g = 8 * v++, this._updateRectangle(i, g, h, a, n, r, s)), n = r, a = d, h = _, l = u);
              (0 !== a || l && 0 !== h) && (g = 8 * v++, this._updateRectangle(i, g, h, a, n, t.cols, s));
            }
            i.count = v;
          }
          updateCursor(e) {
            const t = this._verticesCursor,
              i = e.cursor;
            if (!i || "block" === i.style) return void (t.count = 0);
            let s,
              r = 0;
            "bar" !== i.style && "outline" !== i.style || (s = 8 * r++, this._addRectangleFloat(t.attributes, s, i.x * this._dimensions.device.cell.width, i.y * this._dimensions.device.cell.height, "bar" === i.style ? i.dpr * i.cursorWidth : i.dpr, this._dimensions.device.cell.height, this._cursorFloat)), "underline" !== i.style && "outline" !== i.style || (s = 8 * r++, this._addRectangleFloat(t.attributes, s, i.x * this._dimensions.device.cell.width, (i.y + 1) * this._dimensions.device.cell.height - i.dpr, i.width * this._dimensions.device.cell.width, i.dpr, this._cursorFloat)), "outline" === i.style && (s = 8 * r++, this._addRectangleFloat(t.attributes, s, i.x * this._dimensions.device.cell.width, i.y * this._dimensions.device.cell.height, i.width * this._dimensions.device.cell.width, i.dpr, this._cursorFloat), s = 8 * r++, this._addRectangleFloat(t.attributes, s, (i.x + i.width) * this._dimensions.device.cell.width - i.dpr, i.y * this._dimensions.device.cell.height, i.dpr, this._dimensions.device.cell.height, this._cursorFloat)), t.count = r;
          }
          _updateRectangle(e, t, i, s, r, o, a) {
            if (67108864 & i) switch (50331648 & i) {
              case 16777216:
              case 33554432:
                l = this._themeService.colors.ansi[255 & i].rgba;
                break;
              case 50331648:
                l = (16777215 & i) << 8;
                break;
              default:
                l = this._themeService.colors.foreground.rgba;
            } else switch (50331648 & s) {
              case 16777216:
              case 33554432:
                l = this._themeService.colors.ansi[255 & s].rgba;
                break;
              case 50331648:
                l = (16777215 & s) << 8;
                break;
              default:
                l = this._themeService.colors.background.rgba;
            }
            e.attributes.length < t + 4 && (e.attributes = (0, n.expandFloat32Array)(e.attributes, this._terminal.rows * this._terminal.cols * 8)), c = r * this._dimensions.device.cell.width, d = a * this._dimensions.device.cell.height, _ = (l >> 24 & 255) / 255, u = (l >> 16 & 255) / 255, g = (l >> 8 & 255) / 255, v = 1, this._addRectangle(e.attributes, t, c, d, (o - r) * this._dimensions.device.cell.width, this._dimensions.device.cell.height, _, u, g, v);
          }
          _addRectangle(e, t, i, s, r, o, n, a, h, l) {
            e[t] = i / this._dimensions.device.canvas.width, e[t + 1] = s / this._dimensions.device.canvas.height, e[t + 2] = r / this._dimensions.device.canvas.width, e[t + 3] = o / this._dimensions.device.canvas.height, e[t + 4] = n, e[t + 5] = a, e[t + 6] = h, e[t + 7] = l;
          }
          _addRectangleFloat(e, t, i, s, r, o, n) {
            e[t] = i / this._dimensions.device.canvas.width, e[t + 1] = s / this._dimensions.device.canvas.height, e[t + 2] = r / this._dimensions.device.canvas.width, e[t + 3] = o / this._dimensions.device.canvas.height, e[t + 4] = n[0], e[t + 5] = n[1], e[t + 6] = n[2], e[t + 7] = n[3];
          }
          _colorToFloat32Array(e) {
            return new Float32Array([(e.rgba >> 24 & 255) / 255, (e.rgba >> 16 & 255) / 255, (e.rgba >> 8 & 255) / 255, (255 & e.rgba) / 255]);
          }
        }
        t.RectangleRenderer = f;
      },
      310: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.RenderModel = t.COMBINED_CHAR_BIT_MASK = t.RENDER_MODEL_EXT_OFFSET = t.RENDER_MODEL_FG_OFFSET = t.RENDER_MODEL_BG_OFFSET = t.RENDER_MODEL_INDICIES_PER_CELL = void 0;
        const s = i(296);
        t.RENDER_MODEL_INDICIES_PER_CELL = 4, t.RENDER_MODEL_BG_OFFSET = 1, t.RENDER_MODEL_FG_OFFSET = 2, t.RENDER_MODEL_EXT_OFFSET = 3, t.COMBINED_CHAR_BIT_MASK = 2147483648, t.RenderModel = class {
          constructor() {
            this.cells = new Uint32Array(0), this.lineLengths = new Uint32Array(0), this.selection = (0, s.createSelectionRenderModel)();
          }
          resize(e, i) {
            const s = e * i * t.RENDER_MODEL_INDICIES_PER_CELL;
            s !== this.cells.length && (this.cells = new Uint32Array(s), this.lineLengths = new Uint32Array(i));
          }
          clear() {
            this.cells.fill(0, 0), this.lineLengths.fill(0, 0);
          }
        };
      },
      666: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.JoinedCellData = t.WebglRenderer = void 0;
        const s = i(820),
          r = i(274),
          o = i(627),
          n = i(457),
          a = i(56),
          h = i(374),
          l = i(345),
          c = i(859),
          d = i(147),
          _ = i(782),
          u = i(855),
          g = i(965),
          v = i(742),
          f = i(310),
          p = i(733);
        class C extends c.Disposable {
          constructor(e, t, i, n, d, u, g, v, C) {
            super(), this._terminal = e, this._characterJoinerService = t, this._charSizeService = i, this._coreBrowserService = n, this._coreService = d, this._decorationService = u, this._optionsService = g, this._themeService = v, this._cursorBlinkStateManager = new c.MutableDisposable(), this._charAtlasDisposable = this.register(new c.MutableDisposable()), this._observerDisposable = this.register(new c.MutableDisposable()), this._model = new f.RenderModel(), this._workCell = new _.CellData(), this._rectangleRenderer = this.register(new c.MutableDisposable()), this._glyphRenderer = this.register(new c.MutableDisposable()), this._onChangeTextureAtlas = this.register(new l.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new l.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = this.register(new l.EventEmitter()), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._onRequestRedraw = this.register(new l.EventEmitter()), this.onRequestRedraw = this._onRequestRedraw.event, this._onContextLoss = this.register(new l.EventEmitter()), this.onContextLoss = this._onContextLoss.event, this.register(this._themeService.onChangeColors(() => this._handleColorChange())), this._cellColorResolver = new r.CellColorResolver(this._terminal, this._optionsService, this._model.selection, this._decorationService, this._coreBrowserService, this._themeService), this._core = this._terminal._core, this._renderLayers = [new p.LinkRenderLayer(this._core.screenElement, 2, this._terminal, this._core.linkifier, this._coreBrowserService, g, this._themeService)], this.dimensions = (0, h.createRenderDimensions)(), this._devicePixelRatio = this._coreBrowserService.dpr, this._updateDimensions(), this._updateCursorBlink(), this.register(g.onOptionChange(() => this._handleOptionsChanged())), this._canvas = this._coreBrowserService.mainDocument.createElement("canvas");
            const m = {
              antialias: !1,
              depth: !1,
              preserveDrawingBuffer: C
            };
            if (this._gl = this._canvas.getContext("webgl2", m), !this._gl) throw new Error("WebGL2 not supported " + this._gl);
            this.register((0, s.addDisposableDomListener)(this._canvas, "webglcontextlost", e => {
              console.log("webglcontextlost event received"), e.preventDefault(), this._contextRestorationTimeout = setTimeout(() => {
                this._contextRestorationTimeout = void 0, console.warn("webgl context not restored; firing onContextLoss"), this._onContextLoss.fire(e);
              }, 3e3);
            })), this.register((0, s.addDisposableDomListener)(this._canvas, "webglcontextrestored", e => {
              console.warn("webglcontextrestored event received"), clearTimeout(this._contextRestorationTimeout), this._contextRestorationTimeout = void 0, (0, o.removeTerminalFromCache)(this._terminal), this._initializeWebGLState(), this._requestRedrawViewport();
            })), this._observerDisposable.value = (0, a.observeDevicePixelDimensions)(this._canvas, this._coreBrowserService.window, (e, t) => this._setCanvasDevicePixelDimensions(e, t)), this.register(this._coreBrowserService.onWindowChange(e => {
              this._observerDisposable.value = (0, a.observeDevicePixelDimensions)(this._canvas, e, (e, t) => this._setCanvasDevicePixelDimensions(e, t));
            })), this._core.screenElement.appendChild(this._canvas), [this._rectangleRenderer.value, this._glyphRenderer.value] = this._initializeWebGLState(), this._isAttached = this._coreBrowserService.window.document.body.contains(this._core.screenElement), this.register((0, c.toDisposable)(() => {
              for (const e of this._renderLayers) e.dispose();
              this._canvas.parentElement?.removeChild(this._canvas), (0, o.removeTerminalFromCache)(this._terminal);
            }));
          }
          get textureAtlas() {
            return this._charAtlas?.pages[0].canvas;
          }
          _handleColorChange() {
            this._refreshCharAtlas(), this._clearModel(!0);
          }
          handleDevicePixelRatioChange() {
            this._devicePixelRatio !== this._coreBrowserService.dpr && (this._devicePixelRatio = this._coreBrowserService.dpr, this.handleResize(this._terminal.cols, this._terminal.rows));
          }
          handleResize(e, t) {
            this._updateDimensions(), this._model.resize(this._terminal.cols, this._terminal.rows);
            for (const e of this._renderLayers) e.resize(this._terminal, this.dimensions);
            this._canvas.width = this.dimensions.device.canvas.width, this._canvas.height = this.dimensions.device.canvas.height, this._canvas.style.width = `${this.dimensions.css.canvas.width}px`, this._canvas.style.height = `${this.dimensions.css.canvas.height}px`, this._core.screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._core.screenElement.style.height = `${this.dimensions.css.canvas.height}px`, this._rectangleRenderer.value?.setDimensions(this.dimensions), this._rectangleRenderer.value?.handleResize(), this._glyphRenderer.value?.setDimensions(this.dimensions), this._glyphRenderer.value?.handleResize(), this._refreshCharAtlas(), this._clearModel(!1);
          }
          handleCharSizeChanged() {
            this.handleResize(this._terminal.cols, this._terminal.rows);
          }
          handleBlur() {
            for (const e of this._renderLayers) e.handleBlur(this._terminal);
            this._cursorBlinkStateManager.value?.pause(), this._requestRedrawViewport();
          }
          handleFocus() {
            for (const e of this._renderLayers) e.handleFocus(this._terminal);
            this._cursorBlinkStateManager.value?.resume(), this._requestRedrawViewport();
          }
          handleSelectionChanged(e, t, i) {
            for (const s of this._renderLayers) s.handleSelectionChanged(this._terminal, e, t, i);
            this._model.selection.update(this._core, e, t, i), this._requestRedrawViewport();
          }
          handleCursorMove() {
            for (const e of this._renderLayers) e.handleCursorMove(this._terminal);
            this._cursorBlinkStateManager.value?.restartBlinkAnimation();
          }
          _handleOptionsChanged() {
            this._updateDimensions(), this._refreshCharAtlas(), this._updateCursorBlink();
          }
          _initializeWebGLState() {
            return this._rectangleRenderer.value = new v.RectangleRenderer(this._terminal, this._gl, this.dimensions, this._themeService), this._glyphRenderer.value = new g.GlyphRenderer(this._terminal, this._gl, this.dimensions), this.handleCharSizeChanged(), [this._rectangleRenderer.value, this._glyphRenderer.value];
          }
          _refreshCharAtlas() {
            if (this.dimensions.device.char.width <= 0 && this.dimensions.device.char.height <= 0) return void (this._isAttached = !1);
            const e = (0, o.acquireTextureAtlas)(this._terminal, this._optionsService.rawOptions, this._themeService.colors, this.dimensions.device.cell.width, this.dimensions.device.cell.height, this.dimensions.device.char.width, this.dimensions.device.char.height, this._coreBrowserService.dpr);
            this._charAtlas !== e && (this._onChangeTextureAtlas.fire(e.pages[0].canvas), this._charAtlasDisposable.value = (0, c.getDisposeArrayDisposable)([(0, l.forwardEvent)(e.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas), (0, l.forwardEvent)(e.onRemoveTextureAtlasCanvas, this._onRemoveTextureAtlasCanvas)])), this._charAtlas = e, this._charAtlas.warmUp(), this._glyphRenderer.value?.setAtlas(this._charAtlas);
          }
          _clearModel(e) {
            this._model.clear(), e && this._glyphRenderer.value?.clear();
          }
          clearTextureAtlas() {
            this._charAtlas?.clearTexture(), this._clearModel(!0), this._requestRedrawViewport();
          }
          clear() {
            this._clearModel(!0);
            for (const e of this._renderLayers) e.reset(this._terminal);
            this._cursorBlinkStateManager.value?.restartBlinkAnimation(), this._updateCursorBlink();
          }
          registerCharacterJoiner(e) {
            return -1;
          }
          deregisterCharacterJoiner(e) {
            return !1;
          }
          renderRows(e, t) {
            if (!this._isAttached) {
              if (!(this._coreBrowserService.window.document.body.contains(this._core.screenElement) && this._charSizeService.width && this._charSizeService.height)) return;
              this._updateDimensions(), this._refreshCharAtlas(), this._isAttached = !0;
            }
            for (const i of this._renderLayers) i.handleGridChanged(this._terminal, e, t);
            this._glyphRenderer.value && this._rectangleRenderer.value && (this._glyphRenderer.value.beginFrame() ? (this._clearModel(!0), this._updateModel(0, this._terminal.rows - 1)) : this._updateModel(e, t), this._rectangleRenderer.value.renderBackgrounds(), this._glyphRenderer.value.render(this._model), this._cursorBlinkStateManager.value && !this._cursorBlinkStateManager.value.isCursorVisible || this._rectangleRenderer.value.renderCursor());
          }
          _updateCursorBlink() {
            this._terminal.options.cursorBlink ? this._cursorBlinkStateManager.value = new n.CursorBlinkStateManager(() => {
              this._requestRedrawCursor();
            }, this._coreBrowserService) : this._cursorBlinkStateManager.clear(), this._requestRedrawCursor();
          }
          _updateModel(e, t) {
            const i = this._core;
            let s,
              r,
              o,
              n,
              a,
              h,
              l,
              c,
              d,
              _,
              g,
              v,
              p,
              C = this._workCell;
            e = L(e, i.rows - 1, 0), t = L(t, i.rows - 1, 0);
            const x = this._terminal.buffer.active.baseY + this._terminal.buffer.active.cursorY,
              w = x - i.buffer.ydisp,
              b = Math.min(this._terminal.buffer.active.cursorX, i.cols - 1);
            let M = -1;
            const R = this._coreService.isCursorInitialized && !this._coreService.isCursorHidden && (!this._cursorBlinkStateManager.value || this._cursorBlinkStateManager.value.isCursorVisible);
            this._model.cursor = void 0;
            let y = !1;
            for (r = e; r <= t; r++) for (o = r + i.buffer.ydisp, n = i.buffer.lines.get(o), this._model.lineLengths[r] = 0, a = this._characterJoinerService.getJoinedCharacters(o), v = 0; v < i.cols; v++) if (s = this._cellColorResolver.result.bg, n.loadCell(v, C), 0 === v && (s = this._cellColorResolver.result.bg), h = !1, l = v, a.length > 0 && v === a[0][0] && (h = !0, c = a.shift(), C = new m(C, n.translateToString(!0, c[0], c[1]), c[1] - c[0]), l = c[1] - 1), d = C.getChars(), _ = C.getCode(), g = (r * i.cols + v) * f.RENDER_MODEL_INDICIES_PER_CELL, this._cellColorResolver.resolve(C, v, o, this.dimensions.device.cell.width), R && o === x && (v === b && (this._model.cursor = {
              x: b,
              y: w,
              width: C.getWidth(),
              style: this._coreBrowserService.isFocused ? i.options.cursorStyle || "block" : i.options.cursorInactiveStyle,
              cursorWidth: i.options.cursorWidth,
              dpr: this._devicePixelRatio
            }, M = b + C.getWidth() - 1), v >= b && v <= M && (this._coreBrowserService.isFocused && "block" === (i.options.cursorStyle || "block") || !1 === this._coreBrowserService.isFocused && "block" === i.options.cursorInactiveStyle) && (this._cellColorResolver.result.fg = 50331648 | this._themeService.colors.cursorAccent.rgba >> 8 & 16777215, this._cellColorResolver.result.bg = 50331648 | this._themeService.colors.cursor.rgba >> 8 & 16777215)), _ !== u.NULL_CELL_CODE && (this._model.lineLengths[r] = v + 1), (this._model.cells[g] !== _ || this._model.cells[g + f.RENDER_MODEL_BG_OFFSET] !== this._cellColorResolver.result.bg || this._model.cells[g + f.RENDER_MODEL_FG_OFFSET] !== this._cellColorResolver.result.fg || this._model.cells[g + f.RENDER_MODEL_EXT_OFFSET] !== this._cellColorResolver.result.ext) && (y = !0, d.length > 1 && (_ |= f.COMBINED_CHAR_BIT_MASK), this._model.cells[g] = _, this._model.cells[g + f.RENDER_MODEL_BG_OFFSET] = this._cellColorResolver.result.bg, this._model.cells[g + f.RENDER_MODEL_FG_OFFSET] = this._cellColorResolver.result.fg, this._model.cells[g + f.RENDER_MODEL_EXT_OFFSET] = this._cellColorResolver.result.ext, this._glyphRenderer.value.updateCell(v, r, _, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext, d, s), h)) for (C = this._workCell, v++; v < l; v++) p = (r * i.cols + v) * f.RENDER_MODEL_INDICIES_PER_CELL, this._glyphRenderer.value.updateCell(v, r, u.NULL_CELL_CODE, 0, 0, 0, u.NULL_CELL_CHAR, 0), this._model.cells[p] = u.NULL_CELL_CODE, this._model.cells[p + f.RENDER_MODEL_BG_OFFSET] = this._cellColorResolver.result.bg, this._model.cells[p + f.RENDER_MODEL_FG_OFFSET] = this._cellColorResolver.result.fg, this._model.cells[p + f.RENDER_MODEL_EXT_OFFSET] = this._cellColorResolver.result.ext;
            y && this._rectangleRenderer.value.updateBackgrounds(this._model), this._rectangleRenderer.value.updateCursor(this._model);
          }
          _updateDimensions() {
            this._charSizeService.width && this._charSizeService.height && (this.dimensions.device.char.width = Math.floor(this._charSizeService.width * this._devicePixelRatio), this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * this._devicePixelRatio), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.top = 1 === this._optionsService.rawOptions.lineHeight ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.char.left = Math.floor(this._optionsService.rawOptions.letterSpacing / 2), this.dimensions.device.canvas.height = this._terminal.rows * this.dimensions.device.cell.height, this.dimensions.device.canvas.width = this._terminal.cols * this.dimensions.device.cell.width, this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / this._devicePixelRatio), this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / this._devicePixelRatio), this.dimensions.css.cell.height = this.dimensions.device.cell.height / this._devicePixelRatio, this.dimensions.css.cell.width = this.dimensions.device.cell.width / this._devicePixelRatio);
          }
          _setCanvasDevicePixelDimensions(e, t) {
            this._canvas.width === e && this._canvas.height === t || (this._canvas.width = e, this._canvas.height = t, this._requestRedrawViewport());
          }
          _requestRedrawViewport() {
            this._onRequestRedraw.fire({
              start: 0,
              end: this._terminal.rows - 1
            });
          }
          _requestRedrawCursor() {
            const e = this._terminal.buffer.active.cursorY;
            this._onRequestRedraw.fire({
              start: e,
              end: e
            });
          }
        }
        t.WebglRenderer = C;
        class m extends d.AttributeData {
          constructor(e, t, i) {
            super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
          }
          isCombined() {
            return 2097152;
          }
          getWidth() {
            return this._width;
          }
          getChars() {
            return this.combinedData;
          }
          getCode() {
            return 2097151;
          }
          setFromCharData(e) {
            throw new Error("not implemented");
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        function L(e, t, i = 0) {
          return Math.max(Math.min(e, t), i);
        }
        t.JoinedCellData = m;
      },
      381: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.GLTexture = t.expandFloat32Array = t.createShader = t.createProgram = t.PROJECTION_MATRIX = void 0;
        const s = i(374);
        function r(e, t, i) {
          const r = (0, s.throwIfFalsy)(e.createShader(t));
          if (e.shaderSource(r, i), e.compileShader(r), e.getShaderParameter(r, e.COMPILE_STATUS)) return r;
          console.error(e.getShaderInfoLog(r)), e.deleteShader(r);
        }
        t.PROJECTION_MATRIX = new Float32Array([2, 0, 0, 0, 0, -2, 0, 0, 0, 0, 1, 0, -1, 1, 0, 1]), t.createProgram = function (e, t, i) {
          const o = (0, s.throwIfFalsy)(e.createProgram());
          if (e.attachShader(o, (0, s.throwIfFalsy)(r(e, e.VERTEX_SHADER, t))), e.attachShader(o, (0, s.throwIfFalsy)(r(e, e.FRAGMENT_SHADER, i))), e.linkProgram(o), e.getProgramParameter(o, e.LINK_STATUS)) return o;
          console.error(e.getProgramInfoLog(o)), e.deleteProgram(o);
        }, t.createShader = r, t.expandFloat32Array = function (e, t) {
          const i = Math.min(2 * e.length, t),
            s = new Float32Array(i);
          for (let t = 0; t < e.length; t++) s[t] = e[t];
          return s;
        }, t.GLTexture = class {
          constructor(e) {
            this.texture = e, this.version = -1;
          }
        };
      },
      592: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BaseRenderLayer = void 0;
        const s = i(627),
          r = i(237),
          o = i(374),
          n = i(859);
        class a extends n.Disposable {
          constructor(e, t, i, s, r, o, a, h) {
            super(), this._container = t, this._alpha = r, this._coreBrowserService = o, this._optionsService = a, this._themeService = h, this._deviceCharWidth = 0, this._deviceCharHeight = 0, this._deviceCellWidth = 0, this._deviceCellHeight = 0, this._deviceCharLeft = 0, this._deviceCharTop = 0, this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add(`xterm-${i}-layer`), this._canvas.style.zIndex = s.toString(), this._initCanvas(), this._container.appendChild(this._canvas), this.register(this._themeService.onChangeColors(t => {
              this._refreshCharAtlas(e, t), this.reset(e);
            })), this.register((0, n.toDisposable)(() => {
              this._canvas.remove();
            }));
          }
          _initCanvas() {
            this._ctx = (0, o.throwIfFalsy)(this._canvas.getContext("2d", {
              alpha: this._alpha
            })), this._alpha || this._clearAll();
          }
          handleBlur(e) {}
          handleFocus(e) {}
          handleCursorMove(e) {}
          handleGridChanged(e, t, i) {}
          handleSelectionChanged(e, t, i, s = !1) {}
          _setTransparency(e, t) {
            if (t === this._alpha) return;
            const i = this._canvas;
            this._alpha = t, this._canvas = this._canvas.cloneNode(), this._initCanvas(), this._container.replaceChild(this._canvas, i), this._refreshCharAtlas(e, this._themeService.colors), this.handleGridChanged(e, 0, e.rows - 1);
          }
          _refreshCharAtlas(e, t) {
            this._deviceCharWidth <= 0 && this._deviceCharHeight <= 0 || (this._charAtlas = (0, s.acquireTextureAtlas)(e, this._optionsService.rawOptions, t, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr), this._charAtlas.warmUp());
          }
          resize(e, t) {
            this._deviceCellWidth = t.device.cell.width, this._deviceCellHeight = t.device.cell.height, this._deviceCharWidth = t.device.char.width, this._deviceCharHeight = t.device.char.height, this._deviceCharLeft = t.device.char.left, this._deviceCharTop = t.device.char.top, this._canvas.width = t.device.canvas.width, this._canvas.height = t.device.canvas.height, this._canvas.style.width = `${t.css.canvas.width}px`, this._canvas.style.height = `${t.css.canvas.height}px`, this._alpha || this._clearAll(), this._refreshCharAtlas(e, this._themeService.colors);
          }
          _fillBottomLineAtCells(e, t, i = 1) {
            this._ctx.fillRect(e * this._deviceCellWidth, (t + 1) * this._deviceCellHeight - this._coreBrowserService.dpr - 1, i * this._deviceCellWidth, this._coreBrowserService.dpr);
          }
          _clearAll() {
            this._alpha ? this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height));
          }
          _clearCells(e, t, i, s) {
            this._alpha ? this._ctx.clearRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight));
          }
          _fillCharTrueColor(e, t, i, s) {
            this._ctx.font = this._getFont(e, !1, !1), this._ctx.textBaseline = r.TEXT_BASELINE, this._clipCell(i, s, t.getWidth()), this._ctx.fillText(t.getChars(), i * this._deviceCellWidth + this._deviceCharLeft, s * this._deviceCellHeight + this._deviceCharTop + this._deviceCharHeight);
          }
          _clipCell(e, t, i) {
            this._ctx.beginPath(), this._ctx.rect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, this._deviceCellHeight), this._ctx.clip();
          }
          _getFont(e, t, i) {
            return `${i ? "italic" : ""} ${t ? e.options.fontWeightBold : e.options.fontWeight} ${e.options.fontSize * this._coreBrowserService.dpr}px ${e.options.fontFamily}`;
          }
        }
        t.BaseRenderLayer = a;
      },
      733: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.LinkRenderLayer = void 0;
        const s = i(197),
          r = i(237),
          o = i(592);
        class n extends o.BaseRenderLayer {
          constructor(e, t, i, s, r, o, n) {
            super(i, e, "link", t, !0, r, o, n), this.register(s.onShowLinkUnderline(e => this._handleShowLinkUnderline(e))), this.register(s.onHideLinkUnderline(e => this._handleHideLinkUnderline(e)));
          }
          resize(e, t) {
            super.resize(e, t), this._state = void 0;
          }
          reset(e) {
            this._clearCurrentLink();
          }
          _clearCurrentLink() {
            if (this._state) {
              this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);
              const e = this._state.y2 - this._state.y1 - 1;
              e > 0 && this._clearCells(0, this._state.y1 + 1, this._state.cols, e), this._clearCells(0, this._state.y2, this._state.x2, 1), this._state = void 0;
            }
          }
          _handleShowLinkUnderline(e) {
            if (e.fg === r.INVERTED_DEFAULT_COLOR ? this._ctx.fillStyle = this._themeService.colors.background.css : void 0 !== e.fg && (0, s.is256Color)(e.fg) ? this._ctx.fillStyle = this._themeService.colors.ansi[e.fg].css : this._ctx.fillStyle = this._themeService.colors.foreground.css, e.y1 === e.y2) this._fillBottomLineAtCells(e.x1, e.y1, e.x2 - e.x1);else {
              this._fillBottomLineAtCells(e.x1, e.y1, e.cols - e.x1);
              for (let t = e.y1 + 1; t < e.y2; t++) this._fillBottomLineAtCells(0, t, e.cols);
              this._fillBottomLineAtCells(0, e.y2, e.x2);
            }
            this._state = e;
          }
          _handleHideLinkUnderline(e) {
            this._clearCurrentLink();
          }
        }
        t.LinkRenderLayer = n;
      },
      820: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.addDisposableDomListener = void 0, t.addDisposableDomListener = function (e, t, i, s) {
          e.addEventListener(t, i, s);
          let r = !1;
          return {
            dispose: () => {
              r || (r = !0, e.removeEventListener(t, i, s));
            }
          };
        };
      },
      274: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellColorResolver = void 0;
        const s = i(855),
          r = i(160),
          o = i(374);
        let n,
          a = 0,
          h = 0,
          l = !1,
          c = !1,
          d = !1,
          _ = 0;
        t.CellColorResolver = class {
          constructor(e, t, i, s, r, o) {
            this._terminal = e, this._optionService = t, this._selectionRenderModel = i, this._decorationService = s, this._coreBrowserService = r, this._themeService = o, this.result = {
              fg: 0,
              bg: 0,
              ext: 0
            };
          }
          resolve(e, t, i, u) {
            if (this.result.bg = e.bg, this.result.fg = e.fg, this.result.ext = 268435456 & e.bg ? e.extended.ext : 0, h = 0, a = 0, c = !1, l = !1, d = !1, n = this._themeService.colors, _ = 0, e.getCode() !== s.NULL_CELL_CODE && 4 === e.extended.underlineStyle) {
              const e = Math.max(1, Math.floor(this._optionService.rawOptions.fontSize * this._coreBrowserService.dpr / 15));
              _ = t * u % (2 * Math.round(e));
            }
            if (this._decorationService.forEachDecorationAtCell(t, i, "bottom", e => {
              e.backgroundColorRGB && (h = e.backgroundColorRGB.rgba >> 8 & 16777215, c = !0), e.foregroundColorRGB && (a = e.foregroundColorRGB.rgba >> 8 & 16777215, l = !0);
            }), d = this._selectionRenderModel.isCellSelected(this._terminal, t, i), d) {
              if (67108864 & this.result.fg || 0 != (50331648 & this.result.bg)) {
                if (67108864 & this.result.fg) switch (50331648 & this.result.fg) {
                  case 16777216:
                  case 33554432:
                    h = this._themeService.colors.ansi[255 & this.result.fg].rgba;
                    break;
                  case 50331648:
                    h = (16777215 & this.result.fg) << 8 | 255;
                    break;
                  default:
                    h = this._themeService.colors.foreground.rgba;
                } else switch (50331648 & this.result.bg) {
                  case 16777216:
                  case 33554432:
                    h = this._themeService.colors.ansi[255 & this.result.bg].rgba;
                    break;
                  case 50331648:
                    h = (16777215 & this.result.bg) << 8 | 255;
                }
                h = r.rgba.blend(h, 4294967040 & (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba | 128) >> 8 & 16777215;
              } else h = (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215;
              if (c = !0, n.selectionForeground && (a = n.selectionForeground.rgba >> 8 & 16777215, l = !0), (0, o.treatGlyphAsBackgroundColor)(e.getCode())) {
                if (67108864 & this.result.fg && 0 == (50331648 & this.result.bg)) a = (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215;else {
                  if (67108864 & this.result.fg) switch (50331648 & this.result.bg) {
                    case 16777216:
                    case 33554432:
                      a = this._themeService.colors.ansi[255 & this.result.bg].rgba;
                      break;
                    case 50331648:
                      a = (16777215 & this.result.bg) << 8 | 255;
                  } else switch (50331648 & this.result.fg) {
                    case 16777216:
                    case 33554432:
                      a = this._themeService.colors.ansi[255 & this.result.fg].rgba;
                      break;
                    case 50331648:
                      a = (16777215 & this.result.fg) << 8 | 255;
                      break;
                    default:
                      a = this._themeService.colors.foreground.rgba;
                  }
                  a = r.rgba.blend(a, 4294967040 & (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba | 128) >> 8 & 16777215;
                }
                l = !0;
              }
            }
            this._decorationService.forEachDecorationAtCell(t, i, "top", e => {
              e.backgroundColorRGB && (h = e.backgroundColorRGB.rgba >> 8 & 16777215, c = !0), e.foregroundColorRGB && (a = e.foregroundColorRGB.rgba >> 8 & 16777215, l = !0);
            }), c && (h = d ? -16777216 & e.bg & -134217729 | h | 50331648 : -16777216 & e.bg | h | 50331648), l && (a = -16777216 & e.fg & -67108865 | a | 50331648), 67108864 & this.result.fg && (c && !l && (a = 0 == (50331648 & this.result.bg) ? -134217728 & this.result.fg | 16777215 & n.background.rgba >> 8 | 50331648 : -134217728 & this.result.fg | 67108863 & this.result.bg, l = !0), !c && l && (h = 0 == (50331648 & this.result.fg) ? -67108864 & this.result.bg | 16777215 & n.foreground.rgba >> 8 | 50331648 : -67108864 & this.result.bg | 67108863 & this.result.fg, c = !0)), n = void 0, this.result.bg = c ? h : this.result.bg, this.result.fg = l ? a : this.result.fg, this.result.ext &= 536870911, this.result.ext |= _ << 29 & 3758096384;
          }
        };
      },
      627: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.removeTerminalFromCache = t.acquireTextureAtlas = void 0;
        const s = i(509),
          r = i(197),
          o = [];
        t.acquireTextureAtlas = function (e, t, i, n, a, h, l, c) {
          const d = (0, r.generateConfig)(n, a, h, l, t, i, c);
          for (let t = 0; t < o.length; t++) {
            const i = o[t],
              s = i.ownedBy.indexOf(e);
            if (s >= 0) {
              if ((0, r.configEquals)(i.config, d)) return i.atlas;
              1 === i.ownedBy.length ? (i.atlas.dispose(), o.splice(t, 1)) : i.ownedBy.splice(s, 1);
              break;
            }
          }
          for (let t = 0; t < o.length; t++) {
            const i = o[t];
            if ((0, r.configEquals)(i.config, d)) return i.ownedBy.push(e), i.atlas;
          }
          const _ = e._core,
            u = {
              atlas: new s.TextureAtlas(document, d, _.unicodeService),
              config: d,
              ownedBy: [e]
            };
          return o.push(u), u.atlas;
        }, t.removeTerminalFromCache = function (e) {
          for (let t = 0; t < o.length; t++) {
            const i = o[t].ownedBy.indexOf(e);
            if (-1 !== i) {
              1 === o[t].ownedBy.length ? (o[t].atlas.dispose(), o.splice(t, 1)) : o[t].ownedBy.splice(i, 1);
              break;
            }
          }
        };
      },
      197: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.is256Color = t.configEquals = t.generateConfig = void 0;
        const s = i(160);
        t.generateConfig = function (e, t, i, r, o, n, a) {
          const h = {
            foreground: n.foreground,
            background: n.background,
            cursor: s.NULL_COLOR,
            cursorAccent: s.NULL_COLOR,
            selectionForeground: s.NULL_COLOR,
            selectionBackgroundTransparent: s.NULL_COLOR,
            selectionBackgroundOpaque: s.NULL_COLOR,
            selectionInactiveBackgroundTransparent: s.NULL_COLOR,
            selectionInactiveBackgroundOpaque: s.NULL_COLOR,
            ansi: n.ansi.slice(),
            contrastCache: n.contrastCache,
            halfContrastCache: n.halfContrastCache
          };
          return {
            customGlyphs: o.customGlyphs,
            devicePixelRatio: a,
            letterSpacing: o.letterSpacing,
            lineHeight: o.lineHeight,
            deviceCellWidth: e,
            deviceCellHeight: t,
            deviceCharWidth: i,
            deviceCharHeight: r,
            fontFamily: o.fontFamily,
            fontSize: o.fontSize,
            fontWeight: o.fontWeight,
            fontWeightBold: o.fontWeightBold,
            allowTransparency: o.allowTransparency,
            drawBoldTextInBrightColors: o.drawBoldTextInBrightColors,
            minimumContrastRatio: o.minimumContrastRatio,
            colors: h
          };
        }, t.configEquals = function (e, t) {
          for (let i = 0; i < e.colors.ansi.length; i++) if (e.colors.ansi[i].rgba !== t.colors.ansi[i].rgba) return !1;
          return e.devicePixelRatio === t.devicePixelRatio && e.customGlyphs === t.customGlyphs && e.lineHeight === t.lineHeight && e.letterSpacing === t.letterSpacing && e.fontFamily === t.fontFamily && e.fontSize === t.fontSize && e.fontWeight === t.fontWeight && e.fontWeightBold === t.fontWeightBold && e.allowTransparency === t.allowTransparency && e.deviceCharWidth === t.deviceCharWidth && e.deviceCharHeight === t.deviceCharHeight && e.drawBoldTextInBrightColors === t.drawBoldTextInBrightColors && e.minimumContrastRatio === t.minimumContrastRatio && e.colors.foreground.rgba === t.colors.foreground.rgba && e.colors.background.rgba === t.colors.background.rgba;
        }, t.is256Color = function (e) {
          return 16777216 == (50331648 & e) || 33554432 == (50331648 & e);
        };
      },
      237: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TEXT_BASELINE = t.DIM_OPACITY = t.INVERTED_DEFAULT_COLOR = void 0;
        const s = i(399);
        t.INVERTED_DEFAULT_COLOR = 257, t.DIM_OPACITY = .5, t.TEXT_BASELINE = s.isFirefox || s.isLegacyEdge ? "bottom" : "ideographic";
      },
      457: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CursorBlinkStateManager = void 0;
        t.CursorBlinkStateManager = class {
          constructor(e, t) {
            this._renderCallback = e, this._coreBrowserService = t, this.isCursorVisible = !0, this._coreBrowserService.isFocused && this._restartInterval();
          }
          get isPaused() {
            return !(this._blinkStartTimeout || this._blinkInterval);
          }
          dispose() {
            this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          restartBlinkAnimation() {
            this.isPaused || (this._animationTimeRestarted = Date.now(), this.isCursorVisible = !0, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
              this._renderCallback(), this._animationFrame = void 0;
            })));
          }
          _restartInterval(e = 600) {
            this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout = this._coreBrowserService.window.setTimeout(() => {
              if (this._animationTimeRestarted) {
                const e = 600 - (Date.now() - this._animationTimeRestarted);
                if (this._animationTimeRestarted = void 0, e > 0) return void this._restartInterval(e);
              }
              this.isCursorVisible = !1, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                this._renderCallback(), this._animationFrame = void 0;
              }), this._blinkInterval = this._coreBrowserService.window.setInterval(() => {
                if (this._animationTimeRestarted) {
                  const e = 600 - (Date.now() - this._animationTimeRestarted);
                  return this._animationTimeRestarted = void 0, void this._restartInterval(e);
                }
                this.isCursorVisible = !this.isCursorVisible, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                  this._renderCallback(), this._animationFrame = void 0;
                });
              }, 600);
            }, e);
          }
          pause() {
            this.isCursorVisible = !0, this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          resume() {
            this.pause(), this._animationTimeRestarted = void 0, this._restartInterval(), this.restartBlinkAnimation();
          }
        };
      },
      860: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.tryDrawCustomChar = t.powerlineDefinitions = t.boxDrawingDefinitions = t.blockElementDefinitions = void 0;
        const s = i(374);
        t.blockElementDefinitions = {
          "▀": [{
            x: 0,
            y: 0,
            w: 8,
            h: 4
          }],
          "▁": [{
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "▂": [{
            x: 0,
            y: 6,
            w: 8,
            h: 2
          }],
          "▃": [{
            x: 0,
            y: 5,
            w: 8,
            h: 3
          }],
          "▄": [{
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "▅": [{
            x: 0,
            y: 3,
            w: 8,
            h: 5
          }],
          "▆": [{
            x: 0,
            y: 2,
            w: 8,
            h: 6
          }],
          "▇": [{
            x: 0,
            y: 1,
            w: 8,
            h: 7
          }],
          "█": [{
            x: 0,
            y: 0,
            w: 8,
            h: 8
          }],
          "▉": [{
            x: 0,
            y: 0,
            w: 7,
            h: 8
          }],
          "▊": [{
            x: 0,
            y: 0,
            w: 6,
            h: 8
          }],
          "▋": [{
            x: 0,
            y: 0,
            w: 5,
            h: 8
          }],
          "▌": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }],
          "▍": [{
            x: 0,
            y: 0,
            w: 3,
            h: 8
          }],
          "▎": [{
            x: 0,
            y: 0,
            w: 2,
            h: 8
          }],
          "▏": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }],
          "▐": [{
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }],
          "▔": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "▕": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }],
          "▖": [{
            x: 0,
            y: 4,
            w: 4,
            h: 4
          }],
          "▗": [{
            x: 4,
            y: 4,
            w: 4,
            h: 4
          }],
          "▘": [{
            x: 0,
            y: 0,
            w: 4,
            h: 4
          }],
          "▙": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "▚": [{
            x: 0,
            y: 0,
            w: 4,
            h: 4
          }, {
            x: 4,
            y: 4,
            w: 4,
            h: 4
          }],
          "▛": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }],
          "▜": [{
            x: 0,
            y: 0,
            w: 8,
            h: 4
          }, {
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }],
          "▝": [{
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }],
          "▞": [{
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }, {
            x: 0,
            y: 4,
            w: 4,
            h: 4
          }],
          "▟": [{
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "🭰": [{
            x: 1,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭱": [{
            x: 2,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭲": [{
            x: 3,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭳": [{
            x: 4,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭴": [{
            x: 5,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭵": [{
            x: 6,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭶": [{
            x: 0,
            y: 1,
            w: 8,
            h: 1
          }],
          "🭷": [{
            x: 0,
            y: 2,
            w: 8,
            h: 1
          }],
          "🭸": [{
            x: 0,
            y: 3,
            w: 8,
            h: 1
          }],
          "🭹": [{
            x: 0,
            y: 4,
            w: 8,
            h: 1
          }],
          "🭺": [{
            x: 0,
            y: 5,
            w: 8,
            h: 1
          }],
          "🭻": [{
            x: 0,
            y: 6,
            w: 8,
            h: 1
          }],
          "🭼": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🭽": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "🭾": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "🭿": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮀": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮁": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 2,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮂": [{
            x: 0,
            y: 0,
            w: 8,
            h: 2
          }],
          "🮃": [{
            x: 0,
            y: 0,
            w: 8,
            h: 3
          }],
          "🮄": [{
            x: 0,
            y: 0,
            w: 8,
            h: 5
          }],
          "🮅": [{
            x: 0,
            y: 0,
            w: 8,
            h: 6
          }],
          "🮆": [{
            x: 0,
            y: 0,
            w: 8,
            h: 7
          }],
          "🮇": [{
            x: 6,
            y: 0,
            w: 2,
            h: 8
          }],
          "🮈": [{
            x: 5,
            y: 0,
            w: 3,
            h: 8
          }],
          "🮉": [{
            x: 3,
            y: 0,
            w: 5,
            h: 8
          }],
          "🮊": [{
            x: 2,
            y: 0,
            w: 6,
            h: 8
          }],
          "🮋": [{
            x: 1,
            y: 0,
            w: 7,
            h: 8
          }],
          "🮕": [{
            x: 0,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 6,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 6,
            w: 2,
            h: 2
          }],
          "🮖": [{
            x: 2,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 6,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 6,
            w: 2,
            h: 2
          }],
          "🮗": [{
            x: 0,
            y: 2,
            w: 8,
            h: 2
          }, {
            x: 0,
            y: 6,
            w: 8,
            h: 2
          }]
        };
        const r = {
          "░": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]],
          "▒": [[1, 0], [0, 0], [0, 1], [0, 0]],
          "▓": [[0, 1], [1, 1], [1, 0], [1, 1]]
        };
        t.boxDrawingDefinitions = {
          "─": {
            1: "M0,.5 L1,.5"
          },
          "━": {
            3: "M0,.5 L1,.5"
          },
          "│": {
            1: "M.5,0 L.5,1"
          },
          "┃": {
            3: "M.5,0 L.5,1"
          },
          "┌": {
            1: "M0.5,1 L.5,.5 L1,.5"
          },
          "┏": {
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┐": {
            1: "M0,.5 L.5,.5 L.5,1"
          },
          "┓": {
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "└": {
            1: "M.5,0 L.5,.5 L1,.5"
          },
          "┗": {
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┘": {
            1: "M.5,0 L.5,.5 L0,.5"
          },
          "┛": {
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "├": {
            1: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "┣": {
            3: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "┤": {
            1: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "┫": {
            3: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "┬": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "┳": {
            3: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "┴": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,0"
          },
          "┻": {
            3: "M0,.5 L1,.5 M.5,.5 L.5,0"
          },
          "┼": {
            1: "M0,.5 L1,.5 M.5,0 L.5,1"
          },
          "╋": {
            3: "M0,.5 L1,.5 M.5,0 L.5,1"
          },
          "╴": {
            1: "M.5,.5 L0,.5"
          },
          "╸": {
            3: "M.5,.5 L0,.5"
          },
          "╵": {
            1: "M.5,.5 L.5,0"
          },
          "╹": {
            3: "M.5,.5 L.5,0"
          },
          "╶": {
            1: "M.5,.5 L1,.5"
          },
          "╺": {
            3: "M.5,.5 L1,.5"
          },
          "╷": {
            1: "M.5,.5 L.5,1"
          },
          "╻": {
            3: "M.5,.5 L.5,1"
          },
          "═": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "║": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╒": {
            1: (e, t) => `M.5,1 L.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
          },
          "╓": {
            1: (e, t) => `M${.5 - e},1 L${.5 - e},.5 L1,.5 M${.5 + e},.5 L${.5 + e},1`
          },
          "╔": {
            1: (e, t) => `M1,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
          },
          "╕": {
            1: (e, t) => `M0,${.5 - t} L.5,${.5 - t} L.5,1 M0,${.5 + t} L.5,${.5 + t}`
          },
          "╖": {
            1: (e, t) => `M${.5 + e},1 L${.5 + e},.5 L0,.5 M${.5 - e},.5 L${.5 - e},1`
          },
          "╗": {
            1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},1`
          },
          "╘": {
            1: (e, t) => `M.5,0 L.5,${.5 + t} L1,${.5 + t} M.5,${.5 - t} L1,${.5 - t}`
          },
          "╙": {
            1: (e, t) => `M1,.5 L${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
          },
          "╚": {
            1: (e, t) => `M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0 M1,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},0`
          },
          "╛": {
            1: (e, t) => `M0,${.5 + t} L.5,${.5 + t} L.5,0 M0,${.5 - t} L.5,${.5 - t}`
          },
          "╜": {
            1: (e, t) => `M0,.5 L${.5 + e},.5 L${.5 + e},0 M${.5 - e},.5 L${.5 - e},0`
          },
          "╝": {
            1: (e, t) => `M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M0,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},0`
          },
          "╞": {
            1: (e, t) => `M.5,0 L.5,1 M.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
          },
          "╟": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1 M${.5 + e},.5 L1,.5`
          },
          "╠": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╡": {
            1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L.5,${.5 - t} M0,${.5 + t} L.5,${.5 + t}`
          },
          "╢": {
            1: (e, t) => `M0,.5 L${.5 - e},.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╣": {
            1: (e, t) => `M${.5 + e},0 L${.5 + e},1 M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0`
          },
          "╤": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t} M.5,${.5 + t} L.5,1`
          },
          "╥": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},1 M${.5 + e},.5 L${.5 + e},1`
          },
          "╦": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
          },
          "╧": {
            1: (e, t) => `M.5,0 L.5,${.5 - t} M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "╨": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
          },
          "╩": {
            1: (e, t) => `M0,${.5 + t} L1,${.5 + t} M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╪": {
            1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "╫": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╬": {
            1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╱": {
            1: "M1,0 L0,1"
          },
          "╲": {
            1: "M0,0 L1,1"
          },
          "╳": {
            1: "M1,0 L0,1 M0,0 L1,1"
          },
          "╼": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "╽": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L.5,1"
          },
          "╾": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "╿": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "┍": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┎": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┑": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L0,.5"
          },
          "┒": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L.5,1"
          },
          "┕": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L1,.5"
          },
          "┖": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┙": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L0,.5"
          },
          "┚": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L.5,0"
          },
          "┝": {
            1: "M.5,0 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┞": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┟": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┠": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,1"
          },
          "┡": {
            1: "M.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┢": {
            1: "M.5,.5 L.5,0",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┥": {
            1: "M.5,0 L.5,1",
            3: "M.5,.5 L0,.5"
          },
          "┦": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "┧": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M.5,.5 L.5,1"
          },
          "┨": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,1"
          },
          "┩": {
            1: "M.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "┪": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "┭": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┮": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┯": {
            1: "M.5,.5 L.5,1",
            3: "M0,.5 L1,.5"
          },
          "┰": {
            1: "M0,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┱": {
            1: "M.5,.5 L1,.5",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "┲": {
            1: "M.5,.5 L0,.5",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┵": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┶": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "┷": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L1,.5"
          },
          "┸": {
            1: "M0,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┹": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "┺": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┽": {
            1: "M.5,0 L.5,1 M.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┾": {
            1: "M.5,0 L.5,1 M.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "┿": {
            1: "M.5,0 L.5,1",
            3: "M0,.5 L1,.5"
          },
          "╀": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "╁": {
            1: "M.5,.5 L.5,0 M0,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "╂": {
            1: "M0,.5 L1,.5",
            3: "M.5,0 L.5,1"
          },
          "╃": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "╄": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "╅": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "╆": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "╇": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0 M0,.5 L1,.5"
          },
          "╈": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "╉": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "╊": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "╌": {
            1: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
          },
          "╍": {
            3: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
          },
          "┄": {
            1: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
          },
          "┅": {
            3: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
          },
          "┈": {
            1: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
          },
          "┉": {
            3: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
          },
          "╎": {
            1: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
          },
          "╏": {
            3: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
          },
          "┆": {
            1: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
          },
          "┇": {
            3: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
          },
          "┊": {
            1: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
          },
          "┋": {
            3: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
          },
          "╭": {
            1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,1,.5`
          },
          "╮": {
            1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,0,.5`
          },
          "╯": {
            1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,0,.5`
          },
          "╰": {
            1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,1,.5`
          }
        }, t.powerlineDefinitions = {
          "": {
            d: "M0,0 L1,.5 L0,1",
            type: 0,
            rightPadding: 2
          },
          "": {
            d: "M-1,-.5 L1,.5 L-1,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M1,0 L0,.5 L1,1",
            type: 0,
            leftPadding: 2
          },
          "": {
            d: "M2,-.5 L0,.5 L2,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",
            type: 0,
            rightPadding: 1
          },
          "": {
            d: "M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",
            type: 1,
            rightPadding: 1
          },
          "": {
            d: "M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",
            type: 0,
            leftPadding: 1
          },
          "": {
            d: "M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",
            type: 1,
            leftPadding: 1
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5 L-.5,1.5",
            type: 0
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5 L1.5,1.5",
            type: 0
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5 L-.5,-.5",
            type: 0
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5 L1.5,-.5",
            type: 0
          }
        }, t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.tryDrawCustomChar = function (e, i, n, l, c, d, _, u) {
          const g = t.blockElementDefinitions[i];
          if (g) return function (e, t, i, s, r, o) {
            for (let n = 0; n < t.length; n++) {
              const a = t[n],
                h = r / 8,
                l = o / 8;
              e.fillRect(i + a.x * h, s + a.y * l, a.w * h, a.h * l);
            }
          }(e, g, n, l, c, d), !0;
          const v = r[i];
          if (v) return function (e, t, i, r, n, a) {
            let h = o.get(t);
            h || (h = new Map(), o.set(t, h));
            const l = e.fillStyle;
            if ("string" != typeof l) throw new Error(`Unexpected fillStyle type "${l}"`);
            let c = h.get(l);
            if (!c) {
              const i = t[0].length,
                r = t.length,
                o = e.canvas.ownerDocument.createElement("canvas");
              o.width = i, o.height = r;
              const n = (0, s.throwIfFalsy)(o.getContext("2d")),
                a = new ImageData(i, r);
              let d, _, u, g;
              if (l.startsWith("#")) d = parseInt(l.slice(1, 3), 16), _ = parseInt(l.slice(3, 5), 16), u = parseInt(l.slice(5, 7), 16), g = l.length > 7 && parseInt(l.slice(7, 9), 16) || 1;else {
                if (!l.startsWith("rgba")) throw new Error(`Unexpected fillStyle color format "${l}" when drawing pattern glyph`);
                [d, _, u, g] = l.substring(5, l.length - 1).split(",").map(e => parseFloat(e));
              }
              for (let e = 0; e < r; e++) for (let s = 0; s < i; s++) a.data[4 * (e * i + s)] = d, a.data[4 * (e * i + s) + 1] = _, a.data[4 * (e * i + s) + 2] = u, a.data[4 * (e * i + s) + 3] = t[e][s] * (255 * g);
              n.putImageData(a, 0, 0), c = (0, s.throwIfFalsy)(e.createPattern(o, null)), h.set(l, c);
            }
            e.fillStyle = c, e.fillRect(i, r, n, a);
          }(e, v, n, l, c, d), !0;
          const f = t.boxDrawingDefinitions[i];
          if (f) return function (e, t, i, s, r, o, n) {
            e.strokeStyle = e.fillStyle;
            for (const [l, c] of Object.entries(t)) {
              let t;
              e.beginPath(), e.lineWidth = n * Number.parseInt(l), t = "function" == typeof c ? c(.15, .15 / o * r) : c;
              for (const l of t.split(" ")) {
                const t = l[0],
                  c = a[t];
                if (!c) {
                  console.error(`Could not find drawing instructions for "${t}"`);
                  continue;
                }
                const d = l.substring(1).split(",");
                d[0] && d[1] && c(e, h(d, r, o, i, s, !0, n));
              }
              e.stroke(), e.closePath();
            }
          }(e, f, n, l, c, d, u), !0;
          const p = t.powerlineDefinitions[i];
          return !!p && (function (e, t, i, s, r, o, n, l) {
            const c = new Path2D();
            c.rect(i, s, r, o), e.clip(c), e.beginPath();
            const d = n / 12;
            e.lineWidth = l * d;
            for (const n of t.d.split(" ")) {
              const c = n[0],
                _ = a[c];
              if (!_) {
                console.error(`Could not find drawing instructions for "${c}"`);
                continue;
              }
              const u = n.substring(1).split(",");
              u[0] && u[1] && _(e, h(u, r, o, i, s, !1, l, (t.leftPadding ?? 0) * (d / 2), (t.rightPadding ?? 0) * (d / 2)));
            }
            1 === t.type ? (e.strokeStyle = e.fillStyle, e.stroke()) : e.fill(), e.closePath();
          }(e, p, n, l, c, d, _, u), !0);
        };
        const o = new Map();
        function n(e, t, i = 0) {
          return Math.max(Math.min(e, t), i);
        }
        const a = {
          C: (e, t) => e.bezierCurveTo(t[0], t[1], t[2], t[3], t[4], t[5]),
          L: (e, t) => e.lineTo(t[0], t[1]),
          M: (e, t) => e.moveTo(t[0], t[1])
        };
        function h(e, t, i, s, r, o, a, h = 0, l = 0) {
          const c = e.map(e => parseFloat(e) || parseInt(e));
          if (c.length < 2) throw new Error("Too few arguments for instruction");
          for (let e = 0; e < c.length; e += 2) c[e] *= t - h * a - l * a, o && 0 !== c[e] && (c[e] = n(Math.round(c[e] + .5) - .5, t, 0)), c[e] += s + h * a;
          for (let e = 1; e < c.length; e += 2) c[e] *= i, o && 0 !== c[e] && (c[e] = n(Math.round(c[e] + .5) - .5, i, 0)), c[e] += r;
          return c;
        }
      },
      56: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.observeDevicePixelDimensions = void 0;
        const s = i(859);
        t.observeDevicePixelDimensions = function (e, t, i) {
          let r = new t.ResizeObserver(t => {
            const s = t.find(t => t.target === e);
            if (!s) return;
            if (!("devicePixelContentBoxSize" in s)) return r?.disconnect(), void (r = void 0);
            const o = s.devicePixelContentBoxSize[0].inlineSize,
              n = s.devicePixelContentBoxSize[0].blockSize;
            o > 0 && n > 0 && i(o, n);
          });
          try {
            r.observe(e, {
              box: ["device-pixel-content-box"]
            });
          } catch {
            r.disconnect(), r = void 0;
          }
          return (0, s.toDisposable)(() => r?.disconnect());
        };
      },
      374: (e, t) => {
        function i(e) {
          return 57508 <= e && e <= 57558;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.computeNextVariantOffset = t.createRenderDimensions = t.treatGlyphAsBackgroundColor = t.isRestrictedPowerlineGlyph = t.isPowerlineGlyph = t.throwIfFalsy = void 0, t.throwIfFalsy = function (e) {
          if (!e) throw new Error("value must not be falsy");
          return e;
        }, t.isPowerlineGlyph = i, t.isRestrictedPowerlineGlyph = function (e) {
          return 57520 <= e && e <= 57527;
        }, t.treatGlyphAsBackgroundColor = function (e) {
          return i(e) || function (e) {
            return 9472 <= e && e <= 9631;
          }(e);
        }, t.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
              }
            }
          };
        }, t.computeNextVariantOffset = function (e, t, i = 0) {
          return (e - (2 * Math.round(t) - i)) % (2 * Math.round(t));
        };
      },
      296: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createSelectionRenderModel = void 0;
        class i {
          constructor() {
            this.clear();
          }
          clear() {
            this.hasSelection = !1, this.columnSelectMode = !1, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
          }
          update(e, t, i, s = !1) {
            if (this.selectionStart = t, this.selectionEnd = i, !t || !i || t[0] === i[0] && t[1] === i[1]) return void this.clear();
            const r = e.buffers.active.ydisp,
              o = t[1] - r,
              n = i[1] - r,
              a = Math.max(o, 0),
              h = Math.min(n, e.rows - 1);
            a >= e.rows || h < 0 ? this.clear() : (this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow = o, this.viewportEndRow = n, this.viewportCappedStartRow = a, this.viewportCappedEndRow = h, this.startCol = t[0], this.endCol = i[0]);
          }
          isCellSelected(e, t, i) {
            return !!this.hasSelection && (i -= e.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t >= this.startCol && i >= this.viewportCappedStartRow && t < this.endCol && i <= this.viewportCappedEndRow : t < this.startCol && i >= this.viewportCappedStartRow && t >= this.endCol && i <= this.viewportCappedEndRow : i > this.viewportStartRow && i < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportEndRow && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol);
          }
        }
        t.createSelectionRenderModel = function () {
          return new i();
        };
      },
      509: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TextureAtlas = void 0;
        const s = i(237),
          r = i(860),
          o = i(374),
          n = i(160),
          a = i(345),
          h = i(485),
          l = i(385),
          c = i(147),
          d = i(855),
          _ = {
            texturePage: 0,
            texturePosition: {
              x: 0,
              y: 0
            },
            texturePositionClipSpace: {
              x: 0,
              y: 0
            },
            offset: {
              x: 0,
              y: 0
            },
            size: {
              x: 0,
              y: 0
            },
            sizeClipSpace: {
              x: 0,
              y: 0
            }
          };
        let u;
        class g {
          get pages() {
            return this._pages;
          }
          constructor(e, t, i) {
            this._document = e, this._config = t, this._unicodeService = i, this._didWarmUp = !1, this._cacheMap = new h.FourKeyMap(), this._cacheMapCombined = new h.FourKeyMap(), this._pages = [], this._activePages = [], this._workBoundingBox = {
              top: 0,
              left: 0,
              bottom: 0,
              right: 0
            }, this._workAttributeData = new c.AttributeData(), this._textureSize = 512, this._onAddTextureAtlasCanvas = new a.EventEmitter(), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = new a.EventEmitter(), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._requestClearModel = !1, this._createNewPage(), this._tmpCanvas = p(e, 4 * this._config.deviceCellWidth + 4, this._config.deviceCellHeight + 4), this._tmpCtx = (0, o.throwIfFalsy)(this._tmpCanvas.getContext("2d", {
              alpha: this._config.allowTransparency,
              willReadFrequently: !0
            }));
          }
          dispose() {
            for (const e of this.pages) e.canvas.remove();
            this._onAddTextureAtlasCanvas.dispose();
          }
          warmUp() {
            this._didWarmUp || (this._doWarmUp(), this._didWarmUp = !0);
          }
          _doWarmUp() {
            const e = new l.IdleTaskQueue();
            for (let t = 33; t < 126; t++) e.enqueue(() => {
              if (!this._cacheMap.get(t, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT)) {
                const e = this._drawToCache(t, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT);
                this._cacheMap.set(t, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT, e);
              }
            });
          }
          beginFrame() {
            return this._requestClearModel;
          }
          clearTexture() {
            if (0 !== this._pages[0].currentRow.x || 0 !== this._pages[0].currentRow.y) {
              for (const e of this._pages) e.clear();
              this._cacheMap.clear(), this._cacheMapCombined.clear(), this._didWarmUp = !1;
            }
          }
          _createNewPage() {
            if (g.maxAtlasPages && this._pages.length >= Math.max(4, g.maxAtlasPages)) {
              const e = this._pages.filter(e => 2 * e.canvas.width <= (g.maxTextureSize || 4096)).sort((e, t) => t.canvas.width !== e.canvas.width ? t.canvas.width - e.canvas.width : t.percentageUsed - e.percentageUsed);
              let t = -1,
                i = 0;
              for (let s = 0; s < e.length; s++) if (e[s].canvas.width !== i) t = s, i = e[s].canvas.width;else if (s - t == 3) break;
              const s = e.slice(t, t + 4),
                r = s.map(e => e.glyphs[0].texturePage).sort((e, t) => e > t ? 1 : -1),
                o = this.pages.length - s.length,
                n = this._mergePages(s, o);
              n.version++;
              for (let e = r.length - 1; e >= 0; e--) this._deletePage(r[e]);
              this.pages.push(n), this._requestClearModel = !0, this._onAddTextureAtlasCanvas.fire(n.canvas);
            }
            const e = new v(this._document, this._textureSize);
            return this._pages.push(e), this._activePages.push(e), this._onAddTextureAtlasCanvas.fire(e.canvas), e;
          }
          _mergePages(e, t) {
            const i = 2 * e[0].canvas.width,
              s = new v(this._document, i, e);
            for (const [r, o] of e.entries()) {
              const e = r * o.canvas.width % i,
                n = Math.floor(r / 2) * o.canvas.height;
              s.ctx.drawImage(o.canvas, e, n);
              for (const s of o.glyphs) s.texturePage = t, s.sizeClipSpace.x = s.size.x / i, s.sizeClipSpace.y = s.size.y / i, s.texturePosition.x += e, s.texturePosition.y += n, s.texturePositionClipSpace.x = s.texturePosition.x / i, s.texturePositionClipSpace.y = s.texturePosition.y / i;
              this._onRemoveTextureAtlasCanvas.fire(o.canvas);
              const a = this._activePages.indexOf(o);
              -1 !== a && this._activePages.splice(a, 1);
            }
            return s;
          }
          _deletePage(e) {
            this._pages.splice(e, 1);
            for (let t = e; t < this._pages.length; t++) {
              const e = this._pages[t];
              for (const t of e.glyphs) t.texturePage--;
              e.version++;
            }
          }
          getRasterizedGlyphCombinedChar(e, t, i, s, r) {
            return this._getFromCacheMap(this._cacheMapCombined, e, t, i, s, r);
          }
          getRasterizedGlyph(e, t, i, s, r) {
            return this._getFromCacheMap(this._cacheMap, e, t, i, s, r);
          }
          _getFromCacheMap(e, t, i, s, r, o = !1) {
            return u = e.get(t, i, s, r), u || (u = this._drawToCache(t, i, s, r, o), e.set(t, i, s, r, u)), u;
          }
          _getColorFromAnsiIndex(e) {
            if (e >= this._config.colors.ansi.length) throw new Error("No color found for idx " + e);
            return this._config.colors.ansi[e];
          }
          _getBackgroundColor(e, t, i, s) {
            if (this._config.allowTransparency) return n.NULL_COLOR;
            let r;
            switch (e) {
              case 16777216:
              case 33554432:
                r = this._getColorFromAnsiIndex(t);
                break;
              case 50331648:
                const e = c.AttributeData.toColorRGB(t);
                r = n.channels.toColor(e[0], e[1], e[2]);
                break;
              default:
                r = i ? n.color.opaque(this._config.colors.foreground) : this._config.colors.background;
            }
            return r;
          }
          _getForegroundColor(e, t, i, r, o, a, h, l, d, _) {
            const u = this._getMinimumContrastColor(e, t, i, r, o, a, h, d, l, _);
            if (u) return u;
            let g;
            switch (o) {
              case 16777216:
              case 33554432:
                this._config.drawBoldTextInBrightColors && d && a < 8 && (a += 8), g = this._getColorFromAnsiIndex(a);
                break;
              case 50331648:
                const e = c.AttributeData.toColorRGB(a);
                g = n.channels.toColor(e[0], e[1], e[2]);
                break;
              default:
                g = h ? this._config.colors.background : this._config.colors.foreground;
            }
            return this._config.allowTransparency && (g = n.color.opaque(g)), l && (g = n.color.multiplyOpacity(g, s.DIM_OPACITY)), g;
          }
          _resolveBackgroundRgba(e, t, i) {
            switch (e) {
              case 16777216:
              case 33554432:
                return this._getColorFromAnsiIndex(t).rgba;
              case 50331648:
                return t << 8;
              default:
                return i ? this._config.colors.foreground.rgba : this._config.colors.background.rgba;
            }
          }
          _resolveForegroundRgba(e, t, i, s) {
            switch (e) {
              case 16777216:
              case 33554432:
                return this._config.drawBoldTextInBrightColors && s && t < 8 && (t += 8), this._getColorFromAnsiIndex(t).rgba;
              case 50331648:
                return t << 8;
              default:
                return i ? this._config.colors.background.rgba : this._config.colors.foreground.rgba;
            }
          }
          _getMinimumContrastColor(e, t, i, s, r, o, a, h, l, c) {
            if (1 === this._config.minimumContrastRatio || c) return;
            const d = this._getContrastCache(l),
              _ = d.getColor(e, s);
            if (void 0 !== _) return _ || void 0;
            const u = this._resolveBackgroundRgba(t, i, a),
              g = this._resolveForegroundRgba(r, o, a, h),
              v = n.rgba.ensureContrastRatio(u, g, this._config.minimumContrastRatio / (l ? 2 : 1));
            if (!v) return void d.setColor(e, s, null);
            const f = n.channels.toColor(v >> 24 & 255, v >> 16 & 255, v >> 8 & 255);
            return d.setColor(e, s, f), f;
          }
          _getContrastCache(e) {
            return e ? this._config.colors.halfContrastCache : this._config.colors.contrastCache;
          }
          _drawToCache(e, t, i, n, a = !1) {
            const h = "number" == typeof e ? String.fromCharCode(e) : e,
              l = Math.min(this._config.deviceCellWidth * Math.max(h.length, 2) + 4, this._textureSize);
            this._tmpCanvas.width < l && (this._tmpCanvas.width = l);
            const d = Math.min(this._config.deviceCellHeight + 8, this._textureSize);
            if (this._tmpCanvas.height < d && (this._tmpCanvas.height = d), this._tmpCtx.save(), this._workAttributeData.fg = i, this._workAttributeData.bg = t, this._workAttributeData.extended.ext = n, this._workAttributeData.isInvisible()) return _;
            const u = !!this._workAttributeData.isBold(),
              v = !!this._workAttributeData.isInverse(),
              p = !!this._workAttributeData.isDim(),
              C = !!this._workAttributeData.isItalic(),
              m = !!this._workAttributeData.isUnderline(),
              L = !!this._workAttributeData.isStrikethrough(),
              x = !!this._workAttributeData.isOverline();
            let w = this._workAttributeData.getFgColor(),
              b = this._workAttributeData.getFgColorMode(),
              M = this._workAttributeData.getBgColor(),
              R = this._workAttributeData.getBgColorMode();
            if (v) {
              const e = w;
              w = M, M = e;
              const t = b;
              b = R, R = t;
            }
            const y = this._getBackgroundColor(R, M, v, p);
            this._tmpCtx.globalCompositeOperation = "copy", this._tmpCtx.fillStyle = y.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.globalCompositeOperation = "source-over";
            const A = u ? this._config.fontWeightBold : this._config.fontWeight,
              E = C ? "italic" : "";
            this._tmpCtx.font = `${E} ${A} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`, this._tmpCtx.textBaseline = s.TEXT_BASELINE;
            const S = 1 === h.length && (0, o.isPowerlineGlyph)(h.charCodeAt(0)),
              T = 1 === h.length && (0, o.isRestrictedPowerlineGlyph)(h.charCodeAt(0)),
              D = this._getForegroundColor(t, R, M, i, b, w, v, p, u, (0, o.treatGlyphAsBackgroundColor)(h.charCodeAt(0)));
            this._tmpCtx.fillStyle = D.css;
            const B = T ? 0 : 4;
            let F = !1;
            !1 !== this._config.customGlyphs && (F = (0, r.tryDrawCustomChar)(this._tmpCtx, h, B, B, this._config.deviceCellWidth, this._config.deviceCellHeight, this._config.fontSize, this._config.devicePixelRatio));
            let P,
              I = !S;
            if (P = "number" == typeof e ? this._unicodeService.wcwidth(e) : this._unicodeService.getStringCellWidth(e), m) {
              this._tmpCtx.save();
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)),
                t = e % 2 == 1 ? .5 : 0;
              if (this._tmpCtx.lineWidth = e, this._workAttributeData.isUnderlineColorDefault()) this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle;else if (this._workAttributeData.isUnderlineColorRGB()) I = !1, this._tmpCtx.strokeStyle = `rgb(${c.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else {
                I = !1;
                let e = this._workAttributeData.getUnderlineColor();
                this._config.drawBoldTextInBrightColors && this._workAttributeData.isBold() && e < 8 && (e += 8), this._tmpCtx.strokeStyle = this._getColorFromAnsiIndex(e).css;
              }
              this._tmpCtx.beginPath();
              const i = B,
                s = Math.ceil(B + this._config.deviceCharHeight) - t - (a ? 2 * e : 0),
                r = s + e,
                n = s + 2 * e;
              let l = this._workAttributeData.getUnderlineVariantOffset();
              for (let a = 0; a < P; a++) {
                this._tmpCtx.save();
                const h = i + a * this._config.deviceCellWidth,
                  c = i + (a + 1) * this._config.deviceCellWidth,
                  d = h + this._config.deviceCellWidth / 2;
                switch (this._workAttributeData.extended.underlineStyle) {
                  case 2:
                    this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(c, s), this._tmpCtx.moveTo(h, n), this._tmpCtx.lineTo(c, n);
                    break;
                  case 3:
                    const i = e <= 1 ? n : Math.ceil(B + this._config.deviceCharHeight - e / 2) - t,
                      a = e <= 1 ? s : Math.ceil(B + this._config.deviceCharHeight + e / 2) - t,
                      _ = new Path2D();
                    _.rect(h, s, this._config.deviceCellWidth, n - s), this._tmpCtx.clip(_), this._tmpCtx.moveTo(h - this._config.deviceCellWidth / 2, r), this._tmpCtx.bezierCurveTo(h - this._config.deviceCellWidth / 2, a, h, a, h, r), this._tmpCtx.bezierCurveTo(h, i, d, i, d, r), this._tmpCtx.bezierCurveTo(d, a, c, a, c, r), this._tmpCtx.bezierCurveTo(c, i, c + this._config.deviceCellWidth / 2, i, c + this._config.deviceCellWidth / 2, r);
                    break;
                  case 4:
                    const u = 0 === l ? 0 : l >= e ? 2 * e - l : e - l;
                    !1 == !(l >= e) || 0 === u ? (this._tmpCtx.setLineDash([Math.round(e), Math.round(e)]), this._tmpCtx.moveTo(h + u, s), this._tmpCtx.lineTo(c, s)) : (this._tmpCtx.setLineDash([Math.round(e), Math.round(e)]), this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(h + u, s), this._tmpCtx.moveTo(h + u + e, s), this._tmpCtx.lineTo(c, s)), l = (0, o.computeNextVariantOffset)(c - h, e, l);
                    break;
                  case 5:
                    const g = .6,
                      v = .3,
                      f = c - h,
                      p = Math.floor(g * f),
                      C = Math.floor(v * f),
                      m = f - p - C;
                    this._tmpCtx.setLineDash([p, C, m]), this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(c, s);
                    break;
                  default:
                    this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(c, s);
                }
                this._tmpCtx.stroke(), this._tmpCtx.restore();
              }
              if (this._tmpCtx.restore(), !F && this._config.fontSize >= 12 && !this._config.allowTransparency && " " !== h) {
                this._tmpCtx.save(), this._tmpCtx.textBaseline = "alphabetic";
                const t = this._tmpCtx.measureText(h);
                if (this._tmpCtx.restore(), "actualBoundingBoxDescent" in t && t.actualBoundingBoxDescent > 0) {
                  this._tmpCtx.save();
                  const t = new Path2D();
                  t.rect(i, s - Math.ceil(e / 2), this._config.deviceCellWidth * P, n - s + Math.ceil(e / 2)), this._tmpCtx.clip(t), this._tmpCtx.lineWidth = 3 * this._config.devicePixelRatio, this._tmpCtx.strokeStyle = y.css, this._tmpCtx.strokeText(h, B, B + this._config.deviceCharHeight), this._tmpCtx.restore();
                }
              }
            }
            if (x) {
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)),
                t = e % 2 == 1 ? .5 : 0;
              this._tmpCtx.lineWidth = e, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(B, B + t), this._tmpCtx.lineTo(B + this._config.deviceCharWidth * P, B + t), this._tmpCtx.stroke();
            }
            if (F || this._tmpCtx.fillText(h, B, B + this._config.deviceCharHeight), "_" === h && !this._config.allowTransparency) {
              let e = f(this._tmpCtx.getImageData(B, B, this._config.deviceCellWidth, this._config.deviceCellHeight), y, D, I);
              if (e) for (let t = 1; t <= 5 && (this._tmpCtx.save(), this._tmpCtx.fillStyle = y.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.restore(), this._tmpCtx.fillText(h, B, B + this._config.deviceCharHeight - t), e = f(this._tmpCtx.getImageData(B, B, this._config.deviceCellWidth, this._config.deviceCellHeight), y, D, I), e); t++);
            }
            if (L) {
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 10)),
                t = this._tmpCtx.lineWidth % 2 == 1 ? .5 : 0;
              this._tmpCtx.lineWidth = e, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(B, B + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.lineTo(B + this._config.deviceCharWidth * P, B + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.stroke();
            }
            this._tmpCtx.restore();
            const O = this._tmpCtx.getImageData(0, 0, this._tmpCanvas.width, this._tmpCanvas.height);
            let k;
            if (k = this._config.allowTransparency ? function (e) {
              for (let t = 0; t < e.data.length; t += 4) if (e.data[t + 3] > 0) return !1;
              return !0;
            }(O) : f(O, y, D, I), k) return _;
            const $ = this._findGlyphBoundingBox(O, this._workBoundingBox, l, T, F, B);
            let U, N;
            for (;;) {
              if (0 === this._activePages.length) {
                const e = this._createNewPage();
                U = e, N = e.currentRow, N.height = $.size.y;
                break;
              }
              U = this._activePages[this._activePages.length - 1], N = U.currentRow;
              for (const e of this._activePages) $.size.y <= e.currentRow.height && (U = e, N = e.currentRow);
              for (let e = this._activePages.length - 1; e >= 0; e--) for (const t of this._activePages[e].fixedRows) t.height <= N.height && $.size.y <= t.height && (U = this._activePages[e], N = t);
              if (N.y + $.size.y >= U.canvas.height || N.height > $.size.y + 2) {
                let e = !1;
                if (U.currentRow.y + U.currentRow.height + $.size.y >= U.canvas.height) {
                  let t;
                  for (const e of this._activePages) if (e.currentRow.y + e.currentRow.height + $.size.y < e.canvas.height) {
                    t = e;
                    break;
                  }
                  if (t) U = t;else if (g.maxAtlasPages && this._pages.length >= g.maxAtlasPages && N.y + $.size.y <= U.canvas.height && N.height >= $.size.y && N.x + $.size.x <= U.canvas.width) e = !0;else {
                    const t = this._createNewPage();
                    U = t, N = t.currentRow, N.height = $.size.y, e = !0;
                  }
                }
                e || (U.currentRow.height > 0 && U.fixedRows.push(U.currentRow), N = {
                  x: 0,
                  y: U.currentRow.y + U.currentRow.height,
                  height: $.size.y
                }, U.fixedRows.push(N), U.currentRow = {
                  x: 0,
                  y: N.y + N.height,
                  height: 0
                });
              }
              if (N.x + $.size.x <= U.canvas.width) break;
              N === U.currentRow ? (N.x = 0, N.y += N.height, N.height = 0) : U.fixedRows.splice(U.fixedRows.indexOf(N), 1);
            }
            return $.texturePage = this._pages.indexOf(U), $.texturePosition.x = N.x, $.texturePosition.y = N.y, $.texturePositionClipSpace.x = N.x / U.canvas.width, $.texturePositionClipSpace.y = N.y / U.canvas.height, $.sizeClipSpace.x /= U.canvas.width, $.sizeClipSpace.y /= U.canvas.height, N.height = Math.max(N.height, $.size.y), N.x += $.size.x, U.ctx.putImageData(O, $.texturePosition.x - this._workBoundingBox.left, $.texturePosition.y - this._workBoundingBox.top, this._workBoundingBox.left, this._workBoundingBox.top, $.size.x, $.size.y), U.addGlyph($), U.version++, $;
          }
          _findGlyphBoundingBox(e, t, i, s, r, o) {
            t.top = 0;
            const n = s ? this._config.deviceCellHeight : this._tmpCanvas.height,
              a = s ? this._config.deviceCellWidth : i;
            let h = !1;
            for (let i = 0; i < n; i++) {
              for (let s = 0; s < a; s++) {
                const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                if (0 !== e.data[r]) {
                  t.top = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.left = 0, h = !1;
            for (let i = 0; i < o + a; i++) {
              for (let s = 0; s < n; s++) {
                const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                if (0 !== e.data[r]) {
                  t.left = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.right = a, h = !1;
            for (let i = o + a - 1; i >= o; i--) {
              for (let s = 0; s < n; s++) {
                const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                if (0 !== e.data[r]) {
                  t.right = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.bottom = n, h = !1;
            for (let i = n - 1; i >= 0; i--) {
              for (let s = 0; s < a; s++) {
                const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                if (0 !== e.data[r]) {
                  t.bottom = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            return {
              texturePage: 0,
              texturePosition: {
                x: 0,
                y: 0
              },
              texturePositionClipSpace: {
                x: 0,
                y: 0
              },
              size: {
                x: t.right - t.left + 1,
                y: t.bottom - t.top + 1
              },
              sizeClipSpace: {
                x: t.right - t.left + 1,
                y: t.bottom - t.top + 1
              },
              offset: {
                x: -t.left + o + (s || r ? Math.floor((this._config.deviceCellWidth - this._config.deviceCharWidth) / 2) : 0),
                y: -t.top + o + (s || r ? 1 === this._config.lineHeight ? 0 : Math.round((this._config.deviceCellHeight - this._config.deviceCharHeight) / 2) : 0)
              }
            };
          }
        }
        t.TextureAtlas = g;
        class v {
          get percentageUsed() {
            return this._usedPixels / (this.canvas.width * this.canvas.height);
          }
          get glyphs() {
            return this._glyphs;
          }
          addGlyph(e) {
            this._glyphs.push(e), this._usedPixels += e.size.x * e.size.y;
          }
          constructor(e, t, i) {
            if (this._usedPixels = 0, this._glyphs = [], this.version = 0, this.currentRow = {
              x: 0,
              y: 0,
              height: 0
            }, this.fixedRows = [], i) for (const e of i) this._glyphs.push(...e.glyphs), this._usedPixels += e._usedPixels;
            this.canvas = p(e, t, t), this.ctx = (0, o.throwIfFalsy)(this.canvas.getContext("2d", {
              alpha: !0
            }));
          }
          clear() {
            this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.currentRow.x = 0, this.currentRow.y = 0, this.currentRow.height = 0, this.fixedRows.length = 0, this.version++;
          }
        }
        function f(e, t, i, s) {
          const r = t.rgba >>> 24,
            o = t.rgba >>> 16 & 255,
            n = t.rgba >>> 8 & 255,
            a = i.rgba >>> 24,
            h = i.rgba >>> 16 & 255,
            l = i.rgba >>> 8 & 255,
            c = Math.floor((Math.abs(r - a) + Math.abs(o - h) + Math.abs(n - l)) / 12);
          let d = !0;
          for (let t = 0; t < e.data.length; t += 4) e.data[t] === r && e.data[t + 1] === o && e.data[t + 2] === n || s && Math.abs(e.data[t] - r) + Math.abs(e.data[t + 1] - o) + Math.abs(e.data[t + 2] - n) < c ? e.data[t + 3] = 0 : d = !1;
          return d;
        }
        function p(e, t, i) {
          const s = e.createElement("canvas");
          return s.width = t, s.height = i, s;
        }
      },
      160: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
        const s = i(399);
        let r = 0,
          o = 0,
          n = 0,
          a = 0;
        var h, l, c, d, _;
        function u(e) {
          const t = e.toString(16);
          return t.length < 2 ? "0" + t : t;
        }
        function g(e, t) {
          return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
        }
        t.NULL_COLOR = {
          css: "#00000000",
          rgba: 0
        }, function (e) {
          e.toCss = function (e, t, i, s) {
            return void 0 !== s ? `#${u(e)}${u(t)}${u(i)}${u(s)}` : `#${u(e)}${u(t)}${u(i)}`;
          }, e.toRgba = function (e, t, i, s = 255) {
            return (e << 24 | t << 16 | i << 8 | s) >>> 0;
          }, e.toColor = function (t, i, s, r) {
            return {
              css: e.toCss(t, i, s, r),
              rgba: e.toRgba(t, i, s, r)
            };
          };
        }(h || (t.channels = h = {})), function (e) {
          function t(e, t) {
            return a = Math.round(255 * t), [r, o, n] = _.toChannels(e.rgba), {
              css: h.toCss(r, o, n, a),
              rgba: h.toRgba(r, o, n, a)
            };
          }
          e.blend = function (e, t) {
            if (a = (255 & t.rgba) / 255, 1 === a) return {
              css: t.css,
              rgba: t.rgba
            };
            const i = t.rgba >> 24 & 255,
              s = t.rgba >> 16 & 255,
              l = t.rgba >> 8 & 255,
              c = e.rgba >> 24 & 255,
              d = e.rgba >> 16 & 255,
              _ = e.rgba >> 8 & 255;
            return r = c + Math.round((i - c) * a), o = d + Math.round((s - d) * a), n = _ + Math.round((l - _) * a), {
              css: h.toCss(r, o, n),
              rgba: h.toRgba(r, o, n)
            };
          }, e.isOpaque = function (e) {
            return 255 == (255 & e.rgba);
          }, e.ensureContrastRatio = function (e, t, i) {
            const s = _.ensureContrastRatio(e.rgba, t.rgba, i);
            if (s) return h.toColor(s >> 24 & 255, s >> 16 & 255, s >> 8 & 255);
          }, e.opaque = function (e) {
            const t = (255 | e.rgba) >>> 0;
            return [r, o, n] = _.toChannels(t), {
              css: h.toCss(r, o, n),
              rgba: t
            };
          }, e.opacity = t, e.multiplyOpacity = function (e, i) {
            return a = 255 & e.rgba, t(e, a * i / 255);
          }, e.toColorRGB = function (e) {
            return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
          };
        }(l || (t.color = l = {})), function (e) {
          let t, i;
          if (!s.isNode) {
            const e = document.createElement("canvas");
            e.width = 1, e.height = 1;
            const s = e.getContext("2d", {
              willReadFrequently: !0
            });
            s && (t = s, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
          }
          e.toColor = function (e) {
            if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
              case 4:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), h.toColor(r, o, n);
              case 5:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), h.toColor(r, o, n, a);
              case 7:
                return {
                  css: e,
                  rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                };
              case 9:
                return {
                  css: e,
                  rgba: parseInt(e.slice(1), 16) >>> 0
                };
            }
            const s = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
            if (s) return r = parseInt(s[1]), o = parseInt(s[2]), n = parseInt(s[3]), a = Math.round(255 * (void 0 === s[5] ? 1 : parseFloat(s[5]))), h.toColor(r, o, n, a);
            if (!t || !i) throw new Error("css.toColor: Unsupported css format");
            if (t.fillStyle = i, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
            if (t.fillRect(0, 0, 1, 1), [r, o, n, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
            return {
              rgba: h.toRgba(r, o, n, a),
              css: e
            };
          };
        }(c || (t.css = c = {})), function (e) {
          function t(e, t, i) {
            const s = e / 255,
              r = t / 255,
              o = i / 255;
            return .2126 * (s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4)) + .7152 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (o <= .03928 ? o / 12.92 : Math.pow((o + .055) / 1.055, 2.4));
          }
          e.relativeLuminance = function (e) {
            return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
          }, e.relativeLuminance2 = t;
        }(d || (t.rgb = d = {})), function (e) {
          function t(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              o = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            for (; l < i && (n > 0 || a > 0 || h > 0);) n -= Math.max(0, Math.ceil(.1 * n)), a -= Math.max(0, Math.ceil(.1 * a)), h -= Math.max(0, Math.ceil(.1 * h)), l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          function i(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              o = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            for (; l < i && (n < 255 || a < 255 || h < 255);) n = Math.min(255, n + Math.ceil(.1 * (255 - n))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), h = Math.min(255, h + Math.ceil(.1 * (255 - h))), l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          e.blend = function (e, t) {
            if (a = (255 & t) / 255, 1 === a) return t;
            const i = t >> 24 & 255,
              s = t >> 16 & 255,
              l = t >> 8 & 255,
              c = e >> 24 & 255,
              d = e >> 16 & 255,
              _ = e >> 8 & 255;
            return r = c + Math.round((i - c) * a), o = d + Math.round((s - d) * a), n = _ + Math.round((l - _) * a), h.toRgba(r, o, n);
          }, e.ensureContrastRatio = function (e, s, r) {
            const o = d.relativeLuminance(e >> 8),
              n = d.relativeLuminance(s >> 8);
            if (g(o, n) < r) {
              if (n < o) {
                const n = t(e, s, r),
                  a = g(o, d.relativeLuminance(n >> 8));
                if (a < r) {
                  const t = i(e, s, r);
                  return a > g(o, d.relativeLuminance(t >> 8)) ? n : t;
                }
                return n;
              }
              const a = i(e, s, r),
                h = g(o, d.relativeLuminance(a >> 8));
              if (h < r) {
                const i = t(e, s, r);
                return h > g(o, d.relativeLuminance(i >> 8)) ? a : i;
              }
              return a;
            }
          }, e.reduceLuminance = t, e.increaseLuminance = i, e.toChannels = function (e) {
            return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          };
        }(_ || (t.rgba = _ = {})), t.toPaddedHex = u, t.contrastRatio = g;
      },
      345: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const i = [];
            for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
            for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
          }
          dispose() {
            this.clearListeners(), this._disposed = !0;
          }
          clearListeners() {
            this._listeners && (this._listeners.length = 0);
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        }, t.runAndSubscribe = function (e, t) {
          return t(void 0), e(e => t(e));
        };
      },
      859: (e, t) => {
        function i(e) {
          for (const t of e) t.dispose();
          e.length = 0;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.MutableDisposable = t.Disposable = void 0, t.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const e of this._disposables) e.dispose();
            this._disposables.length = 0;
          }
          register(e) {
            return this._disposables.push(e), e;
          }
          unregister(e) {
            const t = this._disposables.indexOf(e);
            -1 !== t && this._disposables.splice(t, 1);
          }
        }, t.MutableDisposable = class {
          constructor() {
            this._isDisposed = !1;
          }
          get value() {
            return this._isDisposed ? void 0 : this._value;
          }
          set value(e) {
            this._isDisposed || e === this._value || (this._value?.dispose(), this._value = e);
          }
          clear() {
            this.value = void 0;
          }
          dispose() {
            this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
          }
        }, t.toDisposable = function (e) {
          return {
            dispose: e
          };
        }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
          return {
            dispose: () => i(e)
          };
        };
      },
      485: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.FourKeyMap = t.TwoKeyMap = void 0;
        class i {
          constructor() {
            this._data = {};
          }
          set(e, t, i) {
            this._data[e] || (this._data[e] = {}), this._data[e][t] = i;
          }
          get(e, t) {
            return this._data[e] ? this._data[e][t] : void 0;
          }
          clear() {
            this._data = {};
          }
        }
        t.TwoKeyMap = i, t.FourKeyMap = class {
          constructor() {
            this._data = new i();
          }
          set(e, t, s, r, o) {
            this._data.get(e, t) || this._data.set(e, t, new i()), this._data.get(e, t).set(s, r, o);
          }
          get(e, t, i, s) {
            return this._data.get(e, t)?.get(i, s);
          }
          clear() {
            this._data.clear();
          }
        };
      },
      399: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" != typeof process;
        const i = t.isNode ? "node" : navigator.userAgent,
          s = t.isNode ? "node" : navigator.platform;
        t.isFirefox = i.includes("Firefox"), t.isLegacyEdge = i.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(i), t.getSafariVersion = function () {
          if (!t.isSafari) return 0;
          const e = i.match(/Version\/(\d+)/);
          return null === e || e.length < 2 ? 0 : parseInt(e[1]);
        }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s), t.isIpad = "iPad" === s, t.isIphone = "iPhone" === s, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s), t.isLinux = s.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(i);
      },
      385: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DebouncedIdleTask = t.IdleTaskQueue = t.PriorityTaskQueue = void 0;
        const s = i(399);
        class r {
          constructor() {
            this._tasks = [], this._i = 0;
          }
          enqueue(e) {
            this._tasks.push(e), 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(e) {
            this._idleCallback = void 0;
            let t = 0,
              i = 0,
              s = e.timeRemaining(),
              r = 0;
            for (; this._i < this._tasks.length;) {
              if (t = Date.now(), this._tasks[this._i]() || this._i++, t = Math.max(1, Date.now() - t), i = Math.max(t, i), r = e.timeRemaining(), 1.5 * i > r) return s - t < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - t))}ms`), void this._start();
              s = r;
            }
            this.clear();
          }
        }
        class o extends r {
          _requestCallback(e) {
            return setTimeout(() => e(this._createDeadline(16)));
          }
          _cancelCallback(e) {
            clearTimeout(e);
          }
          _createDeadline(e) {
            const t = Date.now() + e;
            return {
              timeRemaining: () => Math.max(0, t - Date.now())
            };
          }
        }
        t.PriorityTaskQueue = o, t.IdleTaskQueue = !s.isNode && "requestIdleCallback" in window ? class extends r {
          _requestCallback(e) {
            return requestIdleCallback(e);
          }
          _cancelCallback(e) {
            cancelIdleCallback(e);
          }
        } : o, t.DebouncedIdleTask = class {
          constructor() {
            this._queue = new t.IdleTaskQueue();
          }
          set(e) {
            this._queue.clear(), this._queue.enqueue(e);
          }
          flush() {
            this._queue.flush();
          }
        };
      },
      147: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ExtendedAttrs = t.AttributeData = void 0;
        class i {
          constructor() {
            this.fg = 0, this.bg = 0, this.extended = new s();
          }
          static toColorRGB(e) {
            return [e >>> 16 & 255, e >>> 8 & 255, 255 & e];
          }
          static fromColorRGB(e) {
            return (255 & e[0]) << 16 | (255 & e[1]) << 8 | 255 & e[2];
          }
          clone() {
            const e = new i();
            return e.fg = this.fg, e.bg = this.bg, e.extended = this.extended.clone(), e;
          }
          isInverse() {
            return 67108864 & this.fg;
          }
          isBold() {
            return 134217728 & this.fg;
          }
          isUnderline() {
            return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 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;
          }
          isOverline() {
            return 1073741824 & this.bg;
          }
          getFgColorMode() {
            return 50331648 & this.fg;
          }
          getBgColorMode() {
            return 50331648 & this.bg;
          }
          isFgRGB() {
            return 50331648 == (50331648 & this.fg);
          }
          isBgRGB() {
            return 50331648 == (50331648 & this.bg);
          }
          isFgPalette() {
            return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
          }
          isBgPalette() {
            return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
          }
          isFgDefault() {
            return 0 == (50331648 & this.fg);
          }
          isBgDefault() {
            return 0 == (50331648 & this.bg);
          }
          isAttributeDefault() {
            return 0 === this.fg && 0 === this.bg;
          }
          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 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
          }
          isUnderlineColorPalette() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
          }
          isUnderlineColorDefault() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
          }
          getUnderlineStyle() {
            return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
          }
          getUnderlineVariantOffset() {
            return this.extended.underlineVariantOffset;
          }
        }
        t.AttributeData = i;
        class s {
          get ext() {
            return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
          }
          set ext(e) {
            this._ext = e;
          }
          get underlineStyle() {
            return this._urlId ? 5 : (469762048 & this._ext) >> 26;
          }
          set underlineStyle(e) {
            this._ext &= -469762049, this._ext |= e << 26 & 469762048;
          }
          get underlineColor() {
            return 67108863 & this._ext;
          }
          set underlineColor(e) {
            this._ext &= -67108864, this._ext |= 67108863 & e;
          }
          get urlId() {
            return this._urlId;
          }
          set urlId(e) {
            this._urlId = e;
          }
          get underlineVariantOffset() {
            const e = (3758096384 & this._ext) >> 29;
            return e < 0 ? 4294967288 ^ e : e;
          }
          set underlineVariantOffset(e) {
            this._ext &= 536870911, this._ext |= e << 29 & 3758096384;
          }
          constructor(e = 0, t = 0) {
            this._ext = 0, this._urlId = 0, this._ext = e, this._urlId = t;
          }
          clone() {
            return new s(this._ext, this._urlId);
          }
          isEmpty() {
            return 0 === this.underlineStyle && 0 === this._urlId;
          }
        }
        t.ExtendedAttrs = s;
      },
      782: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellData = void 0;
        const s = i(133),
          r = i(855),
          o = i(147);
        class n extends o.AttributeData {
          constructor() {
            super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new o.ExtendedAttrs(), this.combinedData = "";
          }
          static fromCharData(e) {
            const t = new n();
            return t.setFromCharData(e), t;
          }
          isCombined() {
            return 2097152 & this.content;
          }
          getWidth() {
            return this.content >> 22;
          }
          getChars() {
            return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s.stringFromCodePoint)(2097151 & this.content) : "";
          }
          getCode() {
            return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
          }
          setFromCharData(e) {
            this.fg = e[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
            let t = !1;
            if (e[r.CHAR_DATA_CHAR_INDEX].length > 2) t = !0;else if (2 === e[r.CHAR_DATA_CHAR_INDEX].length) {
              const i = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
              if (55296 <= i && i <= 56319) {
                const s = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                56320 <= s && s <= 57343 ? this.content = 1024 * (i - 55296) + s - 56320 + 65536 | e[r.CHAR_DATA_WIDTH_INDEX] << 22 : t = !0;
              } else t = !0;
            } else this.content = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e[r.CHAR_DATA_WIDTH_INDEX] << 22;
            t && (this.combinedData = e[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e[r.CHAR_DATA_WIDTH_INDEX] << 22);
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.CellData = n;
      },
      855: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
      },
      133: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Utf8ToUtf32 = t.StringToUtf32 = t.utf32ToString = t.stringFromCodePoint = void 0, t.stringFromCodePoint = function (e) {
          return e > 65535 ? (e -= 65536, String.fromCharCode(55296 + (e >> 10)) + String.fromCharCode(e % 1024 + 56320)) : String.fromCharCode(e);
        }, t.utf32ToString = function (e, t = 0, i = e.length) {
          let s = "";
          for (let r = t; r < i; ++r) {
            let t = e[r];
            t > 65535 ? (t -= 65536, s += String.fromCharCode(55296 + (t >> 10)) + String.fromCharCode(t % 1024 + 56320)) : s += String.fromCharCode(t);
          }
          return s;
        }, t.StringToUtf32 = class {
          constructor() {
            this._interim = 0;
          }
          clear() {
            this._interim = 0;
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s = 0,
              r = 0;
            if (this._interim) {
              const i = e.charCodeAt(r++);
              56320 <= i && i <= 57343 ? t[s++] = 1024 * (this._interim - 55296) + i - 56320 + 65536 : (t[s++] = this._interim, t[s++] = i), this._interim = 0;
            }
            for (let o = r; o < i; ++o) {
              const r = e.charCodeAt(o);
              if (55296 <= r && r <= 56319) {
                if (++o >= i) return this._interim = r, s;
                const n = e.charCodeAt(o);
                56320 <= n && n <= 57343 ? t[s++] = 1024 * (r - 55296) + n - 56320 + 65536 : (t[s++] = r, t[s++] = n);
              } else 65279 !== r && (t[s++] = r);
            }
            return s;
          }
        }, t.Utf8ToUtf32 = class {
          constructor() {
            this.interim = new Uint8Array(3);
          }
          clear() {
            this.interim.fill(0);
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s,
              r,
              o,
              n,
              a = 0,
              h = 0,
              l = 0;
            if (this.interim[0]) {
              let s = !1,
                r = this.interim[0];
              r &= 192 == (224 & r) ? 31 : 224 == (240 & r) ? 15 : 7;
              let o,
                n = 0;
              for (; (o = 63 & this.interim[++n]) && n < 4;) r <<= 6, r |= o;
              const h = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4,
                c = h - n;
              for (; l < c;) {
                if (l >= i) return 0;
                if (o = e[l++], 128 != (192 & o)) {
                  l--, s = !0;
                  break;
                }
                this.interim[n++] = o, r <<= 6, r |= 63 & o;
              }
              s || (2 === h ? r < 128 ? l-- : t[a++] = r : 3 === h ? r < 2048 || r >= 55296 && r <= 57343 || 65279 === r || (t[a++] = r) : r < 65536 || r > 1114111 || (t[a++] = r)), this.interim.fill(0);
            }
            const c = i - 4;
            let d = l;
            for (; d < i;) {
              for (; !(!(d < c) || 128 & (s = e[d]) || 128 & (r = e[d + 1]) || 128 & (o = e[d + 2]) || 128 & (n = e[d + 3]));) t[a++] = s, t[a++] = r, t[a++] = o, t[a++] = n, d += 4;
              if (s = e[d++], s < 128) t[a++] = s;else if (192 == (224 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (h = (31 & s) << 6 | 63 & r, h < 128) {
                  d--;
                  continue;
                }
                t[a++] = h;
              } else if (224 == (240 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (h = (15 & s) << 12 | (63 & r) << 6 | 63 & o, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
                t[a++] = h;
              } else if (240 == (248 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, this.interim[2] = o, a;
                if (n = e[d++], 128 != (192 & n)) {
                  d--;
                  continue;
                }
                if (h = (7 & s) << 18 | (63 & r) << 12 | (63 & o) << 6 | 63 & n, h < 65536 || h > 1114111) continue;
                t[a++] = h;
              }
            }
            return a;
          }
        };
      },
      776: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              o = arguments.length,
              n = o < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
            return o > 3 && n && Object.defineProperty(t, i, n), n;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.traceCall = t.setTraceLogger = t.LogService = void 0;
        const o = i(859),
          n = i(97),
          a = {
            trace: n.LogLevelEnum.TRACE,
            debug: n.LogLevelEnum.DEBUG,
            info: n.LogLevelEnum.INFO,
            warn: n.LogLevelEnum.WARN,
            error: n.LogLevelEnum.ERROR,
            off: n.LogLevelEnum.OFF
          };
        let h,
          l = t.LogService = class extends o.Disposable {
            get logLevel() {
              return this._logLevel;
            }
            constructor(e) {
              super(), this._optionsService = e, this._logLevel = n.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), h = this;
            }
            _updateLogLevel() {
              this._logLevel = a[this._optionsService.rawOptions.logLevel];
            }
            _evalLazyOptionalParams(e) {
              for (let t = 0; t < e.length; t++) "function" == typeof e[t] && (e[t] = e[t]());
            }
            _log(e, t, i) {
              this._evalLazyOptionalParams(i), e.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t, ...i);
            }
            trace(e, ...t) {
              this._logLevel <= n.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e, t);
            }
            debug(e, ...t) {
              this._logLevel <= n.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e, t);
            }
            info(e, ...t) {
              this._logLevel <= n.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e, t);
            }
            warn(e, ...t) {
              this._logLevel <= n.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e, t);
            }
            error(e, ...t) {
              this._logLevel <= n.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e, t);
            }
          };
        t.LogService = l = s([r(0, n.IOptionsService)], l), t.setTraceLogger = function (e) {
          h = e;
        }, t.traceCall = function (e, t, i) {
          if ("function" != typeof i.value) throw new Error("not supported");
          const s = i.value;
          i.value = function (...e) {
            if (h.logLevel !== n.LogLevelEnum.TRACE) return s.apply(this, e);
            h.trace(`GlyphRenderer#${s.name}(${e.map(e => JSON.stringify(e)).join(", ")})`);
            const t = s.apply(this, e);
            return h.trace(`GlyphRenderer#${s.name} return`, t), t;
          };
        };
      },
      726: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0;
        const i = "di$target",
          s = "di$dependencies";
        t.serviceRegistry = new Map(), t.getServiceDependencies = function (e) {
          return e[s] || [];
        }, t.createDecorator = function (e) {
          if (t.serviceRegistry.has(e)) return t.serviceRegistry.get(e);
          const r = function (e, t, o) {
            if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
            !function (e, t, r) {
              t[i] === t ? t[s].push({
                id: e,
                index: r
              }) : (t[s] = [{
                id: e,
                index: r
              }], t[i] = t);
            }(r, e, o);
          };
          return r.toString = () => e, t.serviceRegistry.set(e, r), r;
        };
      },
      97: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.IDecorationService = t.IUnicodeService = t.IOscLinkService = t.IOptionsService = t.ILogService = t.LogLevelEnum = t.IInstantiationService = t.ICharsetService = t.ICoreService = t.ICoreMouseService = t.IBufferService = void 0;
        const s = i(726);
        var r;
        t.IBufferService = (0, s.createDecorator)("BufferService"), t.ICoreMouseService = (0, s.createDecorator)("CoreMouseService"), t.ICoreService = (0, s.createDecorator)("CoreService"), t.ICharsetService = (0, s.createDecorator)("CharsetService"), t.IInstantiationService = (0, s.createDecorator)("InstantiationService"), function (e) {
          e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.OFF = 5] = "OFF";
        }(r || (t.LogLevelEnum = r = {})), t.ILogService = (0, s.createDecorator)("LogService"), t.IOptionsService = (0, s.createDecorator)("OptionsService"), t.IOscLinkService = (0, s.createDecorator)("OscLinkService"), t.IUnicodeService = (0, s.createDecorator)("UnicodeService"), t.IDecorationService = (0, s.createDecorator)("DecorationService");
      }
    },
    t = {};
  function i(s) {
    var r = t[s];
    if (void 0 !== r) return r.exports;
    var o = t[s] = {
      exports: {}
    };
    return e[s].call(o.exports, o, o.exports, i), o.exports;
  }
  var s = {};
  return (() => {
    var e = s;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.WebglAddon = void 0;
    const t = i(345),
      r = i(859),
      o = i(399),
      n = i(666),
      a = i(776);
    class h extends r.Disposable {
      constructor(e) {
        if (o.isSafari && (0, o.getSafariVersion)() < 16) {
          const e = {
            antialias: !1,
            depth: !1,
            preserveDrawingBuffer: !0
          };
          if (!document.createElement("canvas").getContext("webgl2", e)) throw new Error("Webgl2 is only supported on Safari 16 and above");
        }
        super(), this._preserveDrawingBuffer = e, this._onChangeTextureAtlas = this.register(new t.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new t.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = this.register(new t.EventEmitter()), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._onContextLoss = this.register(new t.EventEmitter()), this.onContextLoss = this._onContextLoss.event;
      }
      activate(e) {
        const i = e._core;
        if (!e.element) return void this.register(i.onWillOpen(() => this.activate(e)));
        this._terminal = e;
        const s = i.coreService,
          o = i.optionsService,
          h = i,
          l = h._renderService,
          c = h._characterJoinerService,
          d = h._charSizeService,
          _ = h._coreBrowserService,
          u = h._decorationService,
          g = h._logService,
          v = h._themeService;
        (0, a.setTraceLogger)(g), this._renderer = this.register(new n.WebglRenderer(e, c, d, _, s, u, o, v, this._preserveDrawingBuffer)), this.register((0, t.forwardEvent)(this._renderer.onContextLoss, this._onContextLoss)), this.register((0, t.forwardEvent)(this._renderer.onChangeTextureAtlas, this._onChangeTextureAtlas)), this.register((0, t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas)), this.register((0, t.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas, this._onRemoveTextureAtlasCanvas)), l.setRenderer(this._renderer), this.register((0, r.toDisposable)(() => {
          const t = this._terminal._core._renderService;
          t.setRenderer(this._terminal._core._createRenderer()), t.handleResize(e.cols, e.rows);
        }));
      }
      get textureAtlas() {
        return this._renderer?.textureAtlas;
      }
      clearTextureAtlas() {
        this._renderer?.clearTextureAtlas();
      }
    }
    e.WebglAddon = h;
  })(), s;
})());

/***/ },

/***/ 947
/*!*************************************************************!*\
  !*** ../app/node_modules/has-property-descriptors/index.js ***!
  \*************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var $defineProperty = __webpack_require__(/*! es-define-property */ 5832);
var hasPropertyDescriptors = function hasPropertyDescriptors() {
  return !!$defineProperty;
};
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
  // node v0.6 has a bug where array lengths can be Set but not Defined
  if (!$defineProperty) {
    return null;
  }
  try {
    return $defineProperty([], 'length', {
      value: 1
    }).length !== 1;
  } catch (e) {
    // In Firefox 4-22, defining length on an array throws an exception.
    return true;
  }
};
module.exports = hasPropertyDescriptors;

/***/ },

/***/ 954
/*!****************************************************!*\
  !*** ../app/node_modules/math-intrinsics/isNaN.js ***!
  \****************************************************/
(module) {

"use strict";


/** @type {import('./isNaN')} */
module.exports = Number.isNaN || function isNaN(a) {
  return a !== a;
};

/***/ },

/***/ 988
/*!***********************************************************!*\
  !*** ../app/node_modules/available-typed-arrays/index.js ***!
  \***********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var possibleNames = __webpack_require__(/*! possible-typed-array-names */ 9041);
var g = typeof globalThis === 'undefined' ? global : globalThis;

/** @type {import('.')} */
module.exports = function availableTypedArrays() {
  var /** @type {ReturnType<typeof availableTypedArrays>} */out = [];
  for (var i = 0; i < possibleNames.length; i++) {
    if (typeof g[possibleNames[i]] === 'function') {
      // @ts-expect-error
      out[out.length] = possibleNames[i];
    }
  }
  return out;
};

/***/ },

/***/ 1045
/*!****************************!*\
  !*** ./src/icons/case.svg ***!
  \****************************/
(module) {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"text-size\" class=\"svg-inline--fa fa-text-size\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M0 48l0 96C0 152.8 7.156 160 16 160S32 152.8 32 144V64h144v384h-64C103.2 448 96 455.2 96 464S103.2 480 112 480h160C280.8 480 288 472.8 288 464S280.8 448 272 448h-64V64H352v80C352 152.8 359.2 160 368 160S384 152.8 384 144v-96C384 39.16 376.8 32 368 32h-352C7.156 32 0 39.16 0 48zM320 240v64c0 8.844 7.156 16 16 16S352 312.8 352 304V256h112v192H416c-8.844 0-16 7.156-16 16S407.2 480 416 480h128c8.844 0 16-7.156 16-16S552.8 448 544 448h-48V256H608v48c0 8.844 7.156 16 16 16S640 312.8 640 304v-64C640 231.2 632.8 224 624 224h-288C327.2 224 320 231.2 320 240z\"></path></svg>"

/***/ },

/***/ 1055
/*!***********************************************!*\
  !*** ../node_modules/es-get-iterator/node.js ***!
  \***********************************************/
(module) {

"use strict";


// this should only run in node >= 13.2, so it
// does not need any of the intense fallbacks that old node/browsers do
var $iterator = Symbol.iterator;
module.exports = function getIterator(iterable) {
  // alternatively, `iterable[$iterator]?.()`
  if (iterable != null && typeof iterable[$iterator] !== 'undefined') {
    return iterable[$iterator]();
  }
};

/***/ },

/***/ 1243
/*!*****************************************!*\
  !*** ../node_modules/object-is/shim.js ***!
  \*****************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var getPolyfill = __webpack_require__(/*! ./polyfill */ 4301);
var define = __webpack_require__(/*! define-properties */ 2445);
module.exports = function shimObjectIs() {
  var polyfill = getPolyfill();
  define(Object, {
    is: polyfill
  }, {
    is: function testObjectIs() {
      return Object.is !== polyfill;
    }
  });
  return polyfill;
};

/***/ },

/***/ 1284
/*!*****************************************!*\
  !*** ../app/node_modules/gopd/index.js ***!
  \*****************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


/** @type {import('.')} */
var $gOPD = __webpack_require__(/*! ./gOPD */ 4448);
if ($gOPD) {
  try {
    $gOPD([], 'length');
  } catch (e) {
    // IE 8 has a broken gOPD
    $gOPD = null;
  }
}
module.exports = $gOPD;

/***/ },

/***/ 1290
/*!**************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/baseTerminalTab.component.scss ***!
  \**************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{flex:auto;display:flex;flex-direction:column;position:relative}:host>.content{flex:auto;position:relative;display:block;overflow:hidden;margin:max(0px,30px*var(--spaciness) - 15px);transition:opacity ease-out .25s;opacity:0}:host>.content div[style]:last-child{background:#000 !important;color:#fff !important}:host>terminal-toolbar{position:absolute;top:0;left:0;right:0;z-index:4;opacity:0;transition:.25s opacity;will-change:transform;transform:translate(0, -100px);transition:.25s transform ease-out;height:40px}:host.toolbar-revealed>terminal-toolbar,:host.toolbar-pinned>terminal-toolbar{opacity:1;transform:translate(0, 0)}:host>.toolbar-pin-button{position:absolute;right:34px;top:5px;z-index:4;background:rgba(0,0,0,.2784313725)}:host.toolbar-pinned>.terminal-toolbar-spacer{width:100%;height:40px}:host-context(.with-title-inset){padding-top:20px}:host-context(.with-title-inset) terminal-toolbar{padding-left:90px}", "",{"version":3,"sources":["webpack://./src/components/baseTerminalTab.component.scss"],"names":[],"mappings":"AAAA,MACI,SAAA,CACA,YAAA,CACA,qBAAA,CAEA,iBAAA,CAEA,eACI,SAAA,CACA,iBAAA,CACA,aAAA,CACA,eAAA,CACA,4CAAA,CACA,gCAAA,CACA,SAAA,CAEA,qCACI,0BAAA,CACA,qBAAA,CAMR,uBACI,iBAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,SAAA,CAEA,SAAA,CACA,uBAAA,CACA,qBAAA,CACA,8BAAA,CACA,kCAAA,CACA,WAdY,CAkBZ,8EACI,SAAA,CACA,yBAAA,CAIR,0BACI,iBAAA,CACA,UAAA,CACA,OAAA,CACA,SAAA,CACA,kCAAA,CAGJ,8CACI,UAAA,CACA,WAlCY,CAsCpB,iCACI,gBAAA,CAEA,kDACI,iBAAA","sourcesContent":[":host {\n    flex: auto;\n    display: flex;\n    flex-direction: column;\n    // overflow: hidden;\n    position: relative;\n\n    &> .content {\n        flex: auto;\n        position: relative;\n        display: block;\n        overflow: hidden;\n        margin: calc(max(0px, 30px * var(--spaciness) - 15px));\n        transition: opacity ease-out 0.25s;\n        opacity: 0;\n\n        div[style]:last-child {\n            background: black !important;\n            color: white !important;\n        }\n    }\n\n    $toolbarHeight: 40px;\n\n    > terminal-toolbar {\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        z-index: 4;\n\n        opacity: 0;\n        transition: 0.25s opacity;\n        will-change: transform;\n        transform: translate(0, -100px);\n        transition: 0.25s transform ease-out;\n        height: $toolbarHeight;\n    }\n\n    &.toolbar-revealed, &.toolbar-pinned {\n        > terminal-toolbar {\n            opacity: 1;\n            transform: translate(0, 0);\n        }\n    }\n\n    > .toolbar-pin-button {\n        position: absolute;\n        right: 34px;\n        top: 5px;\n        z-index: 4;\n        background: #00000047;\n    }\n\n    &.toolbar-pinned > .terminal-toolbar-spacer {\n        width: 100%;\n        height: $toolbarHeight;\n    }\n}\n\n:host-context(.with-title-inset) {\n    padding-top: 20px;\n\n    terminal-toolbar {\n        padding-left: 90px;\n    }\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 1333
/*!*************************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/sourceMaps.js ***!
  \*************************************************************/
(module) {

"use strict";


module.exports = function (item) {
  var content = item[1];
  var cssMapping = item[3];
  if (!cssMapping) {
    return content;
  }
  if (typeof btoa === "function") {
    var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
    var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
    var sourceMapping = "/*# ".concat(data, " */");
    return [content].concat([sourceMapping]).join("\n");
  }
  return [content].join("\n");
};

/***/ },

/***/ 1448
/*!**************************************!*\
  !*** external "@angular/animations" ***!
  \**************************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__1448__;

/***/ },

/***/ 1476
/*!*********************************************!*\
  !*** ../app/node_modules/is-regex/index.js ***!
  \*********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();
var hasOwn = __webpack_require__(/*! hasown */ 1766);
var gOPD = __webpack_require__(/*! gopd */ 1284);

/** @type {import('.')} */
var fn;
if (hasToStringTag) {
  /** @type {(receiver: ThisParameterType<typeof RegExp.prototype.exec>, ...args: Parameters<typeof RegExp.prototype.exec>) => ReturnType<typeof RegExp.prototype.exec>} */
  var $exec = callBound('RegExp.prototype.exec');
  /** @type {object} */
  var isRegexMarker = {};
  var throwRegexMarker = function () {
    throw isRegexMarker;
  };
  /** @type {{ toString(): never, valueOf(): never, [Symbol.toPrimitive]?(): never }} */
  var badStringifier = {
    toString: throwRegexMarker,
    valueOf: throwRegexMarker
  };
  if (typeof Symbol.toPrimitive === 'symbol') {
    badStringifier[Symbol.toPrimitive] = throwRegexMarker;
  }

  /** @type {import('.')} */
  // @ts-expect-error TS can't figure out that the $exec call always throws
  // eslint-disable-next-line consistent-return
  fn = function isRegex(value) {
    if (!value || typeof value !== 'object') {
      return false;
    }

    // eslint-disable-next-line no-extra-parens
    var descriptor = /** @type {NonNullable<typeof gOPD>} */gOPD(/** @type {{ lastIndex?: unknown }} */value, 'lastIndex');
    var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, 'value');
    if (!hasLastIndexDataProperty) {
      return false;
    }
    try {
      // eslint-disable-next-line no-extra-parens
      $exec(value, /** @type {string} */ /** @type {unknown} */badStringifier);
    } catch (e) {
      return e === isRegexMarker;
    }
  };
} else {
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
  var $toString = callBound('Object.prototype.toString');
  /** @const @type {'[object RegExp]'} */
  var regexClass = '[object RegExp]';

  /** @type {import('.')} */
  fn = function isRegex(value) {
    // In older browsers, typeof regex incorrectly returns 'function'
    if (!value || typeof value !== 'object' && typeof value !== 'function') {
      return false;
    }
    return $toString(value) === regexClass;
  };
}
module.exports = fn;

/***/ },

/***/ 1488
/*!*******************************************!*\
  !*** ../app/node_modules/uuid/lib/rng.js ***!
  \*******************************************/
(module, __unused_webpack_exports, __webpack_require__) {

// Unique ID creation requires a high quality random # generator.  In node.js
// this is pretty straight-forward - we use the crypto API.

var crypto = __webpack_require__(/*! crypto */ 6982);
module.exports = function nodeRNG() {
  return crypto.randomBytes(16);
};

/***/ },

/***/ 1514
/*!*******************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/appearanceSettingsTab.component.scss?ngResource ***!
  \*******************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, "color-scheme-preview{flex-shrink:0;margin-bottom:20px}textarea{font-family:\"Source Code Pro\",monospace;min-height:120px}.font-size-input{width:100px;flex:none}", "",{"version":3,"sources":["webpack://./src/components/appearanceSettingsTab.component.scss"],"names":[],"mappings":"AAAA,qBACI,aAAA,CACA,kBAAA,CAGJ,SACI,uCAAA,CACA,gBAAA,CAGJ,iBACI,WAAA,CACA,SAAA","sourcesContent":["color-scheme-preview {\n    flex-shrink: 0;\n    margin-bottom: 20px;\n}\n\ntextarea {\n    font-family: 'Source Code Pro', monospace;\n    min-height: 120px;\n}\n\n.font-size-input {\n    width: 100px;\n    flex: none;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 1578
/*!*********************************************!*\
  !*** ../app/node_modules/es-errors/eval.js ***!
  \*********************************************/
(module) {

"use strict";


/** @type {import('./eval')} */
module.exports = EvalError;

/***/ },

/***/ 1625
/*!**********************************************************!*\
  !*** ../app/node_modules/regexp.prototype.flags/shim.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var supportsDescriptors = (__webpack_require__(/*! define-properties */ 2445).supportsDescriptors);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 6919);
var gOPD = __webpack_require__(/*! gopd */ 1284);
var defineProperty = Object.defineProperty;
var $TypeError = __webpack_require__(/*! es-errors */ 8458);
var getProto = __webpack_require__(/*! get-proto */ 3077);
var regex = /a/;
module.exports = function shimFlags() {
  if (!supportsDescriptors || !getProto) {
    throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
  }
  var polyfill = getPolyfill();
  var proto = getProto(regex);
  var descriptor = gOPD(proto, 'flags');
  if (!descriptor || descriptor.get !== polyfill) {
    defineProperty(proto, 'flags', {
      configurable: true,
      enumerable: false,
      get: polyfill
    });
  }
  return polyfill;
};

/***/ },

/***/ 1638
/*!**************************************************!*\
  !*** ./node_modules/zmodem.js/src/zsubpacket.js ***!
  \**************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zcrc */ 142), __webpack_require__(/*! ./zdle */ 6563), __webpack_require__(/*! ./zmlib */ 3568), __webpack_require__(/*! ./zerror */ 3478));
const ZCRCE = 0x68,
  // 'h', 104, frame ends, header packet follows
  ZCRCG = 0x69,
  // 'i', 105, frame continues nonstop
  ZCRCQ = 0x6a,
  // 'j', 106, frame continues, ZACK expected
  ZCRCW = 0x6b // 'k', 107, frame ends, ZACK expected
;
var SUBPACKET_BUILDER;

/** Class that represents a ZMODEM data subpacket. */
Zmodem.Subpacket = class ZmodemSubpacket {
  /**
   * Build a Subpacket subclass given a payload and frame end string.
   *
   * @param {Array} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @param {string} frameend - One of:
   * - `no_end_no_ack`
   * - `end_no_ack`
   * - `no_end_ack` (unused currently)
   * - `end_ack`
   *
   * @returns {Subpacket} An instance of the appropriate Subpacket subclass.
   */
  static build(octets, frameend) {
    //TODO: make this better
    var Ctr = SUBPACKET_BUILDER[frameend];
    if (!Ctr) {
      throw "No subpacket type “" + frameend + "” is defined! Try one of: " + Object.keys(SUBPACKET_BUILDER).join(", ");
    }
    return new Ctr(octets);
  }

  /**
   * Return the octet values array that represents the object
   * encoded with a 16-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  encode16(zencoder) {
    return this._encode(zencoder, Zmodem.CRC.crc16);
  }

  /**
   * Return the octet values array that represents the object
   * encoded with a 32-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  encode32(zencoder) {
    return this._encode(zencoder, Zmodem.CRC.crc32);
  }

  /**
   * Return the subpacket payload’s octet values.
   *
   * NOTE: For speed, this returns the actual data in the subpacket;
   * if you mutate this return value, you alter the Subpacket object
   * internals. This is OK if you won’t need the Subpacket anymore, but
   * just be careful.
   *
   * @returns {number[]} The subpacket’s payload, represented as an
   * array of octet values. **DO NOT ALTER THIS ARRAY** unless you
   * no longer need the Subpacket.
   */
  get_payload() {
    return this._payload;
  }

  /**
   * Parse out a Subpacket object from a given array of octet values,
   * assuming a 16-bit CRC.
   *
   * An exception is thrown if the given bytes are definitively invalid
   * as subpacket values with 16-bit CRC.
   *
   * @param {number[]} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {Subpacket|undefined} An instance of the appropriate Subpacket
   *      subclass, or undefined if not enough octet values are given
   *      to determine whether there is a valid subpacket here or not.
   */
  static parse16(octets) {
    return ZmodemSubpacket._parse(octets, 2);
  }

  //parse32 test:
  //[102, 105, 108, 101, 110, 97, 109, 101, 119, 105, 116, 104, 115, 112, 97, 99, 101, 115, 0, 49, 55, 49, 51, 49, 52, 50, 52, 51, 50, 49, 55, 50, 49, 48, 48, 54, 52, 52, 48, 49, 49, 55, 0, 43, 8, 63, 115, 23, 17]

  /**
   * Same as parse16(), but assuming a 32-bit CRC.
   *
   * @param {number[]} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {Subpacket|undefined} An instance of the appropriate Subpacket
   *      subclass, or undefined if not enough octet values are given
   *      to determine whether there is a valid subpacket here or not.
   */
  static parse32(octets) {
    return ZmodemSubpacket._parse(octets, 4);
  }

  /**
   * Not used directly.
   */
  constructor(payload) {
    this._payload = payload;
  }
  _encode(zencoder, crc_func) {
    return zencoder.encode(this._payload.slice(0)).concat([Zmodem.ZMLIB.ZDLE, this._frameend_num], zencoder.encode(crc_func(this._payload.concat(this._frameend_num))));
  }

  //Because of ZDLE encoding, we’ll never see any of the frame-end octets
  //in a stream except as the ends of data payloads.
  static _parse(bytes_arr, crc_len) {
    var end_at;
    var creator;

    //These have to be written in decimal since they’re lookup keys.
    var _frame_ends_lookup = {
      104: ZEndNoAckSubpacket,
      105: ZNoEndNoAckSubpacket,
      106: ZNoEndAckSubpacket,
      107: ZEndAckSubpacket
    };
    var zdle_at = 0;
    while (zdle_at < bytes_arr.length) {
      zdle_at = bytes_arr.indexOf(Zmodem.ZMLIB.ZDLE, zdle_at);
      if (zdle_at === -1) return;
      var after_zdle = bytes_arr[zdle_at + 1];
      creator = _frame_ends_lookup[after_zdle];
      if (creator) {
        end_at = zdle_at + 1;
        break;
      }
      zdle_at++;
    }
    if (!creator) return;
    var frameend_num = bytes_arr[end_at];

    //sanity check
    if (bytes_arr[end_at - 1] !== Zmodem.ZMLIB.ZDLE) {
      throw "Byte before frame end should be ZDLE, not " + bytes_arr[end_at - 1];
    }
    var zdle_encoded_payload = bytes_arr.splice(0, end_at - 1);
    var got_crc = Zmodem.ZDLE.splice(bytes_arr, 2, crc_len);
    if (!got_crc) {
      //got payload but no CRC yet .. should be rare!

      //We have to put the ZDLE-encoded payload back before returning.
      bytes_arr.unshift.apply(bytes_arr, zdle_encoded_payload);
      return;
    }
    var payload = Zmodem.ZDLE.decode(zdle_encoded_payload);

    //We really shouldn’t need to do this, but just for good measure.
    //I suppose it’s conceivable this may run over UDP or something?
    Zmodem.CRC[crc_len === 2 ? "verify16" : "verify32"](payload.concat([frameend_num]), got_crc);
    return new creator(payload, got_crc);
  }
};
class ZEndSubpacketBase extends Zmodem.Subpacket {
  frame_end() {
    return true;
  }
}
class ZNoEndSubpacketBase extends Zmodem.Subpacket {
  frame_end() {
    return false;
  }
}

//Used for end-of-file.
class ZEndNoAckSubpacket extends ZEndSubpacketBase {
  ack_expected() {
    return false;
  }
}
ZEndNoAckSubpacket.prototype._frameend_num = ZCRCE;

//Used for ZFILE and ZSINIT payloads.
class ZEndAckSubpacket extends ZEndSubpacketBase {
  ack_expected() {
    return true;
  }
}
ZEndAckSubpacket.prototype._frameend_num = ZCRCW;

//Used for ZDATA, prior to end-of-file.
class ZNoEndNoAckSubpacket extends ZNoEndSubpacketBase {
  ack_expected() {
    return false;
  }
}
ZNoEndNoAckSubpacket.prototype._frameend_num = ZCRCG;

//only used if receiver can full-duplex
class ZNoEndAckSubpacket extends ZNoEndSubpacketBase {
  ack_expected() {
    return true;
  }
}
ZNoEndAckSubpacket.prototype._frameend_num = ZCRCQ;
SUBPACKET_BUILDER = {
  end_no_ack: ZEndNoAckSubpacket,
  end_ack: ZEndAckSubpacket,
  no_end_no_ack: ZNoEndNoAckSubpacket,
  no_end_ack: ZNoEndAckSubpacket
};

/***/ },

/***/ 1734
/*!***********************************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
  \***********************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


/* istanbul ignore next  */
function setAttributesWithoutAttributes(styleElement) {
  var nonce =  true ? __webpack_require__.nc : 0;
  if (nonce) {
    styleElement.setAttribute("nonce", nonce);
  }
}
module.exports = setAttributesWithoutAttributes;

/***/ },

/***/ 1766
/*!*******************************************!*\
  !*** ../app/node_modules/hasown/index.js ***!
  \*******************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var call = Function.prototype.call;
var $hasOwn = Object.prototype.hasOwnProperty;
var bind = __webpack_require__(/*! function-bind */ 438);

/** @type {import('.')} */
module.exports = bind.call(call, $hasOwn);

/***/ },

/***/ 1769
/*!************************************************!*\
  !*** ./node_modules/@xterm/xterm/lib/xterm.js ***!
  \************************************************/
(module) {

!function (e, t) {
  if (true) module.exports = t();else // removed by dead control flow
{ var s, i; }
}(globalThis, () => (() => {
  "use strict";

  var e = {
      4567: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.AccessibilityManager = void 0;
        const n = i(9042),
          o = i(9924),
          a = i(844),
          h = i(4725),
          c = i(2585),
          l = i(3656);
        let d = t.AccessibilityManager = class extends a.Disposable {
          constructor(e, t, i, s) {
            super(), this._terminal = e, this._coreBrowserService = i, this._renderService = s, this._rowColumns = new WeakMap(), this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "", this._accessibilityContainer = this._coreBrowserService.mainDocument.createElement("div"), this._accessibilityContainer.classList.add("xterm-accessibility"), this._rowContainer = this._coreBrowserService.mainDocument.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
            for (let e = 0; e < this._terminal.rows; e++) this._rowElements[e] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[e]);
            if (this._topBoundaryFocusListener = e => this._handleBoundaryFocus(e, 0), this._bottomBoundaryFocusListener = e => this._handleBoundaryFocus(e, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions(), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = this._coreBrowserService.mainDocument.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this.register(new o.TimeBasedDebouncer(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
            this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this.register(this._terminal.onResize(e => this._handleResize(e.rows))), this.register(this._terminal.onRender(e => this._refreshRows(e.start, e.end))), this.register(this._terminal.onScroll(() => this._refreshRows())), this.register(this._terminal.onA11yChar(e => this._handleChar(e))), this.register(this._terminal.onLineFeed(() => this._handleChar("\n"))), this.register(this._terminal.onA11yTab(e => this._handleTab(e))), this.register(this._terminal.onKey(e => this._handleKey(e.key))), this.register(this._terminal.onBlur(() => this._clearLiveRegion())), this.register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions())), this.register((0, l.addDisposableDomListener)(document, "selectionchange", () => this._handleSelectionChange())), this.register(this._coreBrowserService.onDprChange(() => this._refreshRowsDimensions())), this._refreshRows(), this.register((0, a.toDisposable)(() => {
              this._accessibilityContainer.remove(), this._rowElements.length = 0;
            }));
          }
          _handleTab(e) {
            for (let t = 0; t < e; t++) this._handleChar(" ");
          }
          _handleChar(e) {
            this._liveRegionLineCount < 21 && (this._charsToConsume.length > 0 ? this._charsToConsume.shift() !== e && (this._charsToAnnounce += e) : this._charsToAnnounce += e, "\n" === e && (this._liveRegionLineCount++, 21 === this._liveRegionLineCount && (this._liveRegion.textContent += n.tooMuchOutput)));
          }
          _clearLiveRegion() {
            this._liveRegion.textContent = "", this._liveRegionLineCount = 0;
          }
          _handleKey(e) {
            this._clearLiveRegion(), /\p{Control}/u.test(e) || this._charsToConsume.push(e);
          }
          _refreshRows(e, t) {
            this._liveRegionDebouncer.refresh(e, t, this._terminal.rows);
          }
          _renderRows(e, t) {
            const i = this._terminal.buffer,
              s = i.lines.length.toString();
            for (let r = e; r <= t; r++) {
              const e = i.lines.get(i.ydisp + r),
                t = [],
                n = e?.translateToString(!0, void 0, void 0, t) || "",
                o = (i.ydisp + r + 1).toString(),
                a = this._rowElements[r];
              a && (0 === n.length ? (a.innerText = " ", this._rowColumns.set(a, [0, 1])) : (a.textContent = n, this._rowColumns.set(a, t)), a.setAttribute("aria-posinset", o), a.setAttribute("aria-setsize", s));
            }
            this._announceCharacters();
          }
          _announceCharacters() {
            0 !== this._charsToAnnounce.length && (this._liveRegion.textContent += this._charsToAnnounce, this._charsToAnnounce = "");
          }
          _handleBoundaryFocus(e, t) {
            const i = e.target,
              s = this._rowElements[0 === t ? 1 : this._rowElements.length - 2];
            if (i.getAttribute("aria-posinset") === (0 === t ? "1" : `${this._terminal.buffer.lines.length}`)) return;
            if (e.relatedTarget !== s) return;
            let r, n;
            if (0 === t ? (r = i, n = this._rowElements.pop(), this._rowContainer.removeChild(n)) : (r = this._rowElements.shift(), n = i, this._rowContainer.removeChild(r)), r.removeEventListener("focus", this._topBoundaryFocusListener), n.removeEventListener("focus", this._bottomBoundaryFocusListener), 0 === t) {
              const e = this._createAccessibilityTreeNode();
              this._rowElements.unshift(e), this._rowContainer.insertAdjacentElement("afterbegin", e);
            } else {
              const e = this._createAccessibilityTreeNode();
              this._rowElements.push(e), this._rowContainer.appendChild(e);
            }
            this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._terminal.scrollLines(0 === t ? -1 : 1), this._rowElements[0 === t ? 1 : this._rowElements.length - 2].focus(), e.preventDefault(), e.stopImmediatePropagation();
          }
          _handleSelectionChange() {
            if (0 === this._rowElements.length) return;
            const e = document.getSelection();
            if (!e) return;
            if (e.isCollapsed) return void (this._rowContainer.contains(e.anchorNode) && this._terminal.clearSelection());
            if (!e.anchorNode || !e.focusNode) return void console.error("anchorNode and/or focusNode are null");
            let t = {
                node: e.anchorNode,
                offset: e.anchorOffset
              },
              i = {
                node: e.focusNode,
                offset: e.focusOffset
              };
            if ((t.node.compareDocumentPosition(i.node) & Node.DOCUMENT_POSITION_PRECEDING || t.node === i.node && t.offset > i.offset) && ([t, i] = [i, t]), t.node.compareDocumentPosition(this._rowElements[0]) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_FOLLOWING) && (t = {
              node: this._rowElements[0].childNodes[0],
              offset: 0
            }), !this._rowContainer.contains(t.node)) return;
            const s = this._rowElements.slice(-1)[0];
            if (i.node.compareDocumentPosition(s) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_PRECEDING) && (i = {
              node: s,
              offset: s.textContent?.length ?? 0
            }), !this._rowContainer.contains(i.node)) return;
            const r = ({
                node: e,
                offset: t
              }) => {
                const i = e instanceof Text ? e.parentNode : e;
                let s = parseInt(i?.getAttribute("aria-posinset"), 10) - 1;
                if (isNaN(s)) return console.warn("row is invalid. Race condition?"), null;
                const r = this._rowColumns.get(i);
                if (!r) return console.warn("columns is null. Race condition?"), null;
                let n = t < r.length ? r[t] : r.slice(-1)[0] + 1;
                return n >= this._terminal.cols && (++s, n = 0), {
                  row: s,
                  column: n
                };
              },
              n = r(t),
              o = r(i);
            if (n && o) {
              if (n.row > o.row || n.row === o.row && n.column >= o.column) throw new Error("invalid range");
              this._terminal.select(n.column, n.row, (o.row - n.row) * this._terminal.cols - n.column + o.column);
            }
          }
          _handleResize(e) {
            this._rowElements[this._rowElements.length - 1].removeEventListener("focus", this._bottomBoundaryFocusListener);
            for (let e = this._rowContainer.children.length; e < this._terminal.rows; e++) this._rowElements[e] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[e]);
            for (; this._rowElements.length > e;) this._rowContainer.removeChild(this._rowElements.pop());
            this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions();
          }
          _createAccessibilityTreeNode() {
            const e = this._coreBrowserService.mainDocument.createElement("div");
            return e.setAttribute("role", "listitem"), e.tabIndex = -1, this._refreshRowDimensions(e), e;
          }
          _refreshRowsDimensions() {
            if (this._renderService.dimensions.css.cell.height) {
              this._accessibilityContainer.style.width = `${this._renderService.dimensions.css.canvas.width}px`, this._rowElements.length !== this._terminal.rows && this._handleResize(this._terminal.rows);
              for (let e = 0; e < this._terminal.rows; e++) this._refreshRowDimensions(this._rowElements[e]);
            }
          }
          _refreshRowDimensions(e) {
            e.style.height = `${this._renderService.dimensions.css.cell.height}px`;
          }
        };
        t.AccessibilityManager = d = s([r(1, c.IInstantiationService), r(2, h.ICoreBrowserService), r(3, h.IRenderService)], d);
      },
      3614: (e, t) => {
        function i(e) {
          return e.replace(/\r?\n/g, "\r");
        }
        function s(e, t) {
          return t ? "[200~" + e + "[201~" : e;
        }
        function r(e, t, r, n) {
          e = s(e = i(e), r.decPrivateModes.bracketedPasteMode && !0 !== n.rawOptions.ignoreBracketedPasteMode), r.triggerDataEvent(e, !0), t.value = "";
        }
        function n(e, t, i) {
          const s = i.getBoundingClientRect(),
            r = e.clientX - s.left - 10,
            n = e.clientY - s.top - 10;
          t.style.width = "20px", t.style.height = "20px", t.style.left = `${r}px`, t.style.top = `${n}px`, t.style.zIndex = "1000", t.focus();
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.rightClickHandler = t.moveTextAreaUnderMouseCursor = t.paste = t.handlePasteEvent = t.copyHandler = t.bracketTextForPaste = t.prepareTextForTerminal = void 0, t.prepareTextForTerminal = i, t.bracketTextForPaste = s, t.copyHandler = function (e, t) {
          e.clipboardData && e.clipboardData.setData("text/plain", t.selectionText), e.preventDefault();
        }, t.handlePasteEvent = function (e, t, i, s) {
          e.stopPropagation(), e.clipboardData && r(e.clipboardData.getData("text/plain"), t, i, s);
        }, t.paste = r, t.moveTextAreaUnderMouseCursor = n, t.rightClickHandler = function (e, t, i, s, r) {
          n(e, t, i), r && s.rightClickSelect(e), t.value = s.selectionText, t.select();
        };
      },
      7239: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ColorContrastCache = void 0;
        const s = i(1505);
        t.ColorContrastCache = class {
          constructor() {
            this._color = new s.TwoKeyMap(), this._css = new s.TwoKeyMap();
          }
          setCss(e, t, i) {
            this._css.set(e, t, i);
          }
          getCss(e, t) {
            return this._css.get(e, t);
          }
          setColor(e, t, i) {
            this._color.set(e, t, i);
          }
          getColor(e, t) {
            return this._color.get(e, t);
          }
          clear() {
            this._color.clear(), this._css.clear();
          }
        };
      },
      3656: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.addDisposableDomListener = void 0, t.addDisposableDomListener = function (e, t, i, s) {
          e.addEventListener(t, i, s);
          let r = !1;
          return {
            dispose: () => {
              r || (r = !0, e.removeEventListener(t, i, s));
            }
          };
        };
      },
      3551: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Linkifier = void 0;
        const n = i(3656),
          o = i(8460),
          a = i(844),
          h = i(2585),
          c = i(4725);
        let l = t.Linkifier = class extends a.Disposable {
          get currentLink() {
            return this._currentLink;
          }
          constructor(e, t, i, s, r) {
            super(), this._element = e, this._mouseService = t, this._renderService = i, this._bufferService = s, this._linkProviderService = r, this._linkCacheDisposables = [], this._isMouseOut = !0, this._wasResized = !1, this._activeLine = -1, this._onShowLinkUnderline = this.register(new o.EventEmitter()), this.onShowLinkUnderline = this._onShowLinkUnderline.event, this._onHideLinkUnderline = this.register(new o.EventEmitter()), this.onHideLinkUnderline = this._onHideLinkUnderline.event, this.register((0, a.getDisposeArrayDisposable)(this._linkCacheDisposables)), this.register((0, a.toDisposable)(() => {
              this._lastMouseEvent = void 0, this._activeProviderReplies?.clear();
            })), this.register(this._bufferService.onResize(() => {
              this._clearCurrentLink(), this._wasResized = !0;
            })), this.register((0, n.addDisposableDomListener)(this._element, "mouseleave", () => {
              this._isMouseOut = !0, this._clearCurrentLink();
            })), this.register((0, n.addDisposableDomListener)(this._element, "mousemove", this._handleMouseMove.bind(this))), this.register((0, n.addDisposableDomListener)(this._element, "mousedown", this._handleMouseDown.bind(this))), this.register((0, n.addDisposableDomListener)(this._element, "mouseup", this._handleMouseUp.bind(this)));
          }
          _handleMouseMove(e) {
            this._lastMouseEvent = e;
            const t = this._positionFromMouseEvent(e, this._element, this._mouseService);
            if (!t) return;
            this._isMouseOut = !1;
            const i = e.composedPath();
            for (let e = 0; e < i.length; e++) {
              const t = i[e];
              if (t.classList.contains("xterm")) break;
              if (t.classList.contains("xterm-hover")) return;
            }
            this._lastBufferCell && t.x === this._lastBufferCell.x && t.y === this._lastBufferCell.y || (this._handleHover(t), this._lastBufferCell = t);
          }
          _handleHover(e) {
            if (this._activeLine !== e.y || this._wasResized) return this._clearCurrentLink(), this._askForLink(e, !1), void (this._wasResized = !1);
            this._currentLink && this._linkAtPosition(this._currentLink.link, e) || (this._clearCurrentLink(), this._askForLink(e, !0));
          }
          _askForLink(e, t) {
            this._activeProviderReplies && t || (this._activeProviderReplies?.forEach(e => {
              e?.forEach(e => {
                e.link.dispose && e.link.dispose();
              });
            }), this._activeProviderReplies = new Map(), this._activeLine = e.y);
            let i = !1;
            for (const [s, r] of this._linkProviderService.linkProviders.entries()) if (t) {
              const t = this._activeProviderReplies?.get(s);
              t && (i = this._checkLinkProviderResult(s, e, i));
            } else r.provideLinks(e.y, t => {
              if (this._isMouseOut) return;
              const r = t?.map(e => ({
                link: e
              }));
              this._activeProviderReplies?.set(s, r), i = this._checkLinkProviderResult(s, e, i), this._activeProviderReplies?.size === this._linkProviderService.linkProviders.length && this._removeIntersectingLinks(e.y, this._activeProviderReplies);
            });
          }
          _removeIntersectingLinks(e, t) {
            const i = new Set();
            for (let s = 0; s < t.size; s++) {
              const r = t.get(s);
              if (r) for (let t = 0; t < r.length; t++) {
                const s = r[t],
                  n = s.link.range.start.y < e ? 0 : s.link.range.start.x,
                  o = s.link.range.end.y > e ? this._bufferService.cols : s.link.range.end.x;
                for (let e = n; e <= o; e++) {
                  if (i.has(e)) {
                    r.splice(t--, 1);
                    break;
                  }
                  i.add(e);
                }
              }
            }
          }
          _checkLinkProviderResult(e, t, i) {
            if (!this._activeProviderReplies) return i;
            const s = this._activeProviderReplies.get(e);
            let r = !1;
            for (let t = 0; t < e; t++) this._activeProviderReplies.has(t) && !this._activeProviderReplies.get(t) || (r = !0);
            if (!r && s) {
              const e = s.find(e => this._linkAtPosition(e.link, t));
              e && (i = !0, this._handleNewLink(e));
            }
            if (this._activeProviderReplies.size === this._linkProviderService.linkProviders.length && !i) for (let e = 0; e < this._activeProviderReplies.size; e++) {
              const s = this._activeProviderReplies.get(e)?.find(e => this._linkAtPosition(e.link, t));
              if (s) {
                i = !0, this._handleNewLink(s);
                break;
              }
            }
            return i;
          }
          _handleMouseDown() {
            this._mouseDownLink = this._currentLink;
          }
          _handleMouseUp(e) {
            if (!this._currentLink) return;
            const t = this._positionFromMouseEvent(e, this._element, this._mouseService);
            t && this._mouseDownLink === this._currentLink && this._linkAtPosition(this._currentLink.link, t) && this._currentLink.link.activate(e, this._currentLink.link.text);
          }
          _clearCurrentLink(e, t) {
            this._currentLink && this._lastMouseEvent && (!e || !t || this._currentLink.link.range.start.y >= e && this._currentLink.link.range.end.y <= t) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, a.disposeArray)(this._linkCacheDisposables));
          }
          _handleNewLink(e) {
            if (!this._lastMouseEvent) return;
            const t = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
            t && this._linkAtPosition(e.link, t) && (this._currentLink = e, this._currentLink.state = {
              decorations: {
                underline: void 0 === e.link.decorations || e.link.decorations.underline,
                pointerCursor: void 0 === e.link.decorations || e.link.decorations.pointerCursor
              },
              isHovered: !0
            }, this._linkHover(this._element, e.link, this._lastMouseEvent), e.link.decorations = {}, Object.defineProperties(e.link.decorations, {
              pointerCursor: {
                get: () => this._currentLink?.state?.decorations.pointerCursor,
                set: e => {
                  this._currentLink?.state && this._currentLink.state.decorations.pointerCursor !== e && (this._currentLink.state.decorations.pointerCursor = e, this._currentLink.state.isHovered && this._element.classList.toggle("xterm-cursor-pointer", e));
                }
              },
              underline: {
                get: () => this._currentLink?.state?.decorations.underline,
                set: t => {
                  this._currentLink?.state && this._currentLink?.state?.decorations.underline !== t && (this._currentLink.state.decorations.underline = t, this._currentLink.state.isHovered && this._fireUnderlineEvent(e.link, t));
                }
              }
            }), this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e => {
              if (!this._currentLink) return;
              const t = 0 === e.start ? 0 : e.start + 1 + this._bufferService.buffer.ydisp,
                i = this._bufferService.buffer.ydisp + 1 + e.end;
              if (this._currentLink.link.range.start.y >= t && this._currentLink.link.range.end.y <= i && (this._clearCurrentLink(t, i), this._lastMouseEvent)) {
                const e = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
                e && this._askForLink(e, !1);
              }
            })));
          }
          _linkHover(e, t, i) {
            this._currentLink?.state && (this._currentLink.state.isHovered = !0, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t, !0), this._currentLink.state.decorations.pointerCursor && e.classList.add("xterm-cursor-pointer")), t.hover && t.hover(i, t.text);
          }
          _fireUnderlineEvent(e, t) {
            const i = e.range,
              s = this._bufferService.buffer.ydisp,
              r = this._createLinkUnderlineEvent(i.start.x - 1, i.start.y - s - 1, i.end.x, i.end.y - s - 1, void 0);
            (t ? this._onShowLinkUnderline : this._onHideLinkUnderline).fire(r);
          }
          _linkLeave(e, t, i) {
            this._currentLink?.state && (this._currentLink.state.isHovered = !1, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t, !1), this._currentLink.state.decorations.pointerCursor && e.classList.remove("xterm-cursor-pointer")), t.leave && t.leave(i, t.text);
          }
          _linkAtPosition(e, t) {
            const i = e.range.start.y * this._bufferService.cols + e.range.start.x,
              s = e.range.end.y * this._bufferService.cols + e.range.end.x,
              r = t.y * this._bufferService.cols + t.x;
            return i <= r && r <= s;
          }
          _positionFromMouseEvent(e, t, i) {
            const s = i.getCoords(e, t, this._bufferService.cols, this._bufferService.rows);
            if (s) return {
              x: s[0],
              y: s[1] + this._bufferService.buffer.ydisp
            };
          }
          _createLinkUnderlineEvent(e, t, i, s, r) {
            return {
              x1: e,
              y1: t,
              x2: i,
              y2: s,
              cols: this._bufferService.cols,
              fg: r
            };
          }
        };
        t.Linkifier = l = s([r(1, c.IMouseService), r(2, c.IRenderService), r(3, h.IBufferService), r(4, c.ILinkProviderService)], l);
      },
      9042: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.tooMuchOutput = t.promptLabel = void 0, t.promptLabel = "Terminal input", t.tooMuchOutput = "Too much output to announce, navigate to rows manually to read";
      },
      3730: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.OscLinkProvider = void 0;
        const n = i(511),
          o = i(2585);
        let a = t.OscLinkProvider = class {
          constructor(e, t, i) {
            this._bufferService = e, this._optionsService = t, this._oscLinkService = i;
          }
          provideLinks(e, t) {
            const i = this._bufferService.buffer.lines.get(e - 1);
            if (!i) return void t(void 0);
            const s = [],
              r = this._optionsService.rawOptions.linkHandler,
              o = new n.CellData(),
              a = i.getTrimmedLength();
            let c = -1,
              l = -1,
              d = !1;
            for (let t = 0; t < a; t++) if (-1 !== l || i.hasContent(t)) {
              if (i.loadCell(t, o), o.hasExtendedAttrs() && o.extended.urlId) {
                if (-1 === l) {
                  l = t, c = o.extended.urlId;
                  continue;
                }
                d = o.extended.urlId !== c;
              } else -1 !== l && (d = !0);
              if (d || -1 !== l && t === a - 1) {
                const i = this._oscLinkService.getLinkData(c)?.uri;
                if (i) {
                  const n = {
                    start: {
                      x: l + 1,
                      y: e
                    },
                    end: {
                      x: t + (d || t !== a - 1 ? 0 : 1),
                      y: e
                    }
                  };
                  let o = !1;
                  if (!r?.allowNonHttpProtocols) try {
                    const e = new URL(i);
                    ["http:", "https:"].includes(e.protocol) || (o = !0);
                  } catch (e) {
                    o = !0;
                  }
                  o || s.push({
                    text: i,
                    range: n,
                    activate: (e, t) => r ? r.activate(e, t, n) : h(0, t),
                    hover: (e, t) => r?.hover?.(e, t, n),
                    leave: (e, t) => r?.leave?.(e, t, n)
                  });
                }
                d = !1, o.hasExtendedAttrs() && o.extended.urlId ? (l = t, c = o.extended.urlId) : (l = -1, c = -1);
              }
            }
            t(s);
          }
        };
        function h(e, t) {
          if (confirm(`Do you want to navigate to ${t}?\n\nWARNING: This link could potentially be dangerous`)) {
            const e = window.open();
            if (e) {
              try {
                e.opener = null;
              } catch {}
              e.location.href = t;
            } else console.warn("Opening link blocked as opener could not be cleared");
          }
        }
        t.OscLinkProvider = a = s([r(0, o.IBufferService), r(1, o.IOptionsService), r(2, o.IOscLinkService)], a);
      },
      6193: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.RenderDebouncer = void 0, t.RenderDebouncer = class {
          constructor(e, t) {
            this._renderCallback = e, this._coreBrowserService = t, this._refreshCallbacks = [];
          }
          dispose() {
            this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          addRefreshCallback(e) {
            return this._refreshCallbacks.push(e), this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh())), this._animationFrame;
          }
          refresh(e, t, i) {
            this._rowCount = i, e = void 0 !== e ? e : 0, t = void 0 !== t ? t : this._rowCount - 1, this._rowStart = void 0 !== this._rowStart ? Math.min(this._rowStart, e) : e, this._rowEnd = void 0 !== this._rowEnd ? Math.max(this._rowEnd, t) : t, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh()));
          }
          _innerRefresh() {
            if (this._animationFrame = void 0, void 0 === this._rowStart || void 0 === this._rowEnd || void 0 === this._rowCount) return void this._runRefreshCallbacks();
            const e = Math.max(this._rowStart, 0),
              t = Math.min(this._rowEnd, this._rowCount - 1);
            this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(e, t), this._runRefreshCallbacks();
          }
          _runRefreshCallbacks() {
            for (const e of this._refreshCallbacks) e(0);
            this._refreshCallbacks = [];
          }
        };
      },
      3236: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Terminal = void 0;
        const s = i(3614),
          r = i(3656),
          n = i(3551),
          o = i(9042),
          a = i(3730),
          h = i(1680),
          c = i(3107),
          l = i(5744),
          d = i(2950),
          _ = i(1296),
          u = i(428),
          f = i(4269),
          v = i(5114),
          p = i(8934),
          g = i(3230),
          m = i(9312),
          S = i(4725),
          C = i(6731),
          b = i(8055),
          w = i(8969),
          y = i(8460),
          E = i(844),
          k = i(6114),
          L = i(8437),
          D = i(2584),
          R = i(7399),
          x = i(5941),
          A = i(9074),
          B = i(2585),
          T = i(5435),
          M = i(4567),
          O = i(779);
        class P extends w.CoreTerminal {
          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;
          }
          constructor(e = {}) {
            super(e), this.browser = k, this._keyDownHandled = !1, this._keyDownSeen = !1, this._keyPressHandled = !1, this._unprocessedDeadKey = !1, this._accessibilityManager = this.register(new E.MutableDisposable()), this._onCursorMove = this.register(new y.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onKey = this.register(new y.EventEmitter()), this.onKey = this._onKey.event, this._onRender = this.register(new y.EventEmitter()), this.onRender = this._onRender.event, this._onSelectionChange = this.register(new y.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this.register(new y.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onBell = this.register(new y.EventEmitter()), this.onBell = this._onBell.event, this._onFocus = this.register(new y.EventEmitter()), this._onBlur = this.register(new y.EventEmitter()), this._onA11yCharEmitter = this.register(new y.EventEmitter()), this._onA11yTabEmitter = this.register(new y.EventEmitter()), this._onWillOpen = this.register(new y.EventEmitter()), this._setup(), this._decorationService = this._instantiationService.createInstance(A.DecorationService), this._instantiationService.setService(B.IDecorationService, this._decorationService), this._linkProviderService = this._instantiationService.createInstance(O.LinkProviderService), this._instantiationService.setService(S.ILinkProviderService, this._linkProviderService), this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(a.OscLinkProvider)), this.register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this.register(this._inputHandler.onRequestRefreshRows((e, t) => this.refresh(e, t))), this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this.register(this._inputHandler.onRequestReset(() => this.reset())), this.register(this._inputHandler.onRequestWindowsOptionsReport(e => this._reportWindowsOptions(e))), this.register(this._inputHandler.onColor(e => this._handleColorEvent(e))), this.register((0, y.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, y.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, y.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, y.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this.register(this._bufferService.onResize(e => this._afterResize(e.cols, e.rows))), this.register((0, E.toDisposable)(() => {
              this._customKeyEventHandler = void 0, this.element?.parentNode?.removeChild(this.element);
            }));
          }
          _handleColorEvent(e) {
            if (this._themeService) for (const t of e) {
              let e,
                i = "";
              switch (t.index) {
                case 256:
                  e = "foreground", i = "10";
                  break;
                case 257:
                  e = "background", i = "11";
                  break;
                case 258:
                  e = "cursor", i = "12";
                  break;
                default:
                  e = "ansi", i = "4;" + t.index;
              }
              switch (t.type) {
                case 0:
                  const s = b.color.toColorRGB("ansi" === e ? this._themeService.colors.ansi[t.index] : this._themeService.colors[e]);
                  this.coreService.triggerDataEvent(`${D.C0.ESC}]${i};${(0, x.toRgbString)(s)}${D.C1_ESCAPED.ST}`);
                  break;
                case 1:
                  if ("ansi" === e) this._themeService.modifyColors(e => e.ansi[t.index] = b.channels.toColor(...t.color));else {
                    const i = e;
                    this._themeService.modifyColors(e => e[i] = b.channels.toColor(...t.color));
                  }
                  break;
                case 2:
                  this._themeService.restoreColor(t.index);
              }
            }
          }
          _setup() {
            super._setup(), this._customKeyEventHandler = void 0;
          }
          get buffer() {
            return this.buffers.active;
          }
          focus() {
            this.textarea && this.textarea.focus({
              preventScroll: !0
            });
          }
          _handleScreenReaderModeOptionChange(e) {
            e ? !this._accessibilityManager.value && this._renderService && (this._accessibilityManager.value = this._instantiationService.createInstance(M.AccessibilityManager, this)) : this._accessibilityManager.clear();
          }
          _handleTextAreaFocus(e) {
            this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D.C0.ESC + "[I"), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
          }
          blur() {
            return this.textarea?.blur();
          }
          _handleTextAreaBlur() {
            this.textarea.value = "", this.refresh(this.buffer.y, this.buffer.y), this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(D.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 e = this.buffer.ybase + this.buffer.y,
              t = this.buffer.lines.get(e);
            if (!t) return;
            const i = Math.min(this.buffer.x, this.cols - 1),
              s = this._renderService.dimensions.css.cell.height,
              r = t.getWidth(i),
              n = this._renderService.dimensions.css.cell.width * r,
              o = this.buffer.y * this._renderService.dimensions.css.cell.height,
              a = i * this._renderService.dimensions.css.cell.width;
            this.textarea.style.left = a + "px", this.textarea.style.top = o + "px", this.textarea.style.width = n + "px", this.textarea.style.height = s + "px", this.textarea.style.lineHeight = s + "px", this.textarea.style.zIndex = "-5";
          }
          _initGlobal() {
            this._bindKeys(), this.register((0, r.addDisposableDomListener)(this.element, "copy", e => {
              this.hasSelection() && (0, s.copyHandler)(e, this._selectionService);
            }));
            const e = e => (0, s.handlePasteEvent)(e, this.textarea, this.coreService, this.optionsService);
            this.register((0, r.addDisposableDomListener)(this.textarea, "paste", e)), this.register((0, r.addDisposableDomListener)(this.element, "paste", e)), k.isFirefox ? this.register((0, r.addDisposableDomListener)(this.element, "mousedown", e => {
              2 === e.button && (0, s.rightClickHandler)(e, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
            })) : this.register((0, r.addDisposableDomListener)(this.element, "contextmenu", e => {
              (0, s.rightClickHandler)(e, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
            })), k.isLinux && this.register((0, r.addDisposableDomListener)(this.element, "auxclick", e => {
              1 === e.button && (0, s.moveTextAreaUnderMouseCursor)(e, this.textarea, this.screenElement);
            }));
          }
          _bindKeys() {
            this.register((0, r.addDisposableDomListener)(this.textarea, "keyup", e => this._keyUp(e), !0)), this.register((0, r.addDisposableDomListener)(this.textarea, "keydown", e => this._keyDown(e), !0)), this.register((0, r.addDisposableDomListener)(this.textarea, "keypress", e => this._keyPress(e), !0)), this.register((0, r.addDisposableDomListener)(this.textarea, "compositionstart", () => this._compositionHelper.compositionstart())), this.register((0, r.addDisposableDomListener)(this.textarea, "compositionupdate", e => this._compositionHelper.compositionupdate(e))), this.register((0, r.addDisposableDomListener)(this.textarea, "compositionend", () => this._compositionHelper.compositionend())), this.register((0, r.addDisposableDomListener)(this.textarea, "input", e => this._inputEvent(e), !0)), this.register(this.onRender(() => this._compositionHelper.updateCompositionElements()));
          }
          open(e) {
            if (!e) throw new Error("Terminal requires a parent element.");
            if (e.isConnected || this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"), this.element?.ownerDocument.defaultView && this._coreBrowserService) return void (this.element.ownerDocument.defaultView !== this._coreBrowserService.window && (this._coreBrowserService.window = this.element.ownerDocument.defaultView));
            this._document = e.ownerDocument, this.options.documentOverride && this.options.documentOverride instanceof Document && (this._document = this.optionsService.rawOptions.documentOverride), this.element = this._document.createElement("div"), this.element.dir = "ltr", this.element.classList.add("terminal"), this.element.classList.add("xterm"), e.appendChild(this.element);
            const t = this._document.createDocumentFragment();
            this._viewportElement = this._document.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), t.appendChild(this._viewportElement), this._viewportScrollArea = this._document.createElement("div"), this._viewportScrollArea.classList.add("xterm-scroll-area"), this._viewportElement.appendChild(this._viewportScrollArea), this.screenElement = this._document.createElement("div"), this.screenElement.classList.add("xterm-screen"), this.register((0, r.addDisposableDomListener)(this.screenElement, "mousemove", e => this.updateCursorStyle(e))), this._helperContainer = this._document.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), t.appendChild(this.screenElement), this.textarea = this._document.createElement("textarea"), this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", o.promptLabel), k.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.register(this._instantiationService.createInstance(v.CoreBrowserService, this.textarea, e.ownerDocument.defaultView ?? window, this._document ?? "undefined" != typeof window ? window.document : null)), this._instantiationService.setService(S.ICoreBrowserService, this._coreBrowserService), this.register((0, r.addDisposableDomListener)(this.textarea, "focus", e => this._handleTextAreaFocus(e))), this.register((0, r.addDisposableDomListener)(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(u.CharSizeService, this._document, this._helperContainer), this._instantiationService.setService(S.ICharSizeService, this._charSizeService), this._themeService = this._instantiationService.createInstance(C.ThemeService), this._instantiationService.setService(S.IThemeService, this._themeService), this._characterJoinerService = this._instantiationService.createInstance(f.CharacterJoinerService), this._instantiationService.setService(S.ICharacterJoinerService, this._characterJoinerService), this._renderService = this.register(this._instantiationService.createInstance(g.RenderService, this.rows, this.screenElement)), this._instantiationService.setService(S.IRenderService, this._renderService), this.register(this._renderService.onRenderedViewportChange(e => this._onRender.fire(e))), this.onResize(e => this._renderService.resize(e.cols, e.rows)), this._compositionView = this._document.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(d.CompositionHelper, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this._mouseService = this._instantiationService.createInstance(p.MouseService), this._instantiationService.setService(S.IMouseService, this._mouseService), this.linkifier = this.register(this._instantiationService.createInstance(n.Linkifier, this.screenElement)), this.element.appendChild(t);
            try {
              this._onWillOpen.fire(this.element);
            } catch {}
            this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this.viewport = this._instantiationService.createInstance(h.Viewport, this._viewportElement, this._viewportScrollArea), this.viewport.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent, 1)), 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(m.SelectionService, this.element, this.screenElement, this.linkifier)), this._instantiationService.setService(S.ISelectionService, this._selectionService), this.register(this._selectionService.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent))), this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this.register(this._selectionService.onRequestRedraw(e => this._renderService.handleSelectionChanged(e.start, e.end, e.columnSelectMode))), this.register(this._selectionService.onLinuxMouseSelection(e => {
              this.textarea.value = e, this.textarea.focus(), this.textarea.select();
            })), this.register(this._onScroll.event(e => {
              this.viewport.syncScrollArea(), this._selectionService.refresh();
            })), this.register((0, r.addDisposableDomListener)(this._viewportElement, "scroll", () => this._selectionService.refresh())), this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer, this.screenElement)), this.register((0, r.addDisposableDomListener)(this.element, "mousedown", e => this._selectionService.handleMouseDown(e))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager.value = this._instantiationService.createInstance(M.AccessibilityManager, this)), this.register(this.optionsService.onSpecificOptionChange("screenReaderMode", e => this._handleScreenReaderModeOptionChange(e))), this.options.overviewRulerWidth && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRulerWidth", e => {
              !this._overviewRulerRenderer && e && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer, this._viewportElement, this.screenElement)));
            }), this._charSizeService.measure(), this.refresh(0, this.rows - 1), this._initGlobal(), this.bindMouse();
          }
          _createRenderer() {
            return this._instantiationService.createInstance(_.DomRenderer, this, this._document, this.element, this.screenElement, this._viewportElement, this._helperContainer, this.linkifier);
          }
          bindMouse() {
            const e = this,
              t = this.element;
            function i(t) {
              const i = e._mouseService.getMouseReportCoords(t, e.screenElement);
              if (!i) return !1;
              let s, r;
              switch (t.overrideType || t.type) {
                case "mousemove":
                  r = 32, void 0 === t.buttons ? (s = 3, void 0 !== t.button && (s = t.button < 3 ? t.button : 3)) : s = 1 & t.buttons ? 0 : 4 & t.buttons ? 1 : 2 & t.buttons ? 2 : 3;
                  break;
                case "mouseup":
                  r = 0, s = t.button < 3 ? t.button : 3;
                  break;
                case "mousedown":
                  r = 1, s = t.button < 3 ? t.button : 3;
                  break;
                case "wheel":
                  if (e._customWheelEventHandler && !1 === e._customWheelEventHandler(t)) return !1;
                  if (0 === e.viewport.getLinesScrolled(t)) return !1;
                  r = t.deltaY < 0 ? 0 : 1, s = 4;
                  break;
                default:
                  return !1;
              }
              return !(void 0 === r || void 0 === s || s > 4) && e.coreMouseService.triggerMouseEvent({
                col: i.col,
                row: i.row,
                x: i.x,
                y: i.y,
                button: s,
                action: r,
                ctrl: t.ctrlKey,
                alt: t.altKey,
                shift: t.shiftKey
              });
            }
            const s = {
                mouseup: null,
                wheel: null,
                mousedrag: null,
                mousemove: null
              },
              n = {
                mouseup: e => (i(e), e.buttons || (this._document.removeEventListener("mouseup", s.mouseup), s.mousedrag && this._document.removeEventListener("mousemove", s.mousedrag)), this.cancel(e)),
                wheel: e => (i(e), this.cancel(e, !0)),
                mousedrag: e => {
                  e.buttons && i(e);
                },
                mousemove: e => {
                  e.buttons || i(e);
                }
              };
            this.register(this.coreMouseService.onProtocolChange(e => {
              e ? ("debug" === this.optionsService.rawOptions.logLevel && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(e)), 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 & e ? s.mousemove || (t.addEventListener("mousemove", n.mousemove), s.mousemove = n.mousemove) : (t.removeEventListener("mousemove", s.mousemove), s.mousemove = null), 16 & e ? s.wheel || (t.addEventListener("wheel", n.wheel, {
                passive: !1
              }), s.wheel = n.wheel) : (t.removeEventListener("wheel", s.wheel), s.wheel = null), 2 & e ? s.mouseup || (s.mouseup = n.mouseup) : (this._document.removeEventListener("mouseup", s.mouseup), s.mouseup = null), 4 & e ? s.mousedrag || (s.mousedrag = n.mousedrag) : (this._document.removeEventListener("mousemove", s.mousedrag), s.mousedrag = null);
            })), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this.register((0, r.addDisposableDomListener)(t, "mousedown", e => {
              if (e.preventDefault(), this.focus(), this.coreMouseService.areMouseEventsActive && !this._selectionService.shouldForceSelection(e)) return i(e), s.mouseup && this._document.addEventListener("mouseup", s.mouseup), s.mousedrag && this._document.addEventListener("mousemove", s.mousedrag), this.cancel(e);
            })), this.register((0, r.addDisposableDomListener)(t, "wheel", e => {
              if (!s.wheel) {
                if (this._customWheelEventHandler && !1 === this._customWheelEventHandler(e)) return !1;
                if (!this.buffer.hasScrollback) {
                  const t = this.viewport.getLinesScrolled(e);
                  if (0 === t) return;
                  const i = D.C0.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? "O" : "[") + (e.deltaY < 0 ? "A" : "B");
                  let s = "";
                  for (let e = 0; e < Math.abs(t); e++) s += i;
                  return this.coreService.triggerDataEvent(s, !0), this.cancel(e, !0);
                }
                return this.viewport.handleWheel(e) ? this.cancel(e) : void 0;
              }
            }, {
              passive: !1
            })), this.register((0, r.addDisposableDomListener)(t, "touchstart", e => {
              if (!this.coreMouseService.areMouseEventsActive) return this.viewport.handleTouchStart(e), this.cancel(e);
            }, {
              passive: !0
            })), this.register((0, r.addDisposableDomListener)(t, "touchmove", e => {
              if (!this.coreMouseService.areMouseEventsActive) return this.viewport.handleTouchMove(e) ? void 0 : this.cancel(e);
            }, {
              passive: !1
            }));
          }
          refresh(e, t) {
            this._renderService?.refreshRows(e, t);
          }
          updateCursorStyle(e) {
            this._selectionService?.shouldColumnSelect(e) ? 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(e, t, i = 0) {
            1 === i ? (super.scrollLines(e, t, i), this.refresh(0, this.rows - 1)) : this.viewport?.scrollLines(e);
          }
          paste(e) {
            (0, s.paste)(e, this.textarea, this.coreService, this.optionsService);
          }
          attachCustomKeyEventHandler(e) {
            this._customKeyEventHandler = e;
          }
          attachCustomWheelEventHandler(e) {
            this._customWheelEventHandler = e;
          }
          registerLinkProvider(e) {
            return this._linkProviderService.registerLinkProvider(e);
          }
          registerCharacterJoiner(e) {
            if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
            const t = this._characterJoinerService.register(e);
            return this.refresh(0, this.rows - 1), t;
          }
          deregisterCharacterJoiner(e) {
            if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
            this._characterJoinerService.deregister(e) && this.refresh(0, this.rows - 1);
          }
          get markers() {
            return this.buffer.markers;
          }
          registerMarker(e) {
            return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + e);
          }
          registerDecoration(e) {
            return this._decorationService.registerDecoration(e);
          }
          hasSelection() {
            return !!this._selectionService && this._selectionService.hasSelection;
          }
          select(e, t, i) {
            this._selectionService.setSelection(e, t, i);
          }
          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() {
            this._selectionService?.clearSelection();
          }
          selectAll() {
            this._selectionService?.selectAll();
          }
          selectLines(e, t) {
            this._selectionService?.selectLines(e, t);
          }
          _keyDown(e) {
            if (this._keyDownHandled = !1, this._keyDownSeen = !0, this._customKeyEventHandler && !1 === this._customKeyEventHandler(e)) return !1;
            const t = this.browser.isMac && this.options.macOptionIsMeta && e.altKey;
            if (!t && !this._compositionHelper.keydown(e)) return this.options.scrollOnUserInput && this.buffer.ybase !== this.buffer.ydisp && this.scrollToBottom(), !1;
            t || "Dead" !== e.key && "AltGraph" !== e.key || (this._unprocessedDeadKey = !0);
            const i = (0, R.evaluateKeyboardEvent)(e, this.coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);
            if (this.updateCursorStyle(e), 3 === i.type || 2 === i.type) {
              const t = this.rows - 1;
              return this.scrollLines(2 === i.type ? -t : t), this.cancel(e, !0);
            }
            return 1 === i.type && this.selectAll(), !!this._isThirdLevelShift(this.browser, e) || (i.cancel && this.cancel(e, !0), !i.key || !!(e.key && !e.ctrlKey && !e.altKey && !e.metaKey && 1 === e.key.length && e.key.charCodeAt(0) >= 65 && e.key.charCodeAt(0) <= 90) || (this._unprocessedDeadKey ? (this._unprocessedDeadKey = !1, !0) : (i.key !== D.C0.ETX && i.key !== D.C0.CR || (this.textarea.value = ""), this._onKey.fire({
              key: i.key,
              domEvent: e
            }), this._showCursor(), this.coreService.triggerDataEvent(i.key, !0), !this.optionsService.rawOptions.screenReaderMode || e.altKey || e.ctrlKey ? this.cancel(e, !0) : void (this._keyDownHandled = !0))));
          }
          _isThirdLevelShift(e, t) {
            const i = e.isMac && !this.options.macOptionIsMeta && t.altKey && !t.ctrlKey && !t.metaKey || e.isWindows && t.altKey && t.ctrlKey && !t.metaKey || e.isWindows && t.getModifierState("AltGraph");
            return "keypress" === t.type ? i : i && (!t.keyCode || t.keyCode > 47);
          }
          _keyUp(e) {
            this._keyDownSeen = !1, this._customKeyEventHandler && !1 === this._customKeyEventHandler(e) || (function (e) {
              return 16 === e.keyCode || 17 === e.keyCode || 18 === e.keyCode;
            }(e) || this.focus(), this.updateCursorStyle(e), this._keyPressHandled = !1);
          }
          _keyPress(e) {
            let t;
            if (this._keyPressHandled = !1, this._keyDownHandled) return !1;
            if (this._customKeyEventHandler && !1 === this._customKeyEventHandler(e)) return !1;
            if (this.cancel(e), e.charCode) t = e.charCode;else if (null === e.which || void 0 === e.which) t = e.keyCode;else {
              if (0 === e.which || 0 === e.charCode) return !1;
              t = e.which;
            }
            return !(!t || (e.altKey || e.ctrlKey || e.metaKey) && !this._isThirdLevelShift(this.browser, e) || (t = String.fromCharCode(t), this._onKey.fire({
              key: t,
              domEvent: e
            }), this._showCursor(), this.coreService.triggerDataEvent(t, !0), this._keyPressHandled = !0, this._unprocessedDeadKey = !1, 0));
          }
          _inputEvent(e) {
            if (e.data && "insertText" === e.inputType && (!e.composed || !this._keyDownSeen) && !this.optionsService.rawOptions.screenReaderMode) {
              if (this._keyPressHandled) return !1;
              this._unprocessedDeadKey = !1;
              const t = e.data;
              return this.coreService.triggerDataEvent(t, !0), this.cancel(e), !0;
            }
            return !1;
          }
          resize(e, t) {
            e !== this.cols || t !== this.rows ? super.resize(e, t) : this._charSizeService && !this._charSizeService.hasValidSize && this._charSizeService.measure();
          }
          _afterResize(e, t) {
            this._charSizeService?.measure(), this.viewport?.syncScrollArea(!0);
          }
          clear() {
            if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
              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 e = 1; e < this.rows; e++) this.buffer.lines.push(this.buffer.getBlankLine(L.DEFAULT_ATTR_DATA));
              this._onScroll.fire({
                position: this.buffer.ydisp,
                source: 0
              }), this.viewport?.reset(), this.refresh(0, this.rows - 1);
            }
          }
          reset() {
            this.options.rows = this.rows, this.options.cols = this.cols;
            const e = this._customKeyEventHandler;
            this._setup(), super.reset(), this._selectionService?.reset(), this._decorationService.reset(), this.viewport?.reset(), this._customKeyEventHandler = e, this.refresh(0, this.rows - 1);
          }
          clearTextureAtlas() {
            this._renderService?.clearTextureAtlas();
          }
          _reportFocus() {
            this.element?.classList.contains("focus") ? this.coreService.triggerDataEvent(D.C0.ESC + "[I") : this.coreService.triggerDataEvent(D.C0.ESC + "[O");
          }
          _reportWindowsOptions(e) {
            if (this._renderService) switch (e) {
              case T.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:
                const e = this._renderService.dimensions.css.canvas.width.toFixed(0),
                  t = this._renderService.dimensions.css.canvas.height.toFixed(0);
                this.coreService.triggerDataEvent(`${D.C0.ESC}[4;${t};${e}t`);
                break;
              case T.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:
                const i = this._renderService.dimensions.css.cell.width.toFixed(0),
                  s = this._renderService.dimensions.css.cell.height.toFixed(0);
                this.coreService.triggerDataEvent(`${D.C0.ESC}[6;${s};${i}t`);
            }
          }
          cancel(e, t) {
            if (this.options.cancelEvents || t) return e.preventDefault(), e.stopPropagation(), !1;
          }
        }
        t.Terminal = P;
      },
      9924: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TimeBasedDebouncer = void 0, t.TimeBasedDebouncer = class {
          constructor(e, t = 1e3) {
            this._renderCallback = e, this._debounceThresholdMS = t, this._lastRefreshMs = 0, this._additionalRefreshRequested = !1;
          }
          dispose() {
            this._refreshTimeoutID && clearTimeout(this._refreshTimeoutID);
          }
          refresh(e, t, i) {
            this._rowCount = i, e = void 0 !== e ? e : 0, t = void 0 !== t ? t : this._rowCount - 1, this._rowStart = void 0 !== this._rowStart ? Math.min(this._rowStart, e) : e, this._rowEnd = void 0 !== this._rowEnd ? Math.max(this._rowEnd, t) : t;
            const s = Date.now();
            if (s - this._lastRefreshMs >= this._debounceThresholdMS) this._lastRefreshMs = s, this._innerRefresh();else if (!this._additionalRefreshRequested) {
              const e = s - this._lastRefreshMs,
                t = this._debounceThresholdMS - e;
              this._additionalRefreshRequested = !0, this._refreshTimeoutID = window.setTimeout(() => {
                this._lastRefreshMs = Date.now(), this._innerRefresh(), this._additionalRefreshRequested = !1, this._refreshTimeoutID = void 0;
              }, t);
            }
          }
          _innerRefresh() {
            if (void 0 === this._rowStart || void 0 === this._rowEnd || void 0 === this._rowCount) return;
            const e = Math.max(this._rowStart, 0),
              t = Math.min(this._rowEnd, this._rowCount - 1);
            this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(e, t);
          }
        };
      },
      1680: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Viewport = void 0;
        const n = i(3656),
          o = i(4725),
          a = i(8460),
          h = i(844),
          c = i(2585);
        let l = t.Viewport = class extends h.Disposable {
          constructor(e, t, i, s, r, o, h, c) {
            super(), this._viewportElement = e, this._scrollArea = t, this._bufferService = i, this._optionsService = s, this._charSizeService = r, this._renderService = o, this._coreBrowserService = h, 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._onRequestScrollLines = this.register(new a.EventEmitter()), this.onRequestScrollLines = this._onRequestScrollLines.event, this.scrollBarWidth = this._viewportElement.offsetWidth - this._scrollArea.offsetWidth || 15, this.register((0, n.addDisposableDomListener)(this._viewportElement, "scroll", this._handleScroll.bind(this))), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer)), this._renderDimensions = this._renderService.dimensions, this.register(this._renderService.onDimensionsChange(e => this._renderDimensions = e)), this._handleThemeChange(c.colors), this.register(c.onChangeColors(e => this._handleThemeChange(e))), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.syncScrollArea())), setTimeout(() => this.syncScrollArea());
          }
          _handleThemeChange(e) {
            this._viewportElement.style.backgroundColor = e.background.css;
          }
          reset() {
            this._currentRowHeight = 0, this._currentDeviceCellHeight = 0, this._lastRecordedBufferLength = 0, this._lastRecordedViewportHeight = 0, this._lastRecordedBufferHeight = 0, this._lastTouchY = 0, this._lastScrollTop = 0, this._coreBrowserService.window.requestAnimationFrame(() => this.syncScrollArea());
          }
          _refresh(e) {
            if (e) return this._innerRefresh(), void (null !== this._refreshAnimationFrame && this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));
            null === this._refreshAnimationFrame && (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh()));
          }
          _innerRefresh() {
            if (this._charSizeService.height > 0) {
              this._currentRowHeight = this._renderDimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderDimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
              const e = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderDimensions.css.canvas.height);
              this._lastRecordedBufferHeight !== e && (this._lastRecordedBufferHeight = e, 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._onRequestScrollLines.fire({
              amount: 0,
              suppressScrollEvent: !0
            });
            const t = Math.round(this._lastScrollTop / this._currentRowHeight) - this._bufferService.buffer.ydisp;
            this._onRequestScrollLines.fire({
              amount: t,
              suppressScrollEvent: !0
            });
          }
          _smoothScroll() {
            if (this._isDisposed || -1 === this._smoothScrollState.origin || -1 === this._smoothScrollState.target) 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, t) {
            const i = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;
            return !(t < 0 && 0 !== this._viewportElement.scrollTop || t > 0 && i < this._lastRecordedBufferHeight) || (e.cancelable && e.preventDefault(), !1);
          }
          handleWheel(e) {
            const t = this._getPixelsScrolled(e);
            return 0 !== t && (this._optionsService.rawOptions.smoothScrollDuration ? (this._smoothScrollState.startTime = Date.now(), this._smoothScrollPercent() < 1 ? (this._smoothScrollState.origin = this._viewportElement.scrollTop, -1 === this._smoothScrollState.target ? this._smoothScrollState.target = this._viewportElement.scrollTop + t : this._smoothScrollState.target += t, this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0), this._smoothScroll()) : this._clearSmoothScrollState()) : this._viewportElement.scrollTop += t, this._bubbleScroll(e, t));
          }
          scrollLines(e) {
            if (0 !== e) if (this._optionsService.rawOptions.smoothScrollDuration) {
              const t = e * this._currentRowHeight;
              this._smoothScrollState.startTime = Date.now(), this._smoothScrollPercent() < 1 ? (this._smoothScrollState.origin = this._viewportElement.scrollTop, this._smoothScrollState.target = this._smoothScrollState.origin + t, this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0), this._smoothScroll()) : this._clearSmoothScrollState();
            } else this._onRequestScrollLines.fire({
              amount: e,
              suppressScrollEvent: !1
            });
          }
          _getPixelsScrolled(e) {
            if (0 === e.deltaY || e.shiftKey) return 0;
            let t = this._applyScrollModifier(e.deltaY, e);
            return e.deltaMode === WheelEvent.DOM_DELTA_LINE ? t *= this._currentRowHeight : e.deltaMode === WheelEvent.DOM_DELTA_PAGE && (t *= this._currentRowHeight * this._bufferService.rows), t;
          }
          getBufferElements(e, t) {
            let i,
              s = "";
            const r = [],
              n = t ?? this._bufferService.buffer.lines.length,
              o = this._bufferService.buffer.lines;
            for (let t = e; t < n; t++) {
              const e = o.get(t);
              if (!e) continue;
              const n = o.get(t + 1)?.isWrapped;
              if (s += e.translateToString(!n), !n || t === o.length - 1) {
                const e = document.createElement("div");
                e.textContent = s, r.push(e), s.length > 0 && (i = e), s = "";
              }
            }
            return {
              bufferElements: r,
              cursorElement: i
            };
          }
          getLinesScrolled(e) {
            if (0 === e.deltaY || e.shiftKey) return 0;
            let t = this._applyScrollModifier(e.deltaY, e);
            return e.deltaMode === WheelEvent.DOM_DELTA_PIXEL ? (t /= this._currentRowHeight + 0, this._wheelPartialScroll += t, t = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1), this._wheelPartialScroll %= 1) : e.deltaMode === WheelEvent.DOM_DELTA_PAGE && (t *= this._bufferService.rows), t;
          }
          _applyScrollModifier(e, t) {
            const i = this._optionsService.rawOptions.fastScrollModifier;
            return "alt" === i && t.altKey || "ctrl" === i && t.ctrlKey || "shift" === i && t.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 t = this._lastTouchY - e.touches[0].pageY;
            return this._lastTouchY = e.touches[0].pageY, 0 !== t && (this._viewportElement.scrollTop += t, this._bubbleScroll(e, t));
          }
        };
        t.Viewport = l = s([r(2, c.IBufferService), r(3, c.IOptionsService), r(4, o.ICharSizeService), r(5, o.IRenderService), r(6, o.ICoreBrowserService), r(7, o.IThemeService)], l);
      },
      3107: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferDecorationRenderer = void 0;
        const n = i(4725),
          o = i(844),
          a = i(2585);
        let h = t.BufferDecorationRenderer = class extends o.Disposable {
          constructor(e, t, i, s, r) {
            super(), this._screenElement = e, this._bufferService = t, this._coreBrowserService = i, this._decorationService = s, this._renderService = r, this._decorationElements = 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(this._coreBrowserService.onDprChange(() => 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(e => this._removeDecoration(e))), this.register((0, o.toDisposable)(() => {
              this._container.remove(), this._decorationElements.clear();
            }));
          }
          _queueRefresh() {
            void 0 === this._animationFrame && (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) {
            const t = this._coreBrowserService.mainDocument.createElement("div");
            t.classList.add("xterm-decoration"), t.classList.toggle("xterm-decoration-top-layer", "top" === e?.options?.layer), t.style.width = `${Math.round((e.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`, t.style.height = (e.options.height || 1) * this._renderService.dimensions.css.cell.height + "px", t.style.top = (e.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height + "px", t.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
            const i = e.options.x ?? 0;
            return i && i > this._bufferService.cols && (t.style.display = "none"), this._refreshXPosition(e, t), t;
          }
          _refreshStyle(e) {
            const t = e.marker.line - this._bufferService.buffers.active.ydisp;
            if (t < 0 || t >= this._bufferService.rows) e.element && (e.element.style.display = "none", e.onRenderEmitter.fire(e.element));else {
              let i = this._decorationElements.get(e);
              i || (i = this._createElement(e), e.element = i, this._decorationElements.set(e, i), this._container.appendChild(i), e.onDispose(() => {
                this._decorationElements.delete(e), i.remove();
              })), i.style.top = t * this._renderService.dimensions.css.cell.height + "px", i.style.display = this._altBufferIsActive ? "none" : "block", e.onRenderEmitter.fire(i);
            }
          }
          _refreshXPosition(e, t = e.element) {
            if (!t) return;
            const i = e.options.x ?? 0;
            "right" === (e.options.anchor || "left") ? t.style.right = i ? i * this._renderService.dimensions.css.cell.width + "px" : "" : t.style.left = i ? i * this._renderService.dimensions.css.cell.width + "px" : "";
          }
          _removeDecoration(e) {
            this._decorationElements.get(e)?.remove(), this._decorationElements.delete(e), e.dispose();
          }
        };
        t.BufferDecorationRenderer = h = s([r(1, a.IBufferService), r(2, n.ICoreBrowserService), r(3, a.IDecorationService), r(4, n.IRenderService)], h);
      },
      5871: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ColorZoneStore = void 0, t.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(e) {
            if (e.options.overviewRulerOptions) {
              for (const t of this._zones) if (t.color === e.options.overviewRulerOptions.color && t.position === e.options.overviewRulerOptions.position) {
                if (this._lineIntersectsZone(t, e.marker.line)) return;
                if (this._lineAdjacentToZone(t, e.marker.line, e.options.overviewRulerOptions.position)) return void this._addLineToZone(t, e.marker.line);
              }
              if (this._zonePoolIndex < this._zonePool.length) return this._zonePool[this._zonePoolIndex].color = e.options.overviewRulerOptions.color, this._zonePool[this._zonePoolIndex].position = e.options.overviewRulerOptions.position, this._zonePool[this._zonePoolIndex].startBufferLine = e.marker.line, this._zonePool[this._zonePoolIndex].endBufferLine = e.marker.line, void this._zones.push(this._zonePool[this._zonePoolIndex++]);
              this._zones.push({
                color: e.options.overviewRulerOptions.color,
                position: e.options.overviewRulerOptions.position,
                startBufferLine: e.marker.line,
                endBufferLine: e.marker.line
              }), this._zonePool.push(this._zones[this._zones.length - 1]), this._zonePoolIndex++;
            }
          }
          setPadding(e) {
            this._linePadding = e;
          }
          _lineIntersectsZone(e, t) {
            return t >= e.startBufferLine && t <= e.endBufferLine;
          }
          _lineAdjacentToZone(e, t, i) {
            return t >= e.startBufferLine - this._linePadding[i || "full"] && t <= e.endBufferLine + this._linePadding[i || "full"];
          }
          _addLineToZone(e, t) {
            e.startBufferLine = Math.min(e.startBufferLine, t), e.endBufferLine = Math.max(e.endBufferLine, t);
          }
        };
      },
      5744: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.OverviewRulerRenderer = void 0;
        const n = i(5871),
          o = i(4725),
          a = i(844),
          h = i(2585),
          c = {
            full: 0,
            left: 0,
            center: 0,
            right: 0
          },
          l = {
            full: 0,
            left: 0,
            center: 0,
            right: 0
          },
          d = {
            full: 0,
            left: 0,
            center: 0,
            right: 0
          };
        let _ = t.OverviewRulerRenderer = class extends a.Disposable {
          get _width() {
            return this._optionsService.options.overviewRulerWidth || 0;
          }
          constructor(e, t, i, s, r, o, h) {
            super(), this._viewportElement = e, this._screenElement = t, this._bufferService = i, this._decorationService = s, this._renderService = r, this._optionsService = o, this._coreBrowserService = h, this._colorZoneStore = new n.ColorZoneStore(), this._shouldUpdateDimensions = !0, this._shouldUpdateAnchor = !0, this._lastKnownBufferLength = 0, this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), this._viewportElement.parentElement?.insertBefore(this._canvas, this._viewportElement);
            const c = this._canvas.getContext("2d");
            if (!c) throw new Error("Ctx cannot be null");
            this._ctx = c, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, a.toDisposable)(() => {
              this._canvas?.remove();
            }));
          }
          _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(this._coreBrowserService.onDprChange(() => this._queueRefresh(!0))), this._queueRefresh(!0);
          }
          _refreshDrawConstants() {
            const e = Math.floor(this._canvas.width / 3),
              t = Math.ceil(this._canvas.width / 3);
            l.full = this._canvas.width, l.left = e, l.center = t, l.right = e, this._refreshDrawHeightConstants(), d.full = 0, d.left = 0, d.center = l.left, d.right = l.left + l.center;
          }
          _refreshDrawHeightConstants() {
            c.full = Math.round(2 * this._coreBrowserService.dpr);
            const e = this._canvas.height / this._bufferService.buffer.lines.length,
              t = Math.round(Math.max(Math.min(e, 12), 6) * this._coreBrowserService.dpr);
            c.left = t, c.center = t, c.right = t;
          }
          _refreshColorZonePadding() {
            this._colorZoneStore.setPadding({
              full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.full),
              left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.left),
              center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.center),
              right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.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._coreBrowserService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowserService.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 e of this._decorationService.decorations) this._colorZoneStore.addDecoration(e);
            this._ctx.lineWidth = 1;
            const e = this._colorZoneStore.zones;
            for (const t of e) "full" !== t.position && this._renderColorZone(t);
            for (const t of e) "full" === t.position && this._renderColorZone(t);
            this._shouldUpdateDimensions = !1, this._shouldUpdateAnchor = !1;
          }
          _renderColorZone(e) {
            this._ctx.fillStyle = e.color, this._ctx.fillRect(d[e.position || "full"], Math.round((this._canvas.height - 1) * (e.startBufferLine / this._bufferService.buffers.active.lines.length) - c[e.position || "full"] / 2), l[e.position || "full"], Math.round((this._canvas.height - 1) * ((e.endBufferLine - e.startBufferLine) / this._bufferService.buffers.active.lines.length) + c[e.position || "full"]));
          }
          _queueRefresh(e, t) {
            this._shouldUpdateDimensions = e || this._shouldUpdateDimensions, this._shouldUpdateAnchor = t || this._shouldUpdateAnchor, void 0 === this._animationFrame && (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
              this._refreshDecorations(), this._animationFrame = void 0;
            }));
          }
        };
        t.OverviewRulerRenderer = _ = s([r(2, h.IBufferService), r(3, h.IDecorationService), r(4, o.IRenderService), r(5, h.IOptionsService), r(6, o.ICoreBrowserService)], _);
      },
      2950: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CompositionHelper = void 0;
        const n = i(4725),
          o = i(2585),
          a = i(2584);
        let h = t.CompositionHelper = class {
          get isComposing() {
            return this._isComposing;
          }
          constructor(e, t, i, s, r, n) {
            this._textarea = e, this._compositionView = t, this._bufferService = i, this._optionsService = s, this._coreService = r, this._renderService = n, this._isComposing = !1, this._isSendingComposition = !1, this._compositionPosition = {
              start: 0,
              end: 0
            }, this._dataAlreadySent = "";
          }
          compositionstart() {
            this._isComposing = !0, this._compositionPosition.start = this._textarea.value.length, this._compositionView.textContent = "", this._dataAlreadySent = "", this._compositionView.classList.add("active");
          }
          compositionupdate(e) {
            this._compositionView.textContent = e.data, this.updateCompositionElements(), setTimeout(() => {
              this._compositionPosition.end = this._textarea.value.length;
            }, 0);
          }
          compositionend() {
            this._finalizeComposition(!0);
          }
          keydown(e) {
            if (this._isComposing || this._isSendingComposition) {
              if (229 === e.keyCode) return !1;
              if (16 === e.keyCode || 17 === e.keyCode || 18 === e.keyCode) return !1;
              this._finalizeComposition(!1);
            }
            return 229 !== e.keyCode || (this._handleAnyTextareaChanges(), !1);
          }
          _finalizeComposition(e) {
            if (this._compositionView.classList.remove("active"), this._isComposing = !1, e) {
              const e = {
                start: this._compositionPosition.start,
                end: this._compositionPosition.end
              };
              this._isSendingComposition = !0, setTimeout(() => {
                if (this._isSendingComposition) {
                  let t;
                  this._isSendingComposition = !1, e.start += this._dataAlreadySent.length, t = this._isComposing ? this._textarea.value.substring(e.start, e.end) : this._textarea.value.substring(e.start), t.length > 0 && this._coreService.triggerDataEvent(t, !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 e = this._textarea.value;
            setTimeout(() => {
              if (!this._isComposing) {
                const t = this._textarea.value,
                  i = t.replace(e, "");
                this._dataAlreadySent = i, t.length > e.length ? this._coreService.triggerDataEvent(i, !0) : t.length < e.length ? this._coreService.triggerDataEvent(`${a.C0.DEL}`, !0) : t.length === e.length && t !== e && this._coreService.triggerDataEvent(t, !0);
              }
            }, 0);
          }
          updateCompositionElements(e) {
            if (this._isComposing) {
              if (this._bufferService.buffer.isCursorInViewport) {
                const e = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1),
                  t = this._renderService.dimensions.css.cell.height,
                  i = this._bufferService.buffer.y * this._renderService.dimensions.css.cell.height,
                  s = e * this._renderService.dimensions.css.cell.width;
                this._compositionView.style.left = s + "px", this._compositionView.style.top = i + "px", this._compositionView.style.height = t + "px", this._compositionView.style.lineHeight = t + "px", this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + "px";
                const r = this._compositionView.getBoundingClientRect();
                this._textarea.style.left = s + "px", this._textarea.style.top = i + "px", this._textarea.style.width = Math.max(r.width, 1) + "px", this._textarea.style.height = Math.max(r.height, 1) + "px", this._textarea.style.lineHeight = r.height + "px";
              }
              e || setTimeout(() => this.updateCompositionElements(!0), 0);
            }
          }
        };
        t.CompositionHelper = h = s([r(2, o.IBufferService), r(3, o.IOptionsService), r(4, o.ICoreService), r(5, n.IRenderService)], h);
      },
      9806: (e, t) => {
        function i(e, t, i) {
          const s = i.getBoundingClientRect(),
            r = e.getComputedStyle(i),
            n = parseInt(r.getPropertyValue("padding-left")),
            o = parseInt(r.getPropertyValue("padding-top"));
          return [t.clientX - s.left - n, t.clientY - s.top - o];
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getCoords = t.getCoordsRelativeToElement = void 0, t.getCoordsRelativeToElement = i, t.getCoords = function (e, t, s, r, n, o, a, h, c) {
          if (!o) return;
          const l = i(e, t, s);
          return l ? (l[0] = Math.ceil((l[0] + (c ? a / 2 : 0)) / a), l[1] = Math.ceil(l[1] / h), l[0] = Math.min(Math.max(l[0], 1), r + (c ? 1 : 0)), l[1] = Math.min(Math.max(l[1], 1), n), l) : void 0;
        };
      },
      9504: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.moveToCellSequence = void 0;
        const s = i(2584);
        function r(e, t, i, s) {
          const r = e - n(e, i),
            a = t - n(t, i),
            l = Math.abs(r - a) - function (e, t, i) {
              let s = 0;
              const r = e - n(e, i),
                a = t - n(t, i);
              for (let n = 0; n < Math.abs(r - a); n++) {
                const a = "A" === o(e, t) ? -1 : 1,
                  h = i.buffer.lines.get(r + a * n);
                h?.isWrapped && s++;
              }
              return s;
            }(e, t, i);
          return c(l, h(o(e, t), s));
        }
        function n(e, t) {
          let i = 0,
            s = t.buffer.lines.get(e),
            r = s?.isWrapped;
          for (; r && e >= 0 && e < t.rows;) i++, s = t.buffer.lines.get(--e), r = s?.isWrapped;
          return i;
        }
        function o(e, t) {
          return e > t ? "A" : "B";
        }
        function a(e, t, i, s, r, n) {
          let o = e,
            a = t,
            h = "";
          for (; o !== i || a !== s;) o += r ? 1 : -1, r && o > n.cols - 1 ? (h += n.buffer.translateBufferLineToString(a, !1, e, o), o = 0, e = 0, a++) : !r && o < 0 && (h += n.buffer.translateBufferLineToString(a, !1, 0, e + 1), o = n.cols - 1, e = o, a--);
          return h + n.buffer.translateBufferLineToString(a, !1, e, o);
        }
        function h(e, t) {
          const i = t ? "O" : "[";
          return s.C0.ESC + i + e;
        }
        function c(e, t) {
          e = Math.floor(e);
          let i = "";
          for (let s = 0; s < e; s++) i += t;
          return i;
        }
        t.moveToCellSequence = function (e, t, i, s) {
          const o = i.buffer.x,
            l = i.buffer.y;
          if (!i.buffer.hasScrollback) return function (e, t, i, s, o, l) {
            return 0 === r(t, s, o, l).length ? "" : c(a(e, t, e, t - n(t, o), !1, o).length, h("D", l));
          }(o, l, 0, t, i, s) + r(l, t, i, s) + function (e, t, i, s, o, l) {
            let d;
            d = r(t, s, o, l).length > 0 ? s - n(s, o) : t;
            const _ = s,
              u = function (e, t, i, s, o, a) {
                let h;
                return h = r(i, s, o, a).length > 0 ? s - n(s, o) : t, e < i && h <= s || e >= i && h < s ? "C" : "D";
              }(e, t, i, s, o, l);
            return c(a(e, d, i, _, "C" === u, o).length, h(u, l));
          }(o, l, e, t, i, s);
          let d;
          if (l === t) return d = o > e ? "D" : "C", c(Math.abs(o - e), h(d, s));
          d = l > t ? "D" : "C";
          const _ = Math.abs(l - t);
          return c(function (e, t) {
            return t.cols - e;
          }(l > t ? e : o, i) + (_ - 1) * i.cols + 1 + ((l > t ? o : e) - 1), h(d, s));
        };
      },
      1296: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DomRenderer = void 0;
        const n = i(3787),
          o = i(2550),
          a = i(2223),
          h = i(6171),
          c = i(6052),
          l = i(4725),
          d = i(8055),
          _ = i(8460),
          u = i(844),
          f = i(2585),
          v = "xterm-dom-renderer-owner-",
          p = "xterm-rows",
          g = "xterm-fg-",
          m = "xterm-bg-",
          S = "xterm-focus",
          C = "xterm-selection";
        let b = 1,
          w = t.DomRenderer = class extends u.Disposable {
            constructor(e, t, i, s, r, a, l, d, f, g, m, S, w) {
              super(), this._terminal = e, this._document = t, this._element = i, this._screenElement = s, this._viewportElement = r, this._helperContainer = a, this._linkifier2 = l, this._charSizeService = f, this._optionsService = g, this._bufferService = m, this._coreBrowserService = S, this._themeService = w, this._terminalClass = b++, this._rowElements = [], this._selectionRenderModel = (0, c.createSelectionRenderModel)(), this.onRequestRedraw = this.register(new _.EventEmitter()).event, this._rowContainer = this._document.createElement("div"), this._rowContainer.classList.add(p), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = this._document.createElement("div"), this._selectionContainer.classList.add(C), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = (0, h.createRenderDimensions)(), this._updateDimensions(), this.register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this.register(this._themeService.onChangeColors(e => this._injectCss(e))), this._injectCss(this._themeService.colors), this._rowFactory = d.createInstance(n.DomRendererRowFactory, document), this._element.classList.add(v + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this.register(this._linkifier2.onShowLinkUnderline(e => this._handleLinkHover(e))), this.register(this._linkifier2.onHideLinkUnderline(e => this._handleLinkLeave(e))), this.register((0, u.toDisposable)(() => {
                this._element.classList.remove(v + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
              })), this._widthCache = new o.WidthCache(this._document, this._helperContainer), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
            }
            _updateDimensions() {
              const e = this._coreBrowserService.dpr;
              this.dimensions.device.char.width = this._charSizeService.width * e, this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * e), 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 / e), this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / e), 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 e of this._rowElements) e.style.width = `${this.dimensions.css.canvas.width}px`, e.style.height = `${this.dimensions.css.cell.height}px`, e.style.lineHeight = `${this.dimensions.css.cell.height}px`, e.style.overflow = "hidden";
              this._dimensionsStyleElement || (this._dimensionsStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
              const t = `${this._terminalSelector} .${p} span { display: inline-block; height: 100%; vertical-align: top;}`;
              this._dimensionsStyleElement.textContent = t, 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(e) {
              this._themeStyleElement || (this._themeStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
              let t = `${this._terminalSelector} .${p} { color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;
              t += `${this._terminalSelector} .${p} .xterm-dim { color: ${d.color.multiplyOpacity(e.foreground, .5).css};}`, t += `${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`, t += "@keyframes blink_box_shadow_" + this._terminalClass + " { 50% {  border-bottom-style: hidden; }}", t += "@keyframes blink_block_" + this._terminalClass + " { 0% {" + `  background-color: ${e.cursor.css};` + `  color: ${e.cursorAccent.css}; } 50% {  background-color: inherit;` + `  color: ${e.cursor.css}; }}`, t += `${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_` + this._terminalClass + " 1s step-end infinite;}" + `${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_` + this._terminalClass + " 1s step-end infinite;}" + `${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-block {` + ` background-color: ${e.cursor.css} !important;` + ` color: ${e.cursorAccent.css} !important;}` + `${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-outline {` + ` outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}` + `${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-bar {` + ` box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}` + `${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-underline {` + ` border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`, t += `${this._terminalSelector} .${C} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${C} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${C} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;
              for (const [i, s] of e.ansi.entries()) t += `${this._terminalSelector} .${g}${i} { color: ${s.css}; }${this._terminalSelector} .${g}${i}.xterm-dim { color: ${d.color.multiplyOpacity(s, .5).css}; }${this._terminalSelector} .${m}${i} { background-color: ${s.css}; }`;
              t += `${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(e.background).css}; }${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(e.background), .5).css}; }${this._terminalSelector} .${m}${a.INVERTED_DEFAULT_COLOR} { background-color: ${e.foreground.css}; }`, this._themeStyleElement.textContent = t;
            }
            _setDefaultSpacing() {
              const e = this.dimensions.css.cell.width - this._widthCache.get("W", !1, !1);
              this._rowContainer.style.letterSpacing = `${e}px`, this._rowFactory.defaultSpacing = e;
            }
            handleDevicePixelRatioChange() {
              this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
            }
            _refreshRowElements(e, t) {
              for (let e = this._rowElements.length; e <= t; e++) {
                const e = this._document.createElement("div");
                this._rowContainer.appendChild(e), this._rowElements.push(e);
              }
              for (; this._rowElements.length > t;) this._rowContainer.removeChild(this._rowElements.pop());
            }
            handleResize(e, t) {
              this._refreshRowElements(e, t), this._updateDimensions(), this.handleSelectionChanged(this._selectionRenderModel.selectionStart, this._selectionRenderModel.selectionEnd, this._selectionRenderModel.columnSelectMode);
            }
            handleCharSizeChanged() {
              this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
            }
            handleBlur() {
              this._rowContainer.classList.remove(S), this.renderRows(0, this._bufferService.rows - 1);
            }
            handleFocus() {
              this._rowContainer.classList.add(S), this.renderRows(this._bufferService.buffer.y, this._bufferService.buffer.y);
            }
            handleSelectionChanged(e, t, i) {
              if (this._selectionContainer.replaceChildren(), this._rowFactory.handleSelectionChanged(e, t, i), this.renderRows(0, this._bufferService.rows - 1), !e || !t) return;
              this._selectionRenderModel.update(this._terminal, e, t, i);
              const s = this._selectionRenderModel.viewportStartRow,
                r = this._selectionRenderModel.viewportEndRow,
                n = this._selectionRenderModel.viewportCappedStartRow,
                o = this._selectionRenderModel.viewportCappedEndRow;
              if (n >= this._bufferService.rows || o < 0) return;
              const a = this._document.createDocumentFragment();
              if (i) {
                const i = e[0] > t[0];
                a.appendChild(this._createSelectionElement(n, i ? t[0] : e[0], i ? e[0] : t[0], o - n + 1));
              } else {
                const i = s === n ? e[0] : 0,
                  h = n === r ? t[0] : this._bufferService.cols;
                a.appendChild(this._createSelectionElement(n, i, h));
                const c = o - n - 1;
                if (a.appendChild(this._createSelectionElement(n + 1, 0, this._bufferService.cols, c)), n !== o) {
                  const e = r === o ? t[0] : this._bufferService.cols;
                  a.appendChild(this._createSelectionElement(o, 0, e));
                }
              }
              this._selectionContainer.appendChild(a);
            }
            _createSelectionElement(e, t, i, s = 1) {
              const r = this._document.createElement("div"),
                n = t * this.dimensions.css.cell.width;
              let o = this.dimensions.css.cell.width * (i - t);
              return n + o > this.dimensions.css.canvas.width && (o = this.dimensions.css.canvas.width - n), r.style.height = s * this.dimensions.css.cell.height + "px", r.style.top = e * this.dimensions.css.cell.height + "px", r.style.left = `${n}px`, r.style.width = `${o}px`, r;
            }
            handleCursorMove() {}
            _handleOptionsChanged() {
              this._updateDimensions(), this._injectCss(this._themeService.colors), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
            }
            clear() {
              for (const e of this._rowElements) e.replaceChildren();
            }
            renderRows(e, t) {
              const i = this._bufferService.buffer,
                s = i.ybase + i.y,
                r = Math.min(i.x, this._bufferService.cols - 1),
                n = this._optionsService.rawOptions.cursorBlink,
                o = this._optionsService.rawOptions.cursorStyle,
                a = this._optionsService.rawOptions.cursorInactiveStyle;
              for (let h = e; h <= t; h++) {
                const e = h + i.ydisp,
                  t = this._rowElements[h],
                  c = i.lines.get(e);
                if (!t || !c) break;
                t.replaceChildren(...this._rowFactory.createRow(c, e, e === s, o, a, r, n, this.dimensions.css.cell.width, this._widthCache, -1, -1));
              }
            }
            get _terminalSelector() {
              return `.${v}${this._terminalClass}`;
            }
            _handleLinkHover(e) {
              this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, !0);
            }
            _handleLinkLeave(e) {
              this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, !1);
            }
            _setCellUnderline(e, t, i, s, r, n) {
              i < 0 && (e = 0), s < 0 && (t = 0);
              const o = this._bufferService.rows - 1;
              i = Math.max(Math.min(i, o), 0), s = Math.max(Math.min(s, o), 0), r = Math.min(r, this._bufferService.cols);
              const a = this._bufferService.buffer,
                h = a.ybase + a.y,
                c = Math.min(a.x, r - 1),
                l = this._optionsService.rawOptions.cursorBlink,
                d = this._optionsService.rawOptions.cursorStyle,
                _ = this._optionsService.rawOptions.cursorInactiveStyle;
              for (let o = i; o <= s; ++o) {
                const u = o + a.ydisp,
                  f = this._rowElements[o],
                  v = a.lines.get(u);
                if (!f || !v) break;
                f.replaceChildren(...this._rowFactory.createRow(v, u, u === h, d, _, c, l, this.dimensions.css.cell.width, this._widthCache, n ? o === i ? e : 0 : -1, n ? (o === s ? t : r) - 1 : -1));
              }
            }
          };
        t.DomRenderer = w = s([r(7, f.IInstantiationService), r(8, l.ICharSizeService), r(9, f.IOptionsService), r(10, f.IBufferService), r(11, l.ICoreBrowserService), r(12, l.IThemeService)], w);
      },
      3787: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DomRendererRowFactory = void 0;
        const n = i(2223),
          o = i(643),
          a = i(511),
          h = i(2585),
          c = i(8055),
          l = i(4725),
          d = i(4269),
          _ = i(6171),
          u = i(3734);
        let f = t.DomRendererRowFactory = class {
          constructor(e, t, i, s, r, n, o) {
            this._document = e, this._characterJoinerService = t, this._optionsService = i, this._coreBrowserService = s, this._coreService = r, this._decorationService = n, this._themeService = o, this._workCell = new a.CellData(), this._columnSelectMode = !1, this.defaultSpacing = 0;
          }
          handleSelectionChanged(e, t, i) {
            this._selectionStart = e, this._selectionEnd = t, this._columnSelectMode = i;
          }
          createRow(e, t, i, s, r, a, h, l, _, f, p) {
            const g = [],
              m = this._characterJoinerService.getJoinedCharacters(t),
              S = this._themeService.colors;
            let C,
              b = e.getNoBgTrimmedLength();
            i && b < a + 1 && (b = a + 1);
            let w = 0,
              y = "",
              E = 0,
              k = 0,
              L = 0,
              D = !1,
              R = 0,
              x = !1,
              A = 0;
            const B = [],
              T = -1 !== f && -1 !== p;
            for (let M = 0; M < b; M++) {
              e.loadCell(M, this._workCell);
              let b = this._workCell.getWidth();
              if (0 === b) continue;
              let O = !1,
                P = M,
                I = this._workCell;
              if (m.length > 0 && M === m[0][0]) {
                O = !0;
                const t = m.shift();
                I = new d.JoinedCellData(this._workCell, e.translateToString(!0, t[0], t[1]), t[1] - t[0]), P = t[1] - 1, b = I.getWidth();
              }
              const H = this._isCellInSelection(M, t),
                F = i && M === a,
                W = T && M >= f && M <= p;
              let U = !1;
              this._decorationService.forEachDecorationAtCell(M, t, void 0, e => {
                U = !0;
              });
              let N = I.getChars() || o.WHITESPACE_CELL_CHAR;
              if (" " === N && (I.isUnderline() || I.isOverline()) && (N = " "), A = b * l - _.get(N, I.isBold(), I.isItalic()), C) {
                if (w && (H && x || !H && !x && I.bg === E) && (H && x && S.selectionForeground || I.fg === k) && I.extended.ext === L && W === D && A === R && !F && !O && !U) {
                  I.isInvisible() ? y += o.WHITESPACE_CELL_CHAR : y += N, w++;
                  continue;
                }
                w && (C.textContent = y), C = this._document.createElement("span"), w = 0, y = "";
              } else C = this._document.createElement("span");
              if (E = I.bg, k = I.fg, L = I.extended.ext, D = W, R = A, x = H, O && a >= M && a <= P && (a = M), !this._coreService.isCursorHidden && F && this._coreService.isCursorInitialized) if (B.push("xterm-cursor"), this._coreBrowserService.isFocused) h && B.push("xterm-cursor-blink"), B.push("bar" === s ? "xterm-cursor-bar" : "underline" === s ? "xterm-cursor-underline" : "xterm-cursor-block");else if (r) switch (r) {
                case "outline":
                  B.push("xterm-cursor-outline");
                  break;
                case "block":
                  B.push("xterm-cursor-block");
                  break;
                case "bar":
                  B.push("xterm-cursor-bar");
                  break;
                case "underline":
                  B.push("xterm-cursor-underline");
              }
              if (I.isBold() && B.push("xterm-bold"), I.isItalic() && B.push("xterm-italic"), I.isDim() && B.push("xterm-dim"), y = I.isInvisible() ? o.WHITESPACE_CELL_CHAR : I.getChars() || o.WHITESPACE_CELL_CHAR, I.isUnderline() && (B.push(`xterm-underline-${I.extended.underlineStyle}`), " " === y && (y = " "), !I.isUnderlineColorDefault())) if (I.isUnderlineColorRGB()) C.style.textDecorationColor = `rgb(${u.AttributeData.toColorRGB(I.getUnderlineColor()).join(",")})`;else {
                let e = I.getUnderlineColor();
                this._optionsService.rawOptions.drawBoldTextInBrightColors && I.isBold() && e < 8 && (e += 8), C.style.textDecorationColor = S.ansi[e].css;
              }
              I.isOverline() && (B.push("xterm-overline"), " " === y && (y = " ")), I.isStrikethrough() && B.push("xterm-strikethrough"), W && (C.style.textDecoration = "underline");
              let $ = I.getFgColor(),
                j = I.getFgColorMode(),
                z = I.getBgColor(),
                K = I.getBgColorMode();
              const q = !!I.isInverse();
              if (q) {
                const e = $;
                $ = z, z = e;
                const t = j;
                j = K, K = t;
              }
              let V,
                G,
                X,
                J = !1;
              switch (this._decorationService.forEachDecorationAtCell(M, t, void 0, e => {
                "top" !== e.options.layer && J || (e.backgroundColorRGB && (K = 50331648, z = e.backgroundColorRGB.rgba >> 8 & 16777215, V = e.backgroundColorRGB), e.foregroundColorRGB && (j = 50331648, $ = e.foregroundColorRGB.rgba >> 8 & 16777215, G = e.foregroundColorRGB), J = "top" === e.options.layer);
              }), !J && H && (V = this._coreBrowserService.isFocused ? S.selectionBackgroundOpaque : S.selectionInactiveBackgroundOpaque, z = V.rgba >> 8 & 16777215, K = 50331648, J = !0, S.selectionForeground && (j = 50331648, $ = S.selectionForeground.rgba >> 8 & 16777215, G = S.selectionForeground)), J && B.push("xterm-decoration-top"), K) {
                case 16777216:
                case 33554432:
                  X = S.ansi[z], B.push(`xterm-bg-${z}`);
                  break;
                case 50331648:
                  X = c.channels.toColor(z >> 16, z >> 8 & 255, 255 & z), this._addStyle(C, `background-color:#${v((z >>> 0).toString(16), "0", 6)}`);
                  break;
                default:
                  q ? (X = S.foreground, B.push(`xterm-bg-${n.INVERTED_DEFAULT_COLOR}`)) : X = S.background;
              }
              switch (V || I.isDim() && (V = c.color.multiplyOpacity(X, .5)), j) {
                case 16777216:
                case 33554432:
                  I.isBold() && $ < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors && ($ += 8), this._applyMinimumContrast(C, X, S.ansi[$], I, V, void 0) || B.push(`xterm-fg-${$}`);
                  break;
                case 50331648:
                  const e = c.channels.toColor($ >> 16 & 255, $ >> 8 & 255, 255 & $);
                  this._applyMinimumContrast(C, X, e, I, V, G) || this._addStyle(C, `color:#${v($.toString(16), "0", 6)}`);
                  break;
                default:
                  this._applyMinimumContrast(C, X, S.foreground, I, V, G) || q && B.push(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`);
              }
              B.length && (C.className = B.join(" "), B.length = 0), F || O || U ? C.textContent = y : w++, A !== this.defaultSpacing && (C.style.letterSpacing = `${A}px`), g.push(C), M = P;
            }
            return C && w && (C.textContent = y), g;
          }
          _applyMinimumContrast(e, t, i, s, r, n) {
            if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.treatGlyphAsBackgroundColor)(s.getCode())) return !1;
            const o = this._getContrastCache(s);
            let a;
            if (r || n || (a = o.getColor(t.rgba, i.rgba)), void 0 === a) {
              const e = this._optionsService.rawOptions.minimumContrastRatio / (s.isDim() ? 2 : 1);
              a = c.color.ensureContrastRatio(r || t, n || i, e), o.setColor((r || t).rgba, (n || i).rgba, a ?? null);
            }
            return !!a && (this._addStyle(e, `color:${a.css}`), !0);
          }
          _getContrastCache(e) {
            return e.isDim() ? this._themeService.colors.halfContrastCache : this._themeService.colors.contrastCache;
          }
          _addStyle(e, t) {
            e.setAttribute("style", `${e.getAttribute("style") || ""}${t};`);
          }
          _isCellInSelection(e, t) {
            const i = this._selectionStart,
              s = this._selectionEnd;
            return !(!i || !s) && (this._columnSelectMode ? i[0] <= s[0] ? e >= i[0] && t >= i[1] && e < s[0] && t <= s[1] : e < i[0] && t >= i[1] && e >= s[0] && t <= s[1] : t > i[1] && t < s[1] || i[1] === s[1] && t === i[1] && e >= i[0] && e < s[0] || i[1] < s[1] && t === s[1] && e < s[0] || i[1] < s[1] && t === i[1] && e >= i[0]);
          }
        };
        function v(e, t, i) {
          for (; e.length < i;) e = t + e;
          return e;
        }
        t.DomRendererRowFactory = f = s([r(1, l.ICharacterJoinerService), r(2, h.IOptionsService), r(3, l.ICoreBrowserService), r(4, h.ICoreService), r(5, h.IDecorationService), r(6, l.IThemeService)], f);
      },
      2550: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.WidthCache = void 0, t.WidthCache = class {
          constructor(e, t) {
            this._flat = new Float32Array(256), this._font = "", this._fontSize = 0, this._weight = "normal", this._weightBold = "bold", this._measureElements = [], this._container = e.createElement("div"), this._container.classList.add("xterm-width-cache-measure-container"), this._container.setAttribute("aria-hidden", "true"), this._container.style.whiteSpace = "pre", this._container.style.fontKerning = "none";
            const i = e.createElement("span");
            i.classList.add("xterm-char-measure-element");
            const s = e.createElement("span");
            s.classList.add("xterm-char-measure-element"), s.style.fontWeight = "bold";
            const r = e.createElement("span");
            r.classList.add("xterm-char-measure-element"), r.style.fontStyle = "italic";
            const n = e.createElement("span");
            n.classList.add("xterm-char-measure-element"), n.style.fontWeight = "bold", n.style.fontStyle = "italic", this._measureElements = [i, s, r, n], this._container.appendChild(i), this._container.appendChild(s), this._container.appendChild(r), this._container.appendChild(n), t.appendChild(this._container), this.clear();
          }
          dispose() {
            this._container.remove(), this._measureElements.length = 0, this._holey = void 0;
          }
          clear() {
            this._flat.fill(-9999), this._holey = new Map();
          }
          setFont(e, t, i, s) {
            e === this._font && t === this._fontSize && i === this._weight && s === this._weightBold || (this._font = e, this._fontSize = t, this._weight = i, this._weightBold = s, this._container.style.fontFamily = this._font, this._container.style.fontSize = `${this._fontSize}px`, this._measureElements[0].style.fontWeight = `${i}`, this._measureElements[1].style.fontWeight = `${s}`, this._measureElements[2].style.fontWeight = `${i}`, this._measureElements[3].style.fontWeight = `${s}`, this.clear());
          }
          get(e, t, i) {
            let s = 0;
            if (!t && !i && 1 === e.length && (s = e.charCodeAt(0)) < 256) {
              if (-9999 !== this._flat[s]) return this._flat[s];
              const t = this._measure(e, 0);
              return t > 0 && (this._flat[s] = t), t;
            }
            let r = e;
            t && (r += "B"), i && (r += "I");
            let n = this._holey.get(r);
            if (void 0 === n) {
              let s = 0;
              t && (s |= 1), i && (s |= 2), n = this._measure(e, s), n > 0 && this._holey.set(r, n);
            }
            return n;
          }
          _measure(e, t) {
            const i = this._measureElements[t];
            return i.textContent = e.repeat(32), i.offsetWidth / 32;
          }
        };
      },
      2223: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TEXT_BASELINE = t.DIM_OPACITY = t.INVERTED_DEFAULT_COLOR = void 0;
        const s = i(6114);
        t.INVERTED_DEFAULT_COLOR = 257, t.DIM_OPACITY = .5, t.TEXT_BASELINE = s.isFirefox || s.isLegacyEdge ? "bottom" : "ideographic";
      },
      6171: (e, t) => {
        function i(e) {
          return 57508 <= e && e <= 57558;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.computeNextVariantOffset = t.createRenderDimensions = t.treatGlyphAsBackgroundColor = t.isRestrictedPowerlineGlyph = t.isPowerlineGlyph = t.throwIfFalsy = void 0, t.throwIfFalsy = function (e) {
          if (!e) throw new Error("value must not be falsy");
          return e;
        }, t.isPowerlineGlyph = i, t.isRestrictedPowerlineGlyph = function (e) {
          return 57520 <= e && e <= 57527;
        }, t.treatGlyphAsBackgroundColor = function (e) {
          return i(e) || function (e) {
            return 9472 <= e && e <= 9631;
          }(e);
        }, t.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
              }
            }
          };
        }, t.computeNextVariantOffset = function (e, t, i = 0) {
          return (e - (2 * Math.round(t) - i)) % (2 * Math.round(t));
        };
      },
      6052: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createSelectionRenderModel = void 0;
        class i {
          constructor() {
            this.clear();
          }
          clear() {
            this.hasSelection = !1, this.columnSelectMode = !1, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
          }
          update(e, t, i, s = !1) {
            if (this.selectionStart = t, this.selectionEnd = i, !t || !i || t[0] === i[0] && t[1] === i[1]) return void this.clear();
            const r = e.buffers.active.ydisp,
              n = t[1] - r,
              o = i[1] - r,
              a = Math.max(n, 0),
              h = Math.min(o, e.rows - 1);
            a >= e.rows || h < 0 ? this.clear() : (this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow = n, this.viewportEndRow = o, this.viewportCappedStartRow = a, this.viewportCappedEndRow = h, this.startCol = t[0], this.endCol = i[0]);
          }
          isCellSelected(e, t, i) {
            return !!this.hasSelection && (i -= e.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t >= this.startCol && i >= this.viewportCappedStartRow && t < this.endCol && i <= this.viewportCappedEndRow : t < this.startCol && i >= this.viewportCappedStartRow && t >= this.endCol && i <= this.viewportCappedEndRow : i > this.viewportStartRow && i < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportEndRow && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol);
          }
        }
        t.createSelectionRenderModel = function () {
          return new i();
        };
      },
      456: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.SelectionModel = void 0, t.SelectionModel = class {
          constructor(e) {
            this._bufferService = e, 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 e = this.selectionStart[0] + this.selectionStartLength;
                return e > this._bufferService.cols ? e % this._bufferService.cols == 0 ? [this._bufferService.cols, this.selectionStart[1] + Math.floor(e / this._bufferService.cols) - 1] : [e % this._bufferService.cols, this.selectionStart[1] + Math.floor(e / this._bufferService.cols)] : [e, this.selectionStart[1]];
              }
              if (this.selectionStartLength && this.selectionEnd[1] === this.selectionStart[1]) {
                const e = this.selectionStart[0] + this.selectionStartLength;
                return e > this._bufferService.cols ? [e % this._bufferService.cols, this.selectionStart[1] + Math.floor(e / this._bufferService.cols)] : [Math.max(e, this.selectionEnd[0]), this.selectionEnd[1]];
              }
              return this.selectionEnd;
            }
          }
          areSelectionValuesReversed() {
            const e = this.selectionStart,
              t = this.selectionEnd;
            return !(!e || !t) && (e[1] > t[1] || e[1] === t[1] && e[0] > t[0]);
          }
          handleTrim(e) {
            return this.selectionStart && (this.selectionStart[1] -= e), this.selectionEnd && (this.selectionEnd[1] -= e), this.selectionEnd && this.selectionEnd[1] < 0 ? (this.clearSelection(), !0) : (this.selectionStart && this.selectionStart[1] < 0 && (this.selectionStart[1] = 0), !1);
          }
        };
      },
      428: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CharSizeService = void 0;
        const n = i(2585),
          o = i(8460),
          a = i(844);
        let h = t.CharSizeService = class extends a.Disposable {
          get hasValidSize() {
            return this.width > 0 && this.height > 0;
          }
          constructor(e, t, i) {
            super(), this._optionsService = i, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new o.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event;
            try {
              this._measureStrategy = this.register(new d(this._optionsService));
            } catch {
              this._measureStrategy = this.register(new l(e, t, this._optionsService));
            }
            this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], () => this.measure()));
          }
          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());
          }
        };
        t.CharSizeService = h = s([r(2, n.IOptionsService)], h);
        class c extends a.Disposable {
          constructor() {
            super(...arguments), this._result = {
              width: 0,
              height: 0
            };
          }
          _validateAndSet(e, t) {
            void 0 !== e && e > 0 && void 0 !== t && t > 0 && (this._result.width = e, this._result.height = t);
          }
        }
        class l extends c {
          constructor(e, t, i) {
            super(), this._document = e, this._parentElement = t, this._optionsService = i, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W".repeat(32), this._measureElement.setAttribute("aria-hidden", "true"), this._measureElement.style.whiteSpace = "pre", this._measureElement.style.fontKerning = "none", this._parentElement.appendChild(this._measureElement);
          }
          measure() {
            return this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`, this._validateAndSet(Number(this._measureElement.offsetWidth) / 32, Number(this._measureElement.offsetHeight)), this._result;
          }
        }
        class d extends c {
          constructor(e) {
            super(), this._optionsService = e, this._canvas = new OffscreenCanvas(100, 100), this._ctx = this._canvas.getContext("2d");
            const t = this._ctx.measureText("W");
            if (!("width" in t && "fontBoundingBoxAscent" in t && "fontBoundingBoxDescent" in t)) throw new Error("Required font metrics not supported");
          }
          measure() {
            this._ctx.font = `${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;
            const e = this._ctx.measureText("W");
            return this._validateAndSet(e.width, e.fontBoundingBoxAscent + e.fontBoundingBoxDescent), this._result;
          }
        }
      },
      4269: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CharacterJoinerService = t.JoinedCellData = void 0;
        const n = i(3734),
          o = i(643),
          a = i(511),
          h = i(2585);
        class c extends n.AttributeData {
          constructor(e, t, i) {
            super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
          }
          isCombined() {
            return 2097152;
          }
          getWidth() {
            return this._width;
          }
          getChars() {
            return this.combinedData;
          }
          getCode() {
            return 2097151;
          }
          setFromCharData(e) {
            throw new Error("not implemented");
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.JoinedCellData = c;
        let l = t.CharacterJoinerService = class e {
          constructor(e) {
            this._bufferService = e, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new a.CellData();
          }
          register(e) {
            const t = {
              id: this._nextCharacterJoinerId++,
              handler: e
            };
            return this._characterJoiners.push(t), t.id;
          }
          deregister(e) {
            for (let t = 0; t < this._characterJoiners.length; t++) if (this._characterJoiners[t].id === e) return this._characterJoiners.splice(t, 1), !0;
            return !1;
          }
          getJoinedCharacters(e) {
            if (0 === this._characterJoiners.length) return [];
            const t = this._bufferService.buffer.lines.get(e);
            if (!t || 0 === t.length) return [];
            const i = [],
              s = t.translateToString(!0);
            let r = 0,
              n = 0,
              a = 0,
              h = t.getFg(0),
              c = t.getBg(0);
            for (let e = 0; e < t.getTrimmedLength(); e++) if (t.loadCell(e, this._workCell), 0 !== this._workCell.getWidth()) {
              if (this._workCell.fg !== h || this._workCell.bg !== c) {
                if (e - r > 1) {
                  const e = this._getJoinedRanges(s, a, n, t, r);
                  for (let t = 0; t < e.length; t++) i.push(e[t]);
                }
                r = e, a = n, h = this._workCell.fg, c = this._workCell.bg;
              }
              n += this._workCell.getChars().length || o.WHITESPACE_CELL_CHAR.length;
            }
            if (this._bufferService.cols - r > 1) {
              const e = this._getJoinedRanges(s, a, n, t, r);
              for (let t = 0; t < e.length; t++) i.push(e[t]);
            }
            return i;
          }
          _getJoinedRanges(t, i, s, r, n) {
            const o = t.substring(i, s);
            let a = [];
            try {
              a = this._characterJoiners[0].handler(o);
            } catch (e) {
              console.error(e);
            }
            for (let t = 1; t < this._characterJoiners.length; t++) try {
              const i = this._characterJoiners[t].handler(o);
              for (let t = 0; t < i.length; t++) e._mergeRanges(a, i[t]);
            } catch (e) {
              console.error(e);
            }
            return this._stringRangesToCellRanges(a, r, n), a;
          }
          _stringRangesToCellRanges(e, t, i) {
            let s = 0,
              r = !1,
              n = 0,
              a = e[s];
            if (a) {
              for (let h = i; h < this._bufferService.cols; h++) {
                const i = t.getWidth(h),
                  c = t.getString(h).length || o.WHITESPACE_CELL_CHAR.length;
                if (0 !== i) {
                  if (!r && a[0] <= n && (a[0] = h, r = !0), a[1] <= n) {
                    if (a[1] = h, a = e[++s], !a) break;
                    a[0] <= n ? (a[0] = h, r = !0) : r = !1;
                  }
                  n += c;
                }
              }
              a && (a[1] = this._bufferService.cols);
            }
          }
          static _mergeRanges(e, t) {
            let i = !1;
            for (let s = 0; s < e.length; s++) {
              const r = e[s];
              if (i) {
                if (t[1] <= r[0]) return e[s - 1][1] = t[1], e;
                if (t[1] <= r[1]) return e[s - 1][1] = Math.max(t[1], r[1]), e.splice(s, 1), e;
                e.splice(s, 1), s--;
              } else {
                if (t[1] <= r[0]) return e.splice(s, 0, t), e;
                if (t[1] <= r[1]) return r[0] = Math.min(t[0], r[0]), e;
                t[0] < r[1] && (r[0] = Math.min(t[0], r[0]), i = !0);
              }
            }
            return i ? e[e.length - 1][1] = t[1] : e.push(t), e;
          }
        };
        t.CharacterJoinerService = l = s([r(0, h.IBufferService)], l);
      },
      5114: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CoreBrowserService = void 0;
        const s = i(844),
          r = i(8460),
          n = i(3656);
        class o extends s.Disposable {
          constructor(e, t, i) {
            super(), this._textarea = e, this._window = t, this.mainDocument = i, this._isFocused = !1, this._cachedIsFocused = void 0, this._screenDprMonitor = new a(this._window), this._onDprChange = this.register(new r.EventEmitter()), this.onDprChange = this._onDprChange.event, this._onWindowChange = this.register(new r.EventEmitter()), this.onWindowChange = this._onWindowChange.event, this.register(this.onWindowChange(e => this._screenDprMonitor.setWindow(e))), this.register((0, r.forwardEvent)(this._screenDprMonitor.onDprChange, this._onDprChange)), this._textarea.addEventListener("focus", () => this._isFocused = !0), this._textarea.addEventListener("blur", () => this._isFocused = !1);
          }
          get window() {
            return this._window;
          }
          set window(e) {
            this._window !== e && (this._window = e, this._onWindowChange.fire(this._window));
          }
          get dpr() {
            return this.window.devicePixelRatio;
          }
          get isFocused() {
            return void 0 === this._cachedIsFocused && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask(() => this._cachedIsFocused = void 0)), this._cachedIsFocused;
          }
        }
        t.CoreBrowserService = o;
        class a extends s.Disposable {
          constructor(e) {
            super(), this._parentWindow = e, this._windowResizeListener = this.register(new s.MutableDisposable()), this._onDprChange = this.register(new r.EventEmitter()), this.onDprChange = this._onDprChange.event, this._outerListener = () => this._setDprAndFireIfDiffers(), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._updateDpr(), this._setWindowResizeListener(), this.register((0, s.toDisposable)(() => this.clearListener()));
          }
          setWindow(e) {
            this._parentWindow = e, this._setWindowResizeListener(), this._setDprAndFireIfDiffers();
          }
          _setWindowResizeListener() {
            this._windowResizeListener.value = (0, n.addDisposableDomListener)(this._parentWindow, "resize", () => this._setDprAndFireIfDiffers());
          }
          _setDprAndFireIfDiffers() {
            this._parentWindow.devicePixelRatio !== this._currentDevicePixelRatio && this._onDprChange.fire(this._parentWindow.devicePixelRatio), this._updateDpr();
          }
          _updateDpr() {
            this._outerListener && (this._resolutionMediaMatchList?.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._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._outerListener = void 0);
          }
        }
      },
      779: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.LinkProviderService = void 0;
        const s = i(844);
        class r extends s.Disposable {
          constructor() {
            super(), this.linkProviders = [], this.register((0, s.toDisposable)(() => this.linkProviders.length = 0));
          }
          registerLinkProvider(e) {
            return this.linkProviders.push(e), {
              dispose: () => {
                const t = this.linkProviders.indexOf(e);
                -1 !== t && this.linkProviders.splice(t, 1);
              }
            };
          }
        }
        t.LinkProviderService = r;
      },
      8934: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.MouseService = void 0;
        const n = i(4725),
          o = i(9806);
        let a = t.MouseService = class {
          constructor(e, t) {
            this._renderService = e, this._charSizeService = t;
          }
          getCoords(e, t, i, s, r) {
            return (0, o.getCoords)(window, e, t, i, s, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, r);
          }
          getMouseReportCoords(e, t) {
            const i = (0, o.getCoordsRelativeToElement)(window, e, t);
            if (this._charSizeService.hasValidSize) return i[0] = Math.min(Math.max(i[0], 0), this._renderService.dimensions.css.canvas.width - 1), i[1] = Math.min(Math.max(i[1], 0), this._renderService.dimensions.css.canvas.height - 1), {
              col: Math.floor(i[0] / this._renderService.dimensions.css.cell.width),
              row: Math.floor(i[1] / this._renderService.dimensions.css.cell.height),
              x: Math.floor(i[0]),
              y: Math.floor(i[1])
            };
          }
        };
        t.MouseService = a = s([r(0, n.IRenderService), r(1, n.ICharSizeService)], a);
      },
      3230: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.RenderService = void 0;
        const n = i(6193),
          o = i(4725),
          a = i(8460),
          h = i(844),
          c = i(7226),
          l = i(2585);
        let d = t.RenderService = class extends h.Disposable {
          get dimensions() {
            return this._renderer.value.dimensions;
          }
          constructor(e, t, i, s, r, o, l, d) {
            super(), this._rowCount = e, this._charSizeService = s, this._renderer = this.register(new h.MutableDisposable()), this._pausedResizeTask = new c.DebouncedIdleTask(), this._observerDisposable = this.register(new h.MutableDisposable()), 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 a.EventEmitter()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this.register(new a.EventEmitter()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this.register(new a.EventEmitter()), this.onRender = this._onRender.event, this._onRefreshRequest = this.register(new a.EventEmitter()), this.onRefreshRequest = this._onRefreshRequest.event, this._renderDebouncer = new n.RenderDebouncer((e, t) => this._renderRows(e, t), l), this.register(this._renderDebouncer), this.register(l.onDprChange(() => this.handleDevicePixelRatioChange())), this.register(o.onResize(() => this._fullRefresh())), this.register(o.buffers.onBufferActivate(() => this._renderer.value?.clear())), this.register(i.onOptionChange(() => this._handleOptionsChanged())), this.register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this.register(r.onDecorationRegistered(() => this._fullRefresh())), this.register(r.onDecorationRemoved(() => this._fullRefresh())), this.register(i.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio"], () => {
              this.clear(), this.handleResize(o.cols, o.rows), this._fullRefresh();
            })), this.register(i.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(o.buffer.y, o.buffer.y, !0))), this.register(d.onChangeColors(() => this._fullRefresh())), this._registerIntersectionObserver(l.window, t), this.register(l.onWindowChange(e => this._registerIntersectionObserver(e, t)));
          }
          _registerIntersectionObserver(e, t) {
            if ("IntersectionObserver" in e) {
              const i = new e.IntersectionObserver(e => this._handleIntersectionChange(e[e.length - 1]), {
                threshold: 0
              });
              i.observe(t), this._observerDisposable.value = (0, h.toDisposable)(() => i.disconnect());
            }
          }
          _handleIntersectionChange(e) {
            this._isPaused = void 0 === e.isIntersecting ? 0 === e.intersectionRatio : !e.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(e, t, i = !1) {
            this._isPaused ? this._needsFullRefresh = !0 : (i || (this._isNextRenderRedrawOnly = !1), this._renderDebouncer.refresh(e, t, this._rowCount));
          }
          _renderRows(e, t) {
            this._renderer.value && (e = Math.min(e, this._rowCount - 1), t = Math.min(t, this._rowCount - 1), this._renderer.value.renderRows(e, t), this._needsSelectionRefresh && (this._renderer.value.handleSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode), this._needsSelectionRefresh = !1), this._isNextRenderRedrawOnly || this._onRenderedViewportChange.fire({
              start: e,
              end: t
            }), this._onRender.fire({
              start: e,
              end: t
            }), this._isNextRenderRedrawOnly = !0);
          }
          resize(e, t) {
            this._rowCount = t, this._fireOnCanvasResize();
          }
          _handleOptionsChanged() {
            this._renderer.value && (this.refreshRows(0, this._rowCount - 1), this._fireOnCanvasResize());
          }
          _fireOnCanvasResize() {
            this._renderer.value && (this._renderer.value.dimensions.css.canvas.width === this._canvasWidth && this._renderer.value.dimensions.css.canvas.height === this._canvasHeight || this._onDimensionsChange.fire(this._renderer.value.dimensions));
          }
          hasRenderer() {
            return !!this._renderer.value;
          }
          setRenderer(e) {
            this._renderer.value = e, this._renderer.value && (this._renderer.value.onRequestRedraw(e => this.refreshRows(e.start, e.end, !0)), this._needsSelectionRefresh = !0, this._fullRefresh());
          }
          addRefreshCallback(e) {
            return this._renderDebouncer.addRefreshCallback(e);
          }
          _fullRefresh() {
            this._isPaused ? this._needsFullRefresh = !0 : this.refreshRows(0, this._rowCount - 1);
          }
          clearTextureAtlas() {
            this._renderer.value && (this._renderer.value.clearTextureAtlas?.(), this._fullRefresh());
          }
          handleDevicePixelRatioChange() {
            this._charSizeService.measure(), this._renderer.value && (this._renderer.value.handleDevicePixelRatioChange(), this.refreshRows(0, this._rowCount - 1));
          }
          handleResize(e, t) {
            this._renderer.value && (this._isPaused ? this._pausedResizeTask.set(() => this._renderer.value?.handleResize(e, t)) : this._renderer.value.handleResize(e, t), this._fullRefresh());
          }
          handleCharSizeChanged() {
            this._renderer.value?.handleCharSizeChanged();
          }
          handleBlur() {
            this._renderer.value?.handleBlur();
          }
          handleFocus() {
            this._renderer.value?.handleFocus();
          }
          handleSelectionChanged(e, t, i) {
            this._selectionState.start = e, this._selectionState.end = t, this._selectionState.columnSelectMode = i, this._renderer.value?.handleSelectionChanged(e, t, i);
          }
          handleCursorMove() {
            this._renderer.value?.handleCursorMove();
          }
          clear() {
            this._renderer.value?.clear();
          }
        };
        t.RenderService = d = s([r(2, l.IOptionsService), r(3, o.ICharSizeService), r(4, l.IDecorationService), r(5, l.IBufferService), r(6, o.ICoreBrowserService), r(7, o.IThemeService)], d);
      },
      9312: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.SelectionService = void 0;
        const n = i(9806),
          o = i(9504),
          a = i(456),
          h = i(4725),
          c = i(8460),
          l = i(844),
          d = i(6114),
          _ = i(4841),
          u = i(511),
          f = i(2585),
          v = String.fromCharCode(160),
          p = new RegExp(v, "g");
        let g = t.SelectionService = class extends l.Disposable {
          constructor(e, t, i, s, r, n, o, h, d) {
            super(), this._element = e, this._screenElement = t, this._linkifier = i, this._bufferService = s, this._coreService = r, this._mouseService = n, this._optionsService = o, this._renderService = h, this._coreBrowserService = d, this._dragScrollAmount = 0, this._enabled = !0, this._workCell = new u.CellData(), this._mouseDownTimeStamp = 0, this._oldHasSelection = !1, this._oldSelectionStart = void 0, this._oldSelectionEnd = void 0, this._onLinuxMouseSelection = this.register(new c.EventEmitter()), this.onLinuxMouseSelection = this._onLinuxMouseSelection.event, this._onRedrawRequest = this.register(new c.EventEmitter()), this.onRequestRedraw = this._onRedrawRequest.event, this._onSelectionChange = this.register(new c.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onRequestScrollLines = this.register(new c.EventEmitter()), this.onRequestScrollLines = this._onRequestScrollLines.event, this._mouseMoveListener = e => this._handleMouseMove(e), this._mouseUpListener = e => this._handleMouseUp(e), this._coreService.onUserInput(() => {
              this.hasSelection && this.clearSelection();
            }), this._trimListener = this._bufferService.buffer.lines.onTrim(e => this._handleTrim(e)), this.register(this._bufferService.buffers.onBufferActivate(e => this._handleBufferActivate(e))), this.enable(), this._model = new a.SelectionModel(this._bufferService), this._activeSelectionMode = 0, this.register((0, l.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 e = this._model.finalSelectionStart,
              t = this._model.finalSelectionEnd;
            return !(!e || !t || e[0] === t[0] && e[1] === t[1]);
          }
          get selectionText() {
            const e = this._model.finalSelectionStart,
              t = this._model.finalSelectionEnd;
            if (!e || !t) return "";
            const i = this._bufferService.buffer,
              s = [];
            if (3 === this._activeSelectionMode) {
              if (e[0] === t[0]) return "";
              const r = e[0] < t[0] ? e[0] : t[0],
                n = e[0] < t[0] ? t[0] : e[0];
              for (let o = e[1]; o <= t[1]; o++) {
                const e = i.translateBufferLineToString(o, !0, r, n);
                s.push(e);
              }
            } else {
              const r = e[1] === t[1] ? t[0] : void 0;
              s.push(i.translateBufferLineToString(e[1], !0, e[0], r));
              for (let r = e[1] + 1; r <= t[1] - 1; r++) {
                const e = i.lines.get(r),
                  t = i.translateBufferLineToString(r, !0);
                e?.isWrapped ? s[s.length - 1] += t : s.push(t);
              }
              if (e[1] !== t[1]) {
                const e = i.lines.get(t[1]),
                  r = i.translateBufferLineToString(t[1], !0, 0, t[0]);
                e && e.isWrapped ? s[s.length - 1] += r : s.push(r);
              }
            }
            return s.map(e => e.replace(p, " ")).join(d.isWindows ? "\r\n" : "\n");
          }
          clearSelection() {
            this._model.clearSelection(), this._removeMouseDownListeners(), this.refresh(), this._onSelectionChange.fire();
          }
          refresh(e) {
            this._refreshAnimationFrame || (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._refresh())), d.isLinux && e && 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: 3 === this._activeSelectionMode
            });
          }
          _isClickInSelection(e) {
            const t = this._getMouseBufferCoords(e),
              i = this._model.finalSelectionStart,
              s = this._model.finalSelectionEnd;
            return !!(i && s && t) && this._areCoordsInSelection(t, i, s);
          }
          isCellInSelection(e, t) {
            const i = this._model.finalSelectionStart,
              s = this._model.finalSelectionEnd;
            return !(!i || !s) && this._areCoordsInSelection([e, t], i, s);
          }
          _areCoordsInSelection(e, t, i) {
            return e[1] > t[1] && e[1] < i[1] || t[1] === i[1] && e[1] === t[1] && e[0] >= t[0] && e[0] < i[0] || t[1] < i[1] && e[1] === i[1] && e[0] < i[0] || t[1] < i[1] && e[1] === t[1] && e[0] >= t[0];
          }
          _selectWordAtCursor(e, t) {
            const i = this._linkifier.currentLink?.link?.range;
            if (i) return this._model.selectionStart = [i.start.x - 1, i.start.y - 1], this._model.selectionStartLength = (0, _.getRangeLength)(i, this._bufferService.cols), this._model.selectionEnd = void 0, !0;
            const s = this._getMouseBufferCoords(e);
            return !!s && (this._selectWordAt(s, t), this._model.selectionEnd = void 0, !0);
          }
          selectAll() {
            this._model.isSelectAllActive = !0, this.refresh(), this._onSelectionChange.fire();
          }
          selectLines(e, t) {
            this._model.clearSelection(), e = Math.max(e, 0), t = Math.min(t, this._bufferService.buffer.lines.length - 1), this._model.selectionStart = [0, e], this._model.selectionEnd = [this._bufferService.cols, t], this.refresh(), this._onSelectionChange.fire();
          }
          _handleTrim(e) {
            this._model.handleTrim(e) && this.refresh();
          }
          _getMouseBufferCoords(e) {
            const t = this._mouseService.getCoords(e, this._screenElement, this._bufferService.cols, this._bufferService.rows, !0);
            if (t) return t[0]--, t[1]--, t[1] += this._bufferService.buffer.ydisp, t;
          }
          _getMouseEventScrollAmount(e) {
            let t = (0, n.getCoordsRelativeToElement)(this._coreBrowserService.window, e, this._screenElement)[1];
            const i = this._renderService.dimensions.css.canvas.height;
            return t >= 0 && t <= i ? 0 : (t > i && (t -= i), t = Math.min(Math.max(t, -50), 50), t /= 50, t / Math.abs(t) + Math.round(14 * t));
          }
          shouldForceSelection(e) {
            return d.isMac ? e.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection : e.shiftKey;
          }
          handleMouseDown(e) {
            if (this._mouseDownTimeStamp = e.timeStamp, (2 !== e.button || !this.hasSelection) && 0 === e.button) {
              if (!this._enabled) {
                if (!this.shouldForceSelection(e)) return;
                e.stopPropagation();
              }
              e.preventDefault(), this._dragScrollAmount = 0, this._enabled && e.shiftKey ? this._handleIncrementalClick(e) : 1 === e.detail ? this._handleSingleClick(e) : 2 === e.detail ? this._handleDoubleClick(e) : 3 === e.detail && this._handleTripleClick(e), 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(e) {
            this._model.selectionStart && (this._model.selectionEnd = this._getMouseBufferCoords(e));
          }
          _handleSingleClick(e) {
            if (this._model.selectionStartLength = 0, this._model.isSelectAllActive = !1, this._activeSelectionMode = this.shouldColumnSelect(e) ? 3 : 0, this._model.selectionStart = this._getMouseBufferCoords(e), !this._model.selectionStart) return;
            this._model.selectionEnd = void 0;
            const t = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);
            t && t.length !== this._model.selectionStart[0] && 0 === t.hasWidth(this._model.selectionStart[0]) && this._model.selectionStart[0]++;
          }
          _handleDoubleClick(e) {
            this._selectWordAtCursor(e, !0) && (this._activeSelectionMode = 1);
          }
          _handleTripleClick(e) {
            const t = this._getMouseBufferCoords(e);
            t && (this._activeSelectionMode = 2, this._selectLineAt(t[1]));
          }
          shouldColumnSelect(e) {
            return e.altKey && !(d.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection);
          }
          _handleMouseMove(e) {
            if (e.stopImmediatePropagation(), !this._model.selectionStart) return;
            const t = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;
            if (this._model.selectionEnd = this._getMouseBufferCoords(e), !this._model.selectionEnd) return void this.refresh(!0);
            2 === this._activeSelectionMode ? this._model.selectionEnd[1] < this._model.selectionStart[1] ? this._model.selectionEnd[0] = 0 : this._model.selectionEnd[0] = this._bufferService.cols : 1 === this._activeSelectionMode && this._selectToWordAt(this._model.selectionEnd), this._dragScrollAmount = this._getMouseEventScrollAmount(e), 3 !== this._activeSelectionMode && (this._dragScrollAmount > 0 ? this._model.selectionEnd[0] = this._bufferService.cols : this._dragScrollAmount < 0 && (this._model.selectionEnd[0] = 0));
            const i = this._bufferService.buffer;
            if (this._model.selectionEnd[1] < i.lines.length) {
              const e = i.lines.get(this._model.selectionEnd[1]);
              e && 0 === e.hasWidth(this._model.selectionEnd[0]) && this._model.selectionEnd[0] < this._bufferService.cols && this._model.selectionEnd[0]++;
            }
            t && t[0] === this._model.selectionEnd[0] && t[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 e = this._bufferService.buffer;
              this._dragScrollAmount > 0 ? (3 !== this._activeSelectionMode && (this._model.selectionEnd[0] = this._bufferService.cols), this._model.selectionEnd[1] = Math.min(e.ydisp + this._bufferService.rows, e.lines.length - 1)) : (3 !== this._activeSelectionMode && (this._model.selectionEnd[0] = 0), this._model.selectionEnd[1] = e.ydisp), this.refresh();
            }
          }
          _handleMouseUp(e) {
            const t = e.timeStamp - this._mouseDownTimeStamp;
            if (this._removeMouseDownListeners(), this.selectionText.length <= 1 && t < 500 && e.altKey && this._optionsService.rawOptions.altClickMovesCursor) {
              if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
                const t = this._mouseService.getCoords(e, this._element, this._bufferService.cols, this._bufferService.rows, !1);
                if (t && void 0 !== t[0] && void 0 !== t[1]) {
                  const e = (0, o.moveToCellSequence)(t[0] - 1, t[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
                  this._coreService.triggerDataEvent(e, !0);
                }
              }
            } else this._fireEventIfSelectionChanged();
          }
          _fireEventIfSelectionChanged() {
            const e = this._model.finalSelectionStart,
              t = this._model.finalSelectionEnd,
              i = !(!e || !t || e[0] === t[0] && e[1] === t[1]);
            i ? e && t && (this._oldSelectionStart && this._oldSelectionEnd && e[0] === this._oldSelectionStart[0] && e[1] === this._oldSelectionStart[1] && t[0] === this._oldSelectionEnd[0] && t[1] === this._oldSelectionEnd[1] || this._fireOnSelectionChange(e, t, i)) : this._oldHasSelection && this._fireOnSelectionChange(e, t, i);
          }
          _fireOnSelectionChange(e, t, i) {
            this._oldSelectionStart = e, this._oldSelectionEnd = t, this._oldHasSelection = i, this._onSelectionChange.fire();
          }
          _handleBufferActivate(e) {
            this.clearSelection(), this._trimListener.dispose(), this._trimListener = e.activeBuffer.lines.onTrim(e => this._handleTrim(e));
          }
          _convertViewportColToCharacterIndex(e, t) {
            let i = t;
            for (let s = 0; t >= s; s++) {
              const r = e.loadCell(s, this._workCell).getChars().length;
              0 === this._workCell.getWidth() ? i-- : r > 1 && t !== s && (i += r - 1);
            }
            return i;
          }
          setSelection(e, t, i) {
            this._model.clearSelection(), this._removeMouseDownListeners(), this._model.selectionStart = [e, t], this._model.selectionStartLength = i, this.refresh(), this._fireEventIfSelectionChanged();
          }
          rightClickSelect(e) {
            this._isClickInSelection(e) || (this._selectWordAtCursor(e, !1) && this.refresh(!0), this._fireEventIfSelectionChanged());
          }
          _getWordAt(e, t, i = !0, s = !0) {
            if (e[0] >= this._bufferService.cols) return;
            const r = this._bufferService.buffer,
              n = r.lines.get(e[1]);
            if (!n) return;
            const o = r.translateBufferLineToString(e[1], !1);
            let a = this._convertViewportColToCharacterIndex(n, e[0]),
              h = a;
            const c = e[0] - a;
            let l = 0,
              d = 0,
              _ = 0,
              u = 0;
            if (" " === o.charAt(a)) {
              for (; a > 0 && " " === o.charAt(a - 1);) a--;
              for (; h < o.length && " " === o.charAt(h + 1);) h++;
            } else {
              let t = e[0],
                i = e[0];
              0 === n.getWidth(t) && (l++, t--), 2 === n.getWidth(i) && (d++, i++);
              const s = n.getString(i).length;
              for (s > 1 && (u += s - 1, h += s - 1); t > 0 && a > 0 && !this._isCharWordSeparator(n.loadCell(t - 1, this._workCell));) {
                n.loadCell(t - 1, this._workCell);
                const e = this._workCell.getChars().length;
                0 === this._workCell.getWidth() ? (l++, t--) : e > 1 && (_ += e - 1, a -= e - 1), a--, t--;
              }
              for (; i < n.length && h + 1 < o.length && !this._isCharWordSeparator(n.loadCell(i + 1, this._workCell));) {
                n.loadCell(i + 1, this._workCell);
                const e = this._workCell.getChars().length;
                2 === this._workCell.getWidth() ? (d++, i++) : e > 1 && (u += e - 1, h += e - 1), h++, i++;
              }
            }
            h++;
            let f = a + c - l + _,
              v = Math.min(this._bufferService.cols, h - a + l + d - _ - u);
            if (t || "" !== o.slice(a, h).trim()) {
              if (i && 0 === f && 32 !== n.getCodePoint(0)) {
                const t = r.lines.get(e[1] - 1);
                if (t && n.isWrapped && 32 !== t.getCodePoint(this._bufferService.cols - 1)) {
                  const t = this._getWordAt([this._bufferService.cols - 1, e[1] - 1], !1, !0, !1);
                  if (t) {
                    const e = this._bufferService.cols - t.start;
                    f -= e, v += e;
                  }
                }
              }
              if (s && f + v === this._bufferService.cols && 32 !== n.getCodePoint(this._bufferService.cols - 1)) {
                const t = r.lines.get(e[1] + 1);
                if (t?.isWrapped && 32 !== t.getCodePoint(0)) {
                  const t = this._getWordAt([0, e[1] + 1], !1, !1, !0);
                  t && (v += t.length);
                }
              }
              return {
                start: f,
                length: v
              };
            }
          }
          _selectWordAt(e, t) {
            const i = this._getWordAt(e, t);
            if (i) {
              for (; i.start < 0;) i.start += this._bufferService.cols, e[1]--;
              this._model.selectionStart = [i.start, e[1]], this._model.selectionStartLength = i.length;
            }
          }
          _selectToWordAt(e) {
            const t = this._getWordAt(e, !0);
            if (t) {
              let i = e[1];
              for (; t.start < 0;) t.start += this._bufferService.cols, i--;
              if (!this._model.areSelectionValuesReversed()) for (; t.start + t.length > this._bufferService.cols;) t.length -= this._bufferService.cols, i++;
              this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? t.start : t.start + t.length, i];
            }
          }
          _isCharWordSeparator(e) {
            return 0 !== e.getWidth() && this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars()) >= 0;
          }
          _selectLineAt(e) {
            const t = this._bufferService.buffer.getWrappedRangeForLine(e),
              i = {
                start: {
                  x: 0,
                  y: t.first
                },
                end: {
                  x: this._bufferService.cols - 1,
                  y: t.last
                }
              };
            this._model.selectionStart = [0, t.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = (0, _.getRangeLength)(i, this._bufferService.cols);
          }
        };
        t.SelectionService = g = s([r(3, f.IBufferService), r(4, f.ICoreService), r(5, h.IMouseService), r(6, f.IOptionsService), r(7, h.IRenderService), r(8, h.ICoreBrowserService)], g);
      },
      4725: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ILinkProviderService = t.IThemeService = t.ICharacterJoinerService = t.ISelectionService = t.IRenderService = t.IMouseService = t.ICoreBrowserService = t.ICharSizeService = void 0;
        const s = i(8343);
        t.ICharSizeService = (0, s.createDecorator)("CharSizeService"), t.ICoreBrowserService = (0, s.createDecorator)("CoreBrowserService"), t.IMouseService = (0, s.createDecorator)("MouseService"), t.IRenderService = (0, s.createDecorator)("RenderService"), t.ISelectionService = (0, s.createDecorator)("SelectionService"), t.ICharacterJoinerService = (0, s.createDecorator)("CharacterJoinerService"), t.IThemeService = (0, s.createDecorator)("ThemeService"), t.ILinkProviderService = (0, s.createDecorator)("LinkProviderService");
      },
      6731: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ThemeService = t.DEFAULT_ANSI_COLORS = void 0;
        const n = i(7239),
          o = i(8055),
          a = i(8460),
          h = i(844),
          c = i(2585),
          l = o.css.toColor("#ffffff"),
          d = o.css.toColor("#000000"),
          _ = o.css.toColor("#ffffff"),
          u = o.css.toColor("#000000"),
          f = {
            css: "rgba(255, 255, 255, 0.3)",
            rgba: 4294967117
          };
        t.DEFAULT_ANSI_COLORS = Object.freeze((() => {
          const e = [o.css.toColor("#2e3436"), o.css.toColor("#cc0000"), o.css.toColor("#4e9a06"), o.css.toColor("#c4a000"), o.css.toColor("#3465a4"), o.css.toColor("#75507b"), o.css.toColor("#06989a"), o.css.toColor("#d3d7cf"), o.css.toColor("#555753"), o.css.toColor("#ef2929"), o.css.toColor("#8ae234"), o.css.toColor("#fce94f"), o.css.toColor("#729fcf"), o.css.toColor("#ad7fa8"), o.css.toColor("#34e2e2"), o.css.toColor("#eeeeec")],
            t = [0, 95, 135, 175, 215, 255];
          for (let i = 0; i < 216; i++) {
            const s = t[i / 36 % 6 | 0],
              r = t[i / 6 % 6 | 0],
              n = t[i % 6];
            e.push({
              css: o.channels.toCss(s, r, n),
              rgba: o.channels.toRgba(s, r, n)
            });
          }
          for (let t = 0; t < 24; t++) {
            const i = 8 + 10 * t;
            e.push({
              css: o.channels.toCss(i, i, i),
              rgba: o.channels.toRgba(i, i, i)
            });
          }
          return e;
        })());
        let v = t.ThemeService = class extends h.Disposable {
          get colors() {
            return this._colors;
          }
          constructor(e) {
            super(), this._optionsService = e, this._contrastCache = new n.ColorContrastCache(), this._halfContrastCache = new n.ColorContrastCache(), this._onChangeColors = this.register(new a.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._colors = {
              foreground: l,
              background: d,
              cursor: _,
              cursorAccent: u,
              selectionForeground: void 0,
              selectionBackgroundTransparent: f,
              selectionBackgroundOpaque: o.color.blend(d, f),
              selectionInactiveBackgroundTransparent: f,
              selectionInactiveBackgroundOpaque: o.color.blend(d, f),
              ansi: t.DEFAULT_ANSI_COLORS.slice(),
              contrastCache: this._contrastCache,
              halfContrastCache: this._halfContrastCache
            }, 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)));
          }
          _setTheme(e = {}) {
            const i = this._colors;
            if (i.foreground = p(e.foreground, l), i.background = p(e.background, d), i.cursor = p(e.cursor, _), i.cursorAccent = p(e.cursorAccent, u), i.selectionBackgroundTransparent = p(e.selectionBackground, f), i.selectionBackgroundOpaque = o.color.blend(i.background, i.selectionBackgroundTransparent), i.selectionInactiveBackgroundTransparent = p(e.selectionInactiveBackground, i.selectionBackgroundTransparent), i.selectionInactiveBackgroundOpaque = o.color.blend(i.background, i.selectionInactiveBackgroundTransparent), i.selectionForeground = e.selectionForeground ? p(e.selectionForeground, o.NULL_COLOR) : void 0, i.selectionForeground === o.NULL_COLOR && (i.selectionForeground = void 0), o.color.isOpaque(i.selectionBackgroundTransparent)) {
              const e = .3;
              i.selectionBackgroundTransparent = o.color.opacity(i.selectionBackgroundTransparent, e);
            }
            if (o.color.isOpaque(i.selectionInactiveBackgroundTransparent)) {
              const e = .3;
              i.selectionInactiveBackgroundTransparent = o.color.opacity(i.selectionInactiveBackgroundTransparent, e);
            }
            if (i.ansi = t.DEFAULT_ANSI_COLORS.slice(), i.ansi[0] = p(e.black, t.DEFAULT_ANSI_COLORS[0]), i.ansi[1] = p(e.red, t.DEFAULT_ANSI_COLORS[1]), i.ansi[2] = p(e.green, t.DEFAULT_ANSI_COLORS[2]), i.ansi[3] = p(e.yellow, t.DEFAULT_ANSI_COLORS[3]), i.ansi[4] = p(e.blue, t.DEFAULT_ANSI_COLORS[4]), i.ansi[5] = p(e.magenta, t.DEFAULT_ANSI_COLORS[5]), i.ansi[6] = p(e.cyan, t.DEFAULT_ANSI_COLORS[6]), i.ansi[7] = p(e.white, t.DEFAULT_ANSI_COLORS[7]), i.ansi[8] = p(e.brightBlack, t.DEFAULT_ANSI_COLORS[8]), i.ansi[9] = p(e.brightRed, t.DEFAULT_ANSI_COLORS[9]), i.ansi[10] = p(e.brightGreen, t.DEFAULT_ANSI_COLORS[10]), i.ansi[11] = p(e.brightYellow, t.DEFAULT_ANSI_COLORS[11]), i.ansi[12] = p(e.brightBlue, t.DEFAULT_ANSI_COLORS[12]), i.ansi[13] = p(e.brightMagenta, t.DEFAULT_ANSI_COLORS[13]), i.ansi[14] = p(e.brightCyan, t.DEFAULT_ANSI_COLORS[14]), i.ansi[15] = p(e.brightWhite, t.DEFAULT_ANSI_COLORS[15]), e.extendedAnsi) {
              const s = Math.min(i.ansi.length - 16, e.extendedAnsi.length);
              for (let r = 0; r < s; r++) i.ansi[r + 16] = p(e.extendedAnsi[r], t.DEFAULT_ANSI_COLORS[r + 16]);
            }
            this._contrastCache.clear(), this._halfContrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors);
          }
          restoreColor(e) {
            this._restoreColor(e), this._onChangeColors.fire(this.colors);
          }
          _restoreColor(e) {
            if (void 0 !== e) switch (e) {
              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[e] = this._restoreColors.ansi[e];
            } else for (let e = 0; e < this._restoreColors.ansi.length; ++e) this._colors.ansi[e] = this._restoreColors.ansi[e];
          }
          modifyColors(e) {
            e(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 p(e, t) {
          if (void 0 !== e) try {
            return o.css.toColor(e);
          } catch {}
          return t;
        }
        t.ThemeService = v = s([r(0, c.IOptionsService)], v);
      },
      6349: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CircularList = void 0;
        const s = i(8460),
          r = i(844);
        class n extends r.Disposable {
          constructor(e) {
            super(), this._maxLength = e, this.onDeleteEmitter = this.register(new s.EventEmitter()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this.register(new s.EventEmitter()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this.register(new s.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(e) {
            if (this._maxLength === e) return;
            const t = new Array(e);
            for (let i = 0; i < Math.min(e, this.length); i++) t[i] = this._array[this._getCyclicIndex(i)];
            this._array = t, this._maxLength = e, this._startIndex = 0;
          }
          get length() {
            return this._length;
          }
          set length(e) {
            if (e > this._length) for (let t = this._length; t < e; t++) this._array[t] = void 0;
            this._length = e;
          }
          get(e) {
            return this._array[this._getCyclicIndex(e)];
          }
          set(e, t) {
            this._array[this._getCyclicIndex(e)] = t;
          }
          push(e) {
            this._array[this._getCyclicIndex(this._length)] = e, 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(e, t, ...i) {
            if (t) {
              for (let i = e; i < this._length - t; i++) this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + t)];
              this._length -= t, this.onDeleteEmitter.fire({
                index: e,
                amount: t
              });
            }
            for (let t = this._length - 1; t >= e; t--) this._array[this._getCyclicIndex(t + i.length)] = this._array[this._getCyclicIndex(t)];
            for (let t = 0; t < i.length; t++) this._array[this._getCyclicIndex(e + t)] = i[t];
            if (i.length && this.onInsertEmitter.fire({
              index: e,
              amount: i.length
            }), this._length + i.length > this._maxLength) {
              const e = this._length + i.length - this._maxLength;
              this._startIndex += e, this._length = this._maxLength, this.onTrimEmitter.fire(e);
            } else this._length += i.length;
          }
          trimStart(e) {
            e > this._length && (e = this._length), this._startIndex += e, this._length -= e, this.onTrimEmitter.fire(e);
          }
          shiftElements(e, t, i) {
            if (!(t <= 0)) {
              if (e < 0 || e >= this._length) throw new Error("start argument out of range");
              if (e + i < 0) throw new Error("Cannot shift elements in list beyond index 0");
              if (i > 0) {
                for (let s = t - 1; s >= 0; s--) this.set(e + s + i, this.get(e + s));
                const s = e + t + i - this._length;
                if (s > 0) for (this._length += s; this._length > this._maxLength;) this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
              } else for (let s = 0; s < t; s++) this.set(e + s + i, this.get(e + s));
            }
          }
          _getCyclicIndex(e) {
            return (this._startIndex + e) % this._maxLength;
          }
        }
        t.CircularList = n;
      },
      1439: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.clone = void 0, t.clone = function e(t, i = 5) {
          if ("object" != typeof t) return t;
          const s = Array.isArray(t) ? [] : {};
          for (const r in t) s[r] = i <= 1 ? t[r] : t[r] && e(t[r], i - 1);
          return s;
        };
      },
      8055: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
        const s = i(6114);
        let r = 0,
          n = 0,
          o = 0,
          a = 0;
        var h, c, l, d, _;
        function u(e) {
          const t = e.toString(16);
          return t.length < 2 ? "0" + t : t;
        }
        function f(e, t) {
          return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
        }
        t.NULL_COLOR = {
          css: "#00000000",
          rgba: 0
        }, function (e) {
          e.toCss = function (e, t, i, s) {
            return void 0 !== s ? `#${u(e)}${u(t)}${u(i)}${u(s)}` : `#${u(e)}${u(t)}${u(i)}`;
          }, e.toRgba = function (e, t, i, s = 255) {
            return (e << 24 | t << 16 | i << 8 | s) >>> 0;
          }, e.toColor = function (t, i, s, r) {
            return {
              css: e.toCss(t, i, s, r),
              rgba: e.toRgba(t, i, s, r)
            };
          };
        }(h || (t.channels = h = {})), function (e) {
          function t(e, t) {
            return a = Math.round(255 * t), [r, n, o] = _.toChannels(e.rgba), {
              css: h.toCss(r, n, o, a),
              rgba: h.toRgba(r, n, o, a)
            };
          }
          e.blend = function (e, t) {
            if (a = (255 & t.rgba) / 255, 1 === a) return {
              css: t.css,
              rgba: t.rgba
            };
            const i = t.rgba >> 24 & 255,
              s = t.rgba >> 16 & 255,
              c = t.rgba >> 8 & 255,
              l = e.rgba >> 24 & 255,
              d = e.rgba >> 16 & 255,
              _ = e.rgba >> 8 & 255;
            return r = l + Math.round((i - l) * a), n = d + Math.round((s - d) * a), o = _ + Math.round((c - _) * a), {
              css: h.toCss(r, n, o),
              rgba: h.toRgba(r, n, o)
            };
          }, e.isOpaque = function (e) {
            return 255 == (255 & e.rgba);
          }, e.ensureContrastRatio = function (e, t, i) {
            const s = _.ensureContrastRatio(e.rgba, t.rgba, i);
            if (s) return h.toColor(s >> 24 & 255, s >> 16 & 255, s >> 8 & 255);
          }, e.opaque = function (e) {
            const t = (255 | e.rgba) >>> 0;
            return [r, n, o] = _.toChannels(t), {
              css: h.toCss(r, n, o),
              rgba: t
            };
          }, e.opacity = t, e.multiplyOpacity = function (e, i) {
            return a = 255 & e.rgba, t(e, a * i / 255);
          }, e.toColorRGB = function (e) {
            return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
          };
        }(c || (t.color = c = {})), function (e) {
          let t, i;
          if (!s.isNode) {
            const e = document.createElement("canvas");
            e.width = 1, e.height = 1;
            const s = e.getContext("2d", {
              willReadFrequently: !0
            });
            s && (t = s, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
          }
          e.toColor = function (e) {
            if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
              case 4:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), n = parseInt(e.slice(2, 3).repeat(2), 16), o = parseInt(e.slice(3, 4).repeat(2), 16), h.toColor(r, n, o);
              case 5:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), n = parseInt(e.slice(2, 3).repeat(2), 16), o = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), h.toColor(r, n, o, a);
              case 7:
                return {
                  css: e,
                  rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                };
              case 9:
                return {
                  css: e,
                  rgba: parseInt(e.slice(1), 16) >>> 0
                };
            }
            const s = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
            if (s) return r = parseInt(s[1]), n = parseInt(s[2]), o = parseInt(s[3]), a = Math.round(255 * (void 0 === s[5] ? 1 : parseFloat(s[5]))), h.toColor(r, n, o, a);
            if (!t || !i) throw new Error("css.toColor: Unsupported css format");
            if (t.fillStyle = i, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
            if (t.fillRect(0, 0, 1, 1), [r, n, o, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
            return {
              rgba: h.toRgba(r, n, o, a),
              css: e
            };
          };
        }(l || (t.css = l = {})), function (e) {
          function t(e, t, i) {
            const s = e / 255,
              r = t / 255,
              n = i / 255;
            return .2126 * (s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4)) + .7152 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (n <= .03928 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4));
          }
          e.relativeLuminance = function (e) {
            return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
          }, e.relativeLuminance2 = t;
        }(d || (t.rgb = d = {})), function (e) {
          function t(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              n = e >> 8 & 255;
            let o = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              c = f(d.relativeLuminance2(o, a, h), d.relativeLuminance2(s, r, n));
            for (; c < i && (o > 0 || a > 0 || h > 0);) o -= Math.max(0, Math.ceil(.1 * o)), a -= Math.max(0, Math.ceil(.1 * a)), h -= Math.max(0, Math.ceil(.1 * h)), c = f(d.relativeLuminance2(o, a, h), d.relativeLuminance2(s, r, n));
            return (o << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          function i(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              n = e >> 8 & 255;
            let o = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              c = f(d.relativeLuminance2(o, a, h), d.relativeLuminance2(s, r, n));
            for (; c < i && (o < 255 || a < 255 || h < 255);) o = Math.min(255, o + Math.ceil(.1 * (255 - o))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), h = Math.min(255, h + Math.ceil(.1 * (255 - h))), c = f(d.relativeLuminance2(o, a, h), d.relativeLuminance2(s, r, n));
            return (o << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          e.blend = function (e, t) {
            if (a = (255 & t) / 255, 1 === a) return t;
            const i = t >> 24 & 255,
              s = t >> 16 & 255,
              c = t >> 8 & 255,
              l = e >> 24 & 255,
              d = e >> 16 & 255,
              _ = e >> 8 & 255;
            return r = l + Math.round((i - l) * a), n = d + Math.round((s - d) * a), o = _ + Math.round((c - _) * a), h.toRgba(r, n, o);
          }, e.ensureContrastRatio = function (e, s, r) {
            const n = d.relativeLuminance(e >> 8),
              o = d.relativeLuminance(s >> 8);
            if (f(n, o) < r) {
              if (o < n) {
                const o = t(e, s, r),
                  a = f(n, d.relativeLuminance(o >> 8));
                if (a < r) {
                  const t = i(e, s, r);
                  return a > f(n, d.relativeLuminance(t >> 8)) ? o : t;
                }
                return o;
              }
              const a = i(e, s, r),
                h = f(n, d.relativeLuminance(a >> 8));
              if (h < r) {
                const i = t(e, s, r);
                return h > f(n, d.relativeLuminance(i >> 8)) ? a : i;
              }
              return a;
            }
          }, e.reduceLuminance = t, e.increaseLuminance = i, e.toChannels = function (e) {
            return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          };
        }(_ || (t.rgba = _ = {})), t.toPaddedHex = u, t.contrastRatio = f;
      },
      8969: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CoreTerminal = void 0;
        const s = i(844),
          r = i(2585),
          n = i(4348),
          o = i(7866),
          a = i(744),
          h = i(7302),
          c = i(6975),
          l = i(8460),
          d = i(1753),
          _ = i(1480),
          u = i(7994),
          f = i(9282),
          v = i(5435),
          p = i(5981),
          g = i(2660);
        let m = !1;
        class S extends s.Disposable {
          get onScroll() {
            return this._onScrollApi || (this._onScrollApi = this.register(new l.EventEmitter()), this._onScroll.event(e => {
              this._onScrollApi?.fire(e.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(e) {
            for (const t in e) this.optionsService.options[t] = e[t];
          }
          constructor(e) {
            super(), this._windowsWrappingHeuristics = this.register(new s.MutableDisposable()), this._onBinary = this.register(new l.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new l.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new l.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new l.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new l.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new l.EventEmitter()), this._instantiationService = new n.InstantiationService(), this.optionsService = this.register(new h.OptionsService(e)), this._instantiationService.setService(r.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(a.BufferService)), this._instantiationService.setService(r.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(o.LogService)), this._instantiationService.setService(r.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(c.CoreService)), this._instantiationService.setService(r.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(d.CoreMouseService)), this._instantiationService.setService(r.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(_.UnicodeService)), this._instantiationService.setService(r.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(u.CharsetService), this._instantiationService.setService(r.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(g.OscLinkService), this._instantiationService.setService(r.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new v.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, l.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, l.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, l.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, l.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.onMultipleOptionChange(["windowsMode", "windowsPty"], () => this._handleWindowsPtyOptionChange())), this.register(this._bufferService.onScroll(e => {
              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(e => {
              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 p.WriteBuffer((e, t) => this._inputHandler.parse(e, t))), this.register((0, l.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed));
          }
          write(e, t) {
            this._writeBuffer.write(e, t);
          }
          writeSync(e, t) {
            this._logService.logLevel <= r.LogLevelEnum.WARN && !m && (this._logService.warn("writeSync is unreliable and will be removed soon."), m = !0), this._writeBuffer.writeSync(e, t);
          }
          input(e, t = !0) {
            this.coreService.triggerDataEvent(e, t);
          }
          resize(e, t) {
            isNaN(e) || isNaN(t) || (e = Math.max(e, a.MINIMUM_COLS), t = Math.max(t, a.MINIMUM_ROWS), this._bufferService.resize(e, t));
          }
          scroll(e, t = !1) {
            this._bufferService.scroll(e, t);
          }
          scrollLines(e, t, i) {
            this._bufferService.scrollLines(e, t, i);
          }
          scrollPages(e) {
            this.scrollLines(e * (this.rows - 1));
          }
          scrollToTop() {
            this.scrollLines(-this._bufferService.buffer.ydisp);
          }
          scrollToBottom() {
            this.scrollLines(this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
          }
          scrollToLine(e) {
            const t = e - this._bufferService.buffer.ydisp;
            0 !== t && this.scrollLines(t);
          }
          registerEscHandler(e, t) {
            return this._inputHandler.registerEscHandler(e, t);
          }
          registerDcsHandler(e, t) {
            return this._inputHandler.registerDcsHandler(e, t);
          }
          registerCsiHandler(e, t) {
            return this._inputHandler.registerCsiHandler(e, t);
          }
          registerOscHandler(e, t) {
            return this._inputHandler.registerOscHandler(e, t);
          }
          _setup() {
            this._handleWindowsPtyOptionChange();
          }
          reset() {
            this._inputHandler.reset(), this._bufferService.reset(), this._charsetService.reset(), this.coreService.reset(), this.coreMouseService.reset();
          }
          _handleWindowsPtyOptionChange() {
            let e = !1;
            const t = this.optionsService.rawOptions.windowsPty;
            t && void 0 !== t.buildNumber && void 0 !== t.buildNumber ? e = !!("conpty" === t.backend && t.buildNumber < 21376) : this.optionsService.rawOptions.windowsMode && (e = !0), e ? this._enableWindowsWrappingHeuristics() : this._windowsWrappingHeuristics.clear();
          }
          _enableWindowsWrappingHeuristics() {
            if (!this._windowsWrappingHeuristics.value) {
              const e = [];
              e.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null, this._bufferService))), e.push(this.registerCsiHandler({
                final: "H"
              }, () => ((0, f.updateWindowsModeWrappedState)(this._bufferService), !1))), this._windowsWrappingHeuristics.value = (0, s.toDisposable)(() => {
                for (const t of e) t.dispose();
              });
            }
          }
        }
        t.CoreTerminal = S;
      },
      8460: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const i = [];
            for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
            for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
          }
          dispose() {
            this.clearListeners(), this._disposed = !0;
          }
          clearListeners() {
            this._listeners && (this._listeners.length = 0);
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        }, t.runAndSubscribe = function (e, t) {
          return t(void 0), e(e => t(e));
        };
      },
      5435: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.InputHandler = t.WindowsOptionsReportType = void 0;
        const n = i(2584),
          o = i(7116),
          a = i(2015),
          h = i(844),
          c = i(482),
          l = i(8437),
          d = i(8460),
          _ = i(643),
          u = i(511),
          f = i(3734),
          v = i(2585),
          p = i(1480),
          g = i(6242),
          m = i(6351),
          S = i(5941),
          C = {
            "(": 0,
            ")": 1,
            "*": 2,
            "+": 3,
            "-": 1,
            ".": 2
          },
          b = 131072;
        function w(e, t) {
          if (e > 24) return t.setWinLines || !1;
          switch (e) {
            case 1:
              return !!t.restoreWin;
            case 2:
              return !!t.minimizeWin;
            case 3:
              return !!t.setWinPosition;
            case 4:
              return !!t.setWinSizePixels;
            case 5:
              return !!t.raiseWin;
            case 6:
              return !!t.lowerWin;
            case 7:
              return !!t.refreshWin;
            case 8:
              return !!t.setWinSizeChars;
            case 9:
              return !!t.maximizeWin;
            case 10:
              return !!t.fullscreenWin;
            case 11:
              return !!t.getWinState;
            case 13:
              return !!t.getWinPosition;
            case 14:
              return !!t.getWinSizePixels;
            case 15:
              return !!t.getScreenSizePixels;
            case 16:
              return !!t.getCellSizePixels;
            case 18:
              return !!t.getWinSizeChars;
            case 19:
              return !!t.getScreenSizeChars;
            case 20:
              return !!t.getIconTitle;
            case 21:
              return !!t.getWinTitle;
            case 22:
              return !!t.pushTitle;
            case 23:
              return !!t.popTitle;
            case 24:
              return !!t.setWinLines;
          }
          return !1;
        }
        var y;
        !function (e) {
          e[e.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", e[e.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
        }(y || (t.WindowsOptionsReportType = y = {}));
        let E = 0;
        class k extends h.Disposable {
          getAttrData() {
            return this._curAttrData;
          }
          constructor(e, t, i, s, r, h, _, f, v = new a.EscapeSequenceParser()) {
            super(), this._bufferService = e, this._charsetService = t, this._coreService = i, this._logService = s, this._optionsService = r, this._oscLinkService = h, this._coreMouseService = _, this._unicodeService = f, this._parser = v, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new u.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new d.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new d.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new d.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new d.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new d.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new d.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new d.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new d.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new d.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new d.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new d.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new d.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new d.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 L(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer)), this._parser.setCsiHandlerFallback((e, t) => {
              this._logService.debug("Unknown CSI code: ", {
                identifier: this._parser.identToString(e),
                params: t.toArray()
              });
            }), this._parser.setEscHandlerFallback(e => {
              this._logService.debug("Unknown ESC code: ", {
                identifier: this._parser.identToString(e)
              });
            }), this._parser.setExecuteHandlerFallback(e => {
              this._logService.debug("Unknown EXECUTE code: ", {
                code: e
              });
            }), this._parser.setOscHandlerFallback((e, t, i) => {
              this._logService.debug("Unknown OSC code: ", {
                identifier: e,
                action: t,
                data: i
              });
            }), this._parser.setDcsHandlerFallback((e, t, i) => {
              "HOOK" === t && (i = i.toArray()), this._logService.debug("Unknown DCS code: ", {
                identifier: this._parser.identToString(e),
                action: t,
                payload: i
              });
            }), this._parser.setPrintHandler((e, t, i) => this.print(e, t, i)), this._parser.registerCsiHandler({
              final: "@"
            }, e => this.insertChars(e)), this._parser.registerCsiHandler({
              intermediates: " ",
              final: "@"
            }, e => this.scrollLeft(e)), this._parser.registerCsiHandler({
              final: "A"
            }, e => this.cursorUp(e)), this._parser.registerCsiHandler({
              intermediates: " ",
              final: "A"
            }, e => this.scrollRight(e)), this._parser.registerCsiHandler({
              final: "B"
            }, e => this.cursorDown(e)), this._parser.registerCsiHandler({
              final: "C"
            }, e => this.cursorForward(e)), this._parser.registerCsiHandler({
              final: "D"
            }, e => this.cursorBackward(e)), this._parser.registerCsiHandler({
              final: "E"
            }, e => this.cursorNextLine(e)), this._parser.registerCsiHandler({
              final: "F"
            }, e => this.cursorPrecedingLine(e)), this._parser.registerCsiHandler({
              final: "G"
            }, e => this.cursorCharAbsolute(e)), this._parser.registerCsiHandler({
              final: "H"
            }, e => this.cursorPosition(e)), this._parser.registerCsiHandler({
              final: "I"
            }, e => this.cursorForwardTab(e)), this._parser.registerCsiHandler({
              final: "J"
            }, e => this.eraseInDisplay(e, !1)), this._parser.registerCsiHandler({
              prefix: "?",
              final: "J"
            }, e => this.eraseInDisplay(e, !0)), this._parser.registerCsiHandler({
              final: "K"
            }, e => this.eraseInLine(e, !1)), this._parser.registerCsiHandler({
              prefix: "?",
              final: "K"
            }, e => this.eraseInLine(e, !0)), this._parser.registerCsiHandler({
              final: "L"
            }, e => this.insertLines(e)), this._parser.registerCsiHandler({
              final: "M"
            }, e => this.deleteLines(e)), this._parser.registerCsiHandler({
              final: "P"
            }, e => this.deleteChars(e)), this._parser.registerCsiHandler({
              final: "S"
            }, e => this.scrollUp(e)), this._parser.registerCsiHandler({
              final: "T"
            }, e => this.scrollDown(e)), this._parser.registerCsiHandler({
              final: "X"
            }, e => this.eraseChars(e)), this._parser.registerCsiHandler({
              final: "Z"
            }, e => this.cursorBackwardTab(e)), this._parser.registerCsiHandler({
              final: "`"
            }, e => this.charPosAbsolute(e)), this._parser.registerCsiHandler({
              final: "a"
            }, e => this.hPositionRelative(e)), this._parser.registerCsiHandler({
              final: "b"
            }, e => this.repeatPrecedingCharacter(e)), this._parser.registerCsiHandler({
              final: "c"
            }, e => this.sendDeviceAttributesPrimary(e)), this._parser.registerCsiHandler({
              prefix: ">",
              final: "c"
            }, e => this.sendDeviceAttributesSecondary(e)), this._parser.registerCsiHandler({
              final: "d"
            }, e => this.linePosAbsolute(e)), this._parser.registerCsiHandler({
              final: "e"
            }, e => this.vPositionRelative(e)), this._parser.registerCsiHandler({
              final: "f"
            }, e => this.hVPosition(e)), this._parser.registerCsiHandler({
              final: "g"
            }, e => this.tabClear(e)), this._parser.registerCsiHandler({
              final: "h"
            }, e => this.setMode(e)), this._parser.registerCsiHandler({
              prefix: "?",
              final: "h"
            }, e => this.setModePrivate(e)), this._parser.registerCsiHandler({
              final: "l"
            }, e => this.resetMode(e)), this._parser.registerCsiHandler({
              prefix: "?",
              final: "l"
            }, e => this.resetModePrivate(e)), this._parser.registerCsiHandler({
              final: "m"
            }, e => this.charAttributes(e)), this._parser.registerCsiHandler({
              final: "n"
            }, e => this.deviceStatus(e)), this._parser.registerCsiHandler({
              prefix: "?",
              final: "n"
            }, e => this.deviceStatusPrivate(e)), this._parser.registerCsiHandler({
              intermediates: "!",
              final: "p"
            }, e => this.softReset(e)), this._parser.registerCsiHandler({
              intermediates: " ",
              final: "q"
            }, e => this.setCursorStyle(e)), this._parser.registerCsiHandler({
              final: "r"
            }, e => this.setScrollRegion(e)), this._parser.registerCsiHandler({
              final: "s"
            }, e => this.saveCursor(e)), this._parser.registerCsiHandler({
              final: "t"
            }, e => this.windowOptions(e)), this._parser.registerCsiHandler({
              final: "u"
            }, e => this.restoreCursor(e)), this._parser.registerCsiHandler({
              intermediates: "'",
              final: "}"
            }, e => this.insertColumns(e)), this._parser.registerCsiHandler({
              intermediates: "'",
              final: "~"
            }, e => this.deleteColumns(e)), this._parser.registerCsiHandler({
              intermediates: '"',
              final: "q"
            }, e => this.selectProtected(e)), this._parser.registerCsiHandler({
              intermediates: "$",
              final: "p"
            }, e => this.requestMode(e, !0)), this._parser.registerCsiHandler({
              prefix: "?",
              intermediates: "$",
              final: "p"
            }, e => this.requestMode(e, !1)), this._parser.setExecuteHandler(n.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(n.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(n.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(n.C0.HT, () => this.tab()), this._parser.setExecuteHandler(n.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(n.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(n.C1.IND, () => this.index()), this._parser.setExecuteHandler(n.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(n.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new g.OscHandler(e => (this.setTitle(e), this.setIconName(e), !0))), this._parser.registerOscHandler(1, new g.OscHandler(e => this.setIconName(e))), this._parser.registerOscHandler(2, new g.OscHandler(e => this.setTitle(e))), this._parser.registerOscHandler(4, new g.OscHandler(e => this.setOrReportIndexedColor(e))), this._parser.registerOscHandler(8, new g.OscHandler(e => this.setHyperlink(e))), this._parser.registerOscHandler(10, new g.OscHandler(e => this.setOrReportFgColor(e))), this._parser.registerOscHandler(11, new g.OscHandler(e => this.setOrReportBgColor(e))), this._parser.registerOscHandler(12, new g.OscHandler(e => this.setOrReportCursorColor(e))), this._parser.registerOscHandler(104, new g.OscHandler(e => this.restoreIndexedColor(e))), this._parser.registerOscHandler(110, new g.OscHandler(e => this.restoreFgColor(e))), this._parser.registerOscHandler(111, new g.OscHandler(e => this.restoreBgColor(e))), this._parser.registerOscHandler(112, new g.OscHandler(e => this.restoreCursorColor(e))), 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 e in o.CHARSETS) this._parser.registerEscHandler({
              intermediates: "(",
              final: e
            }, () => this.selectCharset("(" + e)), this._parser.registerEscHandler({
              intermediates: ")",
              final: e
            }, () => this.selectCharset(")" + e)), this._parser.registerEscHandler({
              intermediates: "*",
              final: e
            }, () => this.selectCharset("*" + e)), this._parser.registerEscHandler({
              intermediates: "+",
              final: e
            }, () => this.selectCharset("+" + e)), this._parser.registerEscHandler({
              intermediates: "-",
              final: e
            }, () => this.selectCharset("-" + e)), this._parser.registerEscHandler({
              intermediates: ".",
              final: e
            }, () => this.selectCharset("." + e)), this._parser.registerEscHandler({
              intermediates: "/",
              final: e
            }, () => this.selectCharset("/" + e));
            this._parser.registerEscHandler({
              intermediates: "#",
              final: "8"
            }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler(e => (this._logService.error("Parsing error: ", e), e)), this._parser.registerDcsHandler({
              intermediates: "$",
              final: "q"
            }, new m.DcsHandler((e, t) => this.requestStatusString(e, t)));
          }
          _preserveStack(e, t, i, s) {
            this._parseStack.paused = !0, this._parseStack.cursorStartX = e, this._parseStack.cursorStartY = t, this._parseStack.decodedLength = i, this._parseStack.position = s;
          }
          _logSlowResolvingAsync(e) {
            this._logService.logLevel <= v.LogLevelEnum.WARN && Promise.race([e, new Promise((e, t) => setTimeout(() => t("#SLOW_TIMEOUT"), 5e3))]).catch(e => {
              if ("#SLOW_TIMEOUT" !== e) throw e;
              console.warn("async parser handler taking longer than 5000 ms");
            });
          }
          _getCurrentLinkId() {
            return this._curAttrData.extended.urlId;
          }
          parse(e, t) {
            let i,
              s = this._activeBuffer.x,
              r = this._activeBuffer.y,
              n = 0;
            const o = this._parseStack.paused;
            if (o) {
              if (i = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t)) return this._logSlowResolvingAsync(i), i;
              s = this._parseStack.cursorStartX, r = this._parseStack.cursorStartY, this._parseStack.paused = !1, e.length > b && (n = this._parseStack.position + b);
            }
            if (this._logService.logLevel <= v.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e ? ` "${e}"` : ` "${Array.prototype.map.call(e, e => String.fromCharCode(e)).join("")}"`), "string" == typeof e ? e.split("").map(e => e.charCodeAt(0)) : e), this._parseBuffer.length < e.length && this._parseBuffer.length < b && (this._parseBuffer = new Uint32Array(Math.min(e.length, b))), o || this._dirtyRowTracker.clearRange(), e.length > b) for (let t = n; t < e.length; t += b) {
              const n = t + b < e.length ? t + b : e.length,
                o = "string" == typeof e ? this._stringDecoder.decode(e.substring(t, n), this._parseBuffer) : this._utf8Decoder.decode(e.subarray(t, n), this._parseBuffer);
              if (i = this._parser.parse(this._parseBuffer, o)) return this._preserveStack(s, r, o, t), this._logSlowResolvingAsync(i), i;
            } else if (!o) {
              const t = "string" == typeof e ? this._stringDecoder.decode(e, this._parseBuffer) : this._utf8Decoder.decode(e, this._parseBuffer);
              if (i = this._parser.parse(this._parseBuffer, t)) return this._preserveStack(s, r, t, 0), this._logSlowResolvingAsync(i), i;
            }
            this._activeBuffer.x === s && this._activeBuffer.y === r || this._onCursorMove.fire();
            const a = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp),
              h = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
            h < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(h, this._bufferService.rows - 1), Math.min(a, this._bufferService.rows - 1));
          }
          print(e, t, i) {
            let s, r;
            const n = this._charsetService.charset,
              o = this._optionsService.rawOptions.screenReaderMode,
              a = this._bufferService.cols,
              h = this._coreService.decPrivateModes.wraparound,
              d = this._coreService.modes.insertMode,
              u = this._curAttrData;
            let f = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i - t > 0 && 2 === f.getWidth(this._activeBuffer.x - 1) && f.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, u);
            let v = this._parser.precedingJoinState;
            for (let g = t; g < i; ++g) {
              if (s = e[g], s < 127 && n) {
                const e = n[String.fromCharCode(s)];
                e && (s = e.charCodeAt(0));
              }
              const t = this._unicodeService.charProperties(s, v);
              r = p.UnicodeService.extractWidth(t);
              const i = p.UnicodeService.extractShouldJoin(t),
                m = i ? p.UnicodeService.extractWidth(v) : 0;
              if (v = t, o && this._onA11yChar.fire((0, c.stringFromCodePoint)(s)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + r - m > a) if (h) {
                const e = f;
                let t = this._activeBuffer.x - m;
                for (this._activeBuffer.x = m, 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), f = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), m > 0 && f instanceof l.BufferLine && f.copyCellsFrom(e, t, 0, m, !1); t < a;) e.setCellFromCodepoint(t++, 0, 1, u);
              } else if (this._activeBuffer.x = a - 1, 2 === r) continue;
              if (i && this._activeBuffer.x) {
                const e = f.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
                f.addCodepointToCell(this._activeBuffer.x - e, s, r);
                for (let e = r - m; --e >= 0;) f.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, u);
              } else if (d && (f.insertCells(this._activeBuffer.x, r - m, this._activeBuffer.getNullCell(u)), 2 === f.getWidth(a - 1) && f.setCellFromCodepoint(a - 1, _.NULL_CELL_CODE, _.NULL_CELL_WIDTH, u)), f.setCellFromCodepoint(this._activeBuffer.x++, s, r, u), r > 0) for (; --r;) f.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, u);
            }
            this._parser.precedingJoinState = v, this._activeBuffer.x < a && i - t > 0 && 0 === f.getWidth(this._activeBuffer.x) && !f.hasContent(this._activeBuffer.x) && f.setCellFromCodepoint(this._activeBuffer.x, 0, 1, u), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
          }
          registerCsiHandler(e, t) {
            return "t" !== e.final || e.prefix || e.intermediates ? this._parser.registerCsiHandler(e, t) : this._parser.registerCsiHandler(e, e => !w(e.params[0], this._optionsService.rawOptions.windowOptions) || t(e));
          }
          registerDcsHandler(e, t) {
            return this._parser.registerDcsHandler(e, new m.DcsHandler(t));
          }
          registerEscHandler(e, t) {
            return this._parser.registerEscHandler(e, t);
          }
          registerOscHandler(e, t) {
            return this._parser.registerOscHandler(e, new g.OscHandler(t));
          }
          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.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !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() {
            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 (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {
              this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !1, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
              const e = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
              e.hasWidth(this._activeBuffer.x) && !e.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
            }
            return this._restrictCursor(), !0;
          }
          tab() {
            if (this._activeBuffer.x >= this._bufferService.cols) return !0;
            const e = this._activeBuffer.x;
            return this._activeBuffer.x = this._activeBuffer.nextStop(), this._optionsService.rawOptions.screenReaderMode && this._onA11yTab.fire(this._activeBuffer.x - e), !0;
          }
          shiftOut() {
            return this._charsetService.setgLevel(1), !0;
          }
          shiftIn() {
            return this._charsetService.setgLevel(0), !0;
          }
          _restrictCursor(e = this._bufferService.cols - 1) {
            this._activeBuffer.x = Math.min(e, 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(e, t) {
            this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = e, this._activeBuffer.y = this._activeBuffer.scrollTop + t) : (this._activeBuffer.x = e, this._activeBuffer.y = t), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
          }
          _moveCursor(e, t) {
            this._restrictCursor(), this._setCursor(this._activeBuffer.x + e, this._activeBuffer.y + t);
          }
          cursorUp(e) {
            const t = this._activeBuffer.y - this._activeBuffer.scrollTop;
            return t >= 0 ? this._moveCursor(0, -Math.min(t, e.params[0] || 1)) : this._moveCursor(0, -(e.params[0] || 1)), !0;
          }
          cursorDown(e) {
            const t = this._activeBuffer.scrollBottom - this._activeBuffer.y;
            return t >= 0 ? this._moveCursor(0, Math.min(t, e.params[0] || 1)) : this._moveCursor(0, e.params[0] || 1), !0;
          }
          cursorForward(e) {
            return this._moveCursor(e.params[0] || 1, 0), !0;
          }
          cursorBackward(e) {
            return this._moveCursor(-(e.params[0] || 1), 0), !0;
          }
          cursorNextLine(e) {
            return this.cursorDown(e), this._activeBuffer.x = 0, !0;
          }
          cursorPrecedingLine(e) {
            return this.cursorUp(e), this._activeBuffer.x = 0, !0;
          }
          cursorCharAbsolute(e) {
            return this._setCursor((e.params[0] || 1) - 1, this._activeBuffer.y), !0;
          }
          cursorPosition(e) {
            return this._setCursor(e.length >= 2 ? (e.params[1] || 1) - 1 : 0, (e.params[0] || 1) - 1), !0;
          }
          charPosAbsolute(e) {
            return this._setCursor((e.params[0] || 1) - 1, this._activeBuffer.y), !0;
          }
          hPositionRelative(e) {
            return this._moveCursor(e.params[0] || 1, 0), !0;
          }
          linePosAbsolute(e) {
            return this._setCursor(this._activeBuffer.x, (e.params[0] || 1) - 1), !0;
          }
          vPositionRelative(e) {
            return this._moveCursor(0, e.params[0] || 1), !0;
          }
          hVPosition(e) {
            return this.cursorPosition(e), !0;
          }
          tabClear(e) {
            const t = e.params[0];
            return 0 === t ? delete this._activeBuffer.tabs[this._activeBuffer.x] : 3 === t && (this._activeBuffer.tabs = {}), !0;
          }
          cursorForwardTab(e) {
            if (this._activeBuffer.x >= this._bufferService.cols) return !0;
            let t = e.params[0] || 1;
            for (; t--;) this._activeBuffer.x = this._activeBuffer.nextStop();
            return !0;
          }
          cursorBackwardTab(e) {
            if (this._activeBuffer.x >= this._bufferService.cols) return !0;
            let t = e.params[0] || 1;
            for (; t--;) this._activeBuffer.x = this._activeBuffer.prevStop();
            return !0;
          }
          selectProtected(e) {
            const t = e.params[0];
            return 1 === t && (this._curAttrData.bg |= 536870912), 2 !== t && 0 !== t || (this._curAttrData.bg &= -536870913), !0;
          }
          _eraseInBufferLine(e, t, i, s = !1, r = !1) {
            const n = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
            n.replaceCells(t, i, this._activeBuffer.getNullCell(this._eraseAttrData()), r), s && (n.isWrapped = !1);
          }
          _resetBufferLine(e, t = !1) {
            const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
            i && (i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), t), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + e), i.isWrapped = !1);
          }
          eraseInDisplay(e, t = !1) {
            let i;
            switch (this._restrictCursor(this._bufferService.cols), e.params[0]) {
              case 0:
                for (i = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i), this._eraseInBufferLine(i++, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t); i < this._bufferService.rows; i++) this._resetBufferLine(i, t);
                this._dirtyRowTracker.markDirty(i);
                break;
              case 1:
                for (i = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i), this._eraseInBufferLine(i, 0, this._activeBuffer.x + 1, !0, t), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(i + 1).isWrapped = !1); i--;) this._resetBufferLine(i, t);
                this._dirtyRowTracker.markDirty(0);
                break;
              case 2:
                for (i = this._bufferService.rows, this._dirtyRowTracker.markDirty(i - 1); i--;) this._resetBufferLine(i, t);
                this._dirtyRowTracker.markDirty(0);
                break;
              case 3:
                const e = this._activeBuffer.lines.length - this._bufferService.rows;
                e > 0 && (this._activeBuffer.lines.trimStart(e), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - e, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - e, 0), this._onScroll.fire(0));
            }
            return !0;
          }
          eraseInLine(e, t = !1) {
            switch (this._restrictCursor(this._bufferService.cols), e.params[0]) {
              case 0:
                this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t);
                break;
              case 1:
                this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, !1, t);
                break;
              case 2:
                this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, !0, t);
            }
            return this._dirtyRowTracker.markDirty(this._activeBuffer.y), !0;
          }
          insertLines(e) {
            this._restrictCursor();
            let t = e.params[0] || 1;
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
            const i = this._activeBuffer.ybase + this._activeBuffer.y,
              s = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom,
              r = this._bufferService.rows - 1 + this._activeBuffer.ybase - s + 1;
            for (; t--;) this._activeBuffer.lines.splice(r - 1, 1), this._activeBuffer.lines.splice(i, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
          }
          deleteLines(e) {
            this._restrictCursor();
            let t = e.params[0] || 1;
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
            const i = this._activeBuffer.ybase + this._activeBuffer.y;
            let s;
            for (s = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, s = this._bufferService.rows - 1 + this._activeBuffer.ybase - s; t--;) this._activeBuffer.lines.splice(i, 1), this._activeBuffer.lines.splice(s, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
          }
          insertChars(e) {
            this._restrictCursor();
            const t = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            return t && (t.insertCells(this._activeBuffer.x, e.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
          }
          deleteChars(e) {
            this._restrictCursor();
            const t = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            return t && (t.deleteCells(this._activeBuffer.x, e.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
          }
          scrollUp(e) {
            let t = e.params[0] || 1;
            for (; t--;) 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(e) {
            let t = e.params[0] || 1;
            for (; t--;) 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(l.DEFAULT_ATTR_DATA));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          scrollLeft(e) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
            const t = e.params[0] || 1;
            for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
              const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
              i.deleteCells(0, t, this._activeBuffer.getNullCell(this._eraseAttrData())), i.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          scrollRight(e) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
            const t = e.params[0] || 1;
            for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
              const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
              i.insertCells(0, t, this._activeBuffer.getNullCell(this._eraseAttrData())), i.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          insertColumns(e) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
            const t = e.params[0] || 1;
            for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
              const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
              i.insertCells(this._activeBuffer.x, t, this._activeBuffer.getNullCell(this._eraseAttrData())), i.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          deleteColumns(e) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
            const t = e.params[0] || 1;
            for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
              const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
              i.deleteCells(this._activeBuffer.x, t, this._activeBuffer.getNullCell(this._eraseAttrData())), i.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          eraseChars(e) {
            this._restrictCursor();
            const t = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            return t && (t.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (e.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
          }
          repeatPrecedingCharacter(e) {
            const t = this._parser.precedingJoinState;
            if (!t) return !0;
            const i = e.params[0] || 1,
              s = p.UnicodeService.extractWidth(t),
              r = this._activeBuffer.x - s,
              n = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(r),
              o = new Uint32Array(n.length * i);
            let a = 0;
            for (let e = 0; e < n.length;) {
              const t = n.codePointAt(e) || 0;
              o[a++] = t, e += t > 65535 ? 2 : 1;
            }
            let h = a;
            for (let e = 1; e < i; ++e) o.copyWithin(h, 0, a), h += a;
            return this.print(o, 0, h), !0;
          }
          sendDeviceAttributesPrimary(e) {
            return e.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n.C0.ESC + "[?6c")), !0;
          }
          sendDeviceAttributesSecondary(e) {
            return e.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent(n.C0.ESC + "[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent(n.C0.ESC + "[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(e.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent(n.C0.ESC + "[>83;40003;0c")), !0;
          }
          _is(e) {
            return 0 === (this._optionsService.rawOptions.termName + "").indexOf(e);
          }
          setMode(e) {
            for (let t = 0; t < e.length; t++) switch (e.params[t]) {
              case 4:
                this._coreService.modes.insertMode = !0;
                break;
              case 20:
                this._optionsService.options.convertEol = !0;
            }
            return !0;
          }
          setModePrivate(e) {
            for (let t = 0; t < e.length; t++) switch (e.params[t]) {
              case 1:
                this._coreService.decPrivateModes.applicationCursorKeys = !0;
                break;
              case 2:
                this._charsetService.setgCharset(0, o.DEFAULT_CHARSET), this._charsetService.setgCharset(1, o.DEFAULT_CHARSET), this._charsetService.setgCharset(2, o.DEFAULT_CHARSET), this._charsetService.setgCharset(3, o.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(e) {
            for (let t = 0; t < e.length; t++) switch (e.params[t]) {
              case 4:
                this._coreService.modes.insertMode = !1;
                break;
              case 20:
                this._optionsService.options.convertEol = !1;
            }
            return !0;
          }
          resetModePrivate(e) {
            for (let t = 0; t < e.length; t++) switch (e.params[t]) {
              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(), 1049 === e.params[t] && 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(e, t) {
            const i = this._coreService.decPrivateModes,
              {
                activeProtocol: s,
                activeEncoding: r
              } = this._coreMouseService,
              o = this._coreService,
              {
                buffers: a,
                cols: h
              } = this._bufferService,
              {
                active: c,
                alt: l
              } = a,
              d = this._optionsService.rawOptions,
              _ = e => e ? 1 : 2,
              u = e.params[0];
            return f = u, v = t ? 2 === u ? 4 : 4 === u ? _(o.modes.insertMode) : 12 === u ? 3 : 20 === u ? _(d.convertEol) : 0 : 1 === u ? _(i.applicationCursorKeys) : 3 === u ? d.windowOptions.setWinLines ? 80 === h ? 2 : 132 === h ? 1 : 0 : 0 : 6 === u ? _(i.origin) : 7 === u ? _(i.wraparound) : 8 === u ? 3 : 9 === u ? _("X10" === s) : 12 === u ? _(d.cursorBlink) : 25 === u ? _(!o.isCursorHidden) : 45 === u ? _(i.reverseWraparound) : 66 === u ? _(i.applicationKeypad) : 67 === u ? 4 : 1e3 === u ? _("VT200" === s) : 1002 === u ? _("DRAG" === s) : 1003 === u ? _("ANY" === s) : 1004 === u ? _(i.sendFocus) : 1005 === u ? 4 : 1006 === u ? _("SGR" === r) : 1015 === u ? 4 : 1016 === u ? _("SGR_PIXELS" === r) : 1048 === u ? 1 : 47 === u || 1047 === u || 1049 === u ? _(c === l) : 2004 === u ? _(i.bracketedPasteMode) : 0, o.triggerDataEvent(`${n.C0.ESC}[${t ? "" : "?"}${f};${v}$y`), !0;
            // removed by dead control flow
 var f, v; 
          }
          _updateAttrColor(e, t, i, s, r) {
            return 2 === t ? (e |= 50331648, e &= -16777216, e |= f.AttributeData.fromColorRGB([i, s, r])) : 5 === t && (e &= -50331904, e |= 33554432 | 255 & i), e;
          }
          _extractColor(e, t, i) {
            const s = [0, 0, -1, 0, 0, 0];
            let r = 0,
              n = 0;
            do {
              if (s[n + r] = e.params[t + n], e.hasSubParams(t + n)) {
                const i = e.getSubParams(t + n);
                let o = 0;
                do {
                  5 === s[1] && (r = 1), s[n + o + 1 + r] = i[o];
                } while (++o < i.length && o + n + 1 + r < s.length);
                break;
              }
              if (5 === s[1] && n + r >= 2 || 2 === s[1] && n + r >= 5) break;
              s[1] && (r = 1);
            } while (++n + t < e.length && n + r < s.length);
            for (let e = 2; e < s.length; ++e) -1 === s[e] && (s[e] = 0);
            switch (s[0]) {
              case 38:
                i.fg = this._updateAttrColor(i.fg, s[1], s[3], s[4], s[5]);
                break;
              case 48:
                i.bg = this._updateAttrColor(i.bg, s[1], s[3], s[4], s[5]);
                break;
              case 58:
                i.extended = i.extended.clone(), i.extended.underlineColor = this._updateAttrColor(i.extended.underlineColor, s[1], s[3], s[4], s[5]);
            }
            return n;
          }
          _processUnderline(e, t) {
            t.extended = t.extended.clone(), (!~e || e > 5) && (e = 1), t.extended.underlineStyle = e, t.fg |= 268435456, 0 === e && (t.fg &= -268435457), t.updateExtended();
          }
          _processSGR0(e) {
            e.fg = l.DEFAULT_ATTR_DATA.fg, e.bg = l.DEFAULT_ATTR_DATA.bg, e.extended = e.extended.clone(), e.extended.underlineStyle = 0, e.extended.underlineColor &= -67108864, e.updateExtended();
          }
          charAttributes(e) {
            if (1 === e.length && 0 === e.params[0]) return this._processSGR0(this._curAttrData), !0;
            const t = e.length;
            let i;
            const s = this._curAttrData;
            for (let r = 0; r < t; r++) i = e.params[r], i >= 30 && i <= 37 ? (s.fg &= -50331904, s.fg |= 16777216 | i - 30) : i >= 40 && i <= 47 ? (s.bg &= -50331904, s.bg |= 16777216 | i - 40) : i >= 90 && i <= 97 ? (s.fg &= -50331904, s.fg |= 16777224 | i - 90) : i >= 100 && i <= 107 ? (s.bg &= -50331904, s.bg |= 16777224 | i - 100) : 0 === i ? this._processSGR0(s) : 1 === i ? s.fg |= 134217728 : 3 === i ? s.bg |= 67108864 : 4 === i ? (s.fg |= 268435456, this._processUnderline(e.hasSubParams(r) ? e.getSubParams(r)[0] : 1, s)) : 5 === i ? s.fg |= 536870912 : 7 === i ? s.fg |= 67108864 : 8 === i ? s.fg |= 1073741824 : 9 === i ? s.fg |= 2147483648 : 2 === i ? s.bg |= 134217728 : 21 === i ? this._processUnderline(2, s) : 22 === i ? (s.fg &= -134217729, s.bg &= -134217729) : 23 === i ? s.bg &= -67108865 : 24 === i ? (s.fg &= -268435457, this._processUnderline(0, s)) : 25 === i ? s.fg &= -536870913 : 27 === i ? s.fg &= -67108865 : 28 === i ? s.fg &= -1073741825 : 29 === i ? s.fg &= 2147483647 : 39 === i ? (s.fg &= -67108864, s.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg) : 49 === i ? (s.bg &= -67108864, s.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : 38 === i || 48 === i || 58 === i ? r += this._extractColor(e, r, s) : 53 === i ? s.bg |= 1073741824 : 55 === i ? s.bg &= -1073741825 : 59 === i ? (s.extended = s.extended.clone(), s.extended.underlineColor = -1, s.updateExtended()) : 100 === i ? (s.fg &= -67108864, s.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg, s.bg &= -67108864, s.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", i);
            return !0;
          }
          deviceStatus(e) {
            switch (e.params[0]) {
              case 5:
                this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);
                break;
              case 6:
                const e = this._activeBuffer.y + 1,
                  t = this._activeBuffer.x + 1;
                this._coreService.triggerDataEvent(`${n.C0.ESC}[${e};${t}R`);
            }
            return !0;
          }
          deviceStatusPrivate(e) {
            if (6 === e.params[0]) {
              const e = this._activeBuffer.y + 1,
                t = this._activeBuffer.x + 1;
              this._coreService.triggerDataEvent(`${n.C0.ESC}[?${e};${t}R`);
            }
            return !0;
          }
          softReset(e) {
            return this._coreService.isCursorHidden = !1, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = l.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(e) {
            const t = e.params[0] || 1;
            switch (t) {
              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 i = t % 2 == 1;
            return this._optionsService.options.cursorBlink = i, !0;
          }
          setScrollRegion(e) {
            const t = e.params[0] || 1;
            let i;
            return (e.length < 2 || (i = e.params[1]) > this._bufferService.rows || 0 === i) && (i = this._bufferService.rows), i > t && (this._activeBuffer.scrollTop = t - 1, this._activeBuffer.scrollBottom = i - 1, this._setCursor(0, 0)), !0;
          }
          windowOptions(e) {
            if (!w(e.params[0], this._optionsService.rawOptions.windowOptions)) return !0;
            const t = e.length > 1 ? e.params[1] : 0;
            switch (e.params[0]) {
              case 14:
                2 !== t && this._onRequestWindowsOptionsReport.fire(y.GET_WIN_SIZE_PIXELS);
                break;
              case 16:
                this._onRequestWindowsOptionsReport.fire(y.GET_CELL_SIZE_PIXELS);
                break;
              case 18:
                this._bufferService && this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
                break;
              case 22:
                0 !== t && 2 !== t || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), 0 !== t && 1 !== t || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
                break;
              case 23:
                0 !== t && 2 !== t || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), 0 !== t && 1 !== t || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
            }
            return !0;
          }
          saveCursor(e) {
            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(e) {
            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(e) {
            return this._windowTitle = e, this._onTitleChange.fire(e), !0;
          }
          setIconName(e) {
            return this._iconName = e, !0;
          }
          setOrReportIndexedColor(e) {
            const t = [],
              i = e.split(";");
            for (; i.length > 1;) {
              const e = i.shift(),
                s = i.shift();
              if (/^\d+$/.exec(e)) {
                const i = parseInt(e);
                if (D(i)) if ("?" === s) t.push({
                  type: 0,
                  index: i
                });else {
                  const e = (0, S.parseColor)(s);
                  e && t.push({
                    type: 1,
                    index: i,
                    color: e
                  });
                }
              }
            }
            return t.length && this._onColor.fire(t), !0;
          }
          setHyperlink(e) {
            const t = e.split(";");
            return !(t.length < 2) && (t[1] ? this._createHyperlink(t[0], t[1]) : !t[0] && this._finishHyperlink());
          }
          _createHyperlink(e, t) {
            this._getCurrentLinkId() && this._finishHyperlink();
            const i = e.split(":");
            let s;
            const r = i.findIndex(e => e.startsWith("id="));
            return -1 !== r && (s = i[r].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({
              id: s,
              uri: t
            }), this._curAttrData.updateExtended(), !0;
          }
          _finishHyperlink() {
            return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), !0;
          }
          _setOrReportSpecialColor(e, t) {
            const i = e.split(";");
            for (let e = 0; e < i.length && !(t >= this._specialColors.length); ++e, ++t) if ("?" === i[e]) this._onColor.fire([{
              type: 0,
              index: this._specialColors[t]
            }]);else {
              const s = (0, S.parseColor)(i[e]);
              s && this._onColor.fire([{
                type: 1,
                index: this._specialColors[t],
                color: s
              }]);
            }
            return !0;
          }
          setOrReportFgColor(e) {
            return this._setOrReportSpecialColor(e, 0);
          }
          setOrReportBgColor(e) {
            return this._setOrReportSpecialColor(e, 1);
          }
          setOrReportCursorColor(e) {
            return this._setOrReportSpecialColor(e, 2);
          }
          restoreIndexedColor(e) {
            if (!e) return this._onColor.fire([{
              type: 2
            }]), !0;
            const t = [],
              i = e.split(";");
            for (let e = 0; e < i.length; ++e) if (/^\d+$/.exec(i[e])) {
              const s = parseInt(i[e]);
              D(s) && t.push({
                type: 2,
                index: s
              });
            }
            return t.length && this._onColor.fire(t), !0;
          }
          restoreFgColor(e) {
            return this._onColor.fire([{
              type: 2,
              index: 256
            }]), !0;
          }
          restoreBgColor(e) {
            return this._onColor.fire([{
              type: 2,
              index: 257
            }]), !0;
          }
          restoreCursorColor(e) {
            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, o.DEFAULT_CHARSET), !0;
          }
          selectCharset(e) {
            return 2 !== e.length ? (this.selectDefaultCharset(), !0) : ("/" === e[0] || this._charsetService.setgCharset(C[e[0]], o.CHARSETS[e[1]] || o.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 e = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
              this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, e, 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 = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone();
          }
          _eraseAttrData() {
            return this._eraseAttrDataInternal.bg &= -67108864, this._eraseAttrDataInternal.bg |= 67108863 & this._curAttrData.bg, this._eraseAttrDataInternal;
          }
          setgLevel(e) {
            return this._charsetService.setgLevel(e), !0;
          }
          screenAlignmentPattern() {
            const e = new u.CellData();
            e.content = 1 << 22 | "E".charCodeAt(0), e.fg = this._curAttrData.fg, e.bg = this._curAttrData.bg, this._setCursor(0, 0);
            for (let t = 0; t < this._bufferService.rows; ++t) {
              const i = this._activeBuffer.ybase + this._activeBuffer.y + t,
                s = this._activeBuffer.lines.get(i);
              s && (s.fill(e), s.isWrapped = !1);
            }
            return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), !0;
          }
          requestStatusString(e, t) {
            const i = this._bufferService.buffer,
              s = this._optionsService.rawOptions;
            return (e => (this._coreService.triggerDataEvent(`${n.C0.ESC}${e}${n.C0.ESC}\\`), !0))('"q' === e ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : '"p' === e ? 'P1$r61;1"p' : "r" === e ? `P1$r${i.scrollTop + 1};${i.scrollBottom + 1}r` : "m" === e ? "P1$r0m" : " q" === e ? `P1$r${{
              block: 2,
              underline: 4,
              bar: 6
            }[s.cursorStyle] - (s.cursorBlink ? 1 : 0)} q` : "P0$r");
          }
          markRangeDirty(e, t) {
            this._dirtyRowTracker.markRangeDirty(e, t);
          }
        }
        t.InputHandler = k;
        let L = class {
          constructor(e) {
            this._bufferService = e, this.clearRange();
          }
          clearRange() {
            this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
          }
          markDirty(e) {
            e < this.start ? this.start = e : e > this.end && (this.end = e);
          }
          markRangeDirty(e, t) {
            e > t && (E = e, e = t, t = E), e < this.start && (this.start = e), t > this.end && (this.end = t);
          }
          markAllDirty() {
            this.markRangeDirty(0, this._bufferService.rows - 1);
          }
        };
        function D(e) {
          return 0 <= e && e < 256;
        }
        L = s([r(0, v.IBufferService)], L);
      },
      844: (e, t) => {
        function i(e) {
          for (const t of e) t.dispose();
          e.length = 0;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.MutableDisposable = t.Disposable = void 0, t.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const e of this._disposables) e.dispose();
            this._disposables.length = 0;
          }
          register(e) {
            return this._disposables.push(e), e;
          }
          unregister(e) {
            const t = this._disposables.indexOf(e);
            -1 !== t && this._disposables.splice(t, 1);
          }
        }, t.MutableDisposable = class {
          constructor() {
            this._isDisposed = !1;
          }
          get value() {
            return this._isDisposed ? void 0 : this._value;
          }
          set value(e) {
            this._isDisposed || e === this._value || (this._value?.dispose(), this._value = e);
          }
          clear() {
            this.value = void 0;
          }
          dispose() {
            this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
          }
        }, t.toDisposable = function (e) {
          return {
            dispose: e
          };
        }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
          return {
            dispose: () => i(e)
          };
        };
      },
      1505: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.FourKeyMap = t.TwoKeyMap = void 0;
        class i {
          constructor() {
            this._data = {};
          }
          set(e, t, i) {
            this._data[e] || (this._data[e] = {}), this._data[e][t] = i;
          }
          get(e, t) {
            return this._data[e] ? this._data[e][t] : void 0;
          }
          clear() {
            this._data = {};
          }
        }
        t.TwoKeyMap = i, t.FourKeyMap = class {
          constructor() {
            this._data = new i();
          }
          set(e, t, s, r, n) {
            this._data.get(e, t) || this._data.set(e, t, new i()), this._data.get(e, t).set(s, r, n);
          }
          get(e, t, i, s) {
            return this._data.get(e, t)?.get(i, s);
          }
          clear() {
            this._data.clear();
          }
        };
      },
      6114: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" != typeof process;
        const i = t.isNode ? "node" : navigator.userAgent,
          s = t.isNode ? "node" : navigator.platform;
        t.isFirefox = i.includes("Firefox"), t.isLegacyEdge = i.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(i), t.getSafariVersion = function () {
          if (!t.isSafari) return 0;
          const e = i.match(/Version\/(\d+)/);
          return null === e || e.length < 2 ? 0 : parseInt(e[1]);
        }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s), t.isIpad = "iPad" === s, t.isIphone = "iPhone" === s, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s), t.isLinux = s.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(i);
      },
      6106: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.SortedList = void 0;
        let i = 0;
        t.SortedList = class {
          constructor(e) {
            this._getKey = e, this._array = [];
          }
          clear() {
            this._array.length = 0;
          }
          insert(e) {
            0 !== this._array.length ? (i = this._search(this._getKey(e)), this._array.splice(i, 0, e)) : this._array.push(e);
          }
          delete(e) {
            if (0 === this._array.length) return !1;
            const t = this._getKey(e);
            if (void 0 === t) return !1;
            if (i = this._search(t), -1 === i) return !1;
            if (this._getKey(this._array[i]) !== t) return !1;
            do {
              if (this._array[i] === e) return this._array.splice(i, 1), !0;
            } while (++i < this._array.length && this._getKey(this._array[i]) === t);
            return !1;
          }
          *getKeyIterator(e) {
            if (0 !== this._array.length && (i = this._search(e), !(i < 0 || i >= this._array.length) && this._getKey(this._array[i]) === e)) do {
              yield this._array[i];
            } while (++i < this._array.length && this._getKey(this._array[i]) === e);
          }
          forEachByKey(e, t) {
            if (0 !== this._array.length && (i = this._search(e), !(i < 0 || i >= this._array.length) && this._getKey(this._array[i]) === e)) do {
              t(this._array[i]);
            } while (++i < this._array.length && this._getKey(this._array[i]) === e);
          }
          values() {
            return [...this._array].values();
          }
          _search(e) {
            let t = 0,
              i = this._array.length - 1;
            for (; i >= t;) {
              let s = t + i >> 1;
              const r = this._getKey(this._array[s]);
              if (r > e) i = s - 1;else {
                if (!(r < e)) {
                  for (; s > 0 && this._getKey(this._array[s - 1]) === e;) s--;
                  return s;
                }
                t = s + 1;
              }
            }
            return t;
          }
        };
      },
      7226: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DebouncedIdleTask = t.IdleTaskQueue = t.PriorityTaskQueue = void 0;
        const s = i(6114);
        class r {
          constructor() {
            this._tasks = [], this._i = 0;
          }
          enqueue(e) {
            this._tasks.push(e), 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(e) {
            this._idleCallback = void 0;
            let t = 0,
              i = 0,
              s = e.timeRemaining(),
              r = 0;
            for (; this._i < this._tasks.length;) {
              if (t = Date.now(), this._tasks[this._i]() || this._i++, t = Math.max(1, Date.now() - t), i = Math.max(t, i), r = e.timeRemaining(), 1.5 * i > r) return s - t < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - t))}ms`), void this._start();
              s = r;
            }
            this.clear();
          }
        }
        class n extends r {
          _requestCallback(e) {
            return setTimeout(() => e(this._createDeadline(16)));
          }
          _cancelCallback(e) {
            clearTimeout(e);
          }
          _createDeadline(e) {
            const t = Date.now() + e;
            return {
              timeRemaining: () => Math.max(0, t - Date.now())
            };
          }
        }
        t.PriorityTaskQueue = n, t.IdleTaskQueue = !s.isNode && "requestIdleCallback" in window ? class extends r {
          _requestCallback(e) {
            return requestIdleCallback(e);
          }
          _cancelCallback(e) {
            cancelIdleCallback(e);
          }
        } : n, t.DebouncedIdleTask = class {
          constructor() {
            this._queue = new t.IdleTaskQueue();
          }
          set(e) {
            this._queue.clear(), this._queue.enqueue(e);
          }
          flush() {
            this._queue.flush();
          }
        };
      },
      9282: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.updateWindowsModeWrappedState = void 0;
        const s = i(643);
        t.updateWindowsModeWrappedState = function (e) {
          const t = e.buffer.lines.get(e.buffer.ybase + e.buffer.y - 1),
            i = t?.get(e.cols - 1),
            r = e.buffer.lines.get(e.buffer.ybase + e.buffer.y);
          r && i && (r.isWrapped = i[s.CHAR_DATA_CODE_INDEX] !== s.NULL_CELL_CODE && i[s.CHAR_DATA_CODE_INDEX] !== s.WHITESPACE_CELL_CODE);
        };
      },
      3734: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ExtendedAttrs = t.AttributeData = void 0;
        class i {
          constructor() {
            this.fg = 0, this.bg = 0, this.extended = new s();
          }
          static toColorRGB(e) {
            return [e >>> 16 & 255, e >>> 8 & 255, 255 & e];
          }
          static fromColorRGB(e) {
            return (255 & e[0]) << 16 | (255 & e[1]) << 8 | 255 & e[2];
          }
          clone() {
            const e = new i();
            return e.fg = this.fg, e.bg = this.bg, e.extended = this.extended.clone(), e;
          }
          isInverse() {
            return 67108864 & this.fg;
          }
          isBold() {
            return 134217728 & this.fg;
          }
          isUnderline() {
            return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 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;
          }
          isOverline() {
            return 1073741824 & this.bg;
          }
          getFgColorMode() {
            return 50331648 & this.fg;
          }
          getBgColorMode() {
            return 50331648 & this.bg;
          }
          isFgRGB() {
            return 50331648 == (50331648 & this.fg);
          }
          isBgRGB() {
            return 50331648 == (50331648 & this.bg);
          }
          isFgPalette() {
            return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
          }
          isBgPalette() {
            return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
          }
          isFgDefault() {
            return 0 == (50331648 & this.fg);
          }
          isBgDefault() {
            return 0 == (50331648 & this.bg);
          }
          isAttributeDefault() {
            return 0 === this.fg && 0 === this.bg;
          }
          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 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
          }
          isUnderlineColorPalette() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
          }
          isUnderlineColorDefault() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
          }
          getUnderlineStyle() {
            return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
          }
          getUnderlineVariantOffset() {
            return this.extended.underlineVariantOffset;
          }
        }
        t.AttributeData = i;
        class s {
          get ext() {
            return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
          }
          set ext(e) {
            this._ext = e;
          }
          get underlineStyle() {
            return this._urlId ? 5 : (469762048 & this._ext) >> 26;
          }
          set underlineStyle(e) {
            this._ext &= -469762049, this._ext |= e << 26 & 469762048;
          }
          get underlineColor() {
            return 67108863 & this._ext;
          }
          set underlineColor(e) {
            this._ext &= -67108864, this._ext |= 67108863 & e;
          }
          get urlId() {
            return this._urlId;
          }
          set urlId(e) {
            this._urlId = e;
          }
          get underlineVariantOffset() {
            const e = (3758096384 & this._ext) >> 29;
            return e < 0 ? 4294967288 ^ e : e;
          }
          set underlineVariantOffset(e) {
            this._ext &= 536870911, this._ext |= e << 29 & 3758096384;
          }
          constructor(e = 0, t = 0) {
            this._ext = 0, this._urlId = 0, this._ext = e, this._urlId = t;
          }
          clone() {
            return new s(this._ext, this._urlId);
          }
          isEmpty() {
            return 0 === this.underlineStyle && 0 === this._urlId;
          }
        }
        t.ExtendedAttrs = s;
      },
      9092: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Buffer = t.MAX_BUFFER_SIZE = void 0;
        const s = i(6349),
          r = i(7226),
          n = i(3734),
          o = i(8437),
          a = i(4634),
          h = i(511),
          c = i(643),
          l = i(4863),
          d = i(7116);
        t.MAX_BUFFER_SIZE = 4294967295, t.Buffer = class {
          constructor(e, t, i) {
            this._hasScrollback = e, this._optionsService = t, this._bufferService = i, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = o.DEFAULT_ATTR_DATA.clone(), this.savedCharset = d.DEFAULT_CHARSET, this.markers = [], this._nullCell = h.CellData.fromCharData([0, c.NULL_CELL_CHAR, c.NULL_CELL_WIDTH, c.NULL_CELL_CODE]), this._whitespaceCell = h.CellData.fromCharData([0, c.WHITESPACE_CELL_CHAR, c.WHITESPACE_CELL_WIDTH, c.WHITESPACE_CELL_CODE]), this._isClearing = !1, this._memoryCleanupQueue = new r.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new s.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
          }
          getNullCell(e) {
            return e ? (this._nullCell.fg = e.fg, this._nullCell.bg = e.bg, this._nullCell.extended = e.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new n.ExtendedAttrs()), this._nullCell;
          }
          getWhitespaceCell(e) {
            return e ? (this._whitespaceCell.fg = e.fg, this._whitespaceCell.bg = e.bg, this._whitespaceCell.extended = e.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new n.ExtendedAttrs()), this._whitespaceCell;
          }
          getBlankLine(e, t) {
            return new o.BufferLine(this._bufferService.cols, this.getNullCell(e), t);
          }
          get hasScrollback() {
            return this._hasScrollback && this.lines.maxLength > this._rows;
          }
          get isCursorInViewport() {
            const e = this.ybase + this.y - this.ydisp;
            return e >= 0 && e < this._rows;
          }
          _getCorrectBufferLength(e) {
            if (!this._hasScrollback) return e;
            const i = e + this._optionsService.rawOptions.scrollback;
            return i > t.MAX_BUFFER_SIZE ? t.MAX_BUFFER_SIZE : i;
          }
          fillViewportRows(e) {
            if (0 === this.lines.length) {
              void 0 === e && (e = o.DEFAULT_ATTR_DATA);
              let t = this._rows;
              for (; t--;) this.lines.push(this.getBlankLine(e));
            }
          }
          clear() {
            this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new s.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
          }
          resize(e, t) {
            const i = this.getNullCell(o.DEFAULT_ATTR_DATA);
            let s = 0;
            const r = this._getCorrectBufferLength(t);
            if (r > this.lines.maxLength && (this.lines.maxLength = r), this.lines.length > 0) {
              if (this._cols < e) for (let t = 0; t < this.lines.length; t++) s += +this.lines.get(t).resize(e, i);
              let n = 0;
              if (this._rows < t) for (let s = this._rows; s < t; s++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsMode || void 0 !== this._optionsService.rawOptions.windowsPty.backend || void 0 !== this._optionsService.rawOptions.windowsPty.buildNumber ? this.lines.push(new o.BufferLine(e, i)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + n + 1 ? (this.ybase--, n++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new o.BufferLine(e, i)));else for (let e = this._rows; e > t; e--) this.lines.length > t + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
              if (r < this.lines.maxLength) {
                const e = this.lines.length - r;
                e > 0 && (this.lines.trimStart(e), this.ybase = Math.max(this.ybase - e, 0), this.ydisp = Math.max(this.ydisp - e, 0), this.savedY = Math.max(this.savedY - e, 0)), this.lines.maxLength = r;
              }
              this.x = Math.min(this.x, e - 1), this.y = Math.min(this.y, t - 1), n && (this.y += n), this.savedX = Math.min(this.savedX, e - 1), this.scrollTop = 0;
            }
            if (this.scrollBottom = t - 1, this._isReflowEnabled && (this._reflow(e, t), this._cols > e)) for (let t = 0; t < this.lines.length; t++) s += +this.lines.get(t).resize(e, i);
            this._cols = e, this._rows = t, this._memoryCleanupQueue.clear(), s > .1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
          }
          _batchedMemoryCleanup() {
            let e = !0;
            this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, e = !1);
            let t = 0;
            for (; this._memoryCleanupPosition < this.lines.length;) if (t += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), t > 100) return !0;
            return e;
          }
          get _isReflowEnabled() {
            const e = this._optionsService.rawOptions.windowsPty;
            return e && e.buildNumber ? this._hasScrollback && "conpty" === e.backend && e.buildNumber >= 21376 : this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
          }
          _reflow(e, t) {
            this._cols !== e && (e > this._cols ? this._reflowLarger(e, t) : this._reflowSmaller(e, t));
          }
          _reflowLarger(e, t) {
            const i = (0, a.reflowLargerGetLinesToRemove)(this.lines, this._cols, e, this.ybase + this.y, this.getNullCell(o.DEFAULT_ATTR_DATA));
            if (i.length > 0) {
              const s = (0, a.reflowLargerCreateNewLayout)(this.lines, i);
              (0, a.reflowLargerApplyNewLayout)(this.lines, s.layout), this._reflowLargerAdjustViewport(e, t, s.countRemoved);
            }
          }
          _reflowLargerAdjustViewport(e, t, i) {
            const s = this.getNullCell(o.DEFAULT_ATTR_DATA);
            let r = i;
            for (; r-- > 0;) 0 === this.ybase ? (this.y > 0 && this.y--, this.lines.length < t && this.lines.push(new o.BufferLine(e, s))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
            this.savedY = Math.max(this.savedY - i, 0);
          }
          _reflowSmaller(e, t) {
            const i = this.getNullCell(o.DEFAULT_ATTR_DATA),
              s = [];
            let r = 0;
            for (let n = this.lines.length - 1; n >= 0; n--) {
              let h = this.lines.get(n);
              if (!h || !h.isWrapped && h.getTrimmedLength() <= e) continue;
              const c = [h];
              for (; h.isWrapped && n > 0;) h = this.lines.get(--n), c.unshift(h);
              const l = this.ybase + this.y;
              if (l >= n && l < n + c.length) continue;
              const d = c[c.length - 1].getTrimmedLength(),
                _ = (0, a.reflowSmallerGetNewLineLengths)(c, this._cols, e),
                u = _.length - c.length;
              let f;
              f = 0 === this.ybase && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + u) : Math.max(0, this.lines.length - this.lines.maxLength + u);
              const v = [];
              for (let e = 0; e < u; e++) {
                const e = this.getBlankLine(o.DEFAULT_ATTR_DATA, !0);
                v.push(e);
              }
              v.length > 0 && (s.push({
                start: n + c.length + r,
                newLines: v
              }), r += v.length), c.push(...v);
              let p = _.length - 1,
                g = _[p];
              0 === g && (p--, g = _[p]);
              let m = c.length - u - 1,
                S = d;
              for (; m >= 0;) {
                const e = Math.min(S, g);
                if (void 0 === c[p]) break;
                if (c[p].copyCellsFrom(c[m], S - e, g - e, e, !0), g -= e, 0 === g && (p--, g = _[p]), S -= e, 0 === S) {
                  m--;
                  const e = Math.max(m, 0);
                  S = (0, a.getWrappedLineTrimmedLength)(c, e, this._cols);
                }
              }
              for (let t = 0; t < c.length; t++) _[t] < e && c[t].setCell(_[t], i);
              let C = u - f;
              for (; C-- > 0;) 0 === this.ybase ? this.y < t - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + r) - t && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
              this.savedY = Math.min(this.savedY + u, this.ybase + t - 1);
            }
            if (s.length > 0) {
              const e = [],
                t = [];
              for (let e = 0; e < this.lines.length; e++) t.push(this.lines.get(e));
              const i = this.lines.length;
              let n = i - 1,
                o = 0,
                a = s[o];
              this.lines.length = Math.min(this.lines.maxLength, this.lines.length + r);
              let h = 0;
              for (let c = Math.min(this.lines.maxLength - 1, i + r - 1); c >= 0; c--) if (a && a.start > n + h) {
                for (let e = a.newLines.length - 1; e >= 0; e--) this.lines.set(c--, a.newLines[e]);
                c++, e.push({
                  index: n + 1,
                  amount: a.newLines.length
                }), h += a.newLines.length, a = s[++o];
              } else this.lines.set(c, t[n--]);
              let c = 0;
              for (let t = e.length - 1; t >= 0; t--) e[t].index += c, this.lines.onInsertEmitter.fire(e[t]), c += e[t].amount;
              const l = Math.max(0, i + r - this.lines.maxLength);
              l > 0 && this.lines.onTrimEmitter.fire(l);
            }
          }
          translateBufferLineToString(e, t, i = 0, s) {
            const r = this.lines.get(e);
            return r ? r.translateToString(t, i, s) : "";
          }
          getWrappedRangeForLine(e) {
            let t = e,
              i = e;
            for (; t > 0 && this.lines.get(t).isWrapped;) t--;
            for (; i + 1 < this.lines.length && this.lines.get(i + 1).isWrapped;) i++;
            return {
              first: t,
              last: i
            };
          }
          setupTabStops(e) {
            for (null != e ? this.tabs[e] || (e = this.prevStop(e)) : (this.tabs = {}, e = 0); e < this._cols; e += this._optionsService.rawOptions.tabStopWidth) this.tabs[e] = !0;
          }
          prevStop(e) {
            for (null == e && (e = this.x); !this.tabs[--e] && e > 0;);
            return e >= this._cols ? this._cols - 1 : e < 0 ? 0 : e;
          }
          nextStop(e) {
            for (null == e && (e = this.x); !this.tabs[++e] && e < this._cols;);
            return e >= this._cols ? this._cols - 1 : e < 0 ? 0 : e;
          }
          clearMarkers(e) {
            this._isClearing = !0;
            for (let t = 0; t < this.markers.length; t++) this.markers[t].line === e && (this.markers[t].dispose(), this.markers.splice(t--, 1));
            this._isClearing = !1;
          }
          clearAllMarkers() {
            this._isClearing = !0;
            for (let e = 0; e < this.markers.length; e++) this.markers[e].dispose(), this.markers.splice(e--, 1);
            this._isClearing = !1;
          }
          addMarker(e) {
            const t = new l.Marker(e);
            return this.markers.push(t), t.register(this.lines.onTrim(e => {
              t.line -= e, t.line < 0 && t.dispose();
            })), t.register(this.lines.onInsert(e => {
              t.line >= e.index && (t.line += e.amount);
            })), t.register(this.lines.onDelete(e => {
              t.line >= e.index && t.line < e.index + e.amount && t.dispose(), t.line > e.index && (t.line -= e.amount);
            })), t.register(t.onDispose(() => this._removeMarker(t))), t;
          }
          _removeMarker(e) {
            this._isClearing || this.markers.splice(this.markers.indexOf(e), 1);
          }
        };
      },
      8437: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferLine = t.DEFAULT_ATTR_DATA = void 0;
        const s = i(3734),
          r = i(511),
          n = i(643),
          o = i(482);
        t.DEFAULT_ATTR_DATA = Object.freeze(new s.AttributeData());
        let a = 0;
        class h {
          constructor(e, t, i = !1) {
            this.isWrapped = i, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e);
            const s = t || r.CellData.fromCharData([0, n.NULL_CELL_CHAR, n.NULL_CELL_WIDTH, n.NULL_CELL_CODE]);
            for (let t = 0; t < e; ++t) this.setCell(t, s);
            this.length = e;
          }
          get(e) {
            const t = this._data[3 * e + 0],
              i = 2097151 & t;
            return [this._data[3 * e + 1], 2097152 & t ? this._combined[e] : i ? (0, o.stringFromCodePoint)(i) : "", t >> 22, 2097152 & t ? this._combined[e].charCodeAt(this._combined[e].length - 1) : i];
          }
          set(e, t) {
            this._data[3 * e + 1] = t[n.CHAR_DATA_ATTR_INDEX], t[n.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e] = t[1], this._data[3 * e + 0] = 2097152 | e | t[n.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e + 0] = t[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | t[n.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 t = this._data[3 * e + 0];
            return 2097152 & t ? this._combined[e].charCodeAt(this._combined[e].length - 1) : 2097151 & t;
          }
          isCombined(e) {
            return 2097152 & this._data[3 * e + 0];
          }
          getString(e) {
            const t = this._data[3 * e + 0];
            return 2097152 & t ? this._combined[e] : 2097151 & t ? (0, o.stringFromCodePoint)(2097151 & t) : "";
          }
          isProtected(e) {
            return 536870912 & this._data[3 * e + 2];
          }
          loadCell(e, t) {
            return a = 3 * e, t.content = this._data[a + 0], t.fg = this._data[a + 1], t.bg = this._data[a + 2], 2097152 & t.content && (t.combinedData = this._combined[e]), 268435456 & t.bg && (t.extended = this._extendedAttrs[e]), t;
          }
          setCell(e, t) {
            2097152 & t.content && (this._combined[e] = t.combinedData), 268435456 & t.bg && (this._extendedAttrs[e] = t.extended), this._data[3 * e + 0] = t.content, this._data[3 * e + 1] = t.fg, this._data[3 * e + 2] = t.bg;
          }
          setCellFromCodepoint(e, t, i, s) {
            268435456 & s.bg && (this._extendedAttrs[e] = s.extended), this._data[3 * e + 0] = t | i << 22, this._data[3 * e + 1] = s.fg, this._data[3 * e + 2] = s.bg;
          }
          addCodepointToCell(e, t, i) {
            let s = this._data[3 * e + 0];
            2097152 & s ? this._combined[e] += (0, o.stringFromCodePoint)(t) : 2097151 & s ? (this._combined[e] = (0, o.stringFromCodePoint)(2097151 & s) + (0, o.stringFromCodePoint)(t), s &= -2097152, s |= 2097152) : s = t | 1 << 22, i && (s &= -12582913, s |= i << 22), this._data[3 * e + 0] = s;
          }
          insertCells(e, t, i) {
            if ((e %= this.length) && 2 === this.getWidth(e - 1) && this.setCellFromCodepoint(e - 1, 0, 1, i), t < this.length - e) {
              const s = new r.CellData();
              for (let i = this.length - e - t - 1; i >= 0; --i) this.setCell(e + t + i, this.loadCell(e + i, s));
              for (let s = 0; s < t; ++s) this.setCell(e + s, i);
            } else for (let t = e; t < this.length; ++t) this.setCell(t, i);
            2 === this.getWidth(this.length - 1) && this.setCellFromCodepoint(this.length - 1, 0, 1, i);
          }
          deleteCells(e, t, i) {
            if (e %= this.length, t < this.length - e) {
              const s = new r.CellData();
              for (let i = 0; i < this.length - e - t; ++i) this.setCell(e + i, this.loadCell(e + t + i, s));
              for (let e = this.length - t; e < this.length; ++e) this.setCell(e, i);
            } else for (let t = e; t < this.length; ++t) this.setCell(t, i);
            e && 2 === this.getWidth(e - 1) && this.setCellFromCodepoint(e - 1, 0, 1, i), 0 !== this.getWidth(e) || this.hasContent(e) || this.setCellFromCodepoint(e, 0, 1, i);
          }
          replaceCells(e, t, i, s = !1) {
            if (s) for (e && 2 === this.getWidth(e - 1) && !this.isProtected(e - 1) && this.setCellFromCodepoint(e - 1, 0, 1, i), t < this.length && 2 === this.getWidth(t - 1) && !this.isProtected(t) && this.setCellFromCodepoint(t, 0, 1, i); e < t && e < this.length;) this.isProtected(e) || this.setCell(e, i), e++;else for (e && 2 === this.getWidth(e - 1) && this.setCellFromCodepoint(e - 1, 0, 1, i), t < this.length && 2 === this.getWidth(t - 1) && this.setCellFromCodepoint(t, 0, 1, i); e < t && e < this.length;) this.setCell(e++, i);
          }
          resize(e, t) {
            if (e === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
            const i = 3 * e;
            if (e > this.length) {
              if (this._data.buffer.byteLength >= 4 * i) this._data = new Uint32Array(this._data.buffer, 0, i);else {
                const e = new Uint32Array(i);
                e.set(this._data), this._data = e;
              }
              for (let i = this.length; i < e; ++i) this.setCell(i, t);
            } else {
              this._data = this._data.subarray(0, i);
              const t = Object.keys(this._combined);
              for (let i = 0; i < t.length; i++) {
                const s = parseInt(t[i], 10);
                s >= e && delete this._combined[s];
              }
              const s = Object.keys(this._extendedAttrs);
              for (let t = 0; t < s.length; t++) {
                const i = parseInt(s[t], 10);
                i >= e && delete this._extendedAttrs[i];
              }
            }
            return this.length = e, 4 * i * 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, t = !1) {
            if (t) for (let t = 0; t < this.length; ++t) this.isProtected(t) || this.setCell(t, e);else {
              this._combined = {}, this._extendedAttrs = {};
              for (let t = 0; t < this.length; ++t) this.setCell(t, 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 t in e._combined) this._combined[t] = e._combined[t];
            this._extendedAttrs = {};
            for (const t in e._extendedAttrs) this._extendedAttrs[t] = e._extendedAttrs[t];
            this.isWrapped = e.isWrapped;
          }
          clone() {
            const e = new h(0);
            e._data = new Uint32Array(this._data), e.length = this.length;
            for (const t in this._combined) e._combined[t] = this._combined[t];
            for (const t in this._extendedAttrs) e._extendedAttrs[t] = this._extendedAttrs[t];
            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;
          }
          getNoBgTrimmedLength() {
            for (let e = this.length - 1; e >= 0; --e) if (4194303 & this._data[3 * e + 0] || 50331648 & this._data[3 * e + 2]) return e + (this._data[3 * e + 0] >> 22);
            return 0;
          }
          copyCellsFrom(e, t, i, s, r) {
            const n = e._data;
            if (r) for (let r = s - 1; r >= 0; r--) {
              for (let e = 0; e < 3; e++) this._data[3 * (i + r) + e] = n[3 * (t + r) + e];
              268435456 & n[3 * (t + r) + 2] && (this._extendedAttrs[i + r] = e._extendedAttrs[t + r]);
            } else for (let r = 0; r < s; r++) {
              for (let e = 0; e < 3; e++) this._data[3 * (i + r) + e] = n[3 * (t + r) + e];
              268435456 & n[3 * (t + r) + 2] && (this._extendedAttrs[i + r] = e._extendedAttrs[t + r]);
            }
            const o = Object.keys(e._combined);
            for (let s = 0; s < o.length; s++) {
              const r = parseInt(o[s], 10);
              r >= t && (this._combined[r - t + i] = e._combined[r]);
            }
          }
          translateToString(e, t, i, s) {
            t = t ?? 0, i = i ?? this.length, e && (i = Math.min(i, this.getTrimmedLength())), s && (s.length = 0);
            let r = "";
            for (; t < i;) {
              const e = this._data[3 * t + 0],
                i = 2097151 & e,
                a = 2097152 & e ? this._combined[t] : i ? (0, o.stringFromCodePoint)(i) : n.WHITESPACE_CELL_CHAR;
              if (r += a, s) for (let e = 0; e < a.length; ++e) s.push(t);
              t += e >> 22 || 1;
            }
            return s && s.push(t), r;
          }
        }
        t.BufferLine = h;
      },
      4841: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getRangeLength = void 0, t.getRangeLength = function (e, t) {
          if (e.start.y > e.end.y) throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);
          return t * (e.end.y - e.start.y) + (e.end.x - e.start.x + 1);
        };
      },
      4634: (e, t) => {
        function i(e, t, i) {
          if (t === e.length - 1) return e[t].getTrimmedLength();
          const s = !e[t].hasContent(i - 1) && 1 === e[t].getWidth(i - 1),
            r = 2 === e[t + 1].getWidth(0);
          return s && r ? i - 1 : i;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getWrappedLineTrimmedLength = t.reflowSmallerGetNewLineLengths = t.reflowLargerApplyNewLayout = t.reflowLargerCreateNewLayout = t.reflowLargerGetLinesToRemove = void 0, t.reflowLargerGetLinesToRemove = function (e, t, s, r, n) {
          const o = [];
          for (let a = 0; a < e.length - 1; a++) {
            let h = a,
              c = e.get(++h);
            if (!c.isWrapped) continue;
            const l = [e.get(a)];
            for (; h < e.length && c.isWrapped;) l.push(c), c = e.get(++h);
            if (r >= a && r < h) {
              a += l.length - 1;
              continue;
            }
            let d = 0,
              _ = i(l, d, t),
              u = 1,
              f = 0;
            for (; u < l.length;) {
              const e = i(l, u, t),
                r = e - f,
                o = s - _,
                a = Math.min(r, o);
              l[d].copyCellsFrom(l[u], f, _, a, !1), _ += a, _ === s && (d++, _ = 0), f += a, f === e && (u++, f = 0), 0 === _ && 0 !== d && 2 === l[d - 1].getWidth(s - 1) && (l[d].copyCellsFrom(l[d - 1], s - 1, _++, 1, !1), l[d - 1].setCell(s - 1, n));
            }
            l[d].replaceCells(_, s, n);
            let v = 0;
            for (let e = l.length - 1; e > 0 && (e > d || 0 === l[e].getTrimmedLength()); e--) v++;
            v > 0 && (o.push(a + l.length - v), o.push(v)), a += l.length - 1;
          }
          return o;
        }, t.reflowLargerCreateNewLayout = function (e, t) {
          const i = [];
          let s = 0,
            r = t[s],
            n = 0;
          for (let o = 0; o < e.length; o++) if (r === o) {
            const i = t[++s];
            e.onDeleteEmitter.fire({
              index: o - n,
              amount: i
            }), o += i - 1, n += i, r = t[++s];
          } else i.push(o);
          return {
            layout: i,
            countRemoved: n
          };
        }, t.reflowLargerApplyNewLayout = function (e, t) {
          const i = [];
          for (let s = 0; s < t.length; s++) i.push(e.get(t[s]));
          for (let t = 0; t < i.length; t++) e.set(t, i[t]);
          e.length = t.length;
        }, t.reflowSmallerGetNewLineLengths = function (e, t, s) {
          const r = [],
            n = e.map((s, r) => i(e, r, t)).reduce((e, t) => e + t);
          let o = 0,
            a = 0,
            h = 0;
          for (; h < n;) {
            if (n - h < s) {
              r.push(n - h);
              break;
            }
            o += s;
            const c = i(e, a, t);
            o > c && (o -= c, a++);
            const l = 2 === e[a].getWidth(o - 1);
            l && o--;
            const d = l ? s - 1 : s;
            r.push(d), h += d;
          }
          return r;
        }, t.getWrappedLineTrimmedLength = i;
      },
      5295: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferSet = void 0;
        const s = i(8460),
          r = i(844),
          n = i(9092);
        class o extends r.Disposable {
          constructor(e, t) {
            super(), this._optionsService = e, this._bufferService = t, this._onBufferActivate = this.register(new s.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 n.Buffer(!0, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new n.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(e) {
            this._activeBuffer !== this._alt && (this._alt.fillViewportRows(e), 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(e, t) {
            this._normal.resize(e, t), this._alt.resize(e, t), this.setupTabStops(e);
          }
          setupTabStops(e) {
            this._normal.setupTabStops(e), this._alt.setupTabStops(e);
          }
        }
        t.BufferSet = o;
      },
      511: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellData = void 0;
        const s = i(482),
          r = i(643),
          n = i(3734);
        class o extends n.AttributeData {
          constructor() {
            super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new n.ExtendedAttrs(), this.combinedData = "";
          }
          static fromCharData(e) {
            const t = new o();
            return t.setFromCharData(e), t;
          }
          isCombined() {
            return 2097152 & this.content;
          }
          getWidth() {
            return this.content >> 22;
          }
          getChars() {
            return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s.stringFromCodePoint)(2097151 & this.content) : "";
          }
          getCode() {
            return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
          }
          setFromCharData(e) {
            this.fg = e[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
            let t = !1;
            if (e[r.CHAR_DATA_CHAR_INDEX].length > 2) t = !0;else if (2 === e[r.CHAR_DATA_CHAR_INDEX].length) {
              const i = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
              if (55296 <= i && i <= 56319) {
                const s = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                56320 <= s && s <= 57343 ? this.content = 1024 * (i - 55296) + s - 56320 + 65536 | e[r.CHAR_DATA_WIDTH_INDEX] << 22 : t = !0;
              } else t = !0;
            } else this.content = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e[r.CHAR_DATA_WIDTH_INDEX] << 22;
            t && (this.combinedData = e[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e[r.CHAR_DATA_WIDTH_INDEX] << 22);
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.CellData = o;
      },
      643: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
      },
      4863: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Marker = void 0;
        const s = i(8460),
          r = i(844);
        class n {
          get id() {
            return this._id;
          }
          constructor(e) {
            this.line = e, this.isDisposed = !1, this._disposables = [], this._id = n._nextId++, this._onDispose = this.register(new s.EventEmitter()), this.onDispose = this._onDispose.event;
          }
          dispose() {
            this.isDisposed || (this.isDisposed = !0, this.line = -1, this._onDispose.fire(), (0, r.disposeArray)(this._disposables), this._disposables.length = 0);
          }
          register(e) {
            return this._disposables.push(e), e;
          }
        }
        t.Marker = n, n._nextId = 1;
      },
      7116: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DEFAULT_CHARSET = t.CHARSETS = void 0, t.CHARSETS = {}, t.DEFAULT_CHARSET = t.CHARSETS.B, t.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: "≥",
          "{": "π",
          "|": "≠",
          "}": "£",
          "~": "·"
        }, t.CHARSETS.A = {
          "#": "£"
        }, t.CHARSETS.B = void 0, t.CHARSETS[4] = {
          "#": "£",
          "@": "¾",
          "[": "ij",
          "\\": "½",
          "]": "|",
          "{": "¨",
          "|": "f",
          "}": "¼",
          "~": "´"
        }, t.CHARSETS.C = t.CHARSETS[5] = {
          "[": "Ä",
          "\\": "Ö",
          "]": "Å",
          "^": "Ü",
          "`": "é",
          "{": "ä",
          "|": "ö",
          "}": "å",
          "~": "ü"
        }, t.CHARSETS.R = {
          "#": "£",
          "@": "à",
          "[": "°",
          "\\": "ç",
          "]": "§",
          "{": "é",
          "|": "ù",
          "}": "è",
          "~": "¨"
        }, t.CHARSETS.Q = {
          "@": "à",
          "[": "â",
          "\\": "ç",
          "]": "ê",
          "^": "î",
          "`": "ô",
          "{": "é",
          "|": "ù",
          "}": "è",
          "~": "û"
        }, t.CHARSETS.K = {
          "@": "§",
          "[": "Ä",
          "\\": "Ö",
          "]": "Ü",
          "{": "ä",
          "|": "ö",
          "}": "ü",
          "~": "ß"
        }, t.CHARSETS.Y = {
          "#": "£",
          "@": "§",
          "[": "°",
          "\\": "ç",
          "]": "é",
          "`": "ù",
          "{": "à",
          "|": "ò",
          "}": "è",
          "~": "ì"
        }, t.CHARSETS.E = t.CHARSETS[6] = {
          "@": "Ä",
          "[": "Æ",
          "\\": "Ø",
          "]": "Å",
          "^": "Ü",
          "`": "ä",
          "{": "æ",
          "|": "ø",
          "}": "å",
          "~": "ü"
        }, t.CHARSETS.Z = {
          "#": "£",
          "@": "§",
          "[": "¡",
          "\\": "Ñ",
          "]": "¿",
          "{": "°",
          "|": "ñ",
          "}": "ç"
        }, t.CHARSETS.H = t.CHARSETS[7] = {
          "@": "É",
          "[": "Ä",
          "\\": "Ö",
          "]": "Å",
          "^": "Ü",
          "`": "é",
          "{": "ä",
          "|": "ö",
          "}": "å",
          "~": "ü"
        }, t.CHARSETS["="] = {
          "#": "ù",
          "@": "à",
          "[": "é",
          "\\": "ç",
          "]": "ê",
          "^": "î",
          _: "è",
          "`": "ô",
          "{": "ä",
          "|": "ö",
          "}": "ü",
          "~": "û"
        };
      },
      2584: (e, t) => {
        var i, s, r;
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.C1_ESCAPED = t.C1 = t.C0 = void 0, function (e) {
          e.NUL = "\0", e.SOH = "", e.STX = "", e.ETX = "", e.EOT = "", e.ENQ = "", e.ACK = "", e.BEL = "", e.BS = "\b", e.HT = "\t", e.LF = "\n", e.VT = "\v", e.FF = "\f", e.CR = "\r", e.SO = "", e.SI = "", e.DLE = "", e.DC1 = "", e.DC2 = "", e.DC3 = "", e.DC4 = "", e.NAK = "", e.SYN = "", e.ETB = "", e.CAN = "", e.EM = "", e.SUB = "", e.ESC = "", e.FS = "", e.GS = "", e.RS = "", e.US = "", e.SP = " ", e.DEL = "";
        }(i || (t.C0 = i = {})), function (e) {
          e.PAD = "", e.HOP = "", e.BPH = "", e.NBH = "", e.IND = "", e.NEL = "", e.SSA = "", e.ESA = "", e.HTS = "", e.HTJ = "", e.VTS = "", e.PLD = "", e.PLU = "", e.RI = "", e.SS2 = "", e.SS3 = "", e.DCS = "", e.PU1 = "", e.PU2 = "", e.STS = "", e.CCH = "", e.MW = "", e.SPA = "", e.EPA = "", e.SOS = "", e.SGCI = "", e.SCI = "", e.CSI = "", e.ST = "", e.OSC = "", e.PM = "", e.APC = "";
        }(s || (t.C1 = s = {})), function (e) {
          e.ST = `${i.ESC}\\`;
        }(r || (t.C1_ESCAPED = r = {}));
      },
      7399: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.evaluateKeyboardEvent = void 0;
        const s = i(2584),
          r = {
            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: ["'", '"']
          };
        t.evaluateKeyboardEvent = function (e, t, i, n) {
          const o = {
              type: 0,
              cancel: !1,
              key: void 0
            },
            a = (e.shiftKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.ctrlKey ? 4 : 0) | (e.metaKey ? 8 : 0);
          switch (e.keyCode) {
            case 0:
              "UIKeyInputUpArrow" === e.key ? o.key = t ? s.C0.ESC + "OA" : s.C0.ESC + "[A" : "UIKeyInputLeftArrow" === e.key ? o.key = t ? s.C0.ESC + "OD" : s.C0.ESC + "[D" : "UIKeyInputRightArrow" === e.key ? o.key = t ? s.C0.ESC + "OC" : s.C0.ESC + "[C" : "UIKeyInputDownArrow" === e.key && (o.key = t ? s.C0.ESC + "OB" : s.C0.ESC + "[B");
              break;
            case 8:
              o.key = e.ctrlKey ? "\b" : s.C0.DEL, e.altKey && (o.key = s.C0.ESC + o.key);
              break;
            case 9:
              if (e.shiftKey) {
                o.key = s.C0.ESC + "[Z";
                break;
              }
              o.key = s.C0.HT, o.cancel = !0;
              break;
            case 13:
              o.key = e.altKey ? s.C0.ESC + s.C0.CR : s.C0.CR, o.cancel = !0;
              break;
            case 27:
              o.key = s.C0.ESC, e.altKey && (o.key = s.C0.ESC + s.C0.ESC), o.cancel = !0;
              break;
            case 37:
              if (e.metaKey) break;
              a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "D", o.key === s.C0.ESC + "[1;3D" && (o.key = s.C0.ESC + (i ? "b" : "[1;5D"))) : o.key = t ? s.C0.ESC + "OD" : s.C0.ESC + "[D";
              break;
            case 39:
              if (e.metaKey) break;
              a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "C", o.key === s.C0.ESC + "[1;3C" && (o.key = s.C0.ESC + (i ? "f" : "[1;5C"))) : o.key = t ? s.C0.ESC + "OC" : s.C0.ESC + "[C";
              break;
            case 38:
              if (e.metaKey) break;
              a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "A", i || o.key !== s.C0.ESC + "[1;3A" || (o.key = s.C0.ESC + "[1;5A")) : o.key = t ? s.C0.ESC + "OA" : s.C0.ESC + "[A";
              break;
            case 40:
              if (e.metaKey) break;
              a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "B", i || o.key !== s.C0.ESC + "[1;3B" || (o.key = s.C0.ESC + "[1;5B")) : o.key = t ? s.C0.ESC + "OB" : s.C0.ESC + "[B";
              break;
            case 45:
              e.shiftKey || e.ctrlKey || (o.key = s.C0.ESC + "[2~");
              break;
            case 46:
              o.key = a ? s.C0.ESC + "[3;" + (a + 1) + "~" : s.C0.ESC + "[3~";
              break;
            case 36:
              o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "H" : t ? s.C0.ESC + "OH" : s.C0.ESC + "[H";
              break;
            case 35:
              o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "F" : t ? s.C0.ESC + "OF" : s.C0.ESC + "[F";
              break;
            case 33:
              e.shiftKey ? o.type = 2 : e.ctrlKey ? o.key = s.C0.ESC + "[5;" + (a + 1) + "~" : o.key = s.C0.ESC + "[5~";
              break;
            case 34:
              e.shiftKey ? o.type = 3 : e.ctrlKey ? o.key = s.C0.ESC + "[6;" + (a + 1) + "~" : o.key = s.C0.ESC + "[6~";
              break;
            case 112:
              o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "P" : s.C0.ESC + "OP";
              break;
            case 113:
              o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "Q" : s.C0.ESC + "OQ";
              break;
            case 114:
              o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "R" : s.C0.ESC + "OR";
              break;
            case 115:
              o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "S" : s.C0.ESC + "OS";
              break;
            case 116:
              o.key = a ? s.C0.ESC + "[15;" + (a + 1) + "~" : s.C0.ESC + "[15~";
              break;
            case 117:
              o.key = a ? s.C0.ESC + "[17;" + (a + 1) + "~" : s.C0.ESC + "[17~";
              break;
            case 118:
              o.key = a ? s.C0.ESC + "[18;" + (a + 1) + "~" : s.C0.ESC + "[18~";
              break;
            case 119:
              o.key = a ? s.C0.ESC + "[19;" + (a + 1) + "~" : s.C0.ESC + "[19~";
              break;
            case 120:
              o.key = a ? s.C0.ESC + "[20;" + (a + 1) + "~" : s.C0.ESC + "[20~";
              break;
            case 121:
              o.key = a ? s.C0.ESC + "[21;" + (a + 1) + "~" : s.C0.ESC + "[21~";
              break;
            case 122:
              o.key = a ? s.C0.ESC + "[23;" + (a + 1) + "~" : s.C0.ESC + "[23~";
              break;
            case 123:
              o.key = a ? s.C0.ESC + "[24;" + (a + 1) + "~" : s.C0.ESC + "[24~";
              break;
            default:
              if (!e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) {
                if (i && !n || !e.altKey || e.metaKey) !i || e.altKey || e.ctrlKey || e.shiftKey || !e.metaKey ? e.key && !e.ctrlKey && !e.altKey && !e.metaKey && e.keyCode >= 48 && 1 === e.key.length ? o.key = e.key : e.key && e.ctrlKey && ("_" === e.key && (o.key = s.C0.US), "@" === e.key && (o.key = s.C0.NUL)) : 65 === e.keyCode && (o.type = 1);else {
                  const t = r[e.keyCode],
                    i = t?.[e.shiftKey ? 1 : 0];
                  if (i) o.key = s.C0.ESC + i;else if (e.keyCode >= 65 && e.keyCode <= 90) {
                    const t = e.ctrlKey ? e.keyCode - 64 : e.keyCode + 32;
                    let i = String.fromCharCode(t);
                    e.shiftKey && (i = i.toUpperCase()), o.key = s.C0.ESC + i;
                  } else if (32 === e.keyCode) o.key = s.C0.ESC + (e.ctrlKey ? s.C0.NUL : " ");else if ("Dead" === e.key && e.code.startsWith("Key")) {
                    let t = e.code.slice(3, 4);
                    e.shiftKey || (t = t.toLowerCase()), o.key = s.C0.ESC + t, o.cancel = !0;
                  }
                }
              } else e.keyCode >= 65 && e.keyCode <= 90 ? o.key = String.fromCharCode(e.keyCode - 64) : 32 === e.keyCode ? o.key = s.C0.NUL : e.keyCode >= 51 && e.keyCode <= 55 ? o.key = String.fromCharCode(e.keyCode - 51 + 27) : 56 === e.keyCode ? o.key = s.C0.DEL : 219 === e.keyCode ? o.key = s.C0.ESC : 220 === e.keyCode ? o.key = s.C0.FS : 221 === e.keyCode && (o.key = s.C0.GS);
          }
          return o;
        };
      },
      482: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Utf8ToUtf32 = t.StringToUtf32 = t.utf32ToString = t.stringFromCodePoint = void 0, t.stringFromCodePoint = function (e) {
          return e > 65535 ? (e -= 65536, String.fromCharCode(55296 + (e >> 10)) + String.fromCharCode(e % 1024 + 56320)) : String.fromCharCode(e);
        }, t.utf32ToString = function (e, t = 0, i = e.length) {
          let s = "";
          for (let r = t; r < i; ++r) {
            let t = e[r];
            t > 65535 ? (t -= 65536, s += String.fromCharCode(55296 + (t >> 10)) + String.fromCharCode(t % 1024 + 56320)) : s += String.fromCharCode(t);
          }
          return s;
        }, t.StringToUtf32 = class {
          constructor() {
            this._interim = 0;
          }
          clear() {
            this._interim = 0;
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s = 0,
              r = 0;
            if (this._interim) {
              const i = e.charCodeAt(r++);
              56320 <= i && i <= 57343 ? t[s++] = 1024 * (this._interim - 55296) + i - 56320 + 65536 : (t[s++] = this._interim, t[s++] = i), this._interim = 0;
            }
            for (let n = r; n < i; ++n) {
              const r = e.charCodeAt(n);
              if (55296 <= r && r <= 56319) {
                if (++n >= i) return this._interim = r, s;
                const o = e.charCodeAt(n);
                56320 <= o && o <= 57343 ? t[s++] = 1024 * (r - 55296) + o - 56320 + 65536 : (t[s++] = r, t[s++] = o);
              } else 65279 !== r && (t[s++] = r);
            }
            return s;
          }
        }, t.Utf8ToUtf32 = class {
          constructor() {
            this.interim = new Uint8Array(3);
          }
          clear() {
            this.interim.fill(0);
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s,
              r,
              n,
              o,
              a = 0,
              h = 0,
              c = 0;
            if (this.interim[0]) {
              let s = !1,
                r = this.interim[0];
              r &= 192 == (224 & r) ? 31 : 224 == (240 & r) ? 15 : 7;
              let n,
                o = 0;
              for (; (n = 63 & this.interim[++o]) && o < 4;) r <<= 6, r |= n;
              const h = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4,
                l = h - o;
              for (; c < l;) {
                if (c >= i) return 0;
                if (n = e[c++], 128 != (192 & n)) {
                  c--, s = !0;
                  break;
                }
                this.interim[o++] = n, r <<= 6, r |= 63 & n;
              }
              s || (2 === h ? r < 128 ? c-- : t[a++] = r : 3 === h ? r < 2048 || r >= 55296 && r <= 57343 || 65279 === r || (t[a++] = r) : r < 65536 || r > 1114111 || (t[a++] = r)), this.interim.fill(0);
            }
            const l = i - 4;
            let d = c;
            for (; d < i;) {
              for (; !(!(d < l) || 128 & (s = e[d]) || 128 & (r = e[d + 1]) || 128 & (n = e[d + 2]) || 128 & (o = e[d + 3]));) t[a++] = s, t[a++] = r, t[a++] = n, t[a++] = o, d += 4;
              if (s = e[d++], s < 128) t[a++] = s;else if (192 == (224 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (h = (31 & s) << 6 | 63 & r, h < 128) {
                  d--;
                  continue;
                }
                t[a++] = h;
              } else if (224 == (240 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (n = e[d++], 128 != (192 & n)) {
                  d--;
                  continue;
                }
                if (h = (15 & s) << 12 | (63 & r) << 6 | 63 & n, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
                t[a++] = h;
              } else if (240 == (248 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (n = e[d++], 128 != (192 & n)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, this.interim[2] = n, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (h = (7 & s) << 18 | (63 & r) << 12 | (63 & n) << 6 | 63 & o, h < 65536 || h > 1114111) continue;
                t[a++] = h;
              }
            }
            return a;
          }
        };
      },
      225: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.UnicodeV6 = void 0;
        const s = i(1480),
          r = [[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]],
          n = [[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 o;
        t.UnicodeV6 = class {
          constructor() {
            if (this.version = "6", !o) {
              o = new Uint8Array(65536), o.fill(1), o[0] = 0, o.fill(0, 1, 32), o.fill(0, 127, 160), o.fill(2, 4352, 4448), o[9001] = 2, o[9002] = 2, o.fill(2, 11904, 42192), o[12351] = 1, o.fill(2, 44032, 55204), o.fill(2, 63744, 64256), o.fill(2, 65040, 65050), o.fill(2, 65072, 65136), o.fill(2, 65280, 65377), o.fill(2, 65504, 65511);
              for (let e = 0; e < r.length; ++e) o.fill(0, r[e][0], r[e][1] + 1);
            }
          }
          wcwidth(e) {
            return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ? o[e] : function (e, t) {
              let i,
                s = 0,
                r = t.length - 1;
              if (e < t[0][0] || e > t[r][1]) return !1;
              for (; r >= s;) if (i = s + r >> 1, e > t[i][1]) s = i + 1;else {
                if (!(e < t[i][0])) return !0;
                r = i - 1;
              }
              return !1;
            }(e, n) ? 0 : e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141 ? 2 : 1;
          }
          charProperties(e, t) {
            let i = this.wcwidth(e),
              r = 0 === i && 0 !== t;
            if (r) {
              const e = s.UnicodeService.extractWidth(t);
              0 === e ? r = !1 : e > i && (i = e);
            }
            return s.UnicodeService.createPropertyValue(0, i, r);
          }
        };
      },
      5981: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.WriteBuffer = void 0;
        const s = i(8460),
          r = i(844);
        class n extends r.Disposable {
          constructor(e) {
            super(), this._action = e, this._writeBuffer = [], this._callbacks = [], this._pendingData = 0, this._bufferOffset = 0, this._isSyncWriting = !1, this._syncCalls = 0, this._didUserInput = !1, this._onWriteParsed = this.register(new s.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event;
          }
          handleUserInput() {
            this._didUserInput = !0;
          }
          writeSync(e, t) {
            if (void 0 !== t && this._syncCalls > t) return void (this._syncCalls = 0);
            if (this._pendingData += e.length, this._writeBuffer.push(e), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting) return;
            let i;
            for (this._isSyncWriting = !0; i = this._writeBuffer.shift();) {
              this._action(i);
              const e = this._callbacks.shift();
              e && e();
            }
            this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = !1, this._syncCalls = 0;
          }
          write(e, t) {
            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 += e.length, this._writeBuffer.push(e), this._callbacks.push(t), void this._innerWrite();
              setTimeout(() => this._innerWrite());
            }
            this._pendingData += e.length, this._writeBuffer.push(e), this._callbacks.push(t);
          }
          _innerWrite(e = 0, t = !0) {
            const i = e || Date.now();
            for (; this._writeBuffer.length > this._bufferOffset;) {
              const e = this._writeBuffer[this._bufferOffset],
                s = this._action(e, t);
              if (s) {
                const e = e => Date.now() - i >= 12 ? setTimeout(() => this._innerWrite(0, e)) : this._innerWrite(i, e);
                return void s.catch(e => (queueMicrotask(() => {
                  throw e;
                }), Promise.resolve(!1))).then(e);
              }
              const r = this._callbacks[this._bufferOffset];
              if (r && r(), this._bufferOffset++, this._pendingData -= e.length, Date.now() - i >= 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();
          }
        }
        t.WriteBuffer = n;
      },
      5941: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.toRgbString = t.parseColor = void 0;
        const i = /^([\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})$/,
          s = /^[\da-f]+$/;
        function r(e, t) {
          const i = e.toString(16),
            s = i.length < 2 ? "0" + i : i;
          switch (t) {
            case 4:
              return i[0];
            case 8:
              return s;
            case 12:
              return (s + s).slice(0, 3);
            default:
              return s + s;
          }
        }
        t.parseColor = function (e) {
          if (!e) return;
          let t = e.toLowerCase();
          if (0 === t.indexOf("rgb:")) {
            t = t.slice(4);
            const e = i.exec(t);
            if (e) {
              const t = e[1] ? 15 : e[4] ? 255 : e[7] ? 4095 : 65535;
              return [Math.round(parseInt(e[1] || e[4] || e[7] || e[10], 16) / t * 255), Math.round(parseInt(e[2] || e[5] || e[8] || e[11], 16) / t * 255), Math.round(parseInt(e[3] || e[6] || e[9] || e[12], 16) / t * 255)];
            }
          } else if (0 === t.indexOf("#") && (t = t.slice(1), s.exec(t) && [3, 6, 9, 12].includes(t.length))) {
            const e = t.length / 3,
              i = [0, 0, 0];
            for (let s = 0; s < 3; ++s) {
              const r = parseInt(t.slice(e * s, e * s + e), 16);
              i[s] = 1 === e ? r << 4 : 2 === e ? r : 3 === e ? r >> 4 : r >> 8;
            }
            return i;
          }
        }, t.toRgbString = function (e, t = 16) {
          const [i, s, n] = e;
          return `rgb:${r(i, t)}/${r(s, t)}/${r(n, t)}`;
        };
      },
      5770: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.PAYLOAD_LIMIT = void 0, t.PAYLOAD_LIMIT = 1e7;
      },
      6351: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DcsHandler = t.DcsParser = void 0;
        const s = i(482),
          r = i(8742),
          n = i(5770),
          o = [];
        t.DcsParser = class {
          constructor() {
            this._handlers = Object.create(null), this._active = o, this._ident = 0, this._handlerFb = () => {}, this._stack = {
              paused: !1,
              loopPosition: 0,
              fallThrough: !1
            };
          }
          dispose() {
            this._handlers = Object.create(null), this._handlerFb = () => {}, this._active = o;
          }
          registerHandler(e, t) {
            void 0 === this._handlers[e] && (this._handlers[e] = []);
            const i = this._handlers[e];
            return i.push(t), {
              dispose: () => {
                const e = i.indexOf(t);
                -1 !== e && i.splice(e, 1);
              }
            };
          }
          clearHandler(e) {
            this._handlers[e] && delete this._handlers[e];
          }
          setHandlerFallback(e) {
            this._handlerFb = e;
          }
          reset() {
            if (this._active.length) for (let e = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e >= 0; --e) this._active[e].unhook(!1);
            this._stack.paused = !1, this._active = o, this._ident = 0;
          }
          hook(e, t) {
            if (this.reset(), this._ident = e, this._active = this._handlers[e] || o, this._active.length) for (let e = this._active.length - 1; e >= 0; e--) this._active[e].hook(t);else this._handlerFb(this._ident, "HOOK", t);
          }
          put(e, t, i) {
            if (this._active.length) for (let s = this._active.length - 1; s >= 0; s--) this._active[s].put(e, t, i);else this._handlerFb(this._ident, "PUT", (0, s.utf32ToString)(e, t, i));
          }
          unhook(e, t = !0) {
            if (this._active.length) {
              let i = !1,
                s = this._active.length - 1,
                r = !1;
              if (this._stack.paused && (s = this._stack.loopPosition - 1, i = t, r = this._stack.fallThrough, this._stack.paused = !1), !r && !1 === i) {
                for (; s >= 0 && (i = this._active[s].unhook(e), !0 !== i); s--) if (i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !1, i;
                s--;
              }
              for (; s >= 0; s--) if (i = this._active[s].unhook(!1), i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !0, i;
            } else this._handlerFb(this._ident, "UNHOOK", e);
            this._active = o, this._ident = 0;
          }
        };
        const a = new r.Params();
        a.addParam(0), t.DcsHandler = class {
          constructor(e) {
            this._handler = e, this._data = "", this._params = a, this._hitLimit = !1;
          }
          hook(e) {
            this._params = e.length > 1 || e.params[0] ? e.clone() : a, this._data = "", this._hitLimit = !1;
          }
          put(e, t, i) {
            this._hitLimit || (this._data += (0, s.utf32ToString)(e, t, i), this._data.length > n.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
          }
          unhook(e) {
            let t = !1;
            if (this._hitLimit) t = !1;else if (e && (t = this._handler(this._data, this._params), t instanceof Promise)) return t.then(e => (this._params = a, this._data = "", this._hitLimit = !1, e));
            return this._params = a, this._data = "", this._hitLimit = !1, t;
          }
        };
      },
      2015: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.EscapeSequenceParser = t.VT500_TRANSITION_TABLE = t.TransitionTable = void 0;
        const s = i(844),
          r = i(8742),
          n = i(6242),
          o = i(6351);
        class a {
          constructor(e) {
            this.table = new Uint8Array(e);
          }
          setDefault(e, t) {
            this.table.fill(e << 4 | t);
          }
          add(e, t, i, s) {
            this.table[t << 8 | e] = i << 4 | s;
          }
          addMany(e, t, i, s) {
            for (let r = 0; r < e.length; r++) this.table[t << 8 | e[r]] = i << 4 | s;
          }
        }
        t.TransitionTable = a;
        const h = 160;
        t.VT500_TRANSITION_TABLE = function () {
          const e = new a(4095),
            t = Array.apply(null, Array(256)).map((e, t) => t),
            i = (e, i) => t.slice(e, i),
            s = i(32, 127),
            r = i(0, 24);
          r.push(25), r.push.apply(r, i(28, 32));
          const n = i(0, 14);
          let o;
          for (o in e.setDefault(1, 0), e.addMany(s, 0, 2, 0), n) e.addMany([24, 26, 153, 154], o, 3, 0), e.addMany(i(128, 144), o, 3, 0), e.addMany(i(144, 152), o, 3, 0), e.add(156, o, 0, 0), e.add(27, o, 11, 1), e.add(157, o, 4, 8), e.addMany([152, 158, 159], o, 0, 7), e.add(155, o, 11, 3), e.add(144, o, 11, 9);
          return e.addMany(r, 0, 3, 0), e.addMany(r, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(r, 8, 0, 8), e.addMany(r, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(r, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(r, 6, 3, 6), e.addMany(r, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(r, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(s, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(i(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(s, 7, 0, 7), e.addMany(r, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(i(64, 127), 3, 7, 0), e.addMany(i(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(i(48, 60), 4, 8, 4), e.addMany(i(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(i(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(i(64, 127), 6, 0, 0), e.addMany(i(32, 48), 3, 9, 5), e.addMany(i(32, 48), 5, 9, 5), e.addMany(i(48, 64), 5, 0, 6), e.addMany(i(64, 127), 5, 7, 0), e.addMany(i(32, 48), 4, 9, 5), e.addMany(i(32, 48), 1, 9, 2), e.addMany(i(32, 48), 2, 9, 2), e.addMany(i(48, 127), 2, 10, 0), e.addMany(i(48, 80), 1, 10, 0), e.addMany(i(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(i(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(r, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(i(28, 32), 9, 0, 9), e.addMany(i(32, 48), 9, 9, 12), e.addMany(i(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(r, 11, 0, 11), e.addMany(i(32, 128), 11, 0, 11), e.addMany(i(28, 32), 11, 0, 11), e.addMany(r, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(i(28, 32), 10, 0, 10), e.addMany(i(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(i(32, 48), 10, 9, 12), e.addMany(r, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(i(28, 32), 12, 0, 12), e.addMany(i(32, 48), 12, 9, 12), e.addMany(i(48, 64), 12, 0, 11), e.addMany(i(64, 127), 12, 12, 13), e.addMany(i(64, 127), 10, 12, 13), e.addMany(i(64, 127), 9, 12, 13), e.addMany(r, 13, 13, 13), e.addMany(s, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(h, 0, 2, 0), e.add(h, 8, 5, 8), e.add(h, 6, 0, 6), e.add(h, 11, 0, 11), e.add(h, 13, 13, 13), e;
        }();
        class c extends s.Disposable {
          constructor(e = t.VT500_TRANSITION_TABLE) {
            super(), this._transitions = e, this._parseStack = {
              state: 0,
              handlers: [],
              handlerPos: 0,
              transition: 0,
              chunkPos: 0
            }, this.initialState = 0, this.currentState = this.initialState, this._params = new r.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (e, t, i) => {}, this._executeHandlerFb = e => {}, this._csiHandlerFb = (e, t) => {}, this._escHandlerFb = e => {}, this._errorHandlerFb = e => e, this._printHandler = this._printHandlerFb, this._executeHandlers = Object.create(null), this._csiHandlers = Object.create(null), this._escHandlers = Object.create(null), this.register((0, s.toDisposable)(() => {
              this._csiHandlers = Object.create(null), this._executeHandlers = Object.create(null), this._escHandlers = Object.create(null);
            })), this._oscParser = this.register(new n.OscParser()), this._dcsParser = this.register(new o.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({
              final: "\\"
            }, () => !0);
          }
          _identifier(e, t = [64, 126]) {
            let i = 0;
            if (e.prefix) {
              if (e.prefix.length > 1) throw new Error("only one byte as prefix supported");
              if (i = e.prefix.charCodeAt(0), i && 60 > i || i > 63) throw new Error("prefix must be in range 0x3c .. 0x3f");
            }
            if (e.intermediates) {
              if (e.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
              for (let t = 0; t < e.intermediates.length; ++t) {
                const s = e.intermediates.charCodeAt(t);
                if (32 > s || s > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
                i <<= 8, i |= s;
              }
            }
            if (1 !== e.final.length) throw new Error("final must be a single byte");
            const s = e.final.charCodeAt(0);
            if (t[0] > s || s > t[1]) throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);
            return i <<= 8, i |= s, i;
          }
          identToString(e) {
            const t = [];
            for (; e;) t.push(String.fromCharCode(255 & e)), e >>= 8;
            return t.reverse().join("");
          }
          setPrintHandler(e) {
            this._printHandler = e;
          }
          clearPrintHandler() {
            this._printHandler = this._printHandlerFb;
          }
          registerEscHandler(e, t) {
            const i = this._identifier(e, [48, 126]);
            void 0 === this._escHandlers[i] && (this._escHandlers[i] = []);
            const s = this._escHandlers[i];
            return s.push(t), {
              dispose: () => {
                const e = s.indexOf(t);
                -1 !== e && s.splice(e, 1);
              }
            };
          }
          clearEscHandler(e) {
            this._escHandlers[this._identifier(e, [48, 126])] && delete this._escHandlers[this._identifier(e, [48, 126])];
          }
          setEscHandlerFallback(e) {
            this._escHandlerFb = e;
          }
          setExecuteHandler(e, t) {
            this._executeHandlers[e.charCodeAt(0)] = t;
          }
          clearExecuteHandler(e) {
            this._executeHandlers[e.charCodeAt(0)] && delete this._executeHandlers[e.charCodeAt(0)];
          }
          setExecuteHandlerFallback(e) {
            this._executeHandlerFb = e;
          }
          registerCsiHandler(e, t) {
            const i = this._identifier(e);
            void 0 === this._csiHandlers[i] && (this._csiHandlers[i] = []);
            const s = this._csiHandlers[i];
            return s.push(t), {
              dispose: () => {
                const e = s.indexOf(t);
                -1 !== e && s.splice(e, 1);
              }
            };
          }
          clearCsiHandler(e) {
            this._csiHandlers[this._identifier(e)] && delete this._csiHandlers[this._identifier(e)];
          }
          setCsiHandlerFallback(e) {
            this._csiHandlerFb = e;
          }
          registerDcsHandler(e, t) {
            return this._dcsParser.registerHandler(this._identifier(e), t);
          }
          clearDcsHandler(e) {
            this._dcsParser.clearHandler(this._identifier(e));
          }
          setDcsHandlerFallback(e) {
            this._dcsParser.setHandlerFallback(e);
          }
          registerOscHandler(e, t) {
            return this._oscParser.registerHandler(e, t);
          }
          clearOscHandler(e) {
            this._oscParser.clearHandler(e);
          }
          setOscHandlerFallback(e) {
            this._oscParser.setHandlerFallback(e);
          }
          setErrorHandler(e) {
            this._errorHandler = e;
          }
          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.precedingJoinState = 0, 0 !== this._parseStack.state && (this._parseStack.state = 2, this._parseStack.handlers = []);
          }
          _preserveStack(e, t, i, s, r) {
            this._parseStack.state = e, this._parseStack.handlers = t, this._parseStack.handlerPos = i, this._parseStack.transition = s, this._parseStack.chunkPos = r;
          }
          parse(e, t, i) {
            let s,
              r = 0,
              n = 0,
              o = 0;
            if (this._parseStack.state) if (2 === this._parseStack.state) this._parseStack.state = 0, o = this._parseStack.chunkPos + 1;else {
              if (void 0 === i || 1 === this._parseStack.state) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
              const t = this._parseStack.handlers;
              let n = this._parseStack.handlerPos - 1;
              switch (this._parseStack.state) {
                case 3:
                  if (!1 === i && n > -1) for (; n >= 0 && (s = t[n](this._params), !0 !== s); n--) if (s instanceof Promise) return this._parseStack.handlerPos = n, s;
                  this._parseStack.handlers = [];
                  break;
                case 4:
                  if (!1 === i && n > -1) for (; n >= 0 && (s = t[n](), !0 !== s); n--) if (s instanceof Promise) return this._parseStack.handlerPos = n, s;
                  this._parseStack.handlers = [];
                  break;
                case 6:
                  if (r = e[this._parseStack.chunkPos], s = this._dcsParser.unhook(24 !== r && 26 !== r, i), s) return s;
                  27 === r && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
                  break;
                case 5:
                  if (r = e[this._parseStack.chunkPos], s = this._oscParser.end(24 !== r && 26 !== r, i), s) return s;
                  27 === r && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
              }
              this._parseStack.state = 0, o = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
            }
            for (let i = o; i < t; ++i) {
              switch (r = e[i], n = this._transitions.table[this.currentState << 8 | (r < 160 ? r : h)], n >> 4) {
                case 2:
                  for (let s = i + 1;; ++s) {
                    if (s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                      this._printHandler(e, i, s), i = s - 1;
                      break;
                    }
                    if (++s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                      this._printHandler(e, i, s), i = s - 1;
                      break;
                    }
                    if (++s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                      this._printHandler(e, i, s), i = s - 1;
                      break;
                    }
                    if (++s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                      this._printHandler(e, i, s), i = s - 1;
                      break;
                    }
                  }
                  break;
                case 3:
                  this._executeHandlers[r] ? this._executeHandlers[r]() : this._executeHandlerFb(r), this.precedingJoinState = 0;
                  break;
                case 0:
                  break;
                case 1:
                  if (this._errorHandler({
                    position: i,
                    code: r,
                    currentState: this.currentState,
                    collect: this._collect,
                    params: this._params,
                    abort: !1
                  }).abort) return;
                  break;
                case 7:
                  const o = this._csiHandlers[this._collect << 8 | r];
                  let a = o ? o.length - 1 : -1;
                  for (; a >= 0 && (s = o[a](this._params), !0 !== s); a--) if (s instanceof Promise) return this._preserveStack(3, o, a, n, i), s;
                  a < 0 && this._csiHandlerFb(this._collect << 8 | r, this._params), this.precedingJoinState = 0;
                  break;
                case 8:
                  do {
                    switch (r) {
                      case 59:
                        this._params.addParam(0);
                        break;
                      case 58:
                        this._params.addSubParam(-1);
                        break;
                      default:
                        this._params.addDigit(r - 48);
                    }
                  } while (++i < t && (r = e[i]) > 47 && r < 60);
                  i--;
                  break;
                case 9:
                  this._collect <<= 8, this._collect |= r;
                  break;
                case 10:
                  const c = this._escHandlers[this._collect << 8 | r];
                  let l = c ? c.length - 1 : -1;
                  for (; l >= 0 && (s = c[l](), !0 !== s); l--) if (s instanceof Promise) return this._preserveStack(4, c, l, n, i), s;
                  l < 0 && this._escHandlerFb(this._collect << 8 | r), this.precedingJoinState = 0;
                  break;
                case 11:
                  this._params.reset(), this._params.addParam(0), this._collect = 0;
                  break;
                case 12:
                  this._dcsParser.hook(this._collect << 8 | r, this._params);
                  break;
                case 13:
                  for (let s = i + 1;; ++s) if (s >= t || 24 === (r = e[s]) || 26 === r || 27 === r || r > 127 && r < h) {
                    this._dcsParser.put(e, i, s), i = s - 1;
                    break;
                  }
                  break;
                case 14:
                  if (s = this._dcsParser.unhook(24 !== r && 26 !== r), s) return this._preserveStack(6, [], 0, n, i), s;
                  27 === r && (n |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
                  break;
                case 4:
                  this._oscParser.start();
                  break;
                case 5:
                  for (let s = i + 1;; s++) if (s >= t || (r = e[s]) < 32 || r > 127 && r < h) {
                    this._oscParser.put(e, i, s), i = s - 1;
                    break;
                  }
                  break;
                case 6:
                  if (s = this._oscParser.end(24 !== r && 26 !== r), s) return this._preserveStack(5, [], 0, n, i), s;
                  27 === r && (n |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
              }
              this.currentState = 15 & n;
            }
          }
        }
        t.EscapeSequenceParser = c;
      },
      6242: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.OscHandler = t.OscParser = void 0;
        const s = i(5770),
          r = i(482),
          n = [];
        t.OscParser = class {
          constructor() {
            this._state = 0, this._active = n, this._id = -1, this._handlers = Object.create(null), this._handlerFb = () => {}, this._stack = {
              paused: !1,
              loopPosition: 0,
              fallThrough: !1
            };
          }
          registerHandler(e, t) {
            void 0 === this._handlers[e] && (this._handlers[e] = []);
            const i = this._handlers[e];
            return i.push(t), {
              dispose: () => {
                const e = i.indexOf(t);
                -1 !== e && i.splice(e, 1);
              }
            };
          }
          clearHandler(e) {
            this._handlers[e] && delete this._handlers[e];
          }
          setHandlerFallback(e) {
            this._handlerFb = e;
          }
          dispose() {
            this._handlers = Object.create(null), this._handlerFb = () => {}, this._active = n;
          }
          reset() {
            if (2 === this._state) for (let e = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e >= 0; --e) this._active[e].end(!1);
            this._stack.paused = !1, this._active = n, this._id = -1, this._state = 0;
          }
          _start() {
            if (this._active = this._handlers[this._id] || n, this._active.length) for (let e = this._active.length - 1; e >= 0; e--) this._active[e].start();else this._handlerFb(this._id, "START");
          }
          _put(e, t, i) {
            if (this._active.length) for (let s = this._active.length - 1; s >= 0; s--) this._active[s].put(e, t, i);else this._handlerFb(this._id, "PUT", (0, r.utf32ToString)(e, t, i));
          }
          start() {
            this.reset(), this._state = 1;
          }
          put(e, t, i) {
            if (3 !== this._state) {
              if (1 === this._state) for (; t < i;) {
                const i = e[t++];
                if (59 === i) {
                  this._state = 2, this._start();
                  break;
                }
                if (i < 48 || 57 < i) return void (this._state = 3);
                -1 === this._id && (this._id = 0), this._id = 10 * this._id + i - 48;
              }
              2 === this._state && i - t > 0 && this._put(e, t, i);
            }
          }
          end(e, t = !0) {
            if (0 !== this._state) {
              if (3 !== this._state) if (1 === this._state && this._start(), this._active.length) {
                let i = !1,
                  s = this._active.length - 1,
                  r = !1;
                if (this._stack.paused && (s = this._stack.loopPosition - 1, i = t, r = this._stack.fallThrough, this._stack.paused = !1), !r && !1 === i) {
                  for (; s >= 0 && (i = this._active[s].end(e), !0 !== i); s--) if (i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !1, i;
                  s--;
                }
                for (; s >= 0; s--) if (i = this._active[s].end(!1), i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !0, i;
              } else this._handlerFb(this._id, "END", e);
              this._active = n, this._id = -1, this._state = 0;
            }
          }
        }, t.OscHandler = class {
          constructor(e) {
            this._handler = e, this._data = "", this._hitLimit = !1;
          }
          start() {
            this._data = "", this._hitLimit = !1;
          }
          put(e, t, i) {
            this._hitLimit || (this._data += (0, r.utf32ToString)(e, t, i), this._data.length > s.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
          }
          end(e) {
            let t = !1;
            if (this._hitLimit) t = !1;else if (e && (t = this._handler(this._data), t instanceof Promise)) return t.then(e => (this._data = "", this._hitLimit = !1, e));
            return this._data = "", this._hitLimit = !1, t;
          }
        };
      },
      8742: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Params = void 0;
        const i = 2147483647;
        class s {
          static fromArray(e) {
            const t = new s();
            if (!e.length) return t;
            for (let i = Array.isArray(e[0]) ? 1 : 0; i < e.length; ++i) {
              const s = e[i];
              if (Array.isArray(s)) for (let e = 0; e < s.length; ++e) t.addSubParam(s[e]);else t.addParam(s);
            }
            return t;
          }
          constructor(e = 32, t = 32) {
            if (this.maxLength = e, this.maxSubParamsLength = t, t > 256) throw new Error("maxSubParamsLength must not be greater than 256");
            this.params = new Int32Array(e), this.length = 0, this._subParams = new Int32Array(t), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(e), this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
          }
          clone() {
            const e = new s(this.maxLength, this.maxSubParamsLength);
            return e.params.set(this.params), e.length = this.length, e._subParams.set(this._subParams), e._subParamsLength = this._subParamsLength, e._subParamsIdx.set(this._subParamsIdx), e._rejectDigits = this._rejectDigits, e._rejectSubDigits = this._rejectSubDigits, e._digitIsSub = this._digitIsSub, e;
          }
          toArray() {
            const e = [];
            for (let t = 0; t < this.length; ++t) {
              e.push(this.params[t]);
              const i = this._subParamsIdx[t] >> 8,
                s = 255 & this._subParamsIdx[t];
              s - i > 0 && e.push(Array.prototype.slice.call(this._subParams, i, s));
            }
            return e;
          }
          reset() {
            this.length = 0, this._subParamsLength = 0, this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
          }
          addParam(e) {
            if (this._digitIsSub = !1, this.length >= this.maxLength) this._rejectDigits = !0;else {
              if (e < -1) throw new Error("values lesser than -1 are not allowed");
              this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength, this.params[this.length++] = e > i ? i : e;
            }
          }
          addSubParam(e) {
            if (this._digitIsSub = !0, this.length) if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) this._rejectSubDigits = !0;else {
              if (e < -1) throw new Error("values lesser than -1 are not allowed");
              this._subParams[this._subParamsLength++] = e > i ? i : e, this._subParamsIdx[this.length - 1]++;
            }
          }
          hasSubParams(e) {
            return (255 & this._subParamsIdx[e]) - (this._subParamsIdx[e] >> 8) > 0;
          }
          getSubParams(e) {
            const t = this._subParamsIdx[e] >> 8,
              i = 255 & this._subParamsIdx[e];
            return i - t > 0 ? this._subParams.subarray(t, i) : null;
          }
          getSubParamsAll() {
            const e = {};
            for (let t = 0; t < this.length; ++t) {
              const i = this._subParamsIdx[t] >> 8,
                s = 255 & this._subParamsIdx[t];
              s - i > 0 && (e[t] = this._subParams.slice(i, s));
            }
            return e;
          }
          addDigit(e) {
            let t;
            if (this._rejectDigits || !(t = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits) return;
            const s = this._digitIsSub ? this._subParams : this.params,
              r = s[t - 1];
            s[t - 1] = ~r ? Math.min(10 * r + e, i) : e;
          }
        }
        t.Params = s;
      },
      5741: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.AddonManager = void 0, t.AddonManager = class {
          constructor() {
            this._addons = [];
          }
          dispose() {
            for (let e = this._addons.length - 1; e >= 0; e--) this._addons[e].instance.dispose();
          }
          loadAddon(e, t) {
            const i = {
              instance: t,
              dispose: t.dispose,
              isDisposed: !1
            };
            this._addons.push(i), t.dispose = () => this._wrappedAddonDispose(i), t.activate(e);
          }
          _wrappedAddonDispose(e) {
            if (e.isDisposed) return;
            let t = -1;
            for (let i = 0; i < this._addons.length; i++) if (this._addons[i] === e) {
              t = i;
              break;
            }
            if (-1 === t) throw new Error("Could not dispose an addon that has not been loaded");
            e.isDisposed = !0, e.dispose.apply(e.instance), this._addons.splice(t, 1);
          }
        };
      },
      8771: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferApiView = void 0;
        const s = i(3785),
          r = i(511);
        t.BufferApiView = class {
          constructor(e, t) {
            this._buffer = e, this.type = t;
          }
          init(e) {
            return this._buffer = e, 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(e) {
            const t = this._buffer.lines.get(e);
            if (t) return new s.BufferLineApiView(t);
          }
          getNullCell() {
            return new r.CellData();
          }
        };
      },
      3785: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferLineApiView = void 0;
        const s = i(511);
        t.BufferLineApiView = class {
          constructor(e) {
            this._line = e;
          }
          get isWrapped() {
            return this._line.isWrapped;
          }
          get length() {
            return this._line.length;
          }
          getCell(e, t) {
            if (!(e < 0 || e >= this._line.length)) return t ? (this._line.loadCell(e, t), t) : this._line.loadCell(e, new s.CellData());
          }
          translateToString(e, t, i) {
            return this._line.translateToString(e, t, i);
          }
        };
      },
      8285: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferNamespaceApi = void 0;
        const s = i(8771),
          r = i(8460),
          n = i(844);
        class o extends n.Disposable {
          constructor(e) {
            super(), this._core = e, this._onBufferChange = this.register(new r.EventEmitter()), this.onBufferChange = this._onBufferChange.event, this._normal = new s.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new s.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);
          }
        }
        t.BufferNamespaceApi = o;
      },
      7975: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ParserApi = void 0, t.ParserApi = class {
          constructor(e) {
            this._core = e;
          }
          registerCsiHandler(e, t) {
            return this._core.registerCsiHandler(e, e => t(e.toArray()));
          }
          addCsiHandler(e, t) {
            return this.registerCsiHandler(e, t);
          }
          registerDcsHandler(e, t) {
            return this._core.registerDcsHandler(e, (e, i) => t(e, i.toArray()));
          }
          addDcsHandler(e, t) {
            return this.registerDcsHandler(e, t);
          }
          registerEscHandler(e, t) {
            return this._core.registerEscHandler(e, t);
          }
          addEscHandler(e, t) {
            return this.registerEscHandler(e, t);
          }
          registerOscHandler(e, t) {
            return this._core.registerOscHandler(e, t);
          }
          addOscHandler(e, t) {
            return this.registerOscHandler(e, t);
          }
        };
      },
      7090: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.UnicodeApi = void 0, t.UnicodeApi = class {
          constructor(e) {
            this._core = e;
          }
          register(e) {
            this._core.unicodeService.register(e);
          }
          get versions() {
            return this._core.unicodeService.versions;
          }
          get activeVersion() {
            return this._core.unicodeService.activeVersion;
          }
          set activeVersion(e) {
            this._core.unicodeService.activeVersion = e;
          }
        };
      },
      744: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BufferService = t.MINIMUM_ROWS = t.MINIMUM_COLS = void 0;
        const n = i(8460),
          o = i(844),
          a = i(5295),
          h = i(2585);
        t.MINIMUM_COLS = 2, t.MINIMUM_ROWS = 1;
        let c = t.BufferService = class extends o.Disposable {
          get buffer() {
            return this.buffers.active;
          }
          constructor(e) {
            super(), this.isUserScrolling = !1, this._onResize = this.register(new n.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new n.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e.rawOptions.cols || 0, t.MINIMUM_COLS), this.rows = Math.max(e.rawOptions.rows || 0, t.MINIMUM_ROWS), this.buffers = this.register(new a.BufferSet(e, this));
          }
          resize(e, t) {
            this.cols = e, this.rows = t, this.buffers.resize(e, t), this._onResize.fire({
              cols: e,
              rows: t
            });
          }
          reset() {
            this.buffers.reset(), this.isUserScrolling = !1;
          }
          scroll(e, t = !1) {
            const i = this.buffer;
            let s;
            s = this._cachedBlankLine, s && s.length === this.cols && s.getFg(0) === e.fg && s.getBg(0) === e.bg || (s = i.getBlankLine(e, t), this._cachedBlankLine = s), s.isWrapped = t;
            const r = i.ybase + i.scrollTop,
              n = i.ybase + i.scrollBottom;
            if (0 === i.scrollTop) {
              const e = i.lines.isFull;
              n === i.lines.length - 1 ? e ? i.lines.recycle().copyFrom(s) : i.lines.push(s.clone()) : i.lines.splice(n + 1, 0, s.clone()), e ? this.isUserScrolling && (i.ydisp = Math.max(i.ydisp - 1, 0)) : (i.ybase++, this.isUserScrolling || i.ydisp++);
            } else {
              const e = n - r + 1;
              i.lines.shiftElements(r + 1, e - 1, -1), i.lines.set(n, s.clone());
            }
            this.isUserScrolling || (i.ydisp = i.ybase), this._onScroll.fire(i.ydisp);
          }
          scrollLines(e, t, i) {
            const s = this.buffer;
            if (e < 0) {
              if (0 === s.ydisp) return;
              this.isUserScrolling = !0;
            } else e + s.ydisp >= s.ybase && (this.isUserScrolling = !1);
            const r = s.ydisp;
            s.ydisp = Math.max(Math.min(s.ydisp + e, s.ybase), 0), r !== s.ydisp && (t || this._onScroll.fire(s.ydisp));
          }
        };
        t.BufferService = c = s([r(0, h.IOptionsService)], c);
      },
      7994: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CharsetService = void 0, t.CharsetService = class {
          constructor() {
            this.glevel = 0, this._charsets = [];
          }
          reset() {
            this.charset = void 0, this._charsets = [], this.glevel = 0;
          }
          setgLevel(e) {
            this.glevel = e, this.charset = this._charsets[e];
          }
          setgCharset(e, t) {
            this._charsets[e] = t, this.glevel === e && (this.charset = t);
          }
        };
      },
      1753: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CoreMouseService = void 0;
        const n = i(2585),
          o = i(8460),
          a = i(844),
          h = {
            NONE: {
              events: 0,
              restrict: () => !1
            },
            X10: {
              events: 1,
              restrict: e => 4 !== e.button && 1 === e.action && (e.ctrl = !1, e.alt = !1, e.shift = !1, !0)
            },
            VT200: {
              events: 19,
              restrict: e => 32 !== e.action
            },
            DRAG: {
              events: 23,
              restrict: e => 32 !== e.action || 3 !== e.button
            },
            ANY: {
              events: 31,
              restrict: e => !0
            }
          };
        function c(e, t) {
          let i = (e.ctrl ? 16 : 0) | (e.shift ? 4 : 0) | (e.alt ? 8 : 0);
          return 4 === e.button ? (i |= 64, i |= e.action) : (i |= 3 & e.button, 4 & e.button && (i |= 64), 8 & e.button && (i |= 128), 32 === e.action ? i |= 32 : 0 !== e.action || t || (i |= 3)), i;
        }
        const l = String.fromCharCode,
          d = {
            DEFAULT: e => {
              const t = [c(e, !1) + 32, e.col + 32, e.row + 32];
              return t[0] > 255 || t[1] > 255 || t[2] > 255 ? "" : `[M${l(t[0])}${l(t[1])}${l(t[2])}`;
            },
            SGR: e => {
              const t = 0 === e.action && 4 !== e.button ? "m" : "M";
              return `[<${c(e, !0)};${e.col};${e.row}${t}`;
            },
            SGR_PIXELS: e => {
              const t = 0 === e.action && 4 !== e.button ? "m" : "M";
              return `[<${c(e, !0)};${e.x};${e.y}${t}`;
            }
          };
        let _ = t.CoreMouseService = class extends a.Disposable {
          constructor(e, t) {
            super(), this._bufferService = e, this._coreService = t, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new o.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
            for (const e of Object.keys(h)) this.addProtocol(e, h[e]);
            for (const e of Object.keys(d)) this.addEncoding(e, d[e]);
            this.reset();
          }
          addProtocol(e, t) {
            this._protocols[e] = t;
          }
          addEncoding(e, t) {
            this._encodings[e] = t;
          }
          get activeProtocol() {
            return this._activeProtocol;
          }
          get areMouseEventsActive() {
            return 0 !== this._protocols[this._activeProtocol].events;
          }
          set activeProtocol(e) {
            if (!this._protocols[e]) throw new Error(`unknown protocol "${e}"`);
            this._activeProtocol = e, this._onProtocolChange.fire(this._protocols[e].events);
          }
          get activeEncoding() {
            return this._activeEncoding;
          }
          set activeEncoding(e) {
            if (!this._encodings[e]) throw new Error(`unknown encoding "${e}"`);
            this._activeEncoding = e;
          }
          reset() {
            this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
          }
          triggerMouseEvent(e) {
            if (e.col < 0 || e.col >= this._bufferService.cols || e.row < 0 || e.row >= this._bufferService.rows) return !1;
            if (4 === e.button && 32 === e.action) return !1;
            if (3 === e.button && 32 !== e.action) return !1;
            if (4 !== e.button && (2 === e.action || 3 === e.action)) return !1;
            if (e.col++, e.row++, 32 === e.action && this._lastEvent && this._equalEvents(this._lastEvent, e, "SGR_PIXELS" === this._activeEncoding)) return !1;
            if (!this._protocols[this._activeProtocol].restrict(e)) return !1;
            const t = this._encodings[this._activeEncoding](e);
            return t && ("DEFAULT" === this._activeEncoding ? this._coreService.triggerBinaryEvent(t) : this._coreService.triggerDataEvent(t, !0)), this._lastEvent = e, !0;
          }
          explainEvents(e) {
            return {
              down: !!(1 & e),
              up: !!(2 & e),
              drag: !!(4 & e),
              move: !!(8 & e),
              wheel: !!(16 & e)
            };
          }
          _equalEvents(e, t, i) {
            if (i) {
              if (e.x !== t.x) return !1;
              if (e.y !== t.y) return !1;
            } else {
              if (e.col !== t.col) return !1;
              if (e.row !== t.row) return !1;
            }
            return e.button === t.button && e.action === t.action && e.ctrl === t.ctrl && e.alt === t.alt && e.shift === t.shift;
          }
        };
        t.CoreMouseService = _ = s([r(0, n.IBufferService), r(1, n.ICoreService)], _);
      },
      6975: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CoreService = void 0;
        const n = i(1439),
          o = i(8460),
          a = i(844),
          h = i(2585),
          c = Object.freeze({
            insertMode: !1
          }),
          l = Object.freeze({
            applicationCursorKeys: !1,
            applicationKeypad: !1,
            bracketedPasteMode: !1,
            origin: !1,
            reverseWraparound: !1,
            sendFocus: !1,
            wraparound: !0
          });
        let d = t.CoreService = class extends a.Disposable {
          constructor(e, t, i) {
            super(), this._bufferService = e, this._logService = t, this._optionsService = i, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new o.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new o.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new o.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new o.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, n.clone)(c), this.decPrivateModes = (0, n.clone)(l);
          }
          reset() {
            this.modes = (0, n.clone)(c), this.decPrivateModes = (0, n.clone)(l);
          }
          triggerDataEvent(e, t = !1) {
            if (this._optionsService.rawOptions.disableStdin) return;
            const i = this._bufferService.buffer;
            t && this._optionsService.rawOptions.scrollOnUserInput && i.ybase !== i.ydisp && this._onRequestScrollToBottom.fire(), t && this._onUserInput.fire(), this._logService.debug(`sending data "${e}"`, () => e.split("").map(e => e.charCodeAt(0))), this._onData.fire(e);
          }
          triggerBinaryEvent(e) {
            this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${e}"`, () => e.split("").map(e => e.charCodeAt(0))), this._onBinary.fire(e));
          }
        };
        t.CoreService = d = s([r(0, h.IBufferService), r(1, h.ILogService), r(2, h.IOptionsService)], d);
      },
      9074: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DecorationService = void 0;
        const s = i(8055),
          r = i(8460),
          n = i(844),
          o = i(6106);
        let a = 0,
          h = 0;
        class c extends n.Disposable {
          get decorations() {
            return this._decorations.values();
          }
          constructor() {
            super(), this._decorations = new o.SortedList(e => e?.marker.line), this._onDecorationRegistered = this.register(new r.EventEmitter()), this.onDecorationRegistered = this._onDecorationRegistered.event, this._onDecorationRemoved = this.register(new r.EventEmitter()), this.onDecorationRemoved = this._onDecorationRemoved.event, this.register((0, n.toDisposable)(() => this.reset()));
          }
          registerDecoration(e) {
            if (e.marker.isDisposed) return;
            const t = new l(e);
            if (t) {
              const e = t.marker.onDispose(() => t.dispose());
              t.onDispose(() => {
                t && (this._decorations.delete(t) && this._onDecorationRemoved.fire(t), e.dispose());
              }), this._decorations.insert(t), this._onDecorationRegistered.fire(t);
            }
            return t;
          }
          reset() {
            for (const e of this._decorations.values()) e.dispose();
            this._decorations.clear();
          }
          *getDecorationsAtCell(e, t, i) {
            let s = 0,
              r = 0;
            for (const n of this._decorations.getKeyIterator(t)) s = n.options.x ?? 0, r = s + (n.options.width ?? 1), e >= s && e < r && (!i || (n.options.layer ?? "bottom") === i) && (yield n);
          }
          forEachDecorationAtCell(e, t, i, s) {
            this._decorations.forEachByKey(t, t => {
              a = t.options.x ?? 0, h = a + (t.options.width ?? 1), e >= a && e < h && (!i || (t.options.layer ?? "bottom") === i) && s(t);
            });
          }
        }
        t.DecorationService = c;
        class l extends n.Disposable {
          get isDisposed() {
            return this._isDisposed;
          }
          get backgroundColorRGB() {
            return null === this._cachedBg && (this.options.backgroundColor ? this._cachedBg = s.css.toColor(this.options.backgroundColor) : this._cachedBg = void 0), this._cachedBg;
          }
          get foregroundColorRGB() {
            return null === this._cachedFg && (this.options.foregroundColor ? this._cachedFg = s.css.toColor(this.options.foregroundColor) : this._cachedFg = void 0), this._cachedFg;
          }
          constructor(e) {
            super(), this.options = e, this.onRenderEmitter = this.register(new r.EventEmitter()), this.onRender = this.onRenderEmitter.event, this._onDispose = this.register(new r.EventEmitter()), this.onDispose = this._onDispose.event, this._cachedBg = null, this._cachedFg = null, this.marker = e.marker, this.options.overviewRulerOptions && !this.options.overviewRulerOptions.position && (this.options.overviewRulerOptions.position = "full");
          }
          dispose() {
            this._onDispose.fire(), super.dispose();
          }
        }
      },
      4348: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.InstantiationService = t.ServiceCollection = void 0;
        const s = i(2585),
          r = i(8343);
        class n {
          constructor(...e) {
            this._entries = new Map();
            for (const [t, i] of e) this.set(t, i);
          }
          set(e, t) {
            const i = this._entries.get(e);
            return this._entries.set(e, t), i;
          }
          forEach(e) {
            for (const [t, i] of this._entries.entries()) e(t, i);
          }
          has(e) {
            return this._entries.has(e);
          }
          get(e) {
            return this._entries.get(e);
          }
        }
        t.ServiceCollection = n, t.InstantiationService = class {
          constructor() {
            this._services = new n(), this._services.set(s.IInstantiationService, this);
          }
          setService(e, t) {
            this._services.set(e, t);
          }
          getService(e) {
            return this._services.get(e);
          }
          createInstance(e, ...t) {
            const i = (0, r.getServiceDependencies)(e).sort((e, t) => e.index - t.index),
              s = [];
            for (const t of i) {
              const i = this._services.get(t.id);
              if (!i) throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);
              s.push(i);
            }
            const n = i.length > 0 ? i[0].index : t.length;
            if (t.length !== n) throw new Error(`[createInstance] First service dependency of ${e.name} at position ${n + 1} conflicts with ${t.length} static arguments`);
            return new e(...[...t, ...s]);
          }
        };
      },
      7866: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.traceCall = t.setTraceLogger = t.LogService = void 0;
        const n = i(844),
          o = i(2585),
          a = {
            trace: o.LogLevelEnum.TRACE,
            debug: o.LogLevelEnum.DEBUG,
            info: o.LogLevelEnum.INFO,
            warn: o.LogLevelEnum.WARN,
            error: o.LogLevelEnum.ERROR,
            off: o.LogLevelEnum.OFF
          };
        let h,
          c = t.LogService = class extends n.Disposable {
            get logLevel() {
              return this._logLevel;
            }
            constructor(e) {
              super(), this._optionsService = e, this._logLevel = o.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), h = this;
            }
            _updateLogLevel() {
              this._logLevel = a[this._optionsService.rawOptions.logLevel];
            }
            _evalLazyOptionalParams(e) {
              for (let t = 0; t < e.length; t++) "function" == typeof e[t] && (e[t] = e[t]());
            }
            _log(e, t, i) {
              this._evalLazyOptionalParams(i), e.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t, ...i);
            }
            trace(e, ...t) {
              this._logLevel <= o.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e, t);
            }
            debug(e, ...t) {
              this._logLevel <= o.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e, t);
            }
            info(e, ...t) {
              this._logLevel <= o.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e, t);
            }
            warn(e, ...t) {
              this._logLevel <= o.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e, t);
            }
            error(e, ...t) {
              this._logLevel <= o.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e, t);
            }
          };
        t.LogService = c = s([r(0, o.IOptionsService)], c), t.setTraceLogger = function (e) {
          h = e;
        }, t.traceCall = function (e, t, i) {
          if ("function" != typeof i.value) throw new Error("not supported");
          const s = i.value;
          i.value = function (...e) {
            if (h.logLevel !== o.LogLevelEnum.TRACE) return s.apply(this, e);
            h.trace(`GlyphRenderer#${s.name}(${e.map(e => JSON.stringify(e)).join(", ")})`);
            const t = s.apply(this, e);
            return h.trace(`GlyphRenderer#${s.name} return`, t), t;
          };
        };
      },
      7302: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.OptionsService = t.DEFAULT_OPTIONS = void 0;
        const s = i(8460),
          r = i(844),
          n = i(6114);
        t.DEFAULT_OPTIONS = {
          cols: 80,
          rows: 24,
          cursorBlink: !1,
          cursorStyle: "block",
          cursorWidth: 1,
          cursorInactiveStyle: "outline",
          customGlyphs: !0,
          drawBoldTextInBrightColors: !0,
          documentOverride: null,
          fastScrollModifier: "alt",
          fastScrollSensitivity: 5,
          fontFamily: "courier-new, courier, monospace",
          fontSize: 15,
          fontWeight: "normal",
          fontWeightBold: "bold",
          ignoreBracketedPasteMode: !1,
          lineHeight: 1,
          letterSpacing: 0,
          linkHandler: null,
          logLevel: "info",
          logger: null,
          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: n.isMac,
          windowOptions: {},
          windowsMode: !1,
          windowsPty: {},
          wordSeparator: " ()[]{}',\"`",
          altClickMovesCursor: !0,
          convertEol: !1,
          termName: "xterm",
          cancelEvents: !1,
          overviewRulerWidth: 0
        };
        const o = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
        class a extends r.Disposable {
          constructor(e) {
            super(), this._onOptionChange = this.register(new s.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
            const i = {
              ...t.DEFAULT_OPTIONS
            };
            for (const t in e) if (t in i) try {
              const s = e[t];
              i[t] = this._sanitizeAndValidateOption(t, s);
            } catch (e) {
              console.error(e);
            }
            this.rawOptions = i, this.options = {
              ...i
            }, this._setupOptions(), this.register((0, r.toDisposable)(() => {
              this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
            }));
          }
          onSpecificOptionChange(e, t) {
            return this.onOptionChange(i => {
              i === e && t(this.rawOptions[e]);
            });
          }
          onMultipleOptionChange(e, t) {
            return this.onOptionChange(i => {
              -1 !== e.indexOf(i) && t();
            });
          }
          _setupOptions() {
            const e = e => {
                if (!(e in t.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e}"`);
                return this.rawOptions[e];
              },
              i = (e, i) => {
                if (!(e in t.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e}"`);
                i = this._sanitizeAndValidateOption(e, i), this.rawOptions[e] !== i && (this.rawOptions[e] = i, this._onOptionChange.fire(e));
              };
            for (const t in this.rawOptions) {
              const s = {
                get: e.bind(this, t),
                set: i.bind(this, t)
              };
              Object.defineProperty(this.options, t, s);
            }
          }
          _sanitizeAndValidateOption(e, i) {
            switch (e) {
              case "cursorStyle":
                if (i || (i = t.DEFAULT_OPTIONS[e]), !function (e) {
                  return "block" === e || "underline" === e || "bar" === e;
                }(i)) throw new Error(`"${i}" is not a valid value for ${e}`);
                break;
              case "wordSeparator":
                i || (i = t.DEFAULT_OPTIONS[e]);
                break;
              case "fontWeight":
              case "fontWeightBold":
                if ("number" == typeof i && 1 <= i && i <= 1e3) break;
                i = o.includes(i) ? i : t.DEFAULT_OPTIONS[e];
                break;
              case "cursorWidth":
                i = Math.floor(i);
              case "lineHeight":
              case "tabStopWidth":
                if (i < 1) throw new Error(`${e} cannot be less than 1, value: ${i}`);
                break;
              case "minimumContrastRatio":
                i = Math.max(1, Math.min(21, Math.round(10 * i) / 10));
                break;
              case "scrollback":
                if ((i = Math.min(i, 4294967295)) < 0) throw new Error(`${e} cannot be less than 0, value: ${i}`);
                break;
              case "fastScrollSensitivity":
              case "scrollSensitivity":
                if (i <= 0) throw new Error(`${e} cannot be less than or equal to 0, value: ${i}`);
                break;
              case "rows":
              case "cols":
                if (!i && 0 !== i) throw new Error(`${e} must be numeric, value: ${i}`);
                break;
              case "windowsPty":
                i = i ?? {};
            }
            return i;
          }
        }
        t.OptionsService = a;
      },
      2660: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              n = arguments.length,
              o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
            return n > 3 && o && Object.defineProperty(t, i, o), o;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.OscLinkService = void 0;
        const n = i(2585);
        let o = t.OscLinkService = class {
          constructor(e) {
            this._bufferService = e, this._nextId = 1, this._entriesWithId = new Map(), this._dataByLinkId = new Map();
          }
          registerLink(e) {
            const t = this._bufferService.buffer;
            if (void 0 === e.id) {
              const i = t.addMarker(t.ybase + t.y),
                s = {
                  data: e,
                  id: this._nextId++,
                  lines: [i]
                };
              return i.onDispose(() => this._removeMarkerFromLink(s, i)), this._dataByLinkId.set(s.id, s), s.id;
            }
            const i = e,
              s = this._getEntryIdKey(i),
              r = this._entriesWithId.get(s);
            if (r) return this.addLineToLink(r.id, t.ybase + t.y), r.id;
            const n = t.addMarker(t.ybase + t.y),
              o = {
                id: this._nextId++,
                key: this._getEntryIdKey(i),
                data: i,
                lines: [n]
              };
            return n.onDispose(() => this._removeMarkerFromLink(o, n)), this._entriesWithId.set(o.key, o), this._dataByLinkId.set(o.id, o), o.id;
          }
          addLineToLink(e, t) {
            const i = this._dataByLinkId.get(e);
            if (i && i.lines.every(e => e.line !== t)) {
              const e = this._bufferService.buffer.addMarker(t);
              i.lines.push(e), e.onDispose(() => this._removeMarkerFromLink(i, e));
            }
          }
          getLinkData(e) {
            return this._dataByLinkId.get(e)?.data;
          }
          _getEntryIdKey(e) {
            return `${e.id};;${e.uri}`;
          }
          _removeMarkerFromLink(e, t) {
            const i = e.lines.indexOf(t);
            -1 !== i && (e.lines.splice(i, 1), 0 === e.lines.length && (void 0 !== e.data.id && this._entriesWithId.delete(e.key), this._dataByLinkId.delete(e.id)));
          }
        };
        t.OscLinkService = o = s([r(0, n.IBufferService)], o);
      },
      8343: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0;
        const i = "di$target",
          s = "di$dependencies";
        t.serviceRegistry = new Map(), t.getServiceDependencies = function (e) {
          return e[s] || [];
        }, t.createDecorator = function (e) {
          if (t.serviceRegistry.has(e)) return t.serviceRegistry.get(e);
          const r = function (e, t, n) {
            if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
            !function (e, t, r) {
              t[i] === t ? t[s].push({
                id: e,
                index: r
              }) : (t[s] = [{
                id: e,
                index: r
              }], t[i] = t);
            }(r, e, n);
          };
          return r.toString = () => e, t.serviceRegistry.set(e, r), r;
        };
      },
      2585: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.IDecorationService = t.IUnicodeService = t.IOscLinkService = t.IOptionsService = t.ILogService = t.LogLevelEnum = t.IInstantiationService = t.ICharsetService = t.ICoreService = t.ICoreMouseService = t.IBufferService = void 0;
        const s = i(8343);
        var r;
        t.IBufferService = (0, s.createDecorator)("BufferService"), t.ICoreMouseService = (0, s.createDecorator)("CoreMouseService"), t.ICoreService = (0, s.createDecorator)("CoreService"), t.ICharsetService = (0, s.createDecorator)("CharsetService"), t.IInstantiationService = (0, s.createDecorator)("InstantiationService"), function (e) {
          e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.OFF = 5] = "OFF";
        }(r || (t.LogLevelEnum = r = {})), t.ILogService = (0, s.createDecorator)("LogService"), t.IOptionsService = (0, s.createDecorator)("OptionsService"), t.IOscLinkService = (0, s.createDecorator)("OscLinkService"), t.IUnicodeService = (0, s.createDecorator)("UnicodeService"), t.IDecorationService = (0, s.createDecorator)("DecorationService");
      },
      1480: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.UnicodeService = void 0;
        const s = i(8460),
          r = i(225);
        class n {
          static extractShouldJoin(e) {
            return 0 != (1 & e);
          }
          static extractWidth(e) {
            return e >> 1 & 3;
          }
          static extractCharKind(e) {
            return e >> 3;
          }
          static createPropertyValue(e, t, i = !1) {
            return (16777215 & e) << 3 | (3 & t) << 1 | (i ? 1 : 0);
          }
          constructor() {
            this._providers = Object.create(null), this._active = "", this._onChange = new s.EventEmitter(), this.onChange = this._onChange.event;
            const e = new r.UnicodeV6();
            this.register(e), this._active = e.version, this._activeProvider = e;
          }
          dispose() {
            this._onChange.dispose();
          }
          get versions() {
            return Object.keys(this._providers);
          }
          get activeVersion() {
            return this._active;
          }
          set activeVersion(e) {
            if (!this._providers[e]) throw new Error(`unknown Unicode version "${e}"`);
            this._active = e, this._activeProvider = this._providers[e], this._onChange.fire(e);
          }
          register(e) {
            this._providers[e.version] = e;
          }
          wcwidth(e) {
            return this._activeProvider.wcwidth(e);
          }
          getStringCellWidth(e) {
            let t = 0,
              i = 0;
            const s = e.length;
            for (let r = 0; r < s; ++r) {
              let o = e.charCodeAt(r);
              if (55296 <= o && o <= 56319) {
                if (++r >= s) return t + this.wcwidth(o);
                const i = e.charCodeAt(r);
                56320 <= i && i <= 57343 ? o = 1024 * (o - 55296) + i - 56320 + 65536 : t += this.wcwidth(i);
              }
              const a = this.charProperties(o, i);
              let h = n.extractWidth(a);
              n.extractShouldJoin(a) && (h -= n.extractWidth(i)), t += h, i = a;
            }
            return t;
          }
          charProperties(e, t) {
            return this._activeProvider.charProperties(e, t);
          }
        }
        t.UnicodeService = n;
      }
    },
    t = {};
  function i(s) {
    var r = t[s];
    if (void 0 !== r) return r.exports;
    var n = t[s] = {
      exports: {}
    };
    return e[s].call(n.exports, n, n.exports, i), n.exports;
  }
  var s = {};
  return (() => {
    var e = s;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.Terminal = void 0;
    const t = i(9042),
      r = i(3236),
      n = i(844),
      o = i(5741),
      a = i(8285),
      h = i(7975),
      c = i(7090),
      l = ["cols", "rows"];
    class d extends n.Disposable {
      constructor(e) {
        super(), this._core = this.register(new r.Terminal(e)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions = {
          ...this._core.options
        };
        const t = e => this._core.options[e],
          i = (e, t) => {
            this._checkReadonlyOptions(e), this._core.options[e] = t;
          };
        for (const e in this._core.options) {
          const s = {
            get: t.bind(this, e),
            set: i.bind(this, e)
          };
          Object.defineProperty(this._publicOptions, e, s);
        }
      }
      _checkReadonlyOptions(e) {
        if (l.includes(e)) throw new Error(`Option "${e}" 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 c.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 = this.register(new a.BufferNamespaceApi(this._core))), this._buffer;
      }
      get markers() {
        return this._checkProposedApi(), this._core.markers;
      }
      get modes() {
        const e = this._core.coreService.decPrivateModes;
        let t = "none";
        switch (this._core.coreMouseService.activeProtocol) {
          case "X10":
            t = "x10";
            break;
          case "VT200":
            t = "vt200";
            break;
          case "DRAG":
            t = "drag";
            break;
          case "ANY":
            t = "any";
        }
        return {
          applicationCursorKeysMode: e.applicationCursorKeys,
          applicationKeypadMode: e.applicationKeypad,
          bracketedPasteMode: e.bracketedPasteMode,
          insertMode: this._core.coreService.modes.insertMode,
          mouseTrackingMode: t,
          originMode: e.origin,
          reverseWraparoundMode: e.reverseWraparound,
          sendFocusMode: e.sendFocus,
          wraparoundMode: e.wraparound
        };
      }
      get options() {
        return this._publicOptions;
      }
      set options(e) {
        for (const t in e) this._publicOptions[t] = e[t];
      }
      blur() {
        this._core.blur();
      }
      focus() {
        this._core.focus();
      }
      input(e, t = !0) {
        this._core.input(e, t);
      }
      resize(e, t) {
        this._verifyIntegers(e, t), this._core.resize(e, t);
      }
      open(e) {
        this._core.open(e);
      }
      attachCustomKeyEventHandler(e) {
        this._core.attachCustomKeyEventHandler(e);
      }
      attachCustomWheelEventHandler(e) {
        this._core.attachCustomWheelEventHandler(e);
      }
      registerLinkProvider(e) {
        return this._core.registerLinkProvider(e);
      }
      registerCharacterJoiner(e) {
        return this._checkProposedApi(), this._core.registerCharacterJoiner(e);
      }
      deregisterCharacterJoiner(e) {
        this._checkProposedApi(), this._core.deregisterCharacterJoiner(e);
      }
      registerMarker(e = 0) {
        return this._verifyIntegers(e), this._core.registerMarker(e);
      }
      registerDecoration(e) {
        return this._checkProposedApi(), this._verifyPositiveIntegers(e.x ?? 0, e.width ?? 0, e.height ?? 0), this._core.registerDecoration(e);
      }
      hasSelection() {
        return this._core.hasSelection();
      }
      select(e, t, i) {
        this._verifyIntegers(e, t, i), this._core.select(e, t, i);
      }
      getSelection() {
        return this._core.getSelection();
      }
      getSelectionPosition() {
        return this._core.getSelectionPosition();
      }
      clearSelection() {
        this._core.clearSelection();
      }
      selectAll() {
        this._core.selectAll();
      }
      selectLines(e, t) {
        this._verifyIntegers(e, t), this._core.selectLines(e, t);
      }
      dispose() {
        super.dispose();
      }
      scrollLines(e) {
        this._verifyIntegers(e), this._core.scrollLines(e);
      }
      scrollPages(e) {
        this._verifyIntegers(e), this._core.scrollPages(e);
      }
      scrollToTop() {
        this._core.scrollToTop();
      }
      scrollToBottom() {
        this._core.scrollToBottom();
      }
      scrollToLine(e) {
        this._verifyIntegers(e), this._core.scrollToLine(e);
      }
      clear() {
        this._core.clear();
      }
      write(e, t) {
        this._core.write(e, t);
      }
      writeln(e, t) {
        this._core.write(e), this._core.write("\r\n", t);
      }
      paste(e) {
        this._core.paste(e);
      }
      refresh(e, t) {
        this._verifyIntegers(e, t), this._core.refresh(e, t);
      }
      reset() {
        this._core.reset();
      }
      clearTextureAtlas() {
        this._core.clearTextureAtlas();
      }
      loadAddon(e) {
        this._addonManager.loadAddon(this, e);
      }
      static get strings() {
        return t;
      }
      _verifyIntegers(...e) {
        for (const t of e) if (t === 1 / 0 || isNaN(t) || t % 1 != 0) throw new Error("This API only accepts integers");
      }
      _verifyPositiveIntegers(...e) {
        for (const t of e) if (t && (t === 1 / 0 || isNaN(t) || t % 1 != 0 || t < 0)) throw new Error("This API only accepts positive integers");
      }
    }
    e.Terminal = d;
  })(), s;
})());

/***/ },

/***/ 1836
/*!********************************************!*\
  !*** ../node_modules/pug-runtime/index.js ***!
  \********************************************/
(__unused_webpack_module, exports, __webpack_require__) {

"use strict";


var pug_has_own_property = Object.prototype.hasOwnProperty;

/**
 * Merge two attribute objects giving precedence
 * to values in object `b`. Classes are special-cased
 * allowing for arrays and merging/joining appropriately
 * resulting in a string.
 *
 * @param {Object} a
 * @param {Object} b
 * @return {Object} a
 * @api private
 */

exports.merge = pug_merge;
function pug_merge(a, b) {
  if (arguments.length === 1) {
    var attrs = a[0];
    for (var i = 1; i < a.length; i++) {
      attrs = pug_merge(attrs, a[i]);
    }
    return attrs;
  }

  for (var key in b) {
    if (key === 'class') {
      var valA = a[key] || [];
      a[key] = (Array.isArray(valA) ? valA : [valA]).concat(b[key] || []);
    } else if (key === 'style') {
      var valA = pug_style(a[key]);
      valA = valA && valA[valA.length - 1] !== ';' ? valA + ';' : valA;
      var valB = pug_style(b[key]);
      valB = valB && valB[valB.length - 1] !== ';' ? valB + ';' : valB;
      a[key] = valA + valB;
    } else {
      a[key] = b[key];
    }
  }

  return a;
}

/**
 * Process array, object, or string as a string of classes delimited by a space.
 *
 * If `val` is an array, all members of it and its subarrays are counted as
 * classes. If `escaping` is an array, then whether or not the item in `val` is
 * escaped depends on the corresponding item in `escaping`. If `escaping` is
 * not an array, no escaping is done.
 *
 * If `val` is an object, all the keys whose value is truthy are counted as
 * classes. No escaping is done.
 *
 * If `val` is a string, it is counted as a class. No escaping is done.
 *
 * @param {(Array.<string>|Object.<string, boolean>|string)} val
 * @param {?Array.<string>} escaping
 * @return {String}
 */
exports.classes = pug_classes;
function pug_classes_array(val, escaping) {
  var classString = '',
    className,
    padding = '',
    escapeEnabled = Array.isArray(escaping);
  for (var i = 0; i < val.length; i++) {
    className = pug_classes(val[i]);
    if (!className) continue;
    escapeEnabled && escaping[i] && (className = pug_escape(className));
    classString = classString + padding + className;
    padding = ' ';
  }
  return classString;
}
function pug_classes_object(val) {
  var classString = '',
    padding = '';
  for (var key in val) {
    if (key && val[key] && pug_has_own_property.call(val, key)) {
      classString = classString + padding + key;
      padding = ' ';
    }
  }
  return classString;
}
function pug_classes(val, escaping) {
  if (Array.isArray(val)) {
    return pug_classes_array(val, escaping);
  } else if (val && typeof val === 'object') {
    return pug_classes_object(val);
  } else {
    return val || '';
  }
}

/**
 * Convert object or string to a string of CSS styles delimited by a semicolon.
 *
 * @param {(Object.<string, string>|string)} val
 * @return {String}
 */

exports.style = pug_style;
function pug_style(val) {
  if (!val) return '';
  if (typeof val === 'object') {
    var out = '';
    for (var style in val) {
      /* istanbul ignore else */
      if (pug_has_own_property.call(val, style)) {
        out = out + style + ':' + val[style] + ';';
      }
    }
    return out;
  } else {
    return val + '';
  }
}

/**
 * Render the given attribute.
 *
 * @param {String} key
 * @param {String} val
 * @param {Boolean} escaped
 * @param {Boolean} terse
 * @return {String}
 */
exports.attr = pug_attr;
function pug_attr(key, val, escaped, terse) {
  if (
    val === false ||
    val == null ||
    (!val && (key === 'class' || key === 'style'))
  ) {
    return '';
  }
  if (val === true) {
    return ' ' + (terse ? key : key + '="' + key + '"');
  }
  var type = typeof val;
  if (
    (type === 'object' || type === 'function') &&
    typeof val.toJSON === 'function'
  ) {
    val = val.toJSON();
  }
  if (typeof val !== 'string') {
    val = JSON.stringify(val);
    if (!escaped && val.indexOf('"') !== -1) {
      return ' ' + key + "='" + val.replace(/'/g, '&#39;') + "'";
    }
  }
  if (escaped) val = pug_escape(val);
  return ' ' + key + '="' + val + '"';
}

/**
 * Render the given attributes object.
 *
 * @param {Object} obj
 * @param {Object} terse whether to use HTML5 terse boolean attributes
 * @return {String}
 */
exports.attrs = pug_attrs;
function pug_attrs(obj, terse) {
  var attrs = '';

  for (var key in obj) {
    if (pug_has_own_property.call(obj, key)) {
      var val = obj[key];

      if ('class' === key) {
        val = pug_classes(val);
        attrs = pug_attr(key, val, false, terse) + attrs;
        continue;
      }
      if ('style' === key) {
        val = pug_style(val);
      }
      attrs += pug_attr(key, val, false, terse);
    }
  }

  return attrs;
}

/**
 * Escape the given string of `html`.
 *
 * @param {String} html
 * @return {String}
 * @api private
 */

var pug_match_html = /["&<>]/;
exports.escape = pug_escape;
function pug_escape(_html) {
  var html = '' + _html;
  var regexResult = pug_match_html.exec(html);
  if (!regexResult) return _html;

  var result = '';
  var i, lastIndex, escape;
  for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {
    switch (html.charCodeAt(i)) {
      case 34:
        escape = '&quot;';
        break;
      case 38:
        escape = '&amp;';
        break;
      case 60:
        escape = '&lt;';
        break;
      case 62:
        escape = '&gt;';
        break;
      default:
        continue;
    }
    if (lastIndex !== i) result += html.substring(lastIndex, i);
    lastIndex = i + 1;
    result += escape;
  }
  if (lastIndex !== i) return result + html.substring(lastIndex, i);
  else return result;
}

/**
 * Re-throw the given `err` in context to the
 * the pug in `filename` at the given `lineno`.
 *
 * @param {Error} err
 * @param {String} filename
 * @param {String} lineno
 * @param {String} str original source
 * @api private
 */

exports.rethrow = pug_rethrow;
function pug_rethrow(err, filename, lineno, str) {
  if (!(err instanceof Error)) throw err;
  if ((typeof window != 'undefined' || !filename) && !str) {
    err.message += ' on line ' + lineno;
    throw err;
  }
  var context, lines, start, end;
  try {
    str = str || (__webpack_require__(/*! fs */ 2947).readFileSync)(filename, {encoding: 'utf8'});
    context = 3;
    lines = str.split('\n');
    start = Math.max(lineno - context, 0);
    end = Math.min(lines.length, lineno + context);
  } catch (ex) {
    err.message +=
      ' - could not read from ' + filename + ' (' + ex.message + ')';
    pug_rethrow(err, null, lineno);
    return;
  }

  // Error context
  context = lines
    .slice(start, end)
    .map(function(line, i) {
      var curr = i + start + 1;
      return (curr == lineno ? '  > ' : '    ') + curr + '| ' + line;
    })
    .join('\n');

  // Alter exception message
  err.path = filename;
  try {
    err.message =
      (filename || 'Pug') +
      ':' +
      lineno +
      '\n' +
      context +
      '\n\n' +
      err.message;
  } catch (e) {}
  throw err;
}


/***/ },

/***/ 1837
/*!*****************************************!*\
  !*** ./node_modules/xtend/immutable.js ***!
  \*****************************************/
(module) {

module.exports = extend;
var hasOwnProperty = Object.prototype.hasOwnProperty;
function extend() {
  var target = {};
  for (var i = 0; i < arguments.length; i++) {
    var source = arguments[i];
    for (var key in source) {
      if (hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
  return target;
}

/***/ },

/***/ 1852
/*!***************************************************!*\
  !*** ./node_modules/ansi-color/lib/ansi-color.js ***!
  \***************************************************/
(__unused_webpack_module, exports) {

// ANSI color code outputs for strings

var ANSI_CODES = {
  "off": 0,
  "bold": 1,
  "italic": 3,
  "underline": 4,
  "blink": 5,
  "inverse": 7,
  "hidden": 8,
  "black": 30,
  "red": 31,
  "green": 32,
  "yellow": 33,
  "blue": 34,
  "magenta": 35,
  "cyan": 36,
  "white": 37,
  "black_bg": 40,
  "red_bg": 41,
  "green_bg": 42,
  "yellow_bg": 43,
  "blue_bg": 44,
  "magenta_bg": 45,
  "cyan_bg": 46,
  "white_bg": 47
};
exports.h = function (str, color) {
  if (!color) return str;
  var color_attrs = color.split("+");
  var ansi_str = "";
  for (var i = 0, attr; attr = color_attrs[i]; i++) {
    ansi_str += "\x1b[" + ANSI_CODES[attr] + "m";
  }
  ansi_str += str + "\x1b[" + ANSI_CODES["off"] + "m";
  return ansi_str;
};

/***/ },

/***/ 1991
/*!************************************************************************!*\
  !*** ./src/components/colorSchemeSettingsTab.component.pug?ngResource ***!
  \************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemeSettingsTab.component.pug?ngResource */ 8810);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 2007
/*!***************************************************************!*\
  !*** ../app/node_modules/get-proto/Reflect.getPrototypeOf.js ***!
  \***************************************************************/
(module) {

"use strict";


/** @type {import('./Reflect.getPrototypeOf')} */
module.exports = typeof Reflect !== 'undefined' && Reflect.getPrototypeOf || null;

/***/ },

/***/ 2069
/*!************************************************************************!*\
  !*** ./src/components/appearanceSettingsTab.component.scss?ngResource ***!
  \************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./appearanceSettingsTab.component.scss?ngResource */ 1514);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 2181
/*!*************************************!*\
  !*** ./src/fonts/SourceCodePro.ttf ***!
  \*************************************/
(module) {

"use strict";
module.exports = "data:font/ttf;base64, ";

/***/ },

/***/ 2185
/*!************************************************!*\
  !*** ../node_modules/is-plain-object/index.js ***!
  \************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



var isObject = __webpack_require__(/*! isobject */ 613);
function isObjectObject(o) {
  return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
  var ctor, prot;
  if (isObjectObject(o) === false) return false;

  // If has modified constructor
  ctor = o.constructor;
  if (typeof ctor !== 'function') return false;

  // If has modified prototype
  prot = ctor.prototype;
  if (isObjectObject(prot) === false) return false;

  // If constructor does not have an Object-specific method
  if (prot.hasOwnProperty('isPrototypeOf') === false) {
    return false;
  }

  // Most likely a plain Object
  return true;
};

/***/ },

/***/ 2187
/*!************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!./src/frontends/xterm.css ***!
  \************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_xterm_xterm_css_xterm_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! -!../../../node_modules/css-loader/dist/cjs.js!../../node_modules/@xterm/xterm/css/xterm.css */ 6775);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/getUrl.js */ 442);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3__);
// Imports




var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! ../fonts/SourceCodePro.ttf */ 2181), __webpack_require__.b);
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_node_modules_xterm_xterm_css_xterm_css__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3___default()(___CSS_LOADER_URL_IMPORT_0___);
// Module
___CSS_LOADER_EXPORT___.push([module.id, "@font-face {\n    font-family: \"monospace-fallback\";\n    src: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") format(\"truetype\");\n}\n\n.xterm-viewport::-webkit-scrollbar {\n    background: rgba(0, 0, 0, .125);\n}\n\n.xterm-viewport::-webkit-scrollbar-thumb {\n    background: rgba(255, 255, 255, .25);\n}\n\n.xterm-decoration-overview-ruler {\n    right: 1px;\n    pointer-events: none;\n}\n", "",{"version":3,"sources":["webpack://./src/frontends/xterm.css"],"names":[],"mappings":"AAEA;IACI,iCAAiC;IACjC,+DAAuD;AAC3D;;AAEA;IACI,+BAA+B;AACnC;;AAEA;IACI,oCAAoC;AACxC;;AAEA;IACI,UAAU;IACV,oBAAoB;AACxB","sourcesContent":["@import url(\"../../node_modules/@xterm/xterm/css/xterm.css\");\n\n@font-face {\n    font-family: \"monospace-fallback\";\n    src: url(../fonts/SourceCodePro.ttf) format(\"truetype\");\n}\n\n.xterm-viewport::-webkit-scrollbar {\n    background: rgba(0, 0, 0, .125);\n}\n\n.xterm-viewport::-webkit-scrollbar-thumb {\n    background: rgba(255, 255, 255, .25);\n}\n\n.xterm-decoration-overview-ruler {\n    right: 1px;\n    pointer-events: none;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 2323
/*!********************************************!*\
  !*** ../app/node_modules/es-errors/ref.js ***!
  \********************************************/
(module) {

"use strict";


/** @type {import('./ref')} */
module.exports = ReferenceError;

/***/ },

/***/ 2326
/*!***************************************!*\
  !*** ./node_modules/hexer/hex_spy.js ***!
  \***************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var util = __webpack_require__(/*! util */ 9023);
var Transform = (__webpack_require__(/*! stream */ 7748).Transform);
var ChunkedHexTransform = __webpack_require__(/*! ./chunked_hex_transform */ 803);
module.exports = HexSpy;
function HexSpy(sink, options) {
  if (!(this instanceof HexSpy)) {
    return new HexSpy(sink, options);
  }
  // istanbul ignore next
  if (!options) options = {};
  // istanbul ignore else
  if (options.highWaterMark === undefined) {
    options.highWaterMark = 1;
  }
  var self = this;
  Transform.call(self, options);
  self.hex = ChunkedHexTransform(options);
  self.hex.pipe(sink);
}
util.inherits(HexSpy, Transform);
HexSpy.prototype._transform = function _transform(chunk, encoding, callback) {
  var self = this;
  self.hex.write(chunk, encoding, function writeDone() {
    self.push(chunk);
    callback();
  });
};
HexSpy.prototype._flush = function _flush(callback) {
  var self = this;
  self.hex.end(null, null, callback);
};

/***/ },

/***/ 2443
/*!**************************************!*\
  !*** ../app/node_modules/uuid/v4.js ***!
  \**************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var rng = __webpack_require__(/*! ./lib/rng */ 1488);
var bytesToUuid = __webpack_require__(/*! ./lib/bytesToUuid */ 8516);
function v4(options, buf, offset) {
  var i = buf && offset || 0;
  if (typeof options == 'string') {
    buf = options === 'binary' ? new Array(16) : null;
    options = null;
  }
  options = options || {};
  var rnds = options.random || (options.rng || rng)();

  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  rnds[6] = rnds[6] & 0x0f | 0x40;
  rnds[8] = rnds[8] & 0x3f | 0x80;

  // Copy bytes to buffer, if provided
  if (buf) {
    for (var ii = 0; ii < 16; ++ii) {
      buf[i + ii] = rnds[ii];
    }
  }
  return buf || bytesToUuid(rnds);
}
module.exports = v4;

/***/ },

/***/ 2445
/*!******************************************************!*\
  !*** ../app/node_modules/define-properties/index.js ***!
  \******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var keys = __webpack_require__(/*! object-keys */ 2560);
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
var toStr = Object.prototype.toString;
var concat = Array.prototype.concat;
var defineDataProperty = __webpack_require__(/*! define-data-property */ 4466);
var isFunction = function (fn) {
  return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var supportsDescriptors = __webpack_require__(/*! has-property-descriptors */ 947)();
var defineProperty = function (object, name, value, predicate) {
  if (name in object) {
    if (predicate === true) {
      if (object[name] === value) {
        return;
      }
    } else if (!isFunction(predicate) || !predicate()) {
      return;
    }
  }
  if (supportsDescriptors) {
    defineDataProperty(object, name, value, true);
  } else {
    defineDataProperty(object, name, value);
  }
};
var defineProperties = function (object, map) {
  var predicates = arguments.length > 2 ? arguments[2] : {};
  var props = keys(map);
  if (hasSymbols) {
    props = concat.call(props, Object.getOwnPropertySymbols(map));
  }
  for (var i = 0; i < props.length; i += 1) {
    defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
  }
};
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;

/***/ },

/***/ 2560
/*!************************************************!*\
  !*** ../app/node_modules/object-keys/index.js ***!
  \************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var slice = Array.prototype.slice;
var isArgs = __webpack_require__(/*! ./isArguments */ 6564);
var origKeys = Object.keys;
var keysShim = origKeys ? function keys(o) {
  return origKeys(o);
} : __webpack_require__(/*! ./implementation */ 5860);
var originalKeys = Object.keys;
keysShim.shim = function shimObjectKeys() {
  if (Object.keys) {
    var keysWorksWithArguments = function () {
      // Safari 5.0 bug
      var args = Object.keys(arguments);
      return args && args.length === arguments.length;
    }(1, 2);
    if (!keysWorksWithArguments) {
      Object.keys = function keys(object) {
        // eslint-disable-line func-name-matching
        if (isArgs(object)) {
          return originalKeys(slice.call(object));
        }
        return originalKeys(object);
      };
    }
  } else {
    Object.keys = keysShim;
  }
  return Object.keys || keysShim;
};
module.exports = keysShim;

/***/ },

/***/ 2595
/*!*******************************************!*\
  !*** ../app/node_modules/is-set/index.js ***!
  \*******************************************/
(module) {

"use strict";


var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Set) {
  /** @type {import('.')} */
  // eslint-disable-next-line no-unused-vars
  exported = function isSet(x) {
    // `Set` is not present in this environment.
    return false;
  };
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$setHas) {
  /** @type {import('.')} */
  // eslint-disable-next-line no-unused-vars
  exported = function isSet(x) {
    // `Set` does not have a `has` method
    return false;
  };
}

/** @type {import('.')} */
module.exports = exported || function isSet(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $setHas.call(x);
    if ($mapHas) {
      try {
        $mapHas.call(x);
      } catch (e) {
        return true;
      }
    }
    // @ts-expect-error TS can't figure out that $Set is always truthy here
    return x instanceof $Set; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
};

/***/ },

/***/ 2624
/*!************************************************!*\
  !*** ./node_modules/zmodem.js/src/zsession.js ***!
  \************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var Zmodem = module.exports;

/**
 * This is where the protocol-level logic lives: the interaction of ZMODEM
 * headers and subpackets. The logic here is not unlikely to need tweaking
 * as little edge cases crop up.
 */

Zmodem.DEBUG = false;
Object.assign(Zmodem, __webpack_require__(/*! ./encode */ 6248), __webpack_require__(/*! ./text */ 3773), __webpack_require__(/*! ./zdle */ 6563), __webpack_require__(/*! ./zmlib */ 3568), __webpack_require__(/*! ./zheader */ 3147), __webpack_require__(/*! ./zsubpacket */ 1638), __webpack_require__(/*! ./zvalidation */ 7417), __webpack_require__(/*! ./zerror */ 3478));
const
  //pertinent to this module
  KEEPALIVE_INTERVAL = 5000,
  //We ourselves don’t need ESCCTL, so we don’t send it;
  //however, we always expect to receive it in ZRINIT.
  //See _ensure_receiver_escapes_ctrl_chars() for more details.
  ZRINIT_FLAGS = ["CANFDX",
  //full duplex
  "CANOVIO",
  //overlap I/O

  //lsz has a buffer overflow bug that shows itself when:
  //
  //  - 16-bit CRC is used, and
  //  - lsz receives the abort sequence while sending a file
  //
  //To avoid this, we just tell lsz to use 32-bit CRC
  //even though there is otherwise no reason. This ensures that
  //unfixed lsz versions will avoid the buffer overflow.
  "CANFC32"],
  //We do this because some WebSocket shell servers
  //(e.g., xterm.js’s demo server) enable the IEXTEN termios flag,
  //which bars 0x0f and 0x16 from reaching the shell process,
  //which results in transmission errors.
  FORCE_ESCAPE_CTRL_CHARS = true,
  DEFAULT_RECEIVE_INPUT_MODE = "spool_uint8array",
  //pertinent to ZMODEM
  MAX_CHUNK_LENGTH = 8192,
  //1 KiB officially, but lrzsz allows 8192
  BS = 0x8,
  OVER_AND_OUT = [79, 79],
  ABORT_SEQUENCE = Zmodem.ZMLIB.ABORT_SEQUENCE;

/**
 * A base class for objects that have events.
 *
 * @private
 */
class _Eventer {
  /**
   * Not called directly.
   */
  constructor() {
    this._on_evt = {};
    this._evt_once_index = {};
  }
  _Add_event(evt_name) {
    this._on_evt[evt_name] = [];
    this._evt_once_index[evt_name] = [];
  }
  _get_evt_queue(evt_name) {
    if (!this._on_evt[evt_name]) {
      throw "Bad event: " + evt_name;
    }
    return this._on_evt[evt_name];
  }

  /**
   * Register a callback for a given event.
   *
   * @param {string} evt_name - The name of the event.
   *
   * @param {Function} todo - The function to execute when the event happens.
   */
  on(evt_name, todo) {
    var queue = this._get_evt_queue(evt_name);
    queue.push(todo);
    return this;
  }

  /**
   * Unregister a callback for a given event.
   *
   * @param {string} evt_name - The name of the event.
   *
   * @param {Function} [todo] - The function to execute when the event
   *  happens. If not given, the last event registered for the event
   *  is unregistered.
   */
  off(evt_name, todo) {
    var queue = this._get_evt_queue(evt_name);
    if (todo) {
      var at = queue.indexOf(todo);
      if (at === -1) {
        throw "“" + todo + "” is not in the “" + evt_name + "” queue.";
      }
      queue.splice(at, 1);
    } else {
      queue.pop();
    }
    return this;
  }
  _Happen(evt_name /*, arg0, arg1, .. */) {
    var queue = this._get_evt_queue(evt_name); //might as well validate

    //console.info("EVENT", this, arguments);

    var args = Array.apply(null, arguments);
    args.shift();
    var sess = this;
    queue.forEach(function (cb) {
      cb.apply(sess, args);
    });
    return queue.length;
  }
}

/**
 * The Session classes handle the protocol-level logic.
 * These shield the user from dealing with headers and subpackets.
 * This is a base class with functionality common to both Receive
 * and Send subclasses.
 *
 * @extends _Eventer
*/
Zmodem.Session = class ZmodemSession extends _Eventer {
  /**
   * Parse out a hex header from the given array.
   * If there’s a ZRQINIT or ZRINIT at the beginning,
   * we’ll return it. If the input isn’t a header,
   * for whatever reason, we return undefined.
   *
   * @param {number[]} octets - The bytes to parse.
   *
   * @return {Session|undefined} A Session object if the beginning
   *      of a session was parsable in “octets”; otherwise undefined.
   */
  static parse(octets) {
    //Will need to trap errors.
    var hdr;
    try {
      hdr = Zmodem.Header.parse_hex(octets);
    } catch (e) {
      //Don’t report since we aren’t in session

      //debug
      //console.warn("No hex header: ", e);

      return;
    }
    if (!hdr) return;
    switch (hdr.NAME) {
      case "ZRQINIT":
        //throw if ZCOMMAND
        return new Zmodem.Session.Receive();
      case "ZRINIT":
        return new Zmodem.Session.Send(hdr);
    }

    //console.warn("Invalid first Zmodem header", hdr);
  }

  /**
   * Sets the sender function that a Session object will use.
   *
   * @param {Function} sender_func - The function to call.
   *      It will receive an Array with the relevant octets.
   *
   * @return {Session} The session object (for chaining).
   */
  set_sender(sender_func) {
    this._sender = sender_func;
    return this;
  }

  /**
   * Whether the current Session has ended.
   *
   * @returns {boolean} The ended state.
   */
  has_ended() {
    return this._has_ended();
  }

  /**
   * Consumes an array of octets as ZMODEM session input.
   *
   * @param {number[]} octets - The input octets.
   */
  consume(octets) {
    this._before_consume(octets);
    if (this._aborted) throw new Zmodem.Error('already_aborted');
    if (!octets.length) return;
    this._strip_and_enqueue_input(octets);
    if (!this._check_for_abort_sequence(octets)) {
      this._consume_first();
    }
    return;
  }

  /**
   * Whether the current Session has been `abort()`ed.
   *
   * @returns {boolean} The aborted state.
   */
  aborted() {
    return !!this._aborted;
  }

  /**
   * Not called directly.
   */
  constructor() {
    super();
    //if (!sender_func) throw "Need sender!";

    //this._first_header = first_header;
    //this._sender = sender_func;
    this._config = {};

    //this._input = new ZInput();

    this._input_buffer = [];

    //This is mostly for debugging.
    this._Add_event("receive");
    this._Add_event("garbage");
    this._Add_event("session_end");
  }

  /**
   * Returns the Session object’s role.
   *
   * @returns {string} One of:
   * - `receive`
   * - `send`
   */
  get_role() {
    return this.type;
  }
  _trim_leading_garbage_until_header() {
    var garbage = Zmodem.Header.trim_leading_garbage(this._input_buffer);
    if (garbage.length) {
      if (this._Happen("garbage", garbage) === 0) {
        console.debug("Garbage: ", String.fromCharCode.apply(String, garbage), garbage);
      }
    }
  }
  _parse_and_consume_header() {
    this._trim_leading_garbage_until_header();
    var new_header_and_crc = Zmodem.Header.parse(this._input_buffer);
    if (!new_header_and_crc) return;
    if (Zmodem.DEBUG) {
      this._log_header("RECEIVED HEADER", new_header_and_crc[0]);
    }
    this._consume_header(new_header_and_crc[0]);
    this._last_header_name = new_header_and_crc[0].NAME;
    this._last_header_crc = new_header_and_crc[1];
    return new_header_and_crc[0];
  }
  _log_header(label, header) {
    console.debug(this.type, label, header.NAME, header._bytes4.join());
  }
  _consume_header(new_header) {
    this._on_receive(new_header);
    var handler = this._next_header_handler && this._next_header_handler[new_header.NAME];
    if (!handler) {
      console.error("Unhandled header!", new_header, this._next_header_handler);
      throw new Zmodem.Error("Unhandled header: " + new_header.NAME);
    }
    this._next_header_handler = null;
    handler.call(this, new_header);
  }

  //TODO: strip out the abort sequence
  _check_for_abort_sequence() {
    var abort_at = Zmodem.ZMLIB.find_subarray(this._input_buffer, ABORT_SEQUENCE);
    if (abort_at !== -1) {
      //TODO: expose this to caller
      this._input_buffer.splice(0, abort_at + ABORT_SEQUENCE.length);
      this._aborted = true;

      //TODO compare response here to lrzsz.
      this._on_session_end();

      //We shouldn’t ever expect to receive an abort. Even if we
      //have sent an abort ourselves, the Sentry should have stopped
      //directing input to this Session object.
      //if (this._expect_abort) {
      //    return true;
      //}

      throw new Zmodem.Error("peer_aborted");
    }
  }
  _send_header(name /*, args */) {
    if (!this._sender) throw "Need sender!";
    var args = Array.apply(null, arguments);
    var bytes_hdr = this._create_header_bytes(args);
    if (Zmodem.DEBUG) {
      this._log_header("SENDING HEADER", bytes_hdr[1]);
    }
    this._sender(bytes_hdr[0]);
    this._last_sent_header = bytes_hdr[1];
  }
  _create_header_bytes(name_and_args) {
    var hdr = Zmodem.Header.build.apply(Zmodem.Header, name_and_args);
    var formatter = this._get_header_formatter(name_and_args[0]);
    return [hdr[formatter](this._zencoder), hdr];
  }
  _strip_and_enqueue_input(input) {
    Zmodem.ZMLIB.strip_ignored_bytes(input);

    //It’s possible that “input” is empty at this point.
    //It doesn’t seem to hurt anything to keep processing, though.

    this._input_buffer.push.apply(this._input_buffer, input);
  }

  /**
   * **STOP!** You probably want to `skip()` an Offer rather than
   * `abort()`. See below.
   *
   * Abort the current session by sending the ZMODEM abort sequence.
   * This function will cause the Session object to refuse to send
   * any further data.
   *
   * Zmodem.Sentry is configured to send all output to the terminal
   * after a session’s `abort()`. That could result in lots of
   * ZMODEM garble being sent to the JavaScript terminal, which you
   * probably don’t want.
   *
   * `skip()` on an Offer is better because Session will continue to
   * discard data until we reach either another file or the
   * sender-initiated end of the ZMODEM session. So no ZMODEM garble,
   * and the session will end successfully.
   *
   * The behavior of `abort()` is subject to change since it’s not
   * very useful as currently implemented.
   */
  abort() {
    //this._expect_abort = true;

    //From Forsberg:
    //
    //The Cancel sequence consists of eight CAN characters
    //and ten backspace characters. ZMODEM only requires five
    //Cancel characters; the other three are "insurance".
    //The trailing backspace characters attempt to erase
    //the effects of the CAN characters if they are
    //received by a command interpreter.
    //
    //FG: Since we assume our connection is reliable, there’s
    //no reason to send more than 5 CANs.
    this._sender(ABORT_SEQUENCE.concat([BS, BS, BS, BS, BS]));
    this._aborted = true;
    this._sender = function () {
      throw new Zmodem.Error('already_aborted');
    };
    this._on_session_end();
    return;
  }

  //----------------------------------------------------------------------
  _on_session_end() {
    this._Happen("session_end");
  }
  _on_receive(hdr_or_pkt) {
    this._Happen("receive", hdr_or_pkt);
  }
  _before_consume() {}
};
function _trim_OO(array) {
  if (0 === Zmodem.ZMLIB.find_subarray(array, OVER_AND_OUT)) {
    array.splice(0, OVER_AND_OUT.length);
  }

  //TODO: This assumes OVER_AND_OUT is 2 bytes long. No biggie, but.
  else if (array[0] === OVER_AND_OUT[OVER_AND_OUT.length - 1]) {
    array.splice(0, 1);
  }
  return array;
}

/** A class for ZMODEM receive sessions.
 *
 * @extends Session
 */
Zmodem.Session.Receive = class ZmodemReceiveSession extends Zmodem.Session {
  //We only get 1 file at a time, so on each consume() either
  //continue state for the current file or start a new one.

  /**
   * Not called directly.
   */
  constructor() {
    super();
    this._Add_event("offer");
    this._Add_event("data_in");
    this._Add_event("file_end");
  }

  /**
   * Consume input bytes from the sender.
   *
   * @private
   * @param {number[]} octets - The bytes to consume.
   */
  _before_consume(octets) {
    if (this._bytes_after_OO) {
      throw "PROTOCOL: Session is completed!";
    }

    //Put this here so that our logic later on has access to the
    //input string and can populate _bytes_after_OO when the
    //session ends.
    this._bytes_being_consumed = octets;
  }

  /**
   * Return any bytes that have been `consume()`d but
   * came after the end of the ZMODEM session.
   *
   * @returns {number[]} The trailing bytes.
   */
  get_trailing_bytes() {
    if (this._aborted) return [];
    if (!this._bytes_after_OO) {
      throw "PROTOCOL: Session is not completed!";
    }
    return this._bytes_after_OO.slice(0);
  }
  _has_ended() {
    return this.aborted() || !!this._bytes_after_OO;
  }

  //Receiver always sends hex headers.
  _get_header_formatter() {
    return "to_hex";
  }
  _parse_and_consume_subpacket() {
    var parse_func;
    if (this._last_header_crc === 16) {
      parse_func = "parse16";
    } else {
      parse_func = "parse32";
    }
    var subpacket = Zmodem.Subpacket[parse_func](this._input_buffer);
    if (subpacket) {
      if (Zmodem.DEBUG) {
        console.debug(this.type, "RECEIVED SUBPACKET", subpacket);
      }
      this._consume_data(subpacket);

      //What state are we in if the subpacket indicates frame end
      //but we haven’t gotten ZEOF yet? Can anything other than ZEOF
      //follow after a ZDATA?
      if (subpacket.frame_end()) {
        this._next_subpacket_handler = null;
      }
    }
    return subpacket;
  }
  _consume_first() {
    if (this._got_ZFIN) {
      if (this._input_buffer.length < 2) return;

      //if it’s OO, then set this._bytes_after_OO
      if (Zmodem.ZMLIB.find_subarray(this._input_buffer, OVER_AND_OUT) === 0) {
        //This doubles as an indication that the session has ended.
        //We need to set this right away so that handlers like
        //"session_end" will have access to it.
        this._bytes_after_OO = _trim_OO(this._bytes_being_consumed.slice(0));
        this._on_session_end();
        return;
      } else {
        throw "PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: " + this._input_buffer.join();
      }
    }
    var parsed;
    do {
      if (this._next_subpacket_handler) {
        parsed = this._parse_and_consume_subpacket();
      } else {
        parsed = this._parse_and_consume_header();
      }
    } while (parsed && this._input_buffer.length);
  }
  _consume_data(subpacket) {
    this._on_receive(subpacket);
    if (!this._next_subpacket_handler) {
      throw "PROTOCOL: Received unexpected data packet after " + this._last_header_name + " header: " + subpacket.get_payload().join();
    }
    this._next_subpacket_handler.call(this, subpacket);
  }
  _octets_to_string(octets) {
    if (!this._textdecoder) {
      this._textdecoder = new Zmodem.Text.Decoder();
    }
    return this._textdecoder.decode(new Uint8Array(octets));
  }
  _consume_ZFILE_data(hdr, subpacket) {
    if (this._file_info) {
      throw "PROTOCOL: second ZFILE data subpacket received";
    }
    var packet_payload = subpacket.get_payload();
    var nul_at = packet_payload.indexOf(0);

    //
    var fname = this._octets_to_string(packet_payload.slice(0, nul_at));
    var the_rest = this._octets_to_string(packet_payload.slice(1 + nul_at)).split(" ");
    var mtime = the_rest[1] && parseInt(the_rest[1], 8) || undefined;
    if (mtime) {
      mtime = new Date(mtime * 1000);
    }
    this._file_info = {
      name: fname,
      size: the_rest[0] ? parseInt(the_rest[0], 10) : null,
      mtime: mtime || null,
      mode: the_rest[2] && parseInt(the_rest[2], 8) || null,
      serial: the_rest[3] && parseInt(the_rest[3], 10) || null,
      files_remaining: the_rest[4] ? parseInt(the_rest[4], 10) : null,
      bytes_remaining: the_rest[5] ? parseInt(the_rest[5], 10) : null
    };

    //console.log("ZFILE", hdr);

    var xfer = new Offer(hdr.get_options(), this._file_info, this._accept.bind(this), this._skip.bind(this));
    this._current_transfer = xfer;

    //this._Happen("offer", xfer);
  }
  _consume_ZDATA_data(subpacket) {
    if (!this._accepted_offer) {
      throw "PROTOCOL: Received data without accepting!";
    }

    //TODO: Probably should include some sort of preventive against
    //infinite loop here: if the peer hasn’t sent us what we want after,
    //say, 10 ZRPOS headers then we should send ZABORT and just end.
    if (!this._offset_ok) {
      console.warn("offset not ok!");
      _send_ZRPOS();
      return;
    }
    this._file_offset += subpacket.get_payload().length;
    this._on_data_in(subpacket);

    /*
    console.warn("received error from data_in callback; retrying", e);
    throw "unimplemented";
    */

    if (subpacket.ack_expected() && !subpacket.frame_end()) {
      this._send_header("ZACK", Zmodem.ENCODELIB.pack_u32_le(this._file_offset));
    }
  }
  _make_promise_for_between_files() {
    var sess = this;
    return new Promise(function (res) {
      var between_files_handler = {
        ZFILE: function (hdr) {
          this._next_subpacket_handler = function (subpacket) {
            this._next_subpacket_handler = null;
            this._consume_ZFILE_data(hdr, subpacket);
            this._Happen("offer", this._current_transfer);
            res(this._current_transfer);
          };
        },
        //We use this as a keep-alive. Maybe other
        //implementations do, too?
        ZSINIT: function (hdr) {
          //The content of this header doesn’t affect us
          //since all it does is tell us details of how
          //the sender will ZDLE-encode binary data. Our
          //ZDLE parser doesn’t need to know in advance.

          sess._next_subpacket_handler = function (spkt) {
            sess._next_subpacket_handler = null;
            sess._consume_ZSINIT_data(spkt);
            sess._send_header('ZACK');
            sess._next_header_handler = between_files_handler;
          };
        },
        ZFIN: function () {
          this._consume_ZFIN();
          res();
        }
      };
      sess._next_header_handler = between_files_handler;
    });
  }
  _consume_ZSINIT_data(spkt) {
    //TODO: Should this be used when we signal a cancellation?
    this._attn = spkt.get_payload();
  }

  /**
   * Start the ZMODEM session by signaling to the sender that
   * we are ready for the first file offer.
   *
   * @returns {Promise} A promise that resolves with an Offer object
   * or, if the sender closes the session immediately without offering
   * anything, nothing.
   */
  start() {
    if (this._started) throw "Already started!";
    this._started = true;
    var ret = this._make_promise_for_between_files();
    this._send_ZRINIT();
    return ret;
  }

  //Returns a promise that’s fulfilled when the file
  //transfer is done.
  //
  //  That ZEOF promise return is another promise that’s
  //  fulfilled when we get either ZFIN or another ZFILE.
  _accept(offset) {
    this._accepted_offer = true;
    this._file_offset = offset || 0;
    var sess = this;
    var ret = new Promise(function (resolve_accept) {
      var last_ZDATA;
      sess._next_header_handler = {
        ZDATA: function on_ZDATA(hdr) {
          this._consume_ZDATA(hdr);
          this._next_subpacket_handler = this._consume_ZDATA_data;
          this._next_header_handler = {
            ZEOF: function on_ZEOF(hdr) {
              // Do this first to verify the ZEOF.
              // This also fires the “file_end” event.
              this._consume_ZEOF(hdr);
              this._next_subpacket_handler = null;

              // We don’t care about this promise.
              // Prior to v0.1.8 we did because we called
              // resolve_accept() at the resolution of this
              // promise, but that was a bad idea and was
              // never documented, so 0.1.8 changed it.
              this._make_promise_for_between_files();
              resolve_accept();
              this._send_ZRINIT();
            }
          };
        }
      };
    });
    this._send_ZRPOS();
    return ret;
  }
  _skip() {
    var ret = this._make_promise_for_between_files();
    if (this._accepted_offer) {
      // There’s a race condition where we might attempt to
      // skip() an in-progress transfer near its end but actually
      // the skip() will fire after the transfer is complete.
      // While there might be ways to prevent this, they likely
      // would require extra work on the part of implementations.
      //
      // It seems far simpler just to make this function a no-op
      // in these cases.
      if (!this._current_transfer) return;

      //For cancel of an in-progress transfer from lsz,
      //it’s necessary to avoid this buffer overflow bug:
      //
      //  https://github.com/gooselinux/lrzsz/blob/master/lrzsz-0.12.20.patch
      //
      //… which we do by asking for CRC32 from lsz.

      //We might or might not have consumed ZDATA.
      //The sender also might or might not send a ZEOF before it
      //parses the ZSKIP. Thus, we want to ignore the following:
      //
      //  - ZDATA
      //  - ZDATA then ZEOF
      //  - ZEOF
      //
      //… and just look for the next between-file header.

      var bound_make_promise_for_between_files = function () {
        //Once this happens we fail on any received data packet.
        //So it needs not to happen until we’ve received a header.
        this._accepted_offer = false;
        this._next_subpacket_handler = null;
        this._make_promise_for_between_files();
      }.bind(this);
      Object.assign(this._next_header_handler, {
        ZEOF: bound_make_promise_for_between_files,
        ZDATA: function () {
          bound_make_promise_for_between_files();
          this._next_header_handler.ZEOF = bound_make_promise_for_between_files;
        }.bind(this)
      });
    }

    //this._accepted_offer = false;

    this._file_info = null;
    this._send_header("ZSKIP");
    return ret;
  }
  _send_ZRINIT() {
    this._send_header("ZRINIT", ZRINIT_FLAGS);
  }
  _consume_ZFIN() {
    this._got_ZFIN = true;
    this._send_header("ZFIN");
  }
  _consume_ZEOF(header) {
    if (this._file_offset !== header.get_offset()) {
      throw "ZEOF offset mismatch; unimplemented (local: " + this._file_offset + "; ZEOF: " + header.get_offset() + ")";
    }
    this._on_file_end();

    //Preserve these two so that file_end callbacks
    //will have the right information.
    this._file_info = null;
    this._current_transfer = null;
  }
  _consume_ZDATA(header) {
    if (this._file_offset === header.get_offset()) {
      this._offset_ok = true;
    } else {
      throw "Error correction is unimplemented.";
    }
  }
  _send_ZRPOS() {
    this._send_header("ZRPOS", this._file_offset);
  }

  //----------------------------------------------------------------------
  //events

  _on_file_end() {
    this._Happen("file_end");
    if (this._current_transfer) {
      this._current_transfer._Happen("complete");
      this._current_transfer = null;
    }
  }
  _on_data_in(subpacket) {
    this._Happen("data_in", subpacket);
    if (this._current_transfer) {
      this._current_transfer._Happen("input", subpacket.get_payload());
    }
  }
};
Object.assign(Zmodem.Session.Receive.prototype, {
  type: "receive"
});

//----------------------------------------------------------------------

/**
 * @typedef {Object} FileDetails
 *
 * @property {string} name - The name of the file.
 *
 * @property {number} [size] - The file size, in bytes.
 *
 * @property {number} [mode] - The file mode (e.g., 0100644).
 *
 * @property {Date|number} [mtime] - The file’s modification time.
 *  When expressed as a number, the unit is epoch seconds.
 *
 * @property {number} [files_remaining] - Inclusive of the current file,
 *  so this value is never less than 1.
 *
 * @property {number} [bytes_remaining] - Inclusive of the current file.
 */

/**
 * Common methods for Transfer and Offer objects.
 *
 * @mixin
 */
var Transfer_Offer_Mixin = {
  /**
   * Returns the file details object.
   * @returns {FileDetails} `mtime` is a Date.
   */
  get_details: function get_details() {
    return Object.assign({}, this._file_info);
  },
  /**
   * Returns a parse of the ZFILE header’s payload.
   *
   * @returns {Object} Members are:
   *
   * - `conversion` (string | undefined)
   * - `management` (string | undefined)
   * - `transfer` (string | undefined)
   * - `sparse` (boolean)
   */
  get_options: function get_options() {
    return Object.assign({}, this._zfile_opts);
  },
  /**
   * Returns the offset based on the last transferred chunk.
   * @returns {number} The file offset (i.e., number of bytes after
   *  the start of the file).
   */
  get_offset: function get_offset() {
    return this._file_offset;
  }
};

/**
 * A class to represent a sender’s interaction with a single file
 * transfer within a batch. When a receiver accepts an offer, the
 * Session instantiates this class and passes the instance as the
 * promise resolution from send_offer().
 *
 * @mixes Transfer_Offer_Mixin
 */
class Transfer {
  /**
   * Not called directly.
   */
  constructor(file_info, offset, send_func, end_func) {
    this._file_info = file_info;
    this._file_offset = offset || 0;
    this._send = send_func;
    this._end = end_func;
  }

  /**
   * Send a (non-terminal) piece of the file.
   *
   * @param { number[] | Uint8Array } array_like - The bytes to send.
   */
  send(array_like) {
    this._send(array_like);
    this._file_offset += array_like.length;
  }

  /**
   * Complete the file transfer.
   *
   * @param { number[] | Uint8Array } [array_like] - The last bytes to send.
   *
   * @return { Promise } Resolves when the receiver has indicated
   *      acceptance of the end of the file transfer.
   */
  end(array_like) {
    var ret = this._end(array_like || []);
    if (array_like) this._file_offset += array_like.length;
    return ret;
  }
}
Object.assign(Transfer.prototype, Transfer_Offer_Mixin);

/**
 * A class to represent a receiver’s interaction with a single file
 * transfer offer within a batch. There is functionality here to
 * skip or accept offered files and either to spool the packet
 * payloads or to handle them yourself.
 *
 * @mixes Transfer_Offer_Mixin
 */
class Offer extends _Eventer {
  /**
   * Not called directly.
   */
  constructor(zfile_opts, file_info, accept_func, skip_func) {
    super();
    this._zfile_opts = zfile_opts;
    this._file_info = file_info;
    this._accept_func = accept_func;
    this._skip_func = skip_func;
    this._Add_event("input");
    this._Add_event("complete");

    //Register this first so that application handlers receive
    //the updated offset.
    this.on("input", this._input_handler);
  }
  _verify_not_skipped() {
    if (this._skipped) {
      throw new Zmodem.Error("Already skipped!");
    }
  }

  /**
   * Tell the sender that you don’t want the offered file.
   *
   * You can send this in lieu of `accept()` or after it, e.g.,
   * if you find that the transfer is taking too long. Note that,
   * if you `skip()` after you `accept()`, you’ll likely have to
   * wait for buffers to clear out.
   *
   */
  skip() {
    this._verify_not_skipped();
    this._skipped = true;
    return this._skip_func.apply(this, arguments);
  }

  /**
   * Tell the sender to send the offered file.
   *
   * @param {Object} [opts] - Can be:
   * @param {string} [opts.oninput=spool_uint8array] - Can be:
   *
   * - `spool_uint8array`: Stores the ZMODEM
   *     packet payloads as Uint8Array instances.
   *     This makes for an easy transition to a Blob,
   *     which JavaScript can use to save the file to disk.
   *
   * - `spool_array`: Stores the ZMODEM packet payloads
   *     as Array instances. Each value is an octet value.
   *
   * - (function): A handler that receives each payload
   *     as it arrives. The Offer object does not store
   *     the payloads internally when thus configured.
   *
   * @return { Promise } Resolves when the file is fully received.
   *      If the Offer has been spooling
   *      the packet payloads, the promise resolves with an Array
   *      that contains those payloads.
   */
  accept(opts) {
    this._verify_not_skipped();
    if (this._accepted) {
      throw new Zmodem.Error("Already accepted!");
    }
    this._accepted = true;
    if (!opts) opts = {};
    this._file_offset = opts.offset || 0;
    switch (opts.on_input) {
      case null:
      case undefined:
      case "spool_array":
      case DEFAULT_RECEIVE_INPUT_MODE:
        //default
        this._spool = [];
        break;
      default:
        if (typeof opts.on_input !== "function") {
          throw "Invalid “on_input”: " + opts.on_input;
        }
    }
    this._input_handler_mode = opts.on_input || DEFAULT_RECEIVE_INPUT_MODE;
    return this._accept_func(this._file_offset).then(this._get_spool.bind(this));
  }
  _input_handler(payload) {
    this._file_offset += payload.length;
    if (typeof this._input_handler_mode === "function") {
      this._input_handler_mode(payload);
    } else {
      if (this._input_handler_mode === DEFAULT_RECEIVE_INPUT_MODE) {
        payload = new Uint8Array(payload);
      }

      //sanity
      else if (this._input_handler_mode !== "spool_array") {
        throw new Zmodem.Error("WTF?? _input_handler_mode = " + this._input_handler_mode);
      }
      this._spool.push(payload);
    }
  }
  _get_spool() {
    return this._spool;
  }
}
Object.assign(Offer.prototype, Transfer_Offer_Mixin);

//Curious that ZSINIT isn’t here … but, lsz sends it as hex.
const SENDER_BINARY_HEADER = {
  ZFILE: true,
  ZDATA: true
};

/**
 * A class that encapsulates behavior for a ZMODEM sender.
 *
 * @extends Session
 */
Zmodem.Session.Send = class ZmodemSendSession extends Zmodem.Session {
  /**
   * Not called directly.
   */
  constructor(zrinit_hdr) {
    super();
    if (!zrinit_hdr) {
      throw "Need first header!";
    } else if (zrinit_hdr.NAME !== "ZRINIT") {
      throw "First header should be ZRINIT, not " + zrinit_hdr.NAME;
    }
    this._last_header_name = 'ZRINIT';

    //We don’t need to send crc32. Even if the other side can grok it,
    //there’s no point to sending it since, for now, we assume we’re
    //on a reliable connection, e.g., TCP. Ideally we’d just forgo
    //CRC checks completely, but ZMODEM doesn’t allow that.
    //
    //If we *were* to start using crc32, we’d update this every time
    //we send a header.
    this._subpacket_encode_func = 'encode16';
    this._zencoder = new Zmodem.ZDLE();
    this._consume_ZRINIT(zrinit_hdr);
    this._file_offset = 0;
    var zrqinit_count = 0;
    this._start_keepalive_on_set_sender = true;

    //lrzsz will send ZRINIT until it gets an offer. (keep-alive?)
    //It sends 4 additional ones after the initial ZRINIT and, if
    //no response is received, starts sending “C” (0x43, 67) as if to
    //try to downgrade to XMODEM or YMODEM.
    //var sess = this;
    //this._prepare_to_receive_ZRINIT( function keep_alive() {
    //    sess._prepare_to_receive_ZRINIT(keep_alive);
    //} );

    //queue up the ZSINIT flag to send -- but seems useless??

    /*
    Object.assign(
        this._on_evt,
        {
            file_received: [],
        },
    };
    */
  }

  /**
   * Sets the sender function. The first time this is called,
   * it will also initiate a keepalive using ZSINIT until the
   * first file is sent.
   *
   * @param {Function} func - The function to call.
   *  It will receive an Array with the relevant octets.
   *
   * @return {Session} The session object (for chaining).
   */
  set_sender(func) {
    super.set_sender(func);
    if (this._start_keepalive_on_set_sender) {
      this._start_keepalive_on_set_sender = false;
      this._start_keepalive();
    }
    return this;
  }

  //7.3.3 .. The sender also uses hex headers when they are
  //not followed by binary data subpackets.
  //
  //FG: … or when the header is ZSINIT? That’s what lrzsz does, anyway.
  //Then it sends a single NUL byte as the payload to an end_ack subpacket.
  _get_header_formatter(name) {
    return SENDER_BINARY_HEADER[name] ? "to_binary16" : "to_hex";
  }

  //In order to keep lrzsz from timing out, we send ZSINIT every 5 seconds.
  //Maybe make this configurable?
  _start_keepalive() {
    //if (this._keepalive_promise) throw "Keep-alive already started!";
    if (!this._keepalive_promise) {
      var sess = this;
      this._keepalive_promise = new Promise(function (resolve) {
        //console.log("SETTING KEEPALIVE TIMEOUT");
        sess._keepalive_timeout = setTimeout(resolve, KEEPALIVE_INTERVAL);
      }).then(function () {
        sess._next_header_handler = {
          ZACK: function () {
            //We’re going to need to ensure that the
            //receiver is ready for all control characters
            //to be escaped. If we’ve already sent a ZSINIT
            //and gotten a response, then we know that that
            //work is already done later on when we actually
            //send an offer.
            sess._got_ZSINIT_ZACK = true;
          }
        };
        sess._send_ZSINIT();
        sess._keepalive_promise = null;
        sess._start_keepalive();
      });
    }
  }
  _stop_keepalive() {
    if (this._keepalive_promise) {
      //console.log("STOPPING KEEPALIVE");
      clearTimeout(this._keepalive_timeout);
      this._keep_alive_promise = null;
    }
  }
  _send_ZSINIT() {
    //See note at _ensure_receiver_escapes_ctrl_chars()
    //for why we have to pass ESCCTL.

    var zsinit_flags = [];
    if (this._zencoder.escapes_ctrl_chars()) {
      zsinit_flags.push("ESCCTL");
    }
    this._send_header_and_data(["ZSINIT", zsinit_flags], [0], "end_ack");
  }
  _consume_ZRINIT(hdr) {
    this._last_ZRINIT = hdr;
    if (hdr.get_buffer_size()) {
      throw "Buffer size (" + hdr.get_buffer_size() + ") is unsupported!";
    }
    if (!hdr.can_full_duplex()) {
      throw "Half-duplex I/O is unsupported!";
    }
    if (!hdr.can_overlap_io()) {
      throw "Non-overlap I/O is unsupported!";
    }
    if (hdr.escape_8th_bit()) {
      throw "8-bit escaping is unsupported!";
    }
    if (FORCE_ESCAPE_CTRL_CHARS) {
      this._zencoder.set_escape_ctrl_chars(true);
      if (!hdr.escape_ctrl_chars()) {
        console.debug("Peer didn’t request escape of all control characters. Will send ZSINIT to force recognition of escaped control characters.");
      }
    } else {
      this._zencoder.set_escape_ctrl_chars(hdr.escape_ctrl_chars());
    }
  }

  //https://stackoverflow.com/questions/23155939/missing-0xf-and-0x16-when-binary-data-through-virtual-serial-port-pair-created-b
  //^^ Because of that, we always escape control characters.
  //The alternative would be that lrz would never receive those
  //two bytes from zmodem.js.
  _ensure_receiver_escapes_ctrl_chars() {
    var promise;
    var needs_ZSINIT = !this._last_ZRINIT.escape_ctrl_chars() && !this._got_ZSINIT_ZACK;
    if (needs_ZSINIT) {
      var sess = this;
      promise = new Promise(function (res) {
        sess._next_header_handler = {
          ZACK: hdr => {
            res();
          }
        };
        sess._send_ZSINIT();
      });
    } else {
      promise = Promise.resolve();
    }
    return promise;
  }
  _convert_params_to_offer_payload_array(params) {
    params = Zmodem.Validation.offer_parameters(params);
    var subpacket_payload = params.name + "\x00";
    var subpacket_space_pieces = [(params.size || 0).toString(10), params.mtime ? params.mtime.toString(8) : "0", params.mode ? (0x8000 | params.mode).toString(8) : "0", "0" //serial
    ];
    if (params.files_remaining) {
      subpacket_space_pieces.push(params.files_remaining);
      if (params.bytes_remaining) {
        subpacket_space_pieces.push(params.bytes_remaining);
      }
    }
    subpacket_payload += subpacket_space_pieces.join(" ");
    return this._string_to_octets(subpacket_payload);
  }

  /**
   * Send an offer to the receiver.
   *
   * @param {FileDetails} params - All about the file you want to transfer.
   *
   * @returns {Promise} If the receiver accepts the offer, then the
   * resolution is a Transfer object; otherwise the resolution is
   * undefined.
   */
  send_offer(params) {
    if (Zmodem.DEBUG) {
      console.debug("SENDING OFFER", params);
    }
    if (!params) throw "need file params!";
    if (this._sending_file) throw "Already sending file!";
    var payload_array = this._convert_params_to_offer_payload_array(params);
    this._stop_keepalive();
    var sess = this;
    function zrpos_handler_setter_func() {
      sess._next_header_handler = {
        // The receiver may send ZRPOS in at least two cases:
        //
        // 1) A malformed subpacket arrived, so we need to
        // “rewind” a bit and continue from the receiver’s
        // last-successful location in the file.
        //
        // 2) The receiver hasn’t gotten any data for a bit,
        // so it sends ZRPOS as a “ping”.
        //
        // Case #1 shouldn’t happen since zmodem.js requires a
        // reliable transport. Case #2, though, can happen due
        // to either normal network congestion or errors in
        // implementation. In either case, there’s nothing for
        // us to do but to ignore the ZRPOS, with an optional
        // warning.
        //
        ZRPOS: function (hdr) {
          if (Zmodem.DEBUG) {
            console.warn("Mid-transfer ZRPOS … implementation error?");
          }
          zrpos_handler_setter_func();
        }
      };
    }
    ;
    var doer_func = function () {
      //return Promise object that is fulfilled when the ZRPOS or ZSKIP arrives.
      //The promise value is the byte offset, or undefined for ZSKIP.
      //If ZRPOS arrives, then send ZDATA(0) and set this._sending_file.
      var handler_setter_promise = new Promise(function (res) {
        sess._next_header_handler = {
          ZSKIP: function () {
            sess._start_keepalive();
            res();
          },
          ZRPOS: function (hdr) {
            sess._sending_file = true;
            zrpos_handler_setter_func();
            res(new Transfer(params, hdr.get_offset(), sess._send_interim_file_piece.bind(sess), sess._end_file.bind(sess)));
          }
        };
      });
      sess._send_header_and_data(["ZFILE"], payload_array, "end_ack");
      delete sess._sent_ZDATA;
      return handler_setter_promise;
    };
    if (FORCE_ESCAPE_CTRL_CHARS) {
      return this._ensure_receiver_escapes_ctrl_chars().then(doer_func);
    }
    return doer_func();
  }
  _send_header_and_data(hdr_name_and_args, data_arr, frameend) {
    var bytes_hdr = this._create_header_bytes(hdr_name_and_args);
    var data_bytes = this._build_subpacket_bytes(data_arr, frameend);
    bytes_hdr[0].push.apply(bytes_hdr[0], data_bytes);
    if (Zmodem.DEBUG) {
      this._log_header("SENDING HEADER", bytes_hdr[1]);
      console.debug(this.type, "-- HEADER PAYLOAD:", frameend, data_bytes.length);
    }
    this._sender(bytes_hdr[0]);
    this._last_sent_header = bytes_hdr[1];
  }
  _build_subpacket_bytes(bytes_arr, frameend) {
    var subpacket = Zmodem.Subpacket.build(bytes_arr, frameend);
    return subpacket[this._subpacket_encode_func](this._zencoder);
  }
  _build_and_send_subpacket(bytes_arr, frameend) {
    this._sender(this._build_subpacket_bytes(bytes_arr, frameend));
  }
  _string_to_octets(string) {
    if (!this._textencoder) {
      this._textencoder = new Zmodem.Text.Encoder();
    }
    var uint8arr = this._textencoder.encode(string);
    return Array.prototype.slice.call(uint8arr);
  }

  /*
  Potential future support for responding to ZRPOS:
  send_file_offset(offset) {
  }
  */

  /*
      Sending logic works thus:
          - ASSUME the receiver can overlap I/O (CANOVIO)
              (so fail if !CANFDX || !CANOVIO)
          - Sender opens the firehose … all ZCRCG (!end/!ack)
              until the end, when we send a ZCRCE (end/!ack)
              NB: try 8k/32k/64k chunk sizes? Looks like there’s
              no need to change the packet otherwise.
  */
  //TODO: Put this on a Transfer object similar to what Receive uses?
  _send_interim_file_piece(bytes_obj) {
    //We don’t ask the receiver to confirm because there’s no need.
    this._send_file_part(bytes_obj, "no_end_no_ack");

    //This pattern will allow
    //error-correction without buffering the entire stream in JS.
    //For now the promise is always resolved, but in the future we
    //can make it only resolve once we’ve gotten acknowledgement.
    return Promise.resolve();
  }
  _ensure_we_are_sending() {
    if (!this._sending_file) throw "Not sending a file currently!";
  }

  //This resolves once we receive ZEOF.
  _end_file(bytes_obj) {
    this._ensure_we_are_sending();

    //Is the frame-end-ness of this last packet redundant
    //with the ZEOF packet?? - No. It signals the receiver that
    //the next thing to expect is a header, not a packet.

    //no-ack, following lrzsz’s example
    this._send_file_part(bytes_obj, "end_no_ack");
    var sess = this;

    //Register this before we send ZEOF in case of local round-trip.
    //(Basically just for synchronous testing, but.)
    var ret = new Promise(function (res) {
      //console.log("UNSETTING SENDING FLAG");
      sess._sending_file = false;
      sess._prepare_to_receive_ZRINIT(res);
    });
    this._send_header("ZEOF", this._file_offset);
    this._file_offset = 0;
    return ret;
  }

  //Called at the beginning of our session
  //and also when we’re done sending a file.
  _prepare_to_receive_ZRINIT(after_consume) {
    this._next_header_handler = {
      ZRINIT: function (hdr) {
        this._consume_ZRINIT(hdr);
        if (after_consume) after_consume();
      }
    };
  }

  /**
   * Signal to the receiver that the ZMODEM session is wrapping up.
   *
   * @returns {Promise} Resolves when the receiver has responded to
   * our signal that the session is over.
   */
  close() {
    var ok_to_close = this._last_header_name === "ZRINIT";
    if (!ok_to_close) {
      ok_to_close = this._last_header_name === "ZSKIP";
    }
    if (!ok_to_close) {
      ok_to_close = this._last_sent_header.name === "ZSINIT" && this._last_header_name === "ZACK";
    }
    if (!ok_to_close) {
      throw "Can’t close; last received header was “" + this._last_header_name + "”";
    }
    var sess = this;
    var ret = new Promise(function (res, rej) {
      sess._next_header_handler = {
        ZFIN: function () {
          sess._sender(OVER_AND_OUT);
          sess._sent_OO = true;
          sess._on_session_end();
          res();
        }
      };
    });
    this._send_header("ZFIN");
    return ret;
  }
  _has_ended() {
    return this.aborted() || !!this._sent_OO;
  }
  _send_file_part(bytes_obj, final_packetend) {
    if (!this._sent_ZDATA) {
      this._send_header("ZDATA", this._file_offset);
      this._sent_ZDATA = true;
    }
    var obj_offset = 0;
    var bytes_count = bytes_obj.length;

    //We have to go through at least once in event of an
    //empty buffer, e.g., an empty end_file.
    while (true) {
      var chunk_size = Math.min(obj_offset + MAX_CHUNK_LENGTH, bytes_count) - obj_offset;
      var at_end = chunk_size + obj_offset >= bytes_count;
      var chunk = bytes_obj.slice(obj_offset, obj_offset + chunk_size);
      if (!(chunk instanceof Array)) {
        chunk = Array.prototype.slice.call(chunk);
      }
      this._build_and_send_subpacket(chunk, at_end ? final_packetend : "no_end_no_ack");
      this._file_offset += chunk_size;
      obj_offset += chunk_size;
      if (obj_offset >= bytes_count) break;
    }
  }
  _consume_first() {
    if (!this._parse_and_consume_header()) {
      //When the ZMODEM receive program starts, it immediately sends
      //a ZRINIT header to initiate ZMODEM file transfers, or a
      //ZCHALLENGE header to verify the sending program. The receive
      //program resends its header at response time (default 10 second)
      //intervals for a suitable period of time (40 seconds total)
      //before falling back to YMODEM protocol.
      if (this._input_buffer.join() === "67") {
        throw "Receiver has fallen back to YMODEM.";
      }
    }
  }
  _on_session_end() {
    this._stop_keepalive();
    super._on_session_end();
  }
};
Object.assign(Zmodem.Session.Send.prototype, {
  type: "send"
});

/***/ },

/***/ 2643
/*!******************************************************!*\
  !*** ./src/components/baseTerminalTab.component.pug ***!
  \******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/baseTerminalTab.component.pug */ 8570);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 2657
/*!*************************************************************************!*\
  !*** ./src/components/inputProcessingSettings.component.pug?ngResource ***!
  \*************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/inputProcessingSettings.component.pug?ngResource */ 3894);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 2825
/*!********************************************************!*\
  !*** ./node_modules/@xterm/addon-fit/lib/addon-fit.js ***!
  \********************************************************/
(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, () => (() => {
  "use strict";

  var e = {};
  return (() => {
    var t = e;
    Object.defineProperty(t, "__esModule", {
      value: !0
    }), t.FitAddon = void 0, t.FitAddon = class {
      activate(e) {
        this._terminal = e;
      }
      dispose() {}
      fit() {
        const e = this.proposeDimensions();
        if (!e || !this._terminal || isNaN(e.cols) || isNaN(e.rows)) return;
        const t = this._terminal._core;
        this._terminal.rows === e.rows && this._terminal.cols === e.cols || (t._renderService.clear(), this._terminal.resize(e.cols, e.rows));
      }
      proposeDimensions() {
        if (!this._terminal) return;
        if (!this._terminal.element || !this._terminal.element.parentElement) return;
        const e = this._terminal._core,
          t = e._renderService.dimensions;
        if (0 === t.css.cell.width || 0 === t.css.cell.height) return;
        const r = 0 === this._terminal.options.scrollback ? 0 : e.viewport.scrollBarWidth,
          i = window.getComputedStyle(this._terminal.element.parentElement),
          o = parseInt(i.getPropertyValue("height")),
          s = Math.max(0, parseInt(i.getPropertyValue("width"))),
          n = window.getComputedStyle(this._terminal.element),
          l = o - (parseInt(n.getPropertyValue("padding-top")) + parseInt(n.getPropertyValue("padding-bottom"))),
          a = s - (parseInt(n.getPropertyValue("padding-right")) + parseInt(n.getPropertyValue("padding-left"))) - r;
        return {
          cols: Math.max(2, Math.floor(a / t.css.cell.width)),
          rows: Math.max(1, Math.floor(l / t.css.cell.height))
        };
      }
    };
  })(), e;
})());

/***/ },

/***/ 2861
/*!*****************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorPicker.component.pug?ngResource ***!
  \*****************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv [style.background]=\"model\" ngx-colors-trigger [(ngModel)]=\"model\" (ngModelChange)=\"modelChange.emit($event)\" [ngbTooltip]=\"hint\"\u003E{{ title }}\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 2897
/*!****************************************************!*\
  !*** ../app/node_modules/es-object-atoms/index.js ***!
  \****************************************************/
(module) {

"use strict";


/** @type {import('.')} */
module.exports = Object;

/***/ },

/***/ 2902
/*!*************************************!*\
  !*** ./node_modules/hexer/index.js ***!
  \*************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


hex.Transform = __webpack_require__(/*! ./hex_transform */ 7840);
hex.ChunkedTransform = __webpack_require__(/*! ./chunked_hex_transform */ 803);
hex.Spy = __webpack_require__(/*! ./hex_spy */ 2326);
module.exports = hex;
function hex(buffer, options) {
  if (typeof buffer === 'string') {
    return hex(Buffer(buffer), options);
  }
  if (!Buffer.isBuffer(buffer)) {
    throw new Error('invalid argument to hex, expected a buffer or string');
  }
  options = options || {};
  if (!options.offsetWidth) {
    options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2);
  }
  var stream = hex.Transform(options);
  stream.write(buffer);
  stream.end();
  var out = stream.read();
  if (out === null) {
    return '';
  }
  out = String(out);
  out = out.replace(/\n+$/, '');
  return out;
}

/***/ },

/***/ 2943
/*!*********************************************************************!*\
  !*** ./src/components/colorSchemePreview.component.scss?ngResource ***!
  \*********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./colorSchemePreview.component.scss?ngResource */ 9546);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 2947
/*!*********************!*\
  !*** external "fs" ***!
  \*********************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__2947__;

/***/ },

/***/ 3010
/*!**********************************************************!*\
  !*** ../app/node_modules/which-boxed-primitive/index.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var isString = __webpack_require__(/*! is-string */ 3156);
var isNumber = __webpack_require__(/*! is-number-object */ 3112);
var isBoolean = __webpack_require__(/*! is-boolean-object */ 4281);
var isSymbol = __webpack_require__(/*! is-symbol */ 9885);
var isBigInt = __webpack_require__(/*! is-bigint */ 4026);

/** @type {import('.')} */
// eslint-disable-next-line consistent-return
module.exports = function whichBoxedPrimitive(value) {
  // eslint-disable-next-line eqeqeq
  if (value == null || typeof value !== 'object' && typeof value !== 'function') {
    return null;
  }
  if (isString(value)) {
    return 'String';
  }
  if (isNumber(value)) {
    return 'Number';
  }
  if (isBoolean(value)) {
    return 'Boolean';
  }
  if (isSymbol(value)) {
    return 'Symbol';
  }
  if (isBigInt(value)) {
    return 'BigInt';
  }
};

/***/ },

/***/ 3077
/*!**********************************************!*\
  !*** ../app/node_modules/get-proto/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var reflectGetProto = __webpack_require__(/*! ./Reflect.getPrototypeOf */ 2007);
var originalGetProto = __webpack_require__(/*! ./Object.getPrototypeOf */ 6557);
var getDunderProto = __webpack_require__(/*! dunder-proto/get */ 9875);

/** @type {import('.')} */
module.exports = reflectGetProto ? function getProto(O) {
  // @ts-expect-error TS can't narrow inside a closure, for some reason
  return reflectGetProto(O);
} : originalGetProto ? function getProto(O) {
  if (!O || typeof O !== 'object' && typeof O !== 'function') {
    throw new TypeError('getProto: not an object');
  }
  // @ts-expect-error TS can't narrow inside a closure, for some reason
  return originalGetProto(O);
} : getDunderProto ? function getProto(O) {
  // @ts-expect-error TS can't narrow inside a closure, for some reason
  return getDunderProto(O);
} : null;

/***/ },

/***/ 3112
/*!*****************************************************!*\
  !*** ../app/node_modules/is-number-object/index.js ***!
  \*****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);
var $numToStr = callBound('Number.prototype.toString');

/** @type {import('.')} */
var tryNumberObject = function tryNumberObject(value) {
  try {
    $numToStr(value);
    return true;
  } catch (e) {
    return false;
  }
};
var $toString = callBound('Object.prototype.toString');
var numClass = '[object Number]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();

/** @type {import('.')} */
module.exports = function isNumberObject(value) {
  if (typeof value === 'number') {
    return true;
  }
  if (!value || typeof value !== 'object') {
    return false;
  }
  return hasToStringTag ? tryNumberObject(value) : $toString(value) === numClass;
};

/***/ },

/***/ 3139
/*!************************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorSchemeSettingsForMode.component.scss?ngResource ***!
  \************************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ".head{flex:none}.body{overflow:auto;flex:auto;min-height:0}.swatch{width:10px;height:10px;border-radius:50%;margin-right:3px;margin-bottom:3px;box-shadow:0 1px 1px rgba(0,0,0,.5)}.list-group-item color-scheme-preview{margin-left:14px}", "",{"version":3,"sources":["webpack://./src/components/colorSchemeSettingsForMode.component.scss"],"names":[],"mappings":"AAAA,MACI,SAAA,CAGJ,MACI,aAAA,CACA,SAAA,CACA,YAAA,CAGJ,QACI,UAAA,CACA,WAAA,CACA,iBAAA,CACA,gBAAA,CACA,iBAAA,CACA,mCAAA,CAGJ,sCACI,gBAAA","sourcesContent":[".head {\n    flex: none;\n}\n\n.body {\n    overflow: auto;\n    flex: auto;\n    min-height: 0;\n}\n\n.swatch {\n    width: 10px;\n    height: 10px;\n    border-radius: 50%;\n    margin-right: 3px;\n    margin-bottom: 3px;\n    box-shadow: 0 1px 1px rgba(0, 0, 0, .5);\n}\n\n.list-group-item color-scheme-preview {\n    margin-left: 14px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 3147
/*!***********************************************!*\
  !*** ./node_modules/zmodem.js/src/zheader.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./encode */ 6248), __webpack_require__(/*! ./zdle */ 6563), __webpack_require__(/*! ./zmlib */ 3568), __webpack_require__(/*! ./zcrc */ 142), __webpack_require__(/*! ./zerror */ 3478));
const ZPAD = '*'.charCodeAt(0),
  ZBIN = 'A'.charCodeAt(0),
  ZHEX = 'B'.charCodeAt(0),
  ZBIN32 = 'C'.charCodeAt(0);

//NB: lrzsz uses \x8a rather than \x0a where the specs
//say to use LF. For simplicity, we avoid that and just use
//the 7-bit LF character.
const HEX_HEADER_CRLF = [0x0d, 0x0a];
const HEX_HEADER_CRLF_XON = HEX_HEADER_CRLF.slice(0).concat([Zmodem.ZMLIB.XON]);

//These are more or less duplicated by the logic in trim_leading_garbage().
//
//"**" + ZDLE_CHAR + "B"
const HEX_HEADER_PREFIX = [ZPAD, ZPAD, Zmodem.ZMLIB.ZDLE, ZHEX];
const BINARY16_HEADER_PREFIX = [ZPAD, Zmodem.ZMLIB.ZDLE, ZBIN];
const BINARY32_HEADER_PREFIX = [ZPAD, Zmodem.ZMLIB.ZDLE, ZBIN32];

/** Class that represents a ZMODEM header. */
Zmodem.Header = class ZmodemHeader {
  //lrzsz’s “sz” command sends a random (?) CR/0x0d byte
  //after ZEOF. Let’s accommodate 0x0a, 0x0d, 0x8a, and 0x8d.
  //
  //Also, when you skip a file, sz outputs a message about it.
  //
  //It appears that we’re supposed to ignore anything until
  //[ ZPAD, ZDLE ] when we’re looking for a header.

  /**
   * Weed out the leading bytes that aren’t valid to start a ZMODEM header.
   *
   * @param {number[]} ibuffer - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The octet values that were removed from the start
   *      of “ibuffer”. Order is preserved.
   */
  static trim_leading_garbage(ibuffer) {
    //Since there’s no escaping of the output it’s possible
    //that the garbage could trip us up, e.g., by having a filename
    //be a legit ZMODEM header. But that’s pretty unlikely.

    //Everything up to the first ZPAD: garbage
    //If first ZPAD has asterisk + ZDLE

    var garbage = [];
    var discard_all,
      parser,
      next_ZPAD_at_least = 0;
    TRIM_LOOP: while (ibuffer.length && !parser) {
      var first_ZPAD = ibuffer.indexOf(ZPAD);

      //No ZPAD? Then we purge the input buffer cuz it’s all garbage.
      if (first_ZPAD === -1) {
        discard_all = true;
        break TRIM_LOOP;
      } else {
        garbage.push.apply(garbage, ibuffer.splice(0, first_ZPAD));

        //buffer has only an asterisk … gotta see about more
        if (ibuffer.length < 2) {
          break TRIM_LOOP;
        } else if (ibuffer[1] === ZPAD) {
          //Two leading ZPADs should be a hex header.

          //We’re assuming the length of the header is 4 in
          //this logic … but ZMODEM isn’t likely to change, so.
          if (ibuffer.length < HEX_HEADER_PREFIX.length) {
            if (ibuffer.join() === HEX_HEADER_PREFIX.slice(0, ibuffer.length).join()) {
              //We have an incomplete fragment that matches
              //HEX_HEADER_PREFIX. So don’t trim any more.
              break TRIM_LOOP;
            }

            //Otherwise, we’ll discard one.
          } else if (ibuffer[2] === HEX_HEADER_PREFIX[2] && ibuffer[3] === HEX_HEADER_PREFIX[3]) {
            parser = _parse_hex;
          }
        } else if (ibuffer[1] === Zmodem.ZMLIB.ZDLE) {
          //ZPAD + ZDLE should be a binary header.
          if (ibuffer.length < BINARY16_HEADER_PREFIX.length) {
            break TRIM_LOOP;
          }
          if (ibuffer[2] === BINARY16_HEADER_PREFIX[2]) {
            parser = _parse_binary16;
          } else if (ibuffer[2] === BINARY32_HEADER_PREFIX[2]) {
            parser = _parse_binary32;
          }
        }
        if (!parser) {
          garbage.push(ibuffer.shift());
        }
      }
    }
    if (discard_all) {
      garbage.push.apply(garbage, ibuffer.splice(0));
    }

    //For now we’ll throw away the parser.
    //It’s not hard for parse() to discern anyway.

    return garbage;
  }

  /**
   * Parse out a Header object from a given array of octet values.
   *
   * An exception is thrown if the given bytes are definitively invalid
   * as header values.
   *
   * @param {number[]} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {Header|undefined} An instance of the appropriate Header
   *      subclass, or undefined if not enough octet values are given
   *      to determine whether there is a valid header here or not.
   */
  static parse(octets) {
    var hdr;
    if (octets[1] === ZPAD) {
      hdr = _parse_hex(octets);
      return hdr && [hdr, 16];
    } else if (octets[2] === ZBIN) {
      hdr = _parse_binary16(octets, 3);
      return hdr && [hdr, 16];
    } else if (octets[2] === ZBIN32) {
      hdr = _parse_binary32(octets);
      return hdr && [hdr, 32];
    }
    if (octets.length < 3) return;
    throw "Unrecognized/unsupported octets: " + octets.join();
  }

  /**
   * Build a Header subclass given a name and arguments.
   *
   * @param {string} name - The header type name, e.g., “ZRINIT”.
   *
   * @param {...*} args - The arguments to pass to the appropriate
   *      subclass constructor. These aren’t documented currently
   *      but are pretty easy to glean from the code.
   *
   * @returns {Header} An instance of the appropriate Header subclass.
   */
  static build(name /*, args */) {
    var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);

    //TODO: make this better
    var Ctr = FRAME_NAME_CREATOR[name];
    if (!Ctr) throw "No frame class “" + name + "” is defined!";
    args.shift();

    //Plegh!
    //https://stackoverflow.com/questions/33193310/constr-applythis-args-in-es6-classes
    var hdr = new (Ctr.bind.apply(Ctr, [null].concat(args)))();
    return hdr;
  }

  /**
   * Return the octet values array that represents the object
   * in ZMODEM hex encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  to_hex() {
    var to_crc = this._crc_bytes();
    return HEX_HEADER_PREFIX.concat(Zmodem.ENCODELIB.octets_to_hex(to_crc.concat(Zmodem.CRC.crc16(to_crc))), this._hex_header_ending);
  }

  /**
   * Return the octet values array that represents the object
   * in ZMODEM binary encoding with a 16-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for
   *      ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  to_binary16(zencoder) {
    return this._to_binary(zencoder, BINARY16_HEADER_PREFIX, Zmodem.CRC.crc16);
  }

  /**
   * Return the octet values array that represents the object
   * in ZMODEM binary encoding with a 32-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for
   *      ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  to_binary32(zencoder) {
    return this._to_binary(zencoder, BINARY32_HEADER_PREFIX, Zmodem.CRC.crc32);
  }

  //This is never called directly, but only as super().
  constructor() {
    if (!this._bytes4) {
      this._bytes4 = [0, 0, 0, 0];
    }
  }
  _to_binary(zencoder, prefix, crc_func) {
    var to_crc = this._crc_bytes();

    //Both the 4-byte payload and the CRC bytes are ZDLE-encoded.
    var octets = prefix.concat(zencoder.encode(to_crc.concat(crc_func(to_crc))));
    return octets;
  }
  _crc_bytes() {
    return [this.TYPENUM].concat(this._bytes4);
  }
};
Zmodem.Header.prototype._hex_header_ending = HEX_HEADER_CRLF_XON;
class ZRQINIT_HEADER extends Zmodem.Header {}
;

//----------------------------------------------------------------------

const ZRINIT_FLAG = {
  //----------------------------------------------------------------------
  // Bit Masks for ZRINIT flags byte ZF0
  //----------------------------------------------------------------------
  CANFDX: 0x01,
  // Rx can send and receive true FDX
  CANOVIO: 0x02,
  // Rx can receive data during disk I/O
  CANBRK: 0x04,
  // Rx can send a break signal
  CANCRY: 0x08,
  // Receiver can decrypt -- nothing does this
  CANLZW: 0x10,
  // Receiver can uncompress -- nothing does this
  CANFC32: 0x20,
  // Receiver can use 32 bit Frame Check
  ESCCTL: 0x40,
  // Receiver expects ctl chars to be escaped
  ESC8: 0x80 // Receiver expects 8th bit to be escaped
};
function _get_ZRINIT_flag_num(fl) {
  if (!ZRINIT_FLAG[fl]) {
    throw new Zmodem.Error("Invalid ZRINIT flag: " + fl);
  }
  return ZRINIT_FLAG[fl];
}
class ZRINIT_HEADER extends Zmodem.Header {
  constructor(flags_arr, bufsize) {
    super();
    var flags_num = 0;
    if (!bufsize) bufsize = 0;
    flags_arr.forEach(function (fl) {
      flags_num |= _get_ZRINIT_flag_num(fl);
    });
    this._bytes4 = [bufsize & 0xff, bufsize >> 8, 0, flags_num];
  }

  //undefined if nonstop I/O is allowed
  get_buffer_size() {
    return Zmodem.ENCODELIB.unpack_u16_be(this._bytes4.slice(0, 2)) || undefined;
  }

  //Unimplemented:
  //  can_decrypt
  //  can_decompress

  //----------------------------------------------------------------------
  //function names taken from Jacques Mattheij’s implementation,
  //as used in syncterm.

  can_full_duplex() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANFDX);
  }
  can_overlap_io() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANOVIO);
  }
  can_break() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANBRK);
  }
  can_fcs_32() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANFC32);
  }
  escape_ctrl_chars() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.ESCCTL);
  }

  //Is this used? I don’t see it used in lrzsz or syncterm
  //Looks like it was a “foreseen” feature that Forsberg
  //never implemented. (The need for it went away, maybe?)
  escape_8th_bit() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.ESC8);
  }
}
;

//----------------------------------------------------------------------

//Since context makes clear what’s going on, we use these
//rather than the T-prefixed constants in the specification.
const ZSINIT_FLAG = {
  ESCCTL: 0x40,
  // Transmitter will escape ctl chars
  ESC8: 0x80 // Transmitter will escape 8th bit
};
function _get_ZSINIT_flag_num(fl) {
  if (!ZSINIT_FLAG[fl]) {
    throw "Invalid ZSINIT flag: " + fl;
  }
  return ZSINIT_FLAG[fl];
}
class ZSINIT_HEADER extends Zmodem.Header {
  constructor(flags_arr, attn_seq_arr) {
    super();
    var flags_num = 0;
    flags_arr.forEach(function (fl) {
      flags_num |= _get_ZSINIT_flag_num(fl);
    });
    this._bytes4 = [0, 0, 0, flags_num];
    if (attn_seq_arr) {
      if (attn_seq_arr.length > 31) {
        throw "Attn sequence must be <= 31 bytes";
      }
      if (attn_seq_arr.some(function (num) {
        return num > 255;
      })) {
        throw "Attn sequence (" + attn_seq_arr + ") must be <256";
      }
      this._data = attn_seq_arr.concat([0]);
    }
  }
  escape_ctrl_chars() {
    return !!(this._bytes4[3] & ZSINIT_FLAG.ESCCTL);
  }

  //Is this used? I don’t see it used in lrzsz or syncterm
  escape_8th_bit() {
    return !!(this._bytes4[3] & ZSINIT_FLAG.ESC8);
  }
}

//Thus far it doesn’t seem we really need this header except to respond
//to ZSINIT, which doesn’t require a payload.
class ZACK_HEADER extends Zmodem.Header {
  constructor(payload4) {
    super();
    if (payload4) {
      this._bytes4 = payload4.slice();
    }
  }
}
ZACK_HEADER.prototype._hex_header_ending = HEX_HEADER_CRLF;

//----------------------------------------------------------------------

const ZFILE_VALUES = {
  //ZF3 (i.e., first byte)
  extended: {
    sparse: 0x40 //ZXSPARS
  },
  //ZF2
  transport: [undefined, "compress",
  //ZTLZW
  "encrypt",
  //ZTCRYPT
  "rle" //ZTRLE
  ],
  //ZF1
  management: [undefined, "newer_or_longer",
  //ZF1_ZMNEWL
  "crc",
  //ZF1_ZMCRC
  "append",
  //ZF1_ZMAPND
  "clobber",
  //ZF1_ZMCLOB
  "newer",
  //ZF1_ZMNEW
  "mtime_or_length",
  //ZF1_ZMNEW
  "protect",
  //ZF1_ZMPROT
  "rename" //ZF1_ZMPROT
  ],
  //ZF0 (i.e., last byte)
  conversion: [undefined, "binary",
  //ZCBIN
  "text",
  //ZCNL
  "resume" //ZCRESUM
  ]
};
const ZFILE_ORDER = ["extended", "transport", "management", "conversion"];
const ZMSKNOLOC = 0x80,
  MANAGEMENT_MASK = 0x1f,
  ZXSPARS = 0x40;
class ZFILE_HEADER extends Zmodem.Header {
  //TODO: allow options on instantiation
  get_options() {
    var opts = {
      sparse: !!(this._bytes4[0] & ZXSPARS)
    };
    var bytes_copy = this._bytes4.slice(0);
    ZFILE_ORDER.forEach(function (key, i) {
      if (ZFILE_VALUES[key] instanceof Array) {
        if (key === "management") {
          opts.skip_if_absent = !!(bytes_copy[i] & ZMSKNOLOC);
          bytes_copy[i] &= MANAGEMENT_MASK;
        }
        opts[key] = ZFILE_VALUES[key][bytes_copy[i]];
      } else {
        for (var extkey in ZFILE_VALUES[key]) {
          opts[extkey] = !!(bytes_copy[i] & ZFILE_VALUES[key][extkey]);
          if (opts[extkey]) {
            bytes_copy[i] ^= ZFILE_VALUES[key][extkey];
          }
        }
      }
      if (!opts[key] && bytes_copy[i]) {
        opts[key] = "unknown:" + bytes_copy[i];
      }
    });
    return opts;
  }
}

//----------------------------------------------------------------------

//Empty headers - in addition to ZRQINIT
class ZSKIP_HEADER extends Zmodem.Header {}
//No need for ZNAK
class ZABORT_HEADER extends Zmodem.Header {}
class ZFIN_HEADER extends Zmodem.Header {}
class ZFERR_HEADER extends Zmodem.Header {}
ZFIN_HEADER.prototype._hex_header_ending = HEX_HEADER_CRLF;
class ZOffsetHeader extends Zmodem.Header {
  constructor(offset) {
    super();
    this._bytes4 = Zmodem.ENCODELIB.pack_u32_le(offset);
  }
  get_offset() {
    return Zmodem.ENCODELIB.unpack_u32_le(this._bytes4);
  }
}
class ZRPOS_HEADER extends ZOffsetHeader {}
;
class ZDATA_HEADER extends ZOffsetHeader {}
;
class ZEOF_HEADER extends ZOffsetHeader {}
;

//As request, receiver creates.
/* UNIMPLEMENTED FOR NOW
class ZCRC_HEADER extends ZHeader {
    constructor(crc_le_bytes) {
        super();
        if (crc_le_bytes) {  //response, sender creates
            this._bytes4 = crc_le_bytes;
        }
    }
}
*/

//No ZCHALLENGE implementation

//class ZCOMPL_HEADER extends ZHeader {}
//class ZCAN_HEADER extends Zmodem.Header {}

//As described, this header represents an information disclosure.
//It could be interpreted, I suppose, merely as “this is how much space
//I have FOR YOU.”
//TODO: implement if needed/requested
//class ZFREECNT_HEADER extends ZmodemHeader {}

//----------------------------------------------------------------------

const FRAME_CLASS_TYPES = [[ZRQINIT_HEADER, "ZRQINIT"], [ZRINIT_HEADER, "ZRINIT"], [ZSINIT_HEADER, "ZSINIT"], [ZACK_HEADER, "ZACK"], [ZFILE_HEADER, "ZFILE"], [ZSKIP_HEADER, "ZSKIP"], undefined,
// [ ZNAK_HEADER, "ZNAK" ],
[ZABORT_HEADER, "ZABORT"], [ZFIN_HEADER, "ZFIN"], [ZRPOS_HEADER, "ZRPOS"], [ZDATA_HEADER, "ZDATA"], [ZEOF_HEADER, "ZEOF"], [ZFERR_HEADER, "ZFERR"],
//see note
undefined,
//[ ZCRC_HEADER, "ZCRC" ],
undefined,
//[ ZCHALLENGE_HEADER, "ZCHALLENGE" ],
undefined,
//[ ZCOMPL_HEADER, "ZCOMPL" ],
undefined,
//[ ZCAN_HEADER, "ZCAN" ],
undefined,
//[ ZFREECNT_HEADER, "ZFREECNT" ],
undefined,
//[ ZCOMMAND_HEADER, "ZCOMMAND" ],
undefined //[ ZSTDERR_HEADER, "ZSTDERR" ],
];

/*
ZFERR is described as “error in reading or writing file”. It’s really
not a good idea from a security angle for the endpoint to expose this
information. We should parse this and handle it as ZABORT but never send it.

Likewise with ZFREECNT: the sender shouldn’t ask how much space is left
on the other box; rather, the receiver should decide what to do with the
file size as the sender reports it.
*/

var FRAME_NAME_CREATOR = {};
for (var fc = 0; fc < FRAME_CLASS_TYPES.length; fc++) {
  if (!FRAME_CLASS_TYPES[fc]) continue;
  FRAME_NAME_CREATOR[FRAME_CLASS_TYPES[fc][1]] = FRAME_CLASS_TYPES[fc][0];
  Object.assign(FRAME_CLASS_TYPES[fc][0].prototype, {
    TYPENUM: fc,
    NAME: FRAME_CLASS_TYPES[fc][1]
  });
}

//----------------------------------------------------------------------

const CREATORS = [ZRQINIT_HEADER, ZRINIT_HEADER, ZSINIT_HEADER, ZACK_HEADER, ZFILE_HEADER, ZSKIP_HEADER, 'ZNAK', ZABORT_HEADER, ZFIN_HEADER, ZRPOS_HEADER, ZDATA_HEADER, ZEOF_HEADER, ZFERR_HEADER, 'ZCRC',
//ZCRC_HEADER, -- leaving unimplemented?
'ZCHALLENGE', 'ZCOMPL', 'ZCAN', 'ZFREECNT',
// ZFREECNT_HEADER,
'ZCOMMAND', 'ZSTDERR'];
function _get_blank_header(typenum) {
  var creator = CREATORS[typenum];
  if (typeof creator === "string") {
    throw "Received unsupported header: " + creator;
  }

  /*
  if (creator === ZCRC_HEADER) {
      return new creator([0, 0, 0, 0]);
  }
  */

  return _get_blank_header_from_constructor(creator);
}

//referenced outside TODO
function _get_blank_header_from_constructor(creator) {
  if (creator.prototype instanceof ZOffsetHeader) {
    return new creator(0);
  }
  return new creator([]);
}
function _parse_binary16(bytes_arr) {
  //The max length of a ZDLE-encoded binary header w/ 16-bit CRC is:
  //  3 initial bytes, NOT ZDLE-encoded
  //  2 typenum bytes     (1 decoded)
  //  8 data bytes        (4 decoded)
  //  4 CRC bytes         (2 decoded)

  //A 16-bit payload has 7 ZDLE-encoded octets.
  //The ZDLE-encoded octets follow the initial prefix.
  var zdle_decoded = Zmodem.ZDLE.splice(bytes_arr, BINARY16_HEADER_PREFIX.length, 7);
  return zdle_decoded && _parse_non_zdle_binary16(zdle_decoded);
}
function _parse_non_zdle_binary16(decoded) {
  Zmodem.CRC.verify16(decoded.slice(0, 5), decoded.slice(5));
  var typenum = decoded[0];
  var hdr = _get_blank_header(typenum);
  hdr._bytes4 = decoded.slice(1, 5);
  return hdr;
}
function _parse_binary32(bytes_arr) {
  //Same deal as with 16-bit CRC except there are two more
  //potentially ZDLE-encoded bytes, for a total of 9.
  var zdle_decoded = Zmodem.ZDLE.splice(bytes_arr,
  //omit the leading "*", ZDLE, and "C"
  BINARY32_HEADER_PREFIX.length, 9);
  if (!zdle_decoded) return;
  Zmodem.CRC.verify32(zdle_decoded.slice(0, 5), zdle_decoded.slice(5));
  var typenum = zdle_decoded[0];
  var hdr = _get_blank_header(typenum);
  hdr._bytes4 = zdle_decoded.slice(1, 5);
  return hdr;
}
function _parse_hex(bytes_arr) {
  //A hex header always has:
  //  4 bytes for the ** . ZDLE . 'B'
  //  2 hex bytes for the header type
  //  8 hex bytes for the header content
  //  4 hex bytes for the CRC
  //  1-2 bytes for (CR/)LF
  //  (...and at this point the trailing XON is already stripped)
  //
  //----------------------------------------------------------------------
  //A carriage return and line feed are sent with HEX headers.  The
  //receive routine expects to see at least one of these characters, two
  //if the first is CR.
  //----------------------------------------------------------------------
  //
  //^^ I guess it can be either CR/LF or just LF … though those two
  //sentences appear to be saying contradictory things.

  var lf_pos = bytes_arr.indexOf(0x8a); //lrzsz sends this

  if (-1 === lf_pos) {
    lf_pos = bytes_arr.indexOf(0x0a);
  }
  var hdr_err, hex_bytes;
  if (-1 === lf_pos) {
    if (bytes_arr.length > 11) {
      hdr_err = "Invalid hex header - no LF detected within 12 bytes!";
    }

    //incomplete header
    return;
  } else {
    hex_bytes = bytes_arr.splice(0, lf_pos);

    //Trim off the LF
    bytes_arr.shift();
    if (hex_bytes.length === 19) {
      //NB: The spec says CR but seems to treat high-bit variants
      //of control characters the same as the regulars; should we
      //also allow 0x8d?
      var preceding = hex_bytes.pop();
      if (preceding !== 0x0d && preceding !== 0x8d) {
        hdr_err = "Invalid hex header: (CR/)LF doesn’t have CR!";
      }
    } else if (hex_bytes.length !== 18) {
      hdr_err = "Invalid hex header: invalid number of bytes before LF!";
    }
  }
  if (hdr_err) {
    hdr_err += " (" + hex_bytes.length + " bytes: " + hex_bytes.join() + ")";
    throw hdr_err;
  }
  hex_bytes.splice(0, 4);

  //Should be 7 bytes ultimately:
  //  1 for typenum
  //  4 for header data
  //  2 for CRC
  var octets = Zmodem.ENCODELIB.parse_hex_octets(hex_bytes);
  return _parse_non_zdle_binary16(octets);
}
Zmodem.Header.parse_hex = _parse_hex;

/***/ },

/***/ 3156
/*!**********************************************!*\
  !*** ../app/node_modules/is-string/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);

/** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
var $strValueOf = callBound('String.prototype.valueOf');

/** @type {import('.')} */
var tryStringObject = function tryStringObject(value) {
  try {
    $strValueOf(value);
    return true;
  } catch (e) {
    return false;
  }
};
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
var $toString = callBound('Object.prototype.toString');
var strClass = '[object String]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();

/** @type {import('.')} */
module.exports = function isString(value) {
  if (typeof value === 'string') {
    return true;
  }
  if (!value || typeof value !== 'object') {
    return false;
  }
  return hasToStringTag ? tryStringObject(value) : $toString(value) === strClass;
};

/***/ },

/***/ 3306
/*!******************************************************************!*\
  !*** ./src/components/terminalToolbar.component.scss?ngResource ***!
  \******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./terminalToolbar.component.scss?ngResource */ 7061);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 3413
/*!****************************************************!*\
  !*** ../app/node_modules/math-intrinsics/floor.js ***!
  \****************************************************/
(module) {

"use strict";


/** @type {import('./floor')} */
module.exports = Math.floor;

/***/ },

/***/ 3421
/*!**************************************************************!*\
  !*** ./node_modules/@xterm/addon-canvas/lib/addon-canvas.js ***!
  \**************************************************************/
(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, () => (() => {
  "use strict";

  var e = {
      903: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BaseRenderLayer = void 0;
        const s = i(274),
          r = i(627),
          o = i(237),
          n = i(860),
          a = i(374),
          h = i(296),
          l = i(345),
          c = i(859),
          d = i(399),
          _ = i(855);
        class u extends c.Disposable {
          get canvas() {
            return this._canvas;
          }
          get cacheCanvas() {
            return this._charAtlas?.pages[0].canvas;
          }
          constructor(e, t, i, r, o, n, a, d, _, u) {
            super(), this._terminal = e, this._container = t, this._alpha = o, this._themeService = n, this._bufferService = a, this._optionsService = d, this._decorationService = _, this._coreBrowserService = u, this._deviceCharWidth = 0, this._deviceCharHeight = 0, this._deviceCellWidth = 0, this._deviceCellHeight = 0, this._deviceCharLeft = 0, this._deviceCharTop = 0, this._selectionModel = (0, h.createSelectionRenderModel)(), this._bitmapGenerator = [], this._charAtlasDisposable = this.register(new c.MutableDisposable()), this._onAddTextureAtlasCanvas = this.register(new l.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._cellColorResolver = new s.CellColorResolver(this._terminal, this._optionsService, this._selectionModel, this._decorationService, this._coreBrowserService, this._themeService), this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add(`xterm-${i}-layer`), this._canvas.style.zIndex = r.toString(), this._initCanvas(), this._container.appendChild(this._canvas), this._refreshCharAtlas(this._themeService.colors), this.register(this._themeService.onChangeColors(e => {
              this._refreshCharAtlas(e), this.reset(), this.handleSelectionChanged(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
            })), this.register((0, c.toDisposable)(() => {
              this._canvas.remove();
            }));
          }
          _initCanvas() {
            this._ctx = (0, a.throwIfFalsy)(this._canvas.getContext("2d", {
              alpha: this._alpha
            })), this._alpha || this._clearAll();
          }
          handleBlur() {}
          handleFocus() {}
          handleCursorMove() {}
          handleGridChanged(e, t) {}
          handleSelectionChanged(e, t, i = !1) {
            this._selectionModel.update(this._terminal._core, e, t, i);
          }
          _setTransparency(e) {
            if (e === this._alpha) return;
            const t = this._canvas;
            this._alpha = e, this._canvas = this._canvas.cloneNode(), this._initCanvas(), this._container.replaceChild(this._canvas, t), this._refreshCharAtlas(this._themeService.colors), this.handleGridChanged(0, this._bufferService.rows - 1);
          }
          _refreshCharAtlas(e) {
            if (!(this._deviceCharWidth <= 0 && this._deviceCharHeight <= 0)) {
              this._charAtlas = (0, r.acquireTextureAtlas)(this._terminal, this._optionsService.rawOptions, e, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr), this._charAtlasDisposable.value = (0, l.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas), this._charAtlas.warmUp();
              for (let e = 0; e < this._charAtlas.pages.length; e++) this._bitmapGenerator[e] = new g(this._charAtlas.pages[e].canvas);
            }
          }
          resize(e) {
            this._deviceCellWidth = e.device.cell.width, this._deviceCellHeight = e.device.cell.height, this._deviceCharWidth = e.device.char.width, this._deviceCharHeight = e.device.char.height, this._deviceCharLeft = e.device.char.left, this._deviceCharTop = e.device.char.top, this._canvas.width = e.device.canvas.width, this._canvas.height = e.device.canvas.height, this._canvas.style.width = `${e.css.canvas.width}px`, this._canvas.style.height = `${e.css.canvas.height}px`, this._alpha || this._clearAll(), this._refreshCharAtlas(this._themeService.colors);
          }
          clearTextureAtlas() {
            this._charAtlas?.clearTexture();
          }
          _fillCells(e, t, i, s) {
            this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight);
          }
          _fillMiddleLineAtCells(e, t, i = 1) {
            const s = Math.ceil(.5 * this._deviceCellHeight);
            this._ctx.fillRect(e * this._deviceCellWidth, (t + 1) * this._deviceCellHeight - s - this._coreBrowserService.dpr, i * this._deviceCellWidth, this._coreBrowserService.dpr);
          }
          _fillBottomLineAtCells(e, t, i = 1, s = 0) {
            this._ctx.fillRect(e * this._deviceCellWidth, (t + 1) * this._deviceCellHeight + s - this._coreBrowserService.dpr - 1, i * this._deviceCellWidth, this._coreBrowserService.dpr);
          }
          _curlyUnderlineAtCell(e, t, i = 1) {
            this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
            const s = this._coreBrowserService.dpr;
            this._ctx.lineWidth = s;
            for (let r = 0; r < i; r++) {
              const i = (e + r) * this._deviceCellWidth,
                o = (e + r + .5) * this._deviceCellWidth,
                n = (e + r + 1) * this._deviceCellWidth,
                a = (t + 1) * this._deviceCellHeight - s - 1,
                h = a - s,
                l = a + s;
              this._ctx.moveTo(i, a), this._ctx.bezierCurveTo(i, h, o, h, o, a), this._ctx.bezierCurveTo(o, l, n, l, n, a);
            }
            this._ctx.stroke(), this._ctx.restore();
          }
          _dottedUnderlineAtCell(e, t, i = 1) {
            this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
            const s = this._coreBrowserService.dpr;
            this._ctx.lineWidth = s, this._ctx.setLineDash([2 * s, s]);
            const r = e * this._deviceCellWidth,
              o = (t + 1) * this._deviceCellHeight - s - 1;
            this._ctx.moveTo(r, o);
            for (let t = 0; t < i; t++) {
              const s = (e + i + t) * this._deviceCellWidth;
              this._ctx.lineTo(s, o);
            }
            this._ctx.stroke(), this._ctx.closePath(), this._ctx.restore();
          }
          _dashedUnderlineAtCell(e, t, i = 1) {
            this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
            const s = this._coreBrowserService.dpr;
            this._ctx.lineWidth = s, this._ctx.setLineDash([4 * s, 3 * s]);
            const r = e * this._deviceCellWidth,
              o = (e + i) * this._deviceCellWidth,
              n = (t + 1) * this._deviceCellHeight - s - 1;
            this._ctx.moveTo(r, n), this._ctx.lineTo(o, n), this._ctx.stroke(), this._ctx.closePath(), this._ctx.restore();
          }
          _fillLeftLineAtCell(e, t, i) {
            this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, this._coreBrowserService.dpr * i, this._deviceCellHeight);
          }
          _strokeRectAtCell(e, t, i, s) {
            const r = this._coreBrowserService.dpr;
            this._ctx.lineWidth = r, this._ctx.strokeRect(e * this._deviceCellWidth + r / 2, t * this._deviceCellHeight + r / 2, i * this._deviceCellWidth - r, s * this._deviceCellHeight - r);
          }
          _clearAll() {
            this._alpha ? this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height));
          }
          _clearCells(e, t, i, s) {
            this._alpha ? this._ctx.clearRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight));
          }
          _fillCharTrueColor(e, t, i) {
            this._ctx.font = this._getFont(!1, !1), this._ctx.textBaseline = o.TEXT_BASELINE, this._clipRow(i);
            let s = !1;
            !1 !== this._optionsService.rawOptions.customGlyphs && (s = (0, n.tryDrawCustomChar)(this._ctx, e.getChars(), t * this._deviceCellWidth, i * this._deviceCellHeight, this._deviceCellWidth, this._deviceCellHeight, this._optionsService.rawOptions.fontSize, this._coreBrowserService.dpr)), s || this._ctx.fillText(e.getChars(), t * this._deviceCellWidth + this._deviceCharLeft, i * this._deviceCellHeight + this._deviceCharTop + this._deviceCharHeight);
          }
          _drawChars(e, t, i) {
            const s = e.getChars();
            if (this._cellColorResolver.resolve(e, t, this._bufferService.buffer.ydisp + i, this._deviceCellWidth), !this._charAtlas) return;
            let r;
            r = s && s.length > 1 ? this._charAtlas.getRasterizedGlyphCombinedChar(s, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext, !0) : this._charAtlas.getRasterizedGlyph(e.getCode() || _.WHITESPACE_CELL_CODE, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext, !0), r.size.x && r.size.y && (this._ctx.save(), this._clipRow(i), this._bitmapGenerator[r.texturePage] && this._charAtlas.pages[r.texturePage].canvas !== this._bitmapGenerator[r.texturePage].canvas && (this._bitmapGenerator[r.texturePage]?.bitmap?.close(), delete this._bitmapGenerator[r.texturePage]), this._charAtlas.pages[r.texturePage].version !== this._bitmapGenerator[r.texturePage]?.version && (this._bitmapGenerator[r.texturePage] || (this._bitmapGenerator[r.texturePage] = new g(this._charAtlas.pages[r.texturePage].canvas)), this._bitmapGenerator[r.texturePage].refresh(), this._bitmapGenerator[r.texturePage].version = this._charAtlas.pages[r.texturePage].version), this._ctx.drawImage(this._bitmapGenerator[r.texturePage]?.bitmap || this._charAtlas.pages[r.texturePage].canvas, r.texturePosition.x, r.texturePosition.y, r.size.x, r.size.y, t * this._deviceCellWidth + this._deviceCharLeft - r.offset.x, i * this._deviceCellHeight + this._deviceCharTop - r.offset.y, r.size.x, r.size.y), this._ctx.restore());
          }
          _clipRow(e) {
            this._ctx.beginPath(), this._ctx.rect(0, e * this._deviceCellHeight, this._bufferService.cols * this._deviceCellWidth, this._deviceCellHeight), this._ctx.clip();
          }
          _getFont(e, t) {
            return `${t ? "italic" : ""} ${e ? this._optionsService.rawOptions.fontWeightBold : this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize * this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`;
          }
        }
        t.BaseRenderLayer = u;
        class g {
          get bitmap() {
            return this._bitmap;
          }
          constructor(e) {
            this.canvas = e, this._state = 0, this._commitTimeout = void 0, this._bitmap = void 0, this.version = -1;
          }
          refresh() {
            this._bitmap?.close(), this._bitmap = void 0, d.isSafari || (void 0 === this._commitTimeout && (this._commitTimeout = window.setTimeout(() => this._generate(), 100)), 1 === this._state && (this._state = 2));
          }
          _generate() {
            0 === this._state && (this._bitmap?.close(), this._bitmap = void 0, this._state = 1, window.createImageBitmap(this.canvas).then(e => {
              2 === this._state ? this.refresh() : this._bitmap = e, this._state = 0;
            }), this._commitTimeout && (this._commitTimeout = void 0));
          }
        }
      },
      949: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CanvasRenderer = void 0;
        const s = i(627),
          r = i(56),
          o = i(374),
          n = i(345),
          a = i(859),
          h = i(873),
          l = i(43),
          c = i(630),
          d = i(744);
        class _ extends a.Disposable {
          constructor(e, t, i, _, u, g, f, v, C, p, m) {
            super(), this._terminal = e, this._screenElement = t, this._bufferService = _, this._charSizeService = u, this._optionsService = g, this._coreBrowserService = C, this._themeService = m, this._observerDisposable = this.register(new a.MutableDisposable()), this._onRequestRedraw = this.register(new n.EventEmitter()), this.onRequestRedraw = this._onRequestRedraw.event, this._onChangeTextureAtlas = this.register(new n.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new n.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
            const x = this._optionsService.rawOptions.allowTransparency;
            this._renderLayers = [new d.TextRenderLayer(this._terminal, this._screenElement, 0, x, this._bufferService, this._optionsService, f, p, this._coreBrowserService, m), new c.SelectionRenderLayer(this._terminal, this._screenElement, 1, this._bufferService, this._coreBrowserService, p, this._optionsService, m), new l.LinkRenderLayer(this._terminal, this._screenElement, 2, i, this._bufferService, this._optionsService, p, this._coreBrowserService, m), new h.CursorRenderLayer(this._terminal, this._screenElement, 3, this._onRequestRedraw, this._bufferService, this._optionsService, v, this._coreBrowserService, p, m)];
            for (const e of this._renderLayers) (0, n.forwardEvent)(e.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas);
            this.dimensions = (0, o.createRenderDimensions)(), this._devicePixelRatio = this._coreBrowserService.dpr, this._updateDimensions(), this._observerDisposable.value = (0, r.observeDevicePixelDimensions)(this._renderLayers[0].canvas, this._coreBrowserService.window, (e, t) => this._setCanvasDevicePixelDimensions(e, t)), this.register(this._coreBrowserService.onWindowChange(e => {
              this._observerDisposable.value = (0, r.observeDevicePixelDimensions)(this._renderLayers[0].canvas, e, (e, t) => this._setCanvasDevicePixelDimensions(e, t));
            })), this.register((0, a.toDisposable)(() => {
              for (const e of this._renderLayers) e.dispose();
              (0, s.removeTerminalFromCache)(this._terminal);
            }));
          }
          get textureAtlas() {
            return this._renderLayers[0].cacheCanvas;
          }
          handleDevicePixelRatioChange() {
            this._devicePixelRatio !== this._coreBrowserService.dpr && (this._devicePixelRatio = this._coreBrowserService.dpr, this.handleResize(this._bufferService.cols, this._bufferService.rows));
          }
          handleResize(e, t) {
            this._updateDimensions();
            for (const e of this._renderLayers) e.resize(this.dimensions);
            this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
          }
          handleCharSizeChanged() {
            this.handleResize(this._bufferService.cols, this._bufferService.rows);
          }
          handleBlur() {
            this._runOperation(e => e.handleBlur());
          }
          handleFocus() {
            this._runOperation(e => e.handleFocus());
          }
          handleSelectionChanged(e, t, i = !1) {
            this._runOperation(s => s.handleSelectionChanged(e, t, i)), this._themeService.colors.selectionForeground && this._onRequestRedraw.fire({
              start: 0,
              end: this._bufferService.rows - 1
            });
          }
          handleCursorMove() {
            this._runOperation(e => e.handleCursorMove());
          }
          clear() {
            this._runOperation(e => e.reset());
          }
          _runOperation(e) {
            for (const t of this._renderLayers) e(t);
          }
          renderRows(e, t) {
            for (const i of this._renderLayers) i.handleGridChanged(e, t);
          }
          clearTextureAtlas() {
            for (const e of this._renderLayers) e.clearTextureAtlas();
          }
          _updateDimensions() {
            if (!this._charSizeService.hasValidSize) return;
            const e = this._coreBrowserService.dpr;
            this.dimensions.device.char.width = Math.floor(this._charSizeService.width * e), this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * e), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.top = 1 === this._optionsService.rawOptions.lineHeight ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.char.left = Math.floor(this._optionsService.rawOptions.letterSpacing / 2), this.dimensions.device.canvas.height = this._bufferService.rows * this.dimensions.device.cell.height, this.dimensions.device.canvas.width = this._bufferService.cols * this.dimensions.device.cell.width, this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / e), this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / e), this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows, this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols;
          }
          _setCanvasDevicePixelDimensions(e, t) {
            this.dimensions.device.canvas.height = t, this.dimensions.device.canvas.width = e;
            for (const e of this._renderLayers) e.resize(this.dimensions);
            this._requestRedrawViewport();
          }
          _requestRedrawViewport() {
            this._onRequestRedraw.fire({
              start: 0,
              end: this._bufferService.rows - 1
            });
          }
        }
        t.CanvasRenderer = _;
      },
      873: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CursorRenderLayer = void 0;
        const s = i(457),
          r = i(859),
          o = i(399),
          n = i(782),
          a = i(903);
        class h extends a.BaseRenderLayer {
          constructor(e, t, i, s, o, a, h, l, c, d) {
            super(e, t, "cursor", i, !0, d, o, a, c, l), this._onRequestRedraw = s, this._coreService = h, this._cursorBlinkStateManager = this.register(new r.MutableDisposable()), this._cell = new n.CellData(), this._state = {
              x: 0,
              y: 0,
              isFocused: !1,
              style: "",
              width: 0
            }, this._cursorRenderers = {
              bar: this._renderBarCursor.bind(this),
              block: this._renderBlockCursor.bind(this),
              underline: this._renderUnderlineCursor.bind(this),
              outline: this._renderOutlineCursor.bind(this)
            }, this.register(a.onOptionChange(() => this._handleOptionsChanged())), this._handleOptionsChanged();
          }
          resize(e) {
            super.resize(e), this._state = {
              x: 0,
              y: 0,
              isFocused: !1,
              style: "",
              width: 0
            };
          }
          reset() {
            this._clearCursor(), this._cursorBlinkStateManager.value?.restartBlinkAnimation(), this._handleOptionsChanged();
          }
          handleBlur() {
            this._cursorBlinkStateManager.value?.pause(), this._onRequestRedraw.fire({
              start: this._bufferService.buffer.y,
              end: this._bufferService.buffer.y
            });
          }
          handleFocus() {
            this._cursorBlinkStateManager.value?.resume(), this._onRequestRedraw.fire({
              start: this._bufferService.buffer.y,
              end: this._bufferService.buffer.y
            });
          }
          _handleOptionsChanged() {
            this._optionsService.rawOptions.cursorBlink ? this._cursorBlinkStateManager.value || (this._cursorBlinkStateManager.value = new s.CursorBlinkStateManager(() => this._render(!0), this._coreBrowserService)) : this._cursorBlinkStateManager.clear(), this._onRequestRedraw.fire({
              start: this._bufferService.buffer.y,
              end: this._bufferService.buffer.y
            });
          }
          handleCursorMove() {
            this._cursorBlinkStateManager.value?.restartBlinkAnimation();
          }
          handleGridChanged(e, t) {
            !this._cursorBlinkStateManager.value || this._cursorBlinkStateManager.value.isPaused ? this._render(!1) : this._cursorBlinkStateManager.value.restartBlinkAnimation();
          }
          _render(e) {
            if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) return void this._clearCursor();
            const t = this._bufferService.buffer.ybase + this._bufferService.buffer.y,
              i = t - this._bufferService.buffer.ydisp;
            if (i < 0 || i >= this._bufferService.rows) return void this._clearCursor();
            const s = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);
            if (this._bufferService.buffer.lines.get(t).loadCell(s, this._cell), void 0 !== this._cell.content) {
              if (!this._coreBrowserService.isFocused) {
                this._clearCursor(), this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css;
                const e = this._optionsService.rawOptions.cursorStyle,
                  t = this._optionsService.rawOptions.cursorInactiveStyle;
                return t && "none" !== t && this._cursorRenderers[t](s, i, this._cell), this._ctx.restore(), this._state.x = s, this._state.y = i, this._state.isFocused = !1, this._state.style = e, void (this._state.width = this._cell.getWidth());
              }
              if (!this._cursorBlinkStateManager.value || this._cursorBlinkStateManager.value.isCursorVisible) {
                if (this._state) {
                  if (this._state.x === s && this._state.y === i && this._state.isFocused === this._coreBrowserService.isFocused && this._state.style === this._optionsService.rawOptions.cursorStyle && this._state.width === this._cell.getWidth()) return;
                  this._clearCursor();
                }
                this._ctx.save(), this._cursorRenderers[this._optionsService.rawOptions.cursorStyle || "block"](s, i, this._cell), this._ctx.restore(), this._state.x = s, this._state.y = i, this._state.isFocused = !1, this._state.style = this._optionsService.rawOptions.cursorStyle, this._state.width = this._cell.getWidth();
              } else this._clearCursor();
            }
          }
          _clearCursor() {
            this._state && (o.isFirefox || this._coreBrowserService.dpr < 1 ? this._clearAll() : this._clearCells(this._state.x, this._state.y, this._state.width, 1), this._state = {
              x: 0,
              y: 0,
              isFocused: !1,
              style: "",
              width: 0
            });
          }
          _renderBarCursor(e, t, i) {
            this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillLeftLineAtCell(e, t, this._optionsService.rawOptions.cursorWidth), this._ctx.restore();
          }
          _renderBlockCursor(e, t, i) {
            this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillCells(e, t, i.getWidth(), 1), this._ctx.fillStyle = this._themeService.colors.cursorAccent.css, this._fillCharTrueColor(i, e, t), this._ctx.restore();
          }
          _renderUnderlineCursor(e, t, i) {
            this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillBottomLineAtCells(e, t), this._ctx.restore();
          }
          _renderOutlineCursor(e, t, i) {
            this._ctx.save(), this._ctx.strokeStyle = this._themeService.colors.cursor.css, this._strokeRectAtCell(e, t, i.getWidth(), 1), this._ctx.restore();
          }
        }
        t.CursorRenderLayer = h;
      },
      574: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.GridCache = void 0, t.GridCache = class {
          constructor() {
            this.cache = [];
          }
          resize(e, t) {
            for (let i = 0; i < e; i++) {
              this.cache.length <= i && this.cache.push([]);
              for (let e = this.cache[i].length; e < t; e++) this.cache[i].push(void 0);
              this.cache[i].length = t;
            }
            this.cache.length = e;
          }
          clear() {
            for (let e = 0; e < this.cache.length; e++) for (let t = 0; t < this.cache[e].length; t++) this.cache[e][t] = void 0;
          }
        };
      },
      43: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.LinkRenderLayer = void 0;
        const s = i(197),
          r = i(237),
          o = i(903);
        class n extends o.BaseRenderLayer {
          constructor(e, t, i, s, r, o, n, a, h) {
            super(e, t, "link", i, !0, h, r, o, n, a), this.register(s.onShowLinkUnderline(e => this._handleShowLinkUnderline(e))), this.register(s.onHideLinkUnderline(e => this._handleHideLinkUnderline(e)));
          }
          resize(e) {
            super.resize(e), this._state = void 0;
          }
          reset() {
            this._clearCurrentLink();
          }
          _clearCurrentLink() {
            if (this._state) {
              this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);
              const e = this._state.y2 - this._state.y1 - 1;
              e > 0 && this._clearCells(0, this._state.y1 + 1, this._state.cols, e), this._clearCells(0, this._state.y2, this._state.x2, 1), this._state = void 0;
            }
          }
          _handleShowLinkUnderline(e) {
            if (e.fg === r.INVERTED_DEFAULT_COLOR ? this._ctx.fillStyle = this._themeService.colors.background.css : e.fg && (0, s.is256Color)(e.fg) ? this._ctx.fillStyle = this._themeService.colors.ansi[e.fg].css : this._ctx.fillStyle = this._themeService.colors.foreground.css, e.y1 === e.y2) this._fillBottomLineAtCells(e.x1, e.y1, e.x2 - e.x1);else {
              this._fillBottomLineAtCells(e.x1, e.y1, e.cols - e.x1);
              for (let t = e.y1 + 1; t < e.y2; t++) this._fillBottomLineAtCells(0, t, e.cols);
              this._fillBottomLineAtCells(0, e.y2, e.x2);
            }
            this._state = e;
          }
          _handleHideLinkUnderline(e) {
            this._clearCurrentLink();
          }
        }
        t.LinkRenderLayer = n;
      },
      630: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.SelectionRenderLayer = void 0;
        const s = i(903);
        class r extends s.BaseRenderLayer {
          constructor(e, t, i, s, r, o, n, a) {
            super(e, t, "selection", i, !0, a, s, n, o, r), this._clearState();
          }
          _clearState() {
            this._state = {
              start: void 0,
              end: void 0,
              columnSelectMode: void 0,
              ydisp: void 0
            };
          }
          resize(e) {
            super.resize(e), this._selectionModel.selectionStart && this._selectionModel.selectionEnd && (this._clearState(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode));
          }
          reset() {
            this._state.start && this._state.end && (this._clearState(), this._clearAll());
          }
          handleBlur() {
            this.reset(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
          }
          handleFocus() {
            this.reset(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
          }
          handleSelectionChanged(e, t, i) {
            super.handleSelectionChanged(e, t, i), this._redrawSelection(e, t, i);
          }
          _redrawSelection(e, t, i) {
            if (!this._didStateChange(e, t, i, this._bufferService.buffer.ydisp)) return;
            if (this._clearAll(), !e || !t) return void this._clearState();
            const s = e[1] - this._bufferService.buffer.ydisp,
              r = t[1] - this._bufferService.buffer.ydisp,
              o = Math.max(s, 0),
              n = Math.min(r, this._bufferService.rows - 1);
            if (o >= this._bufferService.rows || n < 0) this._state.ydisp = this._bufferService.buffer.ydisp;else {
              if (this._ctx.fillStyle = (this._coreBrowserService.isFocused ? this._themeService.colors.selectionBackgroundTransparent : this._themeService.colors.selectionInactiveBackgroundTransparent).css, i) {
                const i = e[0],
                  s = t[0] - i,
                  r = n - o + 1;
                this._fillCells(i, o, s, r);
              } else {
                const i = s === o ? e[0] : 0,
                  a = o === r ? t[0] : this._bufferService.cols;
                this._fillCells(i, o, a - i, 1);
                const h = Math.max(n - o - 1, 0);
                if (this._fillCells(0, o + 1, this._bufferService.cols, h), o !== n) {
                  const e = r === n ? t[0] : this._bufferService.cols;
                  this._fillCells(0, n, e, 1);
                }
              }
              this._state.start = [e[0], e[1]], this._state.end = [t[0], t[1]], this._state.columnSelectMode = i, this._state.ydisp = this._bufferService.buffer.ydisp;
            }
          }
          _didStateChange(e, t, i, s) {
            return !this._areCoordinatesEqual(e, this._state.start) || !this._areCoordinatesEqual(t, this._state.end) || i !== this._state.columnSelectMode || s !== this._state.ydisp;
          }
          _areCoordinatesEqual(e, t) {
            return !(!e || !t) && e[0] === t[0] && e[1] === t[1];
          }
        }
        t.SelectionRenderLayer = r;
      },
      744: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TextRenderLayer = void 0;
        const s = i(577),
          r = i(147),
          o = i(782),
          n = i(855),
          a = i(903),
          h = i(574);
        class l extends a.BaseRenderLayer {
          constructor(e, t, i, s, r, n, a, l, c, d) {
            super(e, t, "text", i, s, d, r, n, l, c), this._characterJoinerService = a, this._characterWidth = 0, this._characterFont = "", this._characterOverlapCache = {}, this._workCell = new o.CellData(), this._state = new h.GridCache(), this.register(n.onSpecificOptionChange("allowTransparency", e => this._setTransparency(e)));
          }
          resize(e) {
            super.resize(e);
            const t = this._getFont(!1, !1);
            this._characterWidth === e.device.char.width && this._characterFont === t || (this._characterWidth = e.device.char.width, this._characterFont = t, this._characterOverlapCache = {}), this._state.clear(), this._state.resize(this._bufferService.cols, this._bufferService.rows);
          }
          reset() {
            this._state.clear(), this._clearAll();
          }
          _forEachCell(e, t, i) {
            for (let r = e; r <= t; r++) {
              const e = r + this._bufferService.buffer.ydisp,
                t = this._bufferService.buffer.lines.get(e),
                o = this._characterJoinerService.getJoinedCharacters(e);
              for (let e = 0; e < this._bufferService.cols; e++) {
                t.loadCell(e, this._workCell);
                let a = this._workCell,
                  h = !1,
                  l = e;
                if (0 !== a.getWidth()) {
                  if (o.length > 0 && e === o[0][0]) {
                    h = !0;
                    const e = o.shift();
                    a = new s.JoinedCellData(this._workCell, t.translateToString(!0, e[0], e[1]), e[1] - e[0]), l = e[1] - 1;
                  }
                  !h && this._isOverlapping(a) && l < t.length - 1 && t.getCodePoint(l + 1) === n.NULL_CELL_CODE && (a.content &= -12582913, a.content |= 2 << 22), i(a, e, r), e = l;
                }
              }
            }
          }
          _drawBackground(e, t) {
            const i = this._ctx,
              s = this._bufferService.cols;
            let o = 0,
              n = 0,
              a = null;
            i.save(), this._forEachCell(e, t, (e, t, h) => {
              let l = null;
              e.isInverse() ? l = e.isFgDefault() ? this._themeService.colors.foreground.css : e.isFgRGB() ? `rgb(${r.AttributeData.toColorRGB(e.getFgColor()).join(",")})` : this._themeService.colors.ansi[e.getFgColor()].css : e.isBgRGB() ? l = `rgb(${r.AttributeData.toColorRGB(e.getBgColor()).join(",")})` : e.isBgPalette() && (l = this._themeService.colors.ansi[e.getBgColor()].css);
              let c = !1;
              this._decorationService.forEachDecorationAtCell(t, this._bufferService.buffer.ydisp + h, void 0, e => {
                "top" !== e.options.layer && c || (e.backgroundColorRGB && (l = e.backgroundColorRGB.css), c = "top" === e.options.layer);
              }), null === a && (o = t, n = h), h !== n ? (i.fillStyle = a || "", this._fillCells(o, n, s - o, 1), o = t, n = h) : a !== l && (i.fillStyle = a || "", this._fillCells(o, n, t - o, 1), o = t, n = h), a = l;
            }), null !== a && (i.fillStyle = a, this._fillCells(o, n, s - o, 1)), i.restore();
          }
          _drawForeground(e, t) {
            this._forEachCell(e, t, (e, t, i) => this._drawChars(e, t, i));
          }
          handleGridChanged(e, t) {
            0 !== this._state.cache.length && (this._charAtlas && this._charAtlas.beginFrame(), this._clearCells(0, e, this._bufferService.cols, t - e + 1), this._drawBackground(e, t), this._drawForeground(e, t));
          }
          _isOverlapping(e) {
            if (1 !== e.getWidth()) return !1;
            if (e.getCode() < 256) return !1;
            const t = e.getChars();
            if (this._characterOverlapCache.hasOwnProperty(t)) return this._characterOverlapCache[t];
            this._ctx.save(), this._ctx.font = this._characterFont;
            const i = Math.floor(this._ctx.measureText(t).width) > this._characterWidth;
            return this._ctx.restore(), this._characterOverlapCache[t] = i, i;
          }
        }
        t.TextRenderLayer = l;
      },
      274: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellColorResolver = void 0;
        const s = i(855),
          r = i(160),
          o = i(374);
        let n,
          a = 0,
          h = 0,
          l = !1,
          c = !1,
          d = !1,
          _ = 0;
        t.CellColorResolver = class {
          constructor(e, t, i, s, r, o) {
            this._terminal = e, this._optionService = t, this._selectionRenderModel = i, this._decorationService = s, this._coreBrowserService = r, this._themeService = o, this.result = {
              fg: 0,
              bg: 0,
              ext: 0
            };
          }
          resolve(e, t, i, u) {
            if (this.result.bg = e.bg, this.result.fg = e.fg, this.result.ext = 268435456 & e.bg ? e.extended.ext : 0, h = 0, a = 0, c = !1, l = !1, d = !1, n = this._themeService.colors, _ = 0, e.getCode() !== s.NULL_CELL_CODE && 4 === e.extended.underlineStyle) {
              const e = Math.max(1, Math.floor(this._optionService.rawOptions.fontSize * this._coreBrowserService.dpr / 15));
              _ = t * u % (2 * Math.round(e));
            }
            if (this._decorationService.forEachDecorationAtCell(t, i, "bottom", e => {
              e.backgroundColorRGB && (h = e.backgroundColorRGB.rgba >> 8 & 16777215, c = !0), e.foregroundColorRGB && (a = e.foregroundColorRGB.rgba >> 8 & 16777215, l = !0);
            }), d = this._selectionRenderModel.isCellSelected(this._terminal, t, i), d) {
              if (67108864 & this.result.fg || 0 != (50331648 & this.result.bg)) {
                if (67108864 & this.result.fg) switch (50331648 & this.result.fg) {
                  case 16777216:
                  case 33554432:
                    h = this._themeService.colors.ansi[255 & this.result.fg].rgba;
                    break;
                  case 50331648:
                    h = (16777215 & this.result.fg) << 8 | 255;
                    break;
                  default:
                    h = this._themeService.colors.foreground.rgba;
                } else switch (50331648 & this.result.bg) {
                  case 16777216:
                  case 33554432:
                    h = this._themeService.colors.ansi[255 & this.result.bg].rgba;
                    break;
                  case 50331648:
                    h = (16777215 & this.result.bg) << 8 | 255;
                }
                h = r.rgba.blend(h, 4294967040 & (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba | 128) >> 8 & 16777215;
              } else h = (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215;
              if (c = !0, n.selectionForeground && (a = n.selectionForeground.rgba >> 8 & 16777215, l = !0), (0, o.treatGlyphAsBackgroundColor)(e.getCode())) {
                if (67108864 & this.result.fg && 0 == (50331648 & this.result.bg)) a = (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215;else {
                  if (67108864 & this.result.fg) switch (50331648 & this.result.bg) {
                    case 16777216:
                    case 33554432:
                      a = this._themeService.colors.ansi[255 & this.result.bg].rgba;
                      break;
                    case 50331648:
                      a = (16777215 & this.result.bg) << 8 | 255;
                  } else switch (50331648 & this.result.fg) {
                    case 16777216:
                    case 33554432:
                      a = this._themeService.colors.ansi[255 & this.result.fg].rgba;
                      break;
                    case 50331648:
                      a = (16777215 & this.result.fg) << 8 | 255;
                      break;
                    default:
                      a = this._themeService.colors.foreground.rgba;
                  }
                  a = r.rgba.blend(a, 4294967040 & (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba | 128) >> 8 & 16777215;
                }
                l = !0;
              }
            }
            this._decorationService.forEachDecorationAtCell(t, i, "top", e => {
              e.backgroundColorRGB && (h = e.backgroundColorRGB.rgba >> 8 & 16777215, c = !0), e.foregroundColorRGB && (a = e.foregroundColorRGB.rgba >> 8 & 16777215, l = !0);
            }), c && (h = d ? -16777216 & e.bg & -134217729 | h | 50331648 : -16777216 & e.bg | h | 50331648), l && (a = -16777216 & e.fg & -67108865 | a | 50331648), 67108864 & this.result.fg && (c && !l && (a = 0 == (50331648 & this.result.bg) ? -134217728 & this.result.fg | 16777215 & n.background.rgba >> 8 | 50331648 : -134217728 & this.result.fg | 67108863 & this.result.bg, l = !0), !c && l && (h = 0 == (50331648 & this.result.fg) ? -67108864 & this.result.bg | 16777215 & n.foreground.rgba >> 8 | 50331648 : -67108864 & this.result.bg | 67108863 & this.result.fg, c = !0)), n = void 0, this.result.bg = c ? h : this.result.bg, this.result.fg = l ? a : this.result.fg, this.result.ext &= 536870911, this.result.ext |= _ << 29 & 3758096384;
          }
        };
      },
      627: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.removeTerminalFromCache = t.acquireTextureAtlas = void 0;
        const s = i(509),
          r = i(197),
          o = [];
        t.acquireTextureAtlas = function (e, t, i, n, a, h, l, c) {
          const d = (0, r.generateConfig)(n, a, h, l, t, i, c);
          for (let t = 0; t < o.length; t++) {
            const i = o[t],
              s = i.ownedBy.indexOf(e);
            if (s >= 0) {
              if ((0, r.configEquals)(i.config, d)) return i.atlas;
              1 === i.ownedBy.length ? (i.atlas.dispose(), o.splice(t, 1)) : i.ownedBy.splice(s, 1);
              break;
            }
          }
          for (let t = 0; t < o.length; t++) {
            const i = o[t];
            if ((0, r.configEquals)(i.config, d)) return i.ownedBy.push(e), i.atlas;
          }
          const _ = e._core,
            u = {
              atlas: new s.TextureAtlas(document, d, _.unicodeService),
              config: d,
              ownedBy: [e]
            };
          return o.push(u), u.atlas;
        }, t.removeTerminalFromCache = function (e) {
          for (let t = 0; t < o.length; t++) {
            const i = o[t].ownedBy.indexOf(e);
            if (-1 !== i) {
              1 === o[t].ownedBy.length ? (o[t].atlas.dispose(), o.splice(t, 1)) : o[t].ownedBy.splice(i, 1);
              break;
            }
          }
        };
      },
      197: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.is256Color = t.configEquals = t.generateConfig = void 0;
        const s = i(160);
        t.generateConfig = function (e, t, i, r, o, n, a) {
          const h = {
            foreground: n.foreground,
            background: n.background,
            cursor: s.NULL_COLOR,
            cursorAccent: s.NULL_COLOR,
            selectionForeground: s.NULL_COLOR,
            selectionBackgroundTransparent: s.NULL_COLOR,
            selectionBackgroundOpaque: s.NULL_COLOR,
            selectionInactiveBackgroundTransparent: s.NULL_COLOR,
            selectionInactiveBackgroundOpaque: s.NULL_COLOR,
            ansi: n.ansi.slice(),
            contrastCache: n.contrastCache,
            halfContrastCache: n.halfContrastCache
          };
          return {
            customGlyphs: o.customGlyphs,
            devicePixelRatio: a,
            letterSpacing: o.letterSpacing,
            lineHeight: o.lineHeight,
            deviceCellWidth: e,
            deviceCellHeight: t,
            deviceCharWidth: i,
            deviceCharHeight: r,
            fontFamily: o.fontFamily,
            fontSize: o.fontSize,
            fontWeight: o.fontWeight,
            fontWeightBold: o.fontWeightBold,
            allowTransparency: o.allowTransparency,
            drawBoldTextInBrightColors: o.drawBoldTextInBrightColors,
            minimumContrastRatio: o.minimumContrastRatio,
            colors: h
          };
        }, t.configEquals = function (e, t) {
          for (let i = 0; i < e.colors.ansi.length; i++) if (e.colors.ansi[i].rgba !== t.colors.ansi[i].rgba) return !1;
          return e.devicePixelRatio === t.devicePixelRatio && e.customGlyphs === t.customGlyphs && e.lineHeight === t.lineHeight && e.letterSpacing === t.letterSpacing && e.fontFamily === t.fontFamily && e.fontSize === t.fontSize && e.fontWeight === t.fontWeight && e.fontWeightBold === t.fontWeightBold && e.allowTransparency === t.allowTransparency && e.deviceCharWidth === t.deviceCharWidth && e.deviceCharHeight === t.deviceCharHeight && e.drawBoldTextInBrightColors === t.drawBoldTextInBrightColors && e.minimumContrastRatio === t.minimumContrastRatio && e.colors.foreground.rgba === t.colors.foreground.rgba && e.colors.background.rgba === t.colors.background.rgba;
        }, t.is256Color = function (e) {
          return 16777216 == (50331648 & e) || 33554432 == (50331648 & e);
        };
      },
      237: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TEXT_BASELINE = t.DIM_OPACITY = t.INVERTED_DEFAULT_COLOR = void 0;
        const s = i(399);
        t.INVERTED_DEFAULT_COLOR = 257, t.DIM_OPACITY = .5, t.TEXT_BASELINE = s.isFirefox || s.isLegacyEdge ? "bottom" : "ideographic";
      },
      457: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CursorBlinkStateManager = void 0;
        t.CursorBlinkStateManager = class {
          constructor(e, t) {
            this._renderCallback = e, this._coreBrowserService = t, this.isCursorVisible = !0, this._coreBrowserService.isFocused && this._restartInterval();
          }
          get isPaused() {
            return !(this._blinkStartTimeout || this._blinkInterval);
          }
          dispose() {
            this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          restartBlinkAnimation() {
            this.isPaused || (this._animationTimeRestarted = Date.now(), this.isCursorVisible = !0, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
              this._renderCallback(), this._animationFrame = void 0;
            })));
          }
          _restartInterval(e = 600) {
            this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout = this._coreBrowserService.window.setTimeout(() => {
              if (this._animationTimeRestarted) {
                const e = 600 - (Date.now() - this._animationTimeRestarted);
                if (this._animationTimeRestarted = void 0, e > 0) return void this._restartInterval(e);
              }
              this.isCursorVisible = !1, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                this._renderCallback(), this._animationFrame = void 0;
              }), this._blinkInterval = this._coreBrowserService.window.setInterval(() => {
                if (this._animationTimeRestarted) {
                  const e = 600 - (Date.now() - this._animationTimeRestarted);
                  return this._animationTimeRestarted = void 0, void this._restartInterval(e);
                }
                this.isCursorVisible = !this.isCursorVisible, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                  this._renderCallback(), this._animationFrame = void 0;
                });
              }, 600);
            }, e);
          }
          pause() {
            this.isCursorVisible = !0, this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          resume() {
            this.pause(), this._animationTimeRestarted = void 0, this._restartInterval(), this.restartBlinkAnimation();
          }
        };
      },
      860: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.tryDrawCustomChar = t.powerlineDefinitions = t.boxDrawingDefinitions = t.blockElementDefinitions = void 0;
        const s = i(374);
        t.blockElementDefinitions = {
          "▀": [{
            x: 0,
            y: 0,
            w: 8,
            h: 4
          }],
          "▁": [{
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "▂": [{
            x: 0,
            y: 6,
            w: 8,
            h: 2
          }],
          "▃": [{
            x: 0,
            y: 5,
            w: 8,
            h: 3
          }],
          "▄": [{
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "▅": [{
            x: 0,
            y: 3,
            w: 8,
            h: 5
          }],
          "▆": [{
            x: 0,
            y: 2,
            w: 8,
            h: 6
          }],
          "▇": [{
            x: 0,
            y: 1,
            w: 8,
            h: 7
          }],
          "█": [{
            x: 0,
            y: 0,
            w: 8,
            h: 8
          }],
          "▉": [{
            x: 0,
            y: 0,
            w: 7,
            h: 8
          }],
          "▊": [{
            x: 0,
            y: 0,
            w: 6,
            h: 8
          }],
          "▋": [{
            x: 0,
            y: 0,
            w: 5,
            h: 8
          }],
          "▌": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }],
          "▍": [{
            x: 0,
            y: 0,
            w: 3,
            h: 8
          }],
          "▎": [{
            x: 0,
            y: 0,
            w: 2,
            h: 8
          }],
          "▏": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }],
          "▐": [{
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }],
          "▔": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "▕": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }],
          "▖": [{
            x: 0,
            y: 4,
            w: 4,
            h: 4
          }],
          "▗": [{
            x: 4,
            y: 4,
            w: 4,
            h: 4
          }],
          "▘": [{
            x: 0,
            y: 0,
            w: 4,
            h: 4
          }],
          "▙": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "▚": [{
            x: 0,
            y: 0,
            w: 4,
            h: 4
          }, {
            x: 4,
            y: 4,
            w: 4,
            h: 4
          }],
          "▛": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }],
          "▜": [{
            x: 0,
            y: 0,
            w: 8,
            h: 4
          }, {
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }],
          "▝": [{
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }],
          "▞": [{
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }, {
            x: 0,
            y: 4,
            w: 4,
            h: 4
          }],
          "▟": [{
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "🭰": [{
            x: 1,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭱": [{
            x: 2,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭲": [{
            x: 3,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭳": [{
            x: 4,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭴": [{
            x: 5,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭵": [{
            x: 6,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭶": [{
            x: 0,
            y: 1,
            w: 8,
            h: 1
          }],
          "🭷": [{
            x: 0,
            y: 2,
            w: 8,
            h: 1
          }],
          "🭸": [{
            x: 0,
            y: 3,
            w: 8,
            h: 1
          }],
          "🭹": [{
            x: 0,
            y: 4,
            w: 8,
            h: 1
          }],
          "🭺": [{
            x: 0,
            y: 5,
            w: 8,
            h: 1
          }],
          "🭻": [{
            x: 0,
            y: 6,
            w: 8,
            h: 1
          }],
          "🭼": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🭽": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "🭾": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "🭿": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮀": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮁": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 2,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮂": [{
            x: 0,
            y: 0,
            w: 8,
            h: 2
          }],
          "🮃": [{
            x: 0,
            y: 0,
            w: 8,
            h: 3
          }],
          "🮄": [{
            x: 0,
            y: 0,
            w: 8,
            h: 5
          }],
          "🮅": [{
            x: 0,
            y: 0,
            w: 8,
            h: 6
          }],
          "🮆": [{
            x: 0,
            y: 0,
            w: 8,
            h: 7
          }],
          "🮇": [{
            x: 6,
            y: 0,
            w: 2,
            h: 8
          }],
          "🮈": [{
            x: 5,
            y: 0,
            w: 3,
            h: 8
          }],
          "🮉": [{
            x: 3,
            y: 0,
            w: 5,
            h: 8
          }],
          "🮊": [{
            x: 2,
            y: 0,
            w: 6,
            h: 8
          }],
          "🮋": [{
            x: 1,
            y: 0,
            w: 7,
            h: 8
          }],
          "🮕": [{
            x: 0,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 6,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 6,
            w: 2,
            h: 2
          }],
          "🮖": [{
            x: 2,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 6,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 6,
            w: 2,
            h: 2
          }],
          "🮗": [{
            x: 0,
            y: 2,
            w: 8,
            h: 2
          }, {
            x: 0,
            y: 6,
            w: 8,
            h: 2
          }]
        };
        const r = {
          "░": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]],
          "▒": [[1, 0], [0, 0], [0, 1], [0, 0]],
          "▓": [[0, 1], [1, 1], [1, 0], [1, 1]]
        };
        t.boxDrawingDefinitions = {
          "─": {
            1: "M0,.5 L1,.5"
          },
          "━": {
            3: "M0,.5 L1,.5"
          },
          "│": {
            1: "M.5,0 L.5,1"
          },
          "┃": {
            3: "M.5,0 L.5,1"
          },
          "┌": {
            1: "M0.5,1 L.5,.5 L1,.5"
          },
          "┏": {
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┐": {
            1: "M0,.5 L.5,.5 L.5,1"
          },
          "┓": {
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "└": {
            1: "M.5,0 L.5,.5 L1,.5"
          },
          "┗": {
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┘": {
            1: "M.5,0 L.5,.5 L0,.5"
          },
          "┛": {
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "├": {
            1: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "┣": {
            3: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "┤": {
            1: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "┫": {
            3: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "┬": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "┳": {
            3: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "┴": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,0"
          },
          "┻": {
            3: "M0,.5 L1,.5 M.5,.5 L.5,0"
          },
          "┼": {
            1: "M0,.5 L1,.5 M.5,0 L.5,1"
          },
          "╋": {
            3: "M0,.5 L1,.5 M.5,0 L.5,1"
          },
          "╴": {
            1: "M.5,.5 L0,.5"
          },
          "╸": {
            3: "M.5,.5 L0,.5"
          },
          "╵": {
            1: "M.5,.5 L.5,0"
          },
          "╹": {
            3: "M.5,.5 L.5,0"
          },
          "╶": {
            1: "M.5,.5 L1,.5"
          },
          "╺": {
            3: "M.5,.5 L1,.5"
          },
          "╷": {
            1: "M.5,.5 L.5,1"
          },
          "╻": {
            3: "M.5,.5 L.5,1"
          },
          "═": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "║": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╒": {
            1: (e, t) => `M.5,1 L.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
          },
          "╓": {
            1: (e, t) => `M${.5 - e},1 L${.5 - e},.5 L1,.5 M${.5 + e},.5 L${.5 + e},1`
          },
          "╔": {
            1: (e, t) => `M1,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
          },
          "╕": {
            1: (e, t) => `M0,${.5 - t} L.5,${.5 - t} L.5,1 M0,${.5 + t} L.5,${.5 + t}`
          },
          "╖": {
            1: (e, t) => `M${.5 + e},1 L${.5 + e},.5 L0,.5 M${.5 - e},.5 L${.5 - e},1`
          },
          "╗": {
            1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},1`
          },
          "╘": {
            1: (e, t) => `M.5,0 L.5,${.5 + t} L1,${.5 + t} M.5,${.5 - t} L1,${.5 - t}`
          },
          "╙": {
            1: (e, t) => `M1,.5 L${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
          },
          "╚": {
            1: (e, t) => `M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0 M1,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},0`
          },
          "╛": {
            1: (e, t) => `M0,${.5 + t} L.5,${.5 + t} L.5,0 M0,${.5 - t} L.5,${.5 - t}`
          },
          "╜": {
            1: (e, t) => `M0,.5 L${.5 + e},.5 L${.5 + e},0 M${.5 - e},.5 L${.5 - e},0`
          },
          "╝": {
            1: (e, t) => `M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M0,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},0`
          },
          "╞": {
            1: (e, t) => `M.5,0 L.5,1 M.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
          },
          "╟": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1 M${.5 + e},.5 L1,.5`
          },
          "╠": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╡": {
            1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L.5,${.5 - t} M0,${.5 + t} L.5,${.5 + t}`
          },
          "╢": {
            1: (e, t) => `M0,.5 L${.5 - e},.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╣": {
            1: (e, t) => `M${.5 + e},0 L${.5 + e},1 M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0`
          },
          "╤": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t} M.5,${.5 + t} L.5,1`
          },
          "╥": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},1 M${.5 + e},.5 L${.5 + e},1`
          },
          "╦": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
          },
          "╧": {
            1: (e, t) => `M.5,0 L.5,${.5 - t} M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "╨": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
          },
          "╩": {
            1: (e, t) => `M0,${.5 + t} L1,${.5 + t} M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╪": {
            1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "╫": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╬": {
            1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╱": {
            1: "M1,0 L0,1"
          },
          "╲": {
            1: "M0,0 L1,1"
          },
          "╳": {
            1: "M1,0 L0,1 M0,0 L1,1"
          },
          "╼": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "╽": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L.5,1"
          },
          "╾": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "╿": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "┍": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┎": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┑": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L0,.5"
          },
          "┒": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L.5,1"
          },
          "┕": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L1,.5"
          },
          "┖": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┙": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L0,.5"
          },
          "┚": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L.5,0"
          },
          "┝": {
            1: "M.5,0 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┞": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┟": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┠": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,1"
          },
          "┡": {
            1: "M.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┢": {
            1: "M.5,.5 L.5,0",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┥": {
            1: "M.5,0 L.5,1",
            3: "M.5,.5 L0,.5"
          },
          "┦": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "┧": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M.5,.5 L.5,1"
          },
          "┨": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,1"
          },
          "┩": {
            1: "M.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "┪": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "┭": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┮": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┯": {
            1: "M.5,.5 L.5,1",
            3: "M0,.5 L1,.5"
          },
          "┰": {
            1: "M0,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┱": {
            1: "M.5,.5 L1,.5",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "┲": {
            1: "M.5,.5 L0,.5",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┵": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┶": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "┷": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L1,.5"
          },
          "┸": {
            1: "M0,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┹": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "┺": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┽": {
            1: "M.5,0 L.5,1 M.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┾": {
            1: "M.5,0 L.5,1 M.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "┿": {
            1: "M.5,0 L.5,1",
            3: "M0,.5 L1,.5"
          },
          "╀": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "╁": {
            1: "M.5,.5 L.5,0 M0,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "╂": {
            1: "M0,.5 L1,.5",
            3: "M.5,0 L.5,1"
          },
          "╃": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "╄": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "╅": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "╆": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "╇": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0 M0,.5 L1,.5"
          },
          "╈": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "╉": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "╊": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "╌": {
            1: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
          },
          "╍": {
            3: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
          },
          "┄": {
            1: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
          },
          "┅": {
            3: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
          },
          "┈": {
            1: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
          },
          "┉": {
            3: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
          },
          "╎": {
            1: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
          },
          "╏": {
            3: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
          },
          "┆": {
            1: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
          },
          "┇": {
            3: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
          },
          "┊": {
            1: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
          },
          "┋": {
            3: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
          },
          "╭": {
            1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,1,.5`
          },
          "╮": {
            1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,0,.5`
          },
          "╯": {
            1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,0,.5`
          },
          "╰": {
            1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,1,.5`
          }
        }, t.powerlineDefinitions = {
          "": {
            d: "M0,0 L1,.5 L0,1",
            type: 0,
            rightPadding: 2
          },
          "": {
            d: "M-1,-.5 L1,.5 L-1,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M1,0 L0,.5 L1,1",
            type: 0,
            leftPadding: 2
          },
          "": {
            d: "M2,-.5 L0,.5 L2,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",
            type: 0,
            rightPadding: 1
          },
          "": {
            d: "M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",
            type: 1,
            rightPadding: 1
          },
          "": {
            d: "M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",
            type: 0,
            leftPadding: 1
          },
          "": {
            d: "M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",
            type: 1,
            leftPadding: 1
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5 L-.5,1.5",
            type: 0
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5 L1.5,1.5",
            type: 0
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5 L-.5,-.5",
            type: 0
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5 L1.5,-.5",
            type: 0
          }
        }, t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.tryDrawCustomChar = function (e, i, n, l, c, d, _, u) {
          const g = t.blockElementDefinitions[i];
          if (g) return function (e, t, i, s, r, o) {
            for (let n = 0; n < t.length; n++) {
              const a = t[n],
                h = r / 8,
                l = o / 8;
              e.fillRect(i + a.x * h, s + a.y * l, a.w * h, a.h * l);
            }
          }(e, g, n, l, c, d), !0;
          const f = r[i];
          if (f) return function (e, t, i, r, n, a) {
            let h = o.get(t);
            h || (h = new Map(), o.set(t, h));
            const l = e.fillStyle;
            if ("string" != typeof l) throw new Error(`Unexpected fillStyle type "${l}"`);
            let c = h.get(l);
            if (!c) {
              const i = t[0].length,
                r = t.length,
                o = e.canvas.ownerDocument.createElement("canvas");
              o.width = i, o.height = r;
              const n = (0, s.throwIfFalsy)(o.getContext("2d")),
                a = new ImageData(i, r);
              let d, _, u, g;
              if (l.startsWith("#")) d = parseInt(l.slice(1, 3), 16), _ = parseInt(l.slice(3, 5), 16), u = parseInt(l.slice(5, 7), 16), g = l.length > 7 && parseInt(l.slice(7, 9), 16) || 1;else {
                if (!l.startsWith("rgba")) throw new Error(`Unexpected fillStyle color format "${l}" when drawing pattern glyph`);
                [d, _, u, g] = l.substring(5, l.length - 1).split(",").map(e => parseFloat(e));
              }
              for (let e = 0; e < r; e++) for (let s = 0; s < i; s++) a.data[4 * (e * i + s)] = d, a.data[4 * (e * i + s) + 1] = _, a.data[4 * (e * i + s) + 2] = u, a.data[4 * (e * i + s) + 3] = t[e][s] * (255 * g);
              n.putImageData(a, 0, 0), c = (0, s.throwIfFalsy)(e.createPattern(o, null)), h.set(l, c);
            }
            e.fillStyle = c, e.fillRect(i, r, n, a);
          }(e, f, n, l, c, d), !0;
          const v = t.boxDrawingDefinitions[i];
          if (v) return function (e, t, i, s, r, o, n) {
            e.strokeStyle = e.fillStyle;
            for (const [l, c] of Object.entries(t)) {
              let t;
              e.beginPath(), e.lineWidth = n * Number.parseInt(l), t = "function" == typeof c ? c(.15, .15 / o * r) : c;
              for (const l of t.split(" ")) {
                const t = l[0],
                  c = a[t];
                if (!c) {
                  console.error(`Could not find drawing instructions for "${t}"`);
                  continue;
                }
                const d = l.substring(1).split(",");
                d[0] && d[1] && c(e, h(d, r, o, i, s, !0, n));
              }
              e.stroke(), e.closePath();
            }
          }(e, v, n, l, c, d, u), !0;
          const C = t.powerlineDefinitions[i];
          return !!C && (function (e, t, i, s, r, o, n, l) {
            const c = new Path2D();
            c.rect(i, s, r, o), e.clip(c), e.beginPath();
            const d = n / 12;
            e.lineWidth = l * d;
            for (const n of t.d.split(" ")) {
              const c = n[0],
                _ = a[c];
              if (!_) {
                console.error(`Could not find drawing instructions for "${c}"`);
                continue;
              }
              const u = n.substring(1).split(",");
              u[0] && u[1] && _(e, h(u, r, o, i, s, !1, l, (t.leftPadding ?? 0) * (d / 2), (t.rightPadding ?? 0) * (d / 2)));
            }
            1 === t.type ? (e.strokeStyle = e.fillStyle, e.stroke()) : e.fill(), e.closePath();
          }(e, C, n, l, c, d, _, u), !0);
        };
        const o = new Map();
        function n(e, t, i = 0) {
          return Math.max(Math.min(e, t), i);
        }
        const a = {
          C: (e, t) => e.bezierCurveTo(t[0], t[1], t[2], t[3], t[4], t[5]),
          L: (e, t) => e.lineTo(t[0], t[1]),
          M: (e, t) => e.moveTo(t[0], t[1])
        };
        function h(e, t, i, s, r, o, a, h = 0, l = 0) {
          const c = e.map(e => parseFloat(e) || parseInt(e));
          if (c.length < 2) throw new Error("Too few arguments for instruction");
          for (let e = 0; e < c.length; e += 2) c[e] *= t - h * a - l * a, o && 0 !== c[e] && (c[e] = n(Math.round(c[e] + .5) - .5, t, 0)), c[e] += s + h * a;
          for (let e = 1; e < c.length; e += 2) c[e] *= i, o && 0 !== c[e] && (c[e] = n(Math.round(c[e] + .5) - .5, i, 0)), c[e] += r;
          return c;
        }
      },
      56: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.observeDevicePixelDimensions = void 0;
        const s = i(859);
        t.observeDevicePixelDimensions = function (e, t, i) {
          let r = new t.ResizeObserver(t => {
            const s = t.find(t => t.target === e);
            if (!s) return;
            if (!("devicePixelContentBoxSize" in s)) return r?.disconnect(), void (r = void 0);
            const o = s.devicePixelContentBoxSize[0].inlineSize,
              n = s.devicePixelContentBoxSize[0].blockSize;
            o > 0 && n > 0 && i(o, n);
          });
          try {
            r.observe(e, {
              box: ["device-pixel-content-box"]
            });
          } catch {
            r.disconnect(), r = void 0;
          }
          return (0, s.toDisposable)(() => r?.disconnect());
        };
      },
      374: (e, t) => {
        function i(e) {
          return 57508 <= e && e <= 57558;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.computeNextVariantOffset = t.createRenderDimensions = t.treatGlyphAsBackgroundColor = t.isRestrictedPowerlineGlyph = t.isPowerlineGlyph = t.throwIfFalsy = void 0, t.throwIfFalsy = function (e) {
          if (!e) throw new Error("value must not be falsy");
          return e;
        }, t.isPowerlineGlyph = i, t.isRestrictedPowerlineGlyph = function (e) {
          return 57520 <= e && e <= 57527;
        }, t.treatGlyphAsBackgroundColor = function (e) {
          return i(e) || function (e) {
            return 9472 <= e && e <= 9631;
          }(e);
        }, t.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
              }
            }
          };
        }, t.computeNextVariantOffset = function (e, t, i = 0) {
          return (e - (2 * Math.round(t) - i)) % (2 * Math.round(t));
        };
      },
      296: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createSelectionRenderModel = void 0;
        class i {
          constructor() {
            this.clear();
          }
          clear() {
            this.hasSelection = !1, this.columnSelectMode = !1, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
          }
          update(e, t, i, s = !1) {
            if (this.selectionStart = t, this.selectionEnd = i, !t || !i || t[0] === i[0] && t[1] === i[1]) return void this.clear();
            const r = e.buffers.active.ydisp,
              o = t[1] - r,
              n = i[1] - r,
              a = Math.max(o, 0),
              h = Math.min(n, e.rows - 1);
            a >= e.rows || h < 0 ? this.clear() : (this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow = o, this.viewportEndRow = n, this.viewportCappedStartRow = a, this.viewportCappedEndRow = h, this.startCol = t[0], this.endCol = i[0]);
          }
          isCellSelected(e, t, i) {
            return !!this.hasSelection && (i -= e.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t >= this.startCol && i >= this.viewportCappedStartRow && t < this.endCol && i <= this.viewportCappedEndRow : t < this.startCol && i >= this.viewportCappedStartRow && t >= this.endCol && i <= this.viewportCappedEndRow : i > this.viewportStartRow && i < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportEndRow && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol);
          }
        }
        t.createSelectionRenderModel = function () {
          return new i();
        };
      },
      509: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TextureAtlas = void 0;
        const s = i(237),
          r = i(860),
          o = i(374),
          n = i(160),
          a = i(345),
          h = i(485),
          l = i(385),
          c = i(147),
          d = i(855),
          _ = {
            texturePage: 0,
            texturePosition: {
              x: 0,
              y: 0
            },
            texturePositionClipSpace: {
              x: 0,
              y: 0
            },
            offset: {
              x: 0,
              y: 0
            },
            size: {
              x: 0,
              y: 0
            },
            sizeClipSpace: {
              x: 0,
              y: 0
            }
          };
        let u;
        class g {
          get pages() {
            return this._pages;
          }
          constructor(e, t, i) {
            this._document = e, this._config = t, this._unicodeService = i, this._didWarmUp = !1, this._cacheMap = new h.FourKeyMap(), this._cacheMapCombined = new h.FourKeyMap(), this._pages = [], this._activePages = [], this._workBoundingBox = {
              top: 0,
              left: 0,
              bottom: 0,
              right: 0
            }, this._workAttributeData = new c.AttributeData(), this._textureSize = 512, this._onAddTextureAtlasCanvas = new a.EventEmitter(), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = new a.EventEmitter(), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._requestClearModel = !1, this._createNewPage(), this._tmpCanvas = C(e, 4 * this._config.deviceCellWidth + 4, this._config.deviceCellHeight + 4), this._tmpCtx = (0, o.throwIfFalsy)(this._tmpCanvas.getContext("2d", {
              alpha: this._config.allowTransparency,
              willReadFrequently: !0
            }));
          }
          dispose() {
            for (const e of this.pages) e.canvas.remove();
            this._onAddTextureAtlasCanvas.dispose();
          }
          warmUp() {
            this._didWarmUp || (this._doWarmUp(), this._didWarmUp = !0);
          }
          _doWarmUp() {
            const e = new l.IdleTaskQueue();
            for (let t = 33; t < 126; t++) e.enqueue(() => {
              if (!this._cacheMap.get(t, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT)) {
                const e = this._drawToCache(t, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT);
                this._cacheMap.set(t, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT, e);
              }
            });
          }
          beginFrame() {
            return this._requestClearModel;
          }
          clearTexture() {
            if (0 !== this._pages[0].currentRow.x || 0 !== this._pages[0].currentRow.y) {
              for (const e of this._pages) e.clear();
              this._cacheMap.clear(), this._cacheMapCombined.clear(), this._didWarmUp = !1;
            }
          }
          _createNewPage() {
            if (g.maxAtlasPages && this._pages.length >= Math.max(4, g.maxAtlasPages)) {
              const e = this._pages.filter(e => 2 * e.canvas.width <= (g.maxTextureSize || 4096)).sort((e, t) => t.canvas.width !== e.canvas.width ? t.canvas.width - e.canvas.width : t.percentageUsed - e.percentageUsed);
              let t = -1,
                i = 0;
              for (let s = 0; s < e.length; s++) if (e[s].canvas.width !== i) t = s, i = e[s].canvas.width;else if (s - t == 3) break;
              const s = e.slice(t, t + 4),
                r = s.map(e => e.glyphs[0].texturePage).sort((e, t) => e > t ? 1 : -1),
                o = this.pages.length - s.length,
                n = this._mergePages(s, o);
              n.version++;
              for (let e = r.length - 1; e >= 0; e--) this._deletePage(r[e]);
              this.pages.push(n), this._requestClearModel = !0, this._onAddTextureAtlasCanvas.fire(n.canvas);
            }
            const e = new f(this._document, this._textureSize);
            return this._pages.push(e), this._activePages.push(e), this._onAddTextureAtlasCanvas.fire(e.canvas), e;
          }
          _mergePages(e, t) {
            const i = 2 * e[0].canvas.width,
              s = new f(this._document, i, e);
            for (const [r, o] of e.entries()) {
              const e = r * o.canvas.width % i,
                n = Math.floor(r / 2) * o.canvas.height;
              s.ctx.drawImage(o.canvas, e, n);
              for (const s of o.glyphs) s.texturePage = t, s.sizeClipSpace.x = s.size.x / i, s.sizeClipSpace.y = s.size.y / i, s.texturePosition.x += e, s.texturePosition.y += n, s.texturePositionClipSpace.x = s.texturePosition.x / i, s.texturePositionClipSpace.y = s.texturePosition.y / i;
              this._onRemoveTextureAtlasCanvas.fire(o.canvas);
              const a = this._activePages.indexOf(o);
              -1 !== a && this._activePages.splice(a, 1);
            }
            return s;
          }
          _deletePage(e) {
            this._pages.splice(e, 1);
            for (let t = e; t < this._pages.length; t++) {
              const e = this._pages[t];
              for (const t of e.glyphs) t.texturePage--;
              e.version++;
            }
          }
          getRasterizedGlyphCombinedChar(e, t, i, s, r) {
            return this._getFromCacheMap(this._cacheMapCombined, e, t, i, s, r);
          }
          getRasterizedGlyph(e, t, i, s, r) {
            return this._getFromCacheMap(this._cacheMap, e, t, i, s, r);
          }
          _getFromCacheMap(e, t, i, s, r, o = !1) {
            return u = e.get(t, i, s, r), u || (u = this._drawToCache(t, i, s, r, o), e.set(t, i, s, r, u)), u;
          }
          _getColorFromAnsiIndex(e) {
            if (e >= this._config.colors.ansi.length) throw new Error("No color found for idx " + e);
            return this._config.colors.ansi[e];
          }
          _getBackgroundColor(e, t, i, s) {
            if (this._config.allowTransparency) return n.NULL_COLOR;
            let r;
            switch (e) {
              case 16777216:
              case 33554432:
                r = this._getColorFromAnsiIndex(t);
                break;
              case 50331648:
                const e = c.AttributeData.toColorRGB(t);
                r = n.channels.toColor(e[0], e[1], e[2]);
                break;
              default:
                r = i ? n.color.opaque(this._config.colors.foreground) : this._config.colors.background;
            }
            return r;
          }
          _getForegroundColor(e, t, i, r, o, a, h, l, d, _) {
            const u = this._getMinimumContrastColor(e, t, i, r, o, a, h, d, l, _);
            if (u) return u;
            let g;
            switch (o) {
              case 16777216:
              case 33554432:
                this._config.drawBoldTextInBrightColors && d && a < 8 && (a += 8), g = this._getColorFromAnsiIndex(a);
                break;
              case 50331648:
                const e = c.AttributeData.toColorRGB(a);
                g = n.channels.toColor(e[0], e[1], e[2]);
                break;
              default:
                g = h ? this._config.colors.background : this._config.colors.foreground;
            }
            return this._config.allowTransparency && (g = n.color.opaque(g)), l && (g = n.color.multiplyOpacity(g, s.DIM_OPACITY)), g;
          }
          _resolveBackgroundRgba(e, t, i) {
            switch (e) {
              case 16777216:
              case 33554432:
                return this._getColorFromAnsiIndex(t).rgba;
              case 50331648:
                return t << 8;
              default:
                return i ? this._config.colors.foreground.rgba : this._config.colors.background.rgba;
            }
          }
          _resolveForegroundRgba(e, t, i, s) {
            switch (e) {
              case 16777216:
              case 33554432:
                return this._config.drawBoldTextInBrightColors && s && t < 8 && (t += 8), this._getColorFromAnsiIndex(t).rgba;
              case 50331648:
                return t << 8;
              default:
                return i ? this._config.colors.background.rgba : this._config.colors.foreground.rgba;
            }
          }
          _getMinimumContrastColor(e, t, i, s, r, o, a, h, l, c) {
            if (1 === this._config.minimumContrastRatio || c) return;
            const d = this._getContrastCache(l),
              _ = d.getColor(e, s);
            if (void 0 !== _) return _ || void 0;
            const u = this._resolveBackgroundRgba(t, i, a),
              g = this._resolveForegroundRgba(r, o, a, h),
              f = n.rgba.ensureContrastRatio(u, g, this._config.minimumContrastRatio / (l ? 2 : 1));
            if (!f) return void d.setColor(e, s, null);
            const v = n.channels.toColor(f >> 24 & 255, f >> 16 & 255, f >> 8 & 255);
            return d.setColor(e, s, v), v;
          }
          _getContrastCache(e) {
            return e ? this._config.colors.halfContrastCache : this._config.colors.contrastCache;
          }
          _drawToCache(e, t, i, n, a = !1) {
            const h = "number" == typeof e ? String.fromCharCode(e) : e,
              l = Math.min(this._config.deviceCellWidth * Math.max(h.length, 2) + 4, this._textureSize);
            this._tmpCanvas.width < l && (this._tmpCanvas.width = l);
            const d = Math.min(this._config.deviceCellHeight + 8, this._textureSize);
            if (this._tmpCanvas.height < d && (this._tmpCanvas.height = d), this._tmpCtx.save(), this._workAttributeData.fg = i, this._workAttributeData.bg = t, this._workAttributeData.extended.ext = n, this._workAttributeData.isInvisible()) return _;
            const u = !!this._workAttributeData.isBold(),
              f = !!this._workAttributeData.isInverse(),
              C = !!this._workAttributeData.isDim(),
              p = !!this._workAttributeData.isItalic(),
              m = !!this._workAttributeData.isUnderline(),
              x = !!this._workAttributeData.isStrikethrough(),
              L = !!this._workAttributeData.isOverline();
            let w = this._workAttributeData.getFgColor(),
              b = this._workAttributeData.getFgColorMode(),
              M = this._workAttributeData.getBgColor(),
              S = this._workAttributeData.getBgColorMode();
            if (f) {
              const e = w;
              w = M, M = e;
              const t = b;
              b = S, S = t;
            }
            const y = this._getBackgroundColor(S, M, f, C);
            this._tmpCtx.globalCompositeOperation = "copy", this._tmpCtx.fillStyle = y.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.globalCompositeOperation = "source-over";
            const R = u ? this._config.fontWeightBold : this._config.fontWeight,
              A = p ? "italic" : "";
            this._tmpCtx.font = `${A} ${R} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`, this._tmpCtx.textBaseline = s.TEXT_BASELINE;
            const D = 1 === h.length && (0, o.isPowerlineGlyph)(h.charCodeAt(0)),
              T = 1 === h.length && (0, o.isRestrictedPowerlineGlyph)(h.charCodeAt(0)),
              k = this._getForegroundColor(t, S, M, i, b, w, f, C, u, (0, o.treatGlyphAsBackgroundColor)(h.charCodeAt(0)));
            this._tmpCtx.fillStyle = k.css;
            const E = T ? 0 : 4;
            let B = !1;
            !1 !== this._config.customGlyphs && (B = (0, r.tryDrawCustomChar)(this._tmpCtx, h, E, E, this._config.deviceCellWidth, this._config.deviceCellHeight, this._config.fontSize, this._config.devicePixelRatio));
            let $,
              P = !D;
            if ($ = "number" == typeof e ? this._unicodeService.wcwidth(e) : this._unicodeService.getStringCellWidth(e), m) {
              this._tmpCtx.save();
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)),
                t = e % 2 == 1 ? .5 : 0;
              if (this._tmpCtx.lineWidth = e, this._workAttributeData.isUnderlineColorDefault()) this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle;else if (this._workAttributeData.isUnderlineColorRGB()) P = !1, this._tmpCtx.strokeStyle = `rgb(${c.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else {
                P = !1;
                let e = this._workAttributeData.getUnderlineColor();
                this._config.drawBoldTextInBrightColors && this._workAttributeData.isBold() && e < 8 && (e += 8), this._tmpCtx.strokeStyle = this._getColorFromAnsiIndex(e).css;
              }
              this._tmpCtx.beginPath();
              const i = E,
                s = Math.ceil(E + this._config.deviceCharHeight) - t - (a ? 2 * e : 0),
                r = s + e,
                n = s + 2 * e;
              let l = this._workAttributeData.getUnderlineVariantOffset();
              for (let a = 0; a < $; a++) {
                this._tmpCtx.save();
                const h = i + a * this._config.deviceCellWidth,
                  c = i + (a + 1) * this._config.deviceCellWidth,
                  d = h + this._config.deviceCellWidth / 2;
                switch (this._workAttributeData.extended.underlineStyle) {
                  case 2:
                    this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(c, s), this._tmpCtx.moveTo(h, n), this._tmpCtx.lineTo(c, n);
                    break;
                  case 3:
                    const i = e <= 1 ? n : Math.ceil(E + this._config.deviceCharHeight - e / 2) - t,
                      a = e <= 1 ? s : Math.ceil(E + this._config.deviceCharHeight + e / 2) - t,
                      _ = new Path2D();
                    _.rect(h, s, this._config.deviceCellWidth, n - s), this._tmpCtx.clip(_), this._tmpCtx.moveTo(h - this._config.deviceCellWidth / 2, r), this._tmpCtx.bezierCurveTo(h - this._config.deviceCellWidth / 2, a, h, a, h, r), this._tmpCtx.bezierCurveTo(h, i, d, i, d, r), this._tmpCtx.bezierCurveTo(d, a, c, a, c, r), this._tmpCtx.bezierCurveTo(c, i, c + this._config.deviceCellWidth / 2, i, c + this._config.deviceCellWidth / 2, r);
                    break;
                  case 4:
                    const u = 0 === l ? 0 : l >= e ? 2 * e - l : e - l;
                    !1 == !(l >= e) || 0 === u ? (this._tmpCtx.setLineDash([Math.round(e), Math.round(e)]), this._tmpCtx.moveTo(h + u, s), this._tmpCtx.lineTo(c, s)) : (this._tmpCtx.setLineDash([Math.round(e), Math.round(e)]), this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(h + u, s), this._tmpCtx.moveTo(h + u + e, s), this._tmpCtx.lineTo(c, s)), l = (0, o.computeNextVariantOffset)(c - h, e, l);
                    break;
                  case 5:
                    const g = .6,
                      f = .3,
                      v = c - h,
                      C = Math.floor(g * v),
                      p = Math.floor(f * v),
                      m = v - C - p;
                    this._tmpCtx.setLineDash([C, p, m]), this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(c, s);
                    break;
                  default:
                    this._tmpCtx.moveTo(h, s), this._tmpCtx.lineTo(c, s);
                }
                this._tmpCtx.stroke(), this._tmpCtx.restore();
              }
              if (this._tmpCtx.restore(), !B && this._config.fontSize >= 12 && !this._config.allowTransparency && " " !== h) {
                this._tmpCtx.save(), this._tmpCtx.textBaseline = "alphabetic";
                const t = this._tmpCtx.measureText(h);
                if (this._tmpCtx.restore(), "actualBoundingBoxDescent" in t && t.actualBoundingBoxDescent > 0) {
                  this._tmpCtx.save();
                  const t = new Path2D();
                  t.rect(i, s - Math.ceil(e / 2), this._config.deviceCellWidth * $, n - s + Math.ceil(e / 2)), this._tmpCtx.clip(t), this._tmpCtx.lineWidth = 3 * this._config.devicePixelRatio, this._tmpCtx.strokeStyle = y.css, this._tmpCtx.strokeText(h, E, E + this._config.deviceCharHeight), this._tmpCtx.restore();
                }
              }
            }
            if (L) {
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)),
                t = e % 2 == 1 ? .5 : 0;
              this._tmpCtx.lineWidth = e, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(E, E + t), this._tmpCtx.lineTo(E + this._config.deviceCharWidth * $, E + t), this._tmpCtx.stroke();
            }
            if (B || this._tmpCtx.fillText(h, E, E + this._config.deviceCharHeight), "_" === h && !this._config.allowTransparency) {
              let e = v(this._tmpCtx.getImageData(E, E, this._config.deviceCellWidth, this._config.deviceCellHeight), y, k, P);
              if (e) for (let t = 1; t <= 5 && (this._tmpCtx.save(), this._tmpCtx.fillStyle = y.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.restore(), this._tmpCtx.fillText(h, E, E + this._config.deviceCharHeight - t), e = v(this._tmpCtx.getImageData(E, E, this._config.deviceCellWidth, this._config.deviceCellHeight), y, k, P), e); t++);
            }
            if (x) {
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 10)),
                t = this._tmpCtx.lineWidth % 2 == 1 ? .5 : 0;
              this._tmpCtx.lineWidth = e, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(E, E + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.lineTo(E + this._config.deviceCharWidth * $, E + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.stroke();
            }
            this._tmpCtx.restore();
            const O = this._tmpCtx.getImageData(0, 0, this._tmpCanvas.width, this._tmpCanvas.height);
            let I;
            if (I = this._config.allowTransparency ? function (e) {
              for (let t = 0; t < e.data.length; t += 4) if (e.data[t + 3] > 0) return !1;
              return !0;
            }(O) : v(O, y, k, P), I) return _;
            const F = this._findGlyphBoundingBox(O, this._workBoundingBox, l, T, B, E);
            let W, H;
            for (;;) {
              if (0 === this._activePages.length) {
                const e = this._createNewPage();
                W = e, H = e.currentRow, H.height = F.size.y;
                break;
              }
              W = this._activePages[this._activePages.length - 1], H = W.currentRow;
              for (const e of this._activePages) F.size.y <= e.currentRow.height && (W = e, H = e.currentRow);
              for (let e = this._activePages.length - 1; e >= 0; e--) for (const t of this._activePages[e].fixedRows) t.height <= H.height && F.size.y <= t.height && (W = this._activePages[e], H = t);
              if (H.y + F.size.y >= W.canvas.height || H.height > F.size.y + 2) {
                let e = !1;
                if (W.currentRow.y + W.currentRow.height + F.size.y >= W.canvas.height) {
                  let t;
                  for (const e of this._activePages) if (e.currentRow.y + e.currentRow.height + F.size.y < e.canvas.height) {
                    t = e;
                    break;
                  }
                  if (t) W = t;else if (g.maxAtlasPages && this._pages.length >= g.maxAtlasPages && H.y + F.size.y <= W.canvas.height && H.height >= F.size.y && H.x + F.size.x <= W.canvas.width) e = !0;else {
                    const t = this._createNewPage();
                    W = t, H = t.currentRow, H.height = F.size.y, e = !0;
                  }
                }
                e || (W.currentRow.height > 0 && W.fixedRows.push(W.currentRow), H = {
                  x: 0,
                  y: W.currentRow.y + W.currentRow.height,
                  height: F.size.y
                }, W.fixedRows.push(H), W.currentRow = {
                  x: 0,
                  y: H.y + H.height,
                  height: 0
                });
              }
              if (H.x + F.size.x <= W.canvas.width) break;
              H === W.currentRow ? (H.x = 0, H.y += H.height, H.height = 0) : W.fixedRows.splice(W.fixedRows.indexOf(H), 1);
            }
            return F.texturePage = this._pages.indexOf(W), F.texturePosition.x = H.x, F.texturePosition.y = H.y, F.texturePositionClipSpace.x = H.x / W.canvas.width, F.texturePositionClipSpace.y = H.y / W.canvas.height, F.sizeClipSpace.x /= W.canvas.width, F.sizeClipSpace.y /= W.canvas.height, H.height = Math.max(H.height, F.size.y), H.x += F.size.x, W.ctx.putImageData(O, F.texturePosition.x - this._workBoundingBox.left, F.texturePosition.y - this._workBoundingBox.top, this._workBoundingBox.left, this._workBoundingBox.top, F.size.x, F.size.y), W.addGlyph(F), W.version++, F;
          }
          _findGlyphBoundingBox(e, t, i, s, r, o) {
            t.top = 0;
            const n = s ? this._config.deviceCellHeight : this._tmpCanvas.height,
              a = s ? this._config.deviceCellWidth : i;
            let h = !1;
            for (let i = 0; i < n; i++) {
              for (let s = 0; s < a; s++) {
                const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                if (0 !== e.data[r]) {
                  t.top = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.left = 0, h = !1;
            for (let i = 0; i < o + a; i++) {
              for (let s = 0; s < n; s++) {
                const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                if (0 !== e.data[r]) {
                  t.left = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.right = a, h = !1;
            for (let i = o + a - 1; i >= o; i--) {
              for (let s = 0; s < n; s++) {
                const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                if (0 !== e.data[r]) {
                  t.right = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.bottom = n, h = !1;
            for (let i = n - 1; i >= 0; i--) {
              for (let s = 0; s < a; s++) {
                const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                if (0 !== e.data[r]) {
                  t.bottom = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            return {
              texturePage: 0,
              texturePosition: {
                x: 0,
                y: 0
              },
              texturePositionClipSpace: {
                x: 0,
                y: 0
              },
              size: {
                x: t.right - t.left + 1,
                y: t.bottom - t.top + 1
              },
              sizeClipSpace: {
                x: t.right - t.left + 1,
                y: t.bottom - t.top + 1
              },
              offset: {
                x: -t.left + o + (s || r ? Math.floor((this._config.deviceCellWidth - this._config.deviceCharWidth) / 2) : 0),
                y: -t.top + o + (s || r ? 1 === this._config.lineHeight ? 0 : Math.round((this._config.deviceCellHeight - this._config.deviceCharHeight) / 2) : 0)
              }
            };
          }
        }
        t.TextureAtlas = g;
        class f {
          get percentageUsed() {
            return this._usedPixels / (this.canvas.width * this.canvas.height);
          }
          get glyphs() {
            return this._glyphs;
          }
          addGlyph(e) {
            this._glyphs.push(e), this._usedPixels += e.size.x * e.size.y;
          }
          constructor(e, t, i) {
            if (this._usedPixels = 0, this._glyphs = [], this.version = 0, this.currentRow = {
              x: 0,
              y: 0,
              height: 0
            }, this.fixedRows = [], i) for (const e of i) this._glyphs.push(...e.glyphs), this._usedPixels += e._usedPixels;
            this.canvas = C(e, t, t), this.ctx = (0, o.throwIfFalsy)(this.canvas.getContext("2d", {
              alpha: !0
            }));
          }
          clear() {
            this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.currentRow.x = 0, this.currentRow.y = 0, this.currentRow.height = 0, this.fixedRows.length = 0, this.version++;
          }
        }
        function v(e, t, i, s) {
          const r = t.rgba >>> 24,
            o = t.rgba >>> 16 & 255,
            n = t.rgba >>> 8 & 255,
            a = i.rgba >>> 24,
            h = i.rgba >>> 16 & 255,
            l = i.rgba >>> 8 & 255,
            c = Math.floor((Math.abs(r - a) + Math.abs(o - h) + Math.abs(n - l)) / 12);
          let d = !0;
          for (let t = 0; t < e.data.length; t += 4) e.data[t] === r && e.data[t + 1] === o && e.data[t + 2] === n || s && Math.abs(e.data[t] - r) + Math.abs(e.data[t + 1] - o) + Math.abs(e.data[t + 2] - n) < c ? e.data[t + 3] = 0 : d = !1;
          return d;
        }
        function C(e, t, i) {
          const s = e.createElement("canvas");
          return s.width = t, s.height = i, s;
        }
      },
      577: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              o = arguments.length,
              n = o < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
            return o > 3 && n && Object.defineProperty(t, i, n), n;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CharacterJoinerService = t.JoinedCellData = void 0;
        const o = i(147),
          n = i(855),
          a = i(782),
          h = i(97);
        class l extends o.AttributeData {
          constructor(e, t, i) {
            super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
          }
          isCombined() {
            return 2097152;
          }
          getWidth() {
            return this._width;
          }
          getChars() {
            return this.combinedData;
          }
          getCode() {
            return 2097151;
          }
          setFromCharData(e) {
            throw new Error("not implemented");
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.JoinedCellData = l;
        let c = t.CharacterJoinerService = class e {
          constructor(e) {
            this._bufferService = e, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new a.CellData();
          }
          register(e) {
            const t = {
              id: this._nextCharacterJoinerId++,
              handler: e
            };
            return this._characterJoiners.push(t), t.id;
          }
          deregister(e) {
            for (let t = 0; t < this._characterJoiners.length; t++) if (this._characterJoiners[t].id === e) return this._characterJoiners.splice(t, 1), !0;
            return !1;
          }
          getJoinedCharacters(e) {
            if (0 === this._characterJoiners.length) return [];
            const t = this._bufferService.buffer.lines.get(e);
            if (!t || 0 === t.length) return [];
            const i = [],
              s = t.translateToString(!0);
            let r = 0,
              o = 0,
              a = 0,
              h = t.getFg(0),
              l = t.getBg(0);
            for (let e = 0; e < t.getTrimmedLength(); e++) if (t.loadCell(e, this._workCell), 0 !== this._workCell.getWidth()) {
              if (this._workCell.fg !== h || this._workCell.bg !== l) {
                if (e - r > 1) {
                  const e = this._getJoinedRanges(s, a, o, t, r);
                  for (let t = 0; t < e.length; t++) i.push(e[t]);
                }
                r = e, a = o, h = this._workCell.fg, l = this._workCell.bg;
              }
              o += this._workCell.getChars().length || n.WHITESPACE_CELL_CHAR.length;
            }
            if (this._bufferService.cols - r > 1) {
              const e = this._getJoinedRanges(s, a, o, t, r);
              for (let t = 0; t < e.length; t++) i.push(e[t]);
            }
            return i;
          }
          _getJoinedRanges(t, i, s, r, o) {
            const n = t.substring(i, s);
            let a = [];
            try {
              a = this._characterJoiners[0].handler(n);
            } catch (e) {
              console.error(e);
            }
            for (let t = 1; t < this._characterJoiners.length; t++) try {
              const i = this._characterJoiners[t].handler(n);
              for (let t = 0; t < i.length; t++) e._mergeRanges(a, i[t]);
            } catch (e) {
              console.error(e);
            }
            return this._stringRangesToCellRanges(a, r, o), a;
          }
          _stringRangesToCellRanges(e, t, i) {
            let s = 0,
              r = !1,
              o = 0,
              a = e[s];
            if (a) {
              for (let h = i; h < this._bufferService.cols; h++) {
                const i = t.getWidth(h),
                  l = t.getString(h).length || n.WHITESPACE_CELL_CHAR.length;
                if (0 !== i) {
                  if (!r && a[0] <= o && (a[0] = h, r = !0), a[1] <= o) {
                    if (a[1] = h, a = e[++s], !a) break;
                    a[0] <= o ? (a[0] = h, r = !0) : r = !1;
                  }
                  o += l;
                }
              }
              a && (a[1] = this._bufferService.cols);
            }
          }
          static _mergeRanges(e, t) {
            let i = !1;
            for (let s = 0; s < e.length; s++) {
              const r = e[s];
              if (i) {
                if (t[1] <= r[0]) return e[s - 1][1] = t[1], e;
                if (t[1] <= r[1]) return e[s - 1][1] = Math.max(t[1], r[1]), e.splice(s, 1), e;
                e.splice(s, 1), s--;
              } else {
                if (t[1] <= r[0]) return e.splice(s, 0, t), e;
                if (t[1] <= r[1]) return r[0] = Math.min(t[0], r[0]), e;
                t[0] < r[1] && (r[0] = Math.min(t[0], r[0]), i = !0);
              }
            }
            return i ? e[e.length - 1][1] = t[1] : e.push(t), e;
          }
        };
        t.CharacterJoinerService = c = s([r(0, h.IBufferService)], c);
      },
      160: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
        const s = i(399);
        let r = 0,
          o = 0,
          n = 0,
          a = 0;
        var h, l, c, d, _;
        function u(e) {
          const t = e.toString(16);
          return t.length < 2 ? "0" + t : t;
        }
        function g(e, t) {
          return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
        }
        t.NULL_COLOR = {
          css: "#00000000",
          rgba: 0
        }, function (e) {
          e.toCss = function (e, t, i, s) {
            return void 0 !== s ? `#${u(e)}${u(t)}${u(i)}${u(s)}` : `#${u(e)}${u(t)}${u(i)}`;
          }, e.toRgba = function (e, t, i, s = 255) {
            return (e << 24 | t << 16 | i << 8 | s) >>> 0;
          }, e.toColor = function (t, i, s, r) {
            return {
              css: e.toCss(t, i, s, r),
              rgba: e.toRgba(t, i, s, r)
            };
          };
        }(h || (t.channels = h = {})), function (e) {
          function t(e, t) {
            return a = Math.round(255 * t), [r, o, n] = _.toChannels(e.rgba), {
              css: h.toCss(r, o, n, a),
              rgba: h.toRgba(r, o, n, a)
            };
          }
          e.blend = function (e, t) {
            if (a = (255 & t.rgba) / 255, 1 === a) return {
              css: t.css,
              rgba: t.rgba
            };
            const i = t.rgba >> 24 & 255,
              s = t.rgba >> 16 & 255,
              l = t.rgba >> 8 & 255,
              c = e.rgba >> 24 & 255,
              d = e.rgba >> 16 & 255,
              _ = e.rgba >> 8 & 255;
            return r = c + Math.round((i - c) * a), o = d + Math.round((s - d) * a), n = _ + Math.round((l - _) * a), {
              css: h.toCss(r, o, n),
              rgba: h.toRgba(r, o, n)
            };
          }, e.isOpaque = function (e) {
            return 255 == (255 & e.rgba);
          }, e.ensureContrastRatio = function (e, t, i) {
            const s = _.ensureContrastRatio(e.rgba, t.rgba, i);
            if (s) return h.toColor(s >> 24 & 255, s >> 16 & 255, s >> 8 & 255);
          }, e.opaque = function (e) {
            const t = (255 | e.rgba) >>> 0;
            return [r, o, n] = _.toChannels(t), {
              css: h.toCss(r, o, n),
              rgba: t
            };
          }, e.opacity = t, e.multiplyOpacity = function (e, i) {
            return a = 255 & e.rgba, t(e, a * i / 255);
          }, e.toColorRGB = function (e) {
            return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
          };
        }(l || (t.color = l = {})), function (e) {
          let t, i;
          if (!s.isNode) {
            const e = document.createElement("canvas");
            e.width = 1, e.height = 1;
            const s = e.getContext("2d", {
              willReadFrequently: !0
            });
            s && (t = s, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
          }
          e.toColor = function (e) {
            if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
              case 4:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), h.toColor(r, o, n);
              case 5:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), h.toColor(r, o, n, a);
              case 7:
                return {
                  css: e,
                  rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                };
              case 9:
                return {
                  css: e,
                  rgba: parseInt(e.slice(1), 16) >>> 0
                };
            }
            const s = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
            if (s) return r = parseInt(s[1]), o = parseInt(s[2]), n = parseInt(s[3]), a = Math.round(255 * (void 0 === s[5] ? 1 : parseFloat(s[5]))), h.toColor(r, o, n, a);
            if (!t || !i) throw new Error("css.toColor: Unsupported css format");
            if (t.fillStyle = i, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
            if (t.fillRect(0, 0, 1, 1), [r, o, n, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
            return {
              rgba: h.toRgba(r, o, n, a),
              css: e
            };
          };
        }(c || (t.css = c = {})), function (e) {
          function t(e, t, i) {
            const s = e / 255,
              r = t / 255,
              o = i / 255;
            return .2126 * (s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4)) + .7152 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (o <= .03928 ? o / 12.92 : Math.pow((o + .055) / 1.055, 2.4));
          }
          e.relativeLuminance = function (e) {
            return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
          }, e.relativeLuminance2 = t;
        }(d || (t.rgb = d = {})), function (e) {
          function t(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              o = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            for (; l < i && (n > 0 || a > 0 || h > 0);) n -= Math.max(0, Math.ceil(.1 * n)), a -= Math.max(0, Math.ceil(.1 * a)), h -= Math.max(0, Math.ceil(.1 * h)), l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          function i(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              o = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            for (; l < i && (n < 255 || a < 255 || h < 255);) n = Math.min(255, n + Math.ceil(.1 * (255 - n))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), h = Math.min(255, h + Math.ceil(.1 * (255 - h))), l = g(d.relativeLuminance2(n, a, h), d.relativeLuminance2(s, r, o));
            return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          e.blend = function (e, t) {
            if (a = (255 & t) / 255, 1 === a) return t;
            const i = t >> 24 & 255,
              s = t >> 16 & 255,
              l = t >> 8 & 255,
              c = e >> 24 & 255,
              d = e >> 16 & 255,
              _ = e >> 8 & 255;
            return r = c + Math.round((i - c) * a), o = d + Math.round((s - d) * a), n = _ + Math.round((l - _) * a), h.toRgba(r, o, n);
          }, e.ensureContrastRatio = function (e, s, r) {
            const o = d.relativeLuminance(e >> 8),
              n = d.relativeLuminance(s >> 8);
            if (g(o, n) < r) {
              if (n < o) {
                const n = t(e, s, r),
                  a = g(o, d.relativeLuminance(n >> 8));
                if (a < r) {
                  const t = i(e, s, r);
                  return a > g(o, d.relativeLuminance(t >> 8)) ? n : t;
                }
                return n;
              }
              const a = i(e, s, r),
                h = g(o, d.relativeLuminance(a >> 8));
              if (h < r) {
                const i = t(e, s, r);
                return h > g(o, d.relativeLuminance(i >> 8)) ? a : i;
              }
              return a;
            }
          }, e.reduceLuminance = t, e.increaseLuminance = i, e.toChannels = function (e) {
            return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          };
        }(_ || (t.rgba = _ = {})), t.toPaddedHex = u, t.contrastRatio = g;
      },
      345: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const i = [];
            for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
            for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
          }
          dispose() {
            this.clearListeners(), this._disposed = !0;
          }
          clearListeners() {
            this._listeners && (this._listeners.length = 0);
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        }, t.runAndSubscribe = function (e, t) {
          return t(void 0), e(e => t(e));
        };
      },
      859: (e, t) => {
        function i(e) {
          for (const t of e) t.dispose();
          e.length = 0;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.MutableDisposable = t.Disposable = void 0, t.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const e of this._disposables) e.dispose();
            this._disposables.length = 0;
          }
          register(e) {
            return this._disposables.push(e), e;
          }
          unregister(e) {
            const t = this._disposables.indexOf(e);
            -1 !== t && this._disposables.splice(t, 1);
          }
        }, t.MutableDisposable = class {
          constructor() {
            this._isDisposed = !1;
          }
          get value() {
            return this._isDisposed ? void 0 : this._value;
          }
          set value(e) {
            this._isDisposed || e === this._value || (this._value?.dispose(), this._value = e);
          }
          clear() {
            this.value = void 0;
          }
          dispose() {
            this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
          }
        }, t.toDisposable = function (e) {
          return {
            dispose: e
          };
        }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
          return {
            dispose: () => i(e)
          };
        };
      },
      485: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.FourKeyMap = t.TwoKeyMap = void 0;
        class i {
          constructor() {
            this._data = {};
          }
          set(e, t, i) {
            this._data[e] || (this._data[e] = {}), this._data[e][t] = i;
          }
          get(e, t) {
            return this._data[e] ? this._data[e][t] : void 0;
          }
          clear() {
            this._data = {};
          }
        }
        t.TwoKeyMap = i, t.FourKeyMap = class {
          constructor() {
            this._data = new i();
          }
          set(e, t, s, r, o) {
            this._data.get(e, t) || this._data.set(e, t, new i()), this._data.get(e, t).set(s, r, o);
          }
          get(e, t, i, s) {
            return this._data.get(e, t)?.get(i, s);
          }
          clear() {
            this._data.clear();
          }
        };
      },
      399: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" != typeof process;
        const i = t.isNode ? "node" : navigator.userAgent,
          s = t.isNode ? "node" : navigator.platform;
        t.isFirefox = i.includes("Firefox"), t.isLegacyEdge = i.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(i), t.getSafariVersion = function () {
          if (!t.isSafari) return 0;
          const e = i.match(/Version\/(\d+)/);
          return null === e || e.length < 2 ? 0 : parseInt(e[1]);
        }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s), t.isIpad = "iPad" === s, t.isIphone = "iPhone" === s, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s), t.isLinux = s.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(i);
      },
      385: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DebouncedIdleTask = t.IdleTaskQueue = t.PriorityTaskQueue = void 0;
        const s = i(399);
        class r {
          constructor() {
            this._tasks = [], this._i = 0;
          }
          enqueue(e) {
            this._tasks.push(e), 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(e) {
            this._idleCallback = void 0;
            let t = 0,
              i = 0,
              s = e.timeRemaining(),
              r = 0;
            for (; this._i < this._tasks.length;) {
              if (t = Date.now(), this._tasks[this._i]() || this._i++, t = Math.max(1, Date.now() - t), i = Math.max(t, i), r = e.timeRemaining(), 1.5 * i > r) return s - t < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - t))}ms`), void this._start();
              s = r;
            }
            this.clear();
          }
        }
        class o extends r {
          _requestCallback(e) {
            return setTimeout(() => e(this._createDeadline(16)));
          }
          _cancelCallback(e) {
            clearTimeout(e);
          }
          _createDeadline(e) {
            const t = Date.now() + e;
            return {
              timeRemaining: () => Math.max(0, t - Date.now())
            };
          }
        }
        t.PriorityTaskQueue = o, t.IdleTaskQueue = !s.isNode && "requestIdleCallback" in window ? class extends r {
          _requestCallback(e) {
            return requestIdleCallback(e);
          }
          _cancelCallback(e) {
            cancelIdleCallback(e);
          }
        } : o, t.DebouncedIdleTask = class {
          constructor() {
            this._queue = new t.IdleTaskQueue();
          }
          set(e) {
            this._queue.clear(), this._queue.enqueue(e);
          }
          flush() {
            this._queue.flush();
          }
        };
      },
      147: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ExtendedAttrs = t.AttributeData = void 0;
        class i {
          constructor() {
            this.fg = 0, this.bg = 0, this.extended = new s();
          }
          static toColorRGB(e) {
            return [e >>> 16 & 255, e >>> 8 & 255, 255 & e];
          }
          static fromColorRGB(e) {
            return (255 & e[0]) << 16 | (255 & e[1]) << 8 | 255 & e[2];
          }
          clone() {
            const e = new i();
            return e.fg = this.fg, e.bg = this.bg, e.extended = this.extended.clone(), e;
          }
          isInverse() {
            return 67108864 & this.fg;
          }
          isBold() {
            return 134217728 & this.fg;
          }
          isUnderline() {
            return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 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;
          }
          isOverline() {
            return 1073741824 & this.bg;
          }
          getFgColorMode() {
            return 50331648 & this.fg;
          }
          getBgColorMode() {
            return 50331648 & this.bg;
          }
          isFgRGB() {
            return 50331648 == (50331648 & this.fg);
          }
          isBgRGB() {
            return 50331648 == (50331648 & this.bg);
          }
          isFgPalette() {
            return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
          }
          isBgPalette() {
            return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
          }
          isFgDefault() {
            return 0 == (50331648 & this.fg);
          }
          isBgDefault() {
            return 0 == (50331648 & this.bg);
          }
          isAttributeDefault() {
            return 0 === this.fg && 0 === this.bg;
          }
          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 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
          }
          isUnderlineColorPalette() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
          }
          isUnderlineColorDefault() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
          }
          getUnderlineStyle() {
            return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
          }
          getUnderlineVariantOffset() {
            return this.extended.underlineVariantOffset;
          }
        }
        t.AttributeData = i;
        class s {
          get ext() {
            return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
          }
          set ext(e) {
            this._ext = e;
          }
          get underlineStyle() {
            return this._urlId ? 5 : (469762048 & this._ext) >> 26;
          }
          set underlineStyle(e) {
            this._ext &= -469762049, this._ext |= e << 26 & 469762048;
          }
          get underlineColor() {
            return 67108863 & this._ext;
          }
          set underlineColor(e) {
            this._ext &= -67108864, this._ext |= 67108863 & e;
          }
          get urlId() {
            return this._urlId;
          }
          set urlId(e) {
            this._urlId = e;
          }
          get underlineVariantOffset() {
            const e = (3758096384 & this._ext) >> 29;
            return e < 0 ? 4294967288 ^ e : e;
          }
          set underlineVariantOffset(e) {
            this._ext &= 536870911, this._ext |= e << 29 & 3758096384;
          }
          constructor(e = 0, t = 0) {
            this._ext = 0, this._urlId = 0, this._ext = e, this._urlId = t;
          }
          clone() {
            return new s(this._ext, this._urlId);
          }
          isEmpty() {
            return 0 === this.underlineStyle && 0 === this._urlId;
          }
        }
        t.ExtendedAttrs = s;
      },
      782: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellData = void 0;
        const s = i(133),
          r = i(855),
          o = i(147);
        class n extends o.AttributeData {
          constructor() {
            super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new o.ExtendedAttrs(), this.combinedData = "";
          }
          static fromCharData(e) {
            const t = new n();
            return t.setFromCharData(e), t;
          }
          isCombined() {
            return 2097152 & this.content;
          }
          getWidth() {
            return this.content >> 22;
          }
          getChars() {
            return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s.stringFromCodePoint)(2097151 & this.content) : "";
          }
          getCode() {
            return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
          }
          setFromCharData(e) {
            this.fg = e[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
            let t = !1;
            if (e[r.CHAR_DATA_CHAR_INDEX].length > 2) t = !0;else if (2 === e[r.CHAR_DATA_CHAR_INDEX].length) {
              const i = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
              if (55296 <= i && i <= 56319) {
                const s = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                56320 <= s && s <= 57343 ? this.content = 1024 * (i - 55296) + s - 56320 + 65536 | e[r.CHAR_DATA_WIDTH_INDEX] << 22 : t = !0;
              } else t = !0;
            } else this.content = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e[r.CHAR_DATA_WIDTH_INDEX] << 22;
            t && (this.combinedData = e[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e[r.CHAR_DATA_WIDTH_INDEX] << 22);
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.CellData = n;
      },
      855: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
      },
      133: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Utf8ToUtf32 = t.StringToUtf32 = t.utf32ToString = t.stringFromCodePoint = void 0, t.stringFromCodePoint = function (e) {
          return e > 65535 ? (e -= 65536, String.fromCharCode(55296 + (e >> 10)) + String.fromCharCode(e % 1024 + 56320)) : String.fromCharCode(e);
        }, t.utf32ToString = function (e, t = 0, i = e.length) {
          let s = "";
          for (let r = t; r < i; ++r) {
            let t = e[r];
            t > 65535 ? (t -= 65536, s += String.fromCharCode(55296 + (t >> 10)) + String.fromCharCode(t % 1024 + 56320)) : s += String.fromCharCode(t);
          }
          return s;
        }, t.StringToUtf32 = class {
          constructor() {
            this._interim = 0;
          }
          clear() {
            this._interim = 0;
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s = 0,
              r = 0;
            if (this._interim) {
              const i = e.charCodeAt(r++);
              56320 <= i && i <= 57343 ? t[s++] = 1024 * (this._interim - 55296) + i - 56320 + 65536 : (t[s++] = this._interim, t[s++] = i), this._interim = 0;
            }
            for (let o = r; o < i; ++o) {
              const r = e.charCodeAt(o);
              if (55296 <= r && r <= 56319) {
                if (++o >= i) return this._interim = r, s;
                const n = e.charCodeAt(o);
                56320 <= n && n <= 57343 ? t[s++] = 1024 * (r - 55296) + n - 56320 + 65536 : (t[s++] = r, t[s++] = n);
              } else 65279 !== r && (t[s++] = r);
            }
            return s;
          }
        }, t.Utf8ToUtf32 = class {
          constructor() {
            this.interim = new Uint8Array(3);
          }
          clear() {
            this.interim.fill(0);
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s,
              r,
              o,
              n,
              a = 0,
              h = 0,
              l = 0;
            if (this.interim[0]) {
              let s = !1,
                r = this.interim[0];
              r &= 192 == (224 & r) ? 31 : 224 == (240 & r) ? 15 : 7;
              let o,
                n = 0;
              for (; (o = 63 & this.interim[++n]) && n < 4;) r <<= 6, r |= o;
              const h = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4,
                c = h - n;
              for (; l < c;) {
                if (l >= i) return 0;
                if (o = e[l++], 128 != (192 & o)) {
                  l--, s = !0;
                  break;
                }
                this.interim[n++] = o, r <<= 6, r |= 63 & o;
              }
              s || (2 === h ? r < 128 ? l-- : t[a++] = r : 3 === h ? r < 2048 || r >= 55296 && r <= 57343 || 65279 === r || (t[a++] = r) : r < 65536 || r > 1114111 || (t[a++] = r)), this.interim.fill(0);
            }
            const c = i - 4;
            let d = l;
            for (; d < i;) {
              for (; !(!(d < c) || 128 & (s = e[d]) || 128 & (r = e[d + 1]) || 128 & (o = e[d + 2]) || 128 & (n = e[d + 3]));) t[a++] = s, t[a++] = r, t[a++] = o, t[a++] = n, d += 4;
              if (s = e[d++], s < 128) t[a++] = s;else if (192 == (224 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (h = (31 & s) << 6 | 63 & r, h < 128) {
                  d--;
                  continue;
                }
                t[a++] = h;
              } else if (224 == (240 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (h = (15 & s) << 12 | (63 & r) << 6 | 63 & o, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
                t[a++] = h;
              } else if (240 == (248 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, this.interim[2] = o, a;
                if (n = e[d++], 128 != (192 & n)) {
                  d--;
                  continue;
                }
                if (h = (7 & s) << 18 | (63 & r) << 12 | (63 & o) << 6 | 63 & n, h < 65536 || h > 1114111) continue;
                t[a++] = h;
              }
            }
            return a;
          }
        };
      },
      776: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              o = arguments.length,
              n = o < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
            return o > 3 && n && Object.defineProperty(t, i, n), n;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.traceCall = t.setTraceLogger = t.LogService = void 0;
        const o = i(859),
          n = i(97),
          a = {
            trace: n.LogLevelEnum.TRACE,
            debug: n.LogLevelEnum.DEBUG,
            info: n.LogLevelEnum.INFO,
            warn: n.LogLevelEnum.WARN,
            error: n.LogLevelEnum.ERROR,
            off: n.LogLevelEnum.OFF
          };
        let h,
          l = t.LogService = class extends o.Disposable {
            get logLevel() {
              return this._logLevel;
            }
            constructor(e) {
              super(), this._optionsService = e, this._logLevel = n.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), h = this;
            }
            _updateLogLevel() {
              this._logLevel = a[this._optionsService.rawOptions.logLevel];
            }
            _evalLazyOptionalParams(e) {
              for (let t = 0; t < e.length; t++) "function" == typeof e[t] && (e[t] = e[t]());
            }
            _log(e, t, i) {
              this._evalLazyOptionalParams(i), e.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t, ...i);
            }
            trace(e, ...t) {
              this._logLevel <= n.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e, t);
            }
            debug(e, ...t) {
              this._logLevel <= n.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e, t);
            }
            info(e, ...t) {
              this._logLevel <= n.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e, t);
            }
            warn(e, ...t) {
              this._logLevel <= n.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e, t);
            }
            error(e, ...t) {
              this._logLevel <= n.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e, t);
            }
          };
        t.LogService = l = s([r(0, n.IOptionsService)], l), t.setTraceLogger = function (e) {
          h = e;
        }, t.traceCall = function (e, t, i) {
          if ("function" != typeof i.value) throw new Error("not supported");
          const s = i.value;
          i.value = function (...e) {
            if (h.logLevel !== n.LogLevelEnum.TRACE) return s.apply(this, e);
            h.trace(`GlyphRenderer#${s.name}(${e.map(e => JSON.stringify(e)).join(", ")})`);
            const t = s.apply(this, e);
            return h.trace(`GlyphRenderer#${s.name} return`, t), t;
          };
        };
      },
      726: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0;
        const i = "di$target",
          s = "di$dependencies";
        t.serviceRegistry = new Map(), t.getServiceDependencies = function (e) {
          return e[s] || [];
        }, t.createDecorator = function (e) {
          if (t.serviceRegistry.has(e)) return t.serviceRegistry.get(e);
          const r = function (e, t, o) {
            if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
            !function (e, t, r) {
              t[i] === t ? t[s].push({
                id: e,
                index: r
              }) : (t[s] = [{
                id: e,
                index: r
              }], t[i] = t);
            }(r, e, o);
          };
          return r.toString = () => e, t.serviceRegistry.set(e, r), r;
        };
      },
      97: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.IDecorationService = t.IUnicodeService = t.IOscLinkService = t.IOptionsService = t.ILogService = t.LogLevelEnum = t.IInstantiationService = t.ICharsetService = t.ICoreService = t.ICoreMouseService = t.IBufferService = void 0;
        const s = i(726);
        var r;
        t.IBufferService = (0, s.createDecorator)("BufferService"), t.ICoreMouseService = (0, s.createDecorator)("CoreMouseService"), t.ICoreService = (0, s.createDecorator)("CoreService"), t.ICharsetService = (0, s.createDecorator)("CharsetService"), t.IInstantiationService = (0, s.createDecorator)("InstantiationService"), function (e) {
          e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.OFF = 5] = "OFF";
        }(r || (t.LogLevelEnum = r = {})), t.ILogService = (0, s.createDecorator)("LogService"), t.IOptionsService = (0, s.createDecorator)("OptionsService"), t.IOscLinkService = (0, s.createDecorator)("OscLinkService"), t.IUnicodeService = (0, s.createDecorator)("UnicodeService"), t.IDecorationService = (0, s.createDecorator)("DecorationService");
      }
    },
    t = {};
  function i(s) {
    var r = t[s];
    if (void 0 !== r) return r.exports;
    var o = t[s] = {
      exports: {}
    };
    return e[s].call(o.exports, o, o.exports, i), o.exports;
  }
  var s = {};
  return (() => {
    var e = s;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.CanvasAddon = void 0;
    const t = i(345),
      r = i(859),
      o = i(776),
      n = i(949);
    class a extends r.Disposable {
      constructor() {
        super(...arguments), this._onChangeTextureAtlas = this.register(new t.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new t.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
      }
      get textureAtlas() {
        return this._renderer?.textureAtlas;
      }
      activate(e) {
        const i = e._core;
        if (!e.element) return void this.register(i.onWillOpen(() => this.activate(e)));
        this._terminal = e;
        const s = i.coreService,
          a = i.optionsService,
          h = i.screenElement,
          l = i.linkifier,
          c = i,
          d = c._bufferService,
          _ = c._renderService,
          u = c._characterJoinerService,
          g = c._charSizeService,
          f = c._coreBrowserService,
          v = c._decorationService,
          C = c._logService,
          p = c._themeService;
        (0, o.setTraceLogger)(C), this._renderer = new n.CanvasRenderer(e, h, l, d, g, a, u, s, f, v, p), this.register((0, t.forwardEvent)(this._renderer.onChangeTextureAtlas, this._onChangeTextureAtlas)), this.register((0, t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas)), _.setRenderer(this._renderer), _.handleResize(d.cols, d.rows), this.register((0, r.toDisposable)(() => {
          _.setRenderer(this._terminal._core._createRenderer()), _.handleResize(e.cols, e.rows), this._renderer?.dispose(), this._renderer = void 0;
        }));
      }
      clearTextureAtlas() {
        this._renderer?.clearTextureAtlas();
      }
    }
    e.CanvasAddon = a;
  })(), s;
})());

/***/ },

/***/ 3478
/*!**********************************************!*\
  !*** ./node_modules/zmodem.js/src/zerror.js ***!
  \**********************************************/
(module) {

"use strict";


var Zmodem = module.exports;
function _crc_message(got, expected) {
  this.got = got.slice(0);
  this.expected = expected.slice(0);
  return "CRC check failed! (got: " + got.join() + "; expected: " + expected.join() + ")";
}
function _pass(val) {
  return val;
}
const TYPE_MESSAGE = {
  aborted: "Session aborted",
  peer_aborted: "Peer aborted session",
  already_aborted: "Session already aborted",
  crc: _crc_message,
  validation: _pass
};
function _generate_message(type) {
  const msg = TYPE_MESSAGE[type];
  switch (typeof msg) {
    case "string":
      return msg;
    case "function":
      var args_after_type = [].slice.call(arguments).slice(1);
      return msg.apply(this, args_after_type);
  }
  return null;
}
Zmodem.Error = class ZmodemError extends Error {
  constructor(msg_or_type) {
    super();
    var generated = _generate_message.apply(this, arguments);
    if (generated) {
      this.type = msg_or_type;
      this.message = generated;
    } else {
      this.message = msg_or_type;
    }
  }
};

/***/ },

/***/ 3479
/*!******************************************!*\
  !*** ../node_modules/object-is/index.js ***!
  \******************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var define = __webpack_require__(/*! define-properties */ 2445);
var callBind = __webpack_require__(/*! call-bind */ 3990);
var implementation = __webpack_require__(/*! ./implementation */ 88);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 4301);
var shim = __webpack_require__(/*! ./shim */ 1243);
var polyfill = callBind(getPolyfill(), Object);
define(polyfill, {
  getPolyfill: getPolyfill,
  implementation: implementation,
  shim: shim
});
module.exports = polyfill;

/***/ },

/***/ 3545
/*!********************************************************************!*\
  !*** ./node_modules/@xterm/addon-unicode11/lib/addon-unicode11.js ***!
  \********************************************************************/
(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(this, () => (() => {
  "use strict";

  var e = {
      433: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.UnicodeV11 = void 0;
        const r = i(938),
          s = [[768, 879], [1155, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1541], [1552, 1562], [1564, 1564], [1611, 1631], [1648, 1648], [1750, 1757], [1759, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2045, 2045], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2093], [2137, 2139], [2259, 2306], [2362, 2362], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2391], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2558, 2558], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2641, 2641], [2672, 2673], [2677, 2677], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2810, 2815], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2884], [2893, 2893], [2902, 2902], [2914, 2915], [2946, 2946], [3008, 3008], [3021, 3021], [3072, 3072], [3076, 3076], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3170, 3171], [3201, 3201], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3328, 3329], [3387, 3388], [3393, 3396], [3405, 3405], [3426, 3427], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3981, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4151], [4153, 4154], [4157, 4158], [4184, 4185], [4190, 4192], [4209, 4212], [4226, 4226], [4229, 4230], [4237, 4237], [4253, 4253], [4448, 4607], [4957, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6158], [6277, 6278], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6683, 6683], [6742, 6742], [6744, 6750], [6752, 6752], [6754, 6754], [6757, 6764], [6771, 6780], [6783, 6783], [6832, 6846], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7040, 7041], [7074, 7077], [7080, 7081], [7083, 7085], [7142, 7142], [7144, 7145], [7149, 7149], [7151, 7153], [7212, 7219], [7222, 7223], [7376, 7378], [7380, 7392], [7394, 7400], [7405, 7405], [7412, 7412], [7416, 7417], [7616, 7673], [7675, 7679], [8203, 8207], [8234, 8238], [8288, 8292], [8294, 8303], [8400, 8432], [11503, 11505], [11647, 11647], [11744, 11775], [12330, 12333], [12441, 12442], [42607, 42610], [42612, 42621], [42654, 42655], [42736, 42737], [43010, 43010], [43014, 43014], [43019, 43019], [43045, 43046], [43204, 43205], [43232, 43249], [43263, 43263], [43302, 43309], [43335, 43345], [43392, 43394], [43443, 43443], [43446, 43449], [43452, 43453], [43493, 43493], [43561, 43566], [43569, 43570], [43573, 43574], [43587, 43587], [43596, 43596], [43644, 43644], [43696, 43696], [43698, 43700], [43703, 43704], [43710, 43711], [43713, 43713], [43756, 43757], [43766, 43766], [44005, 44005], [44008, 44008], [44013, 44013], [64286, 64286], [65024, 65039], [65056, 65071], [65279, 65279], [65529, 65531]],
          n = [[66045, 66045], [66272, 66272], [66422, 66426], [68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [68325, 68326], [68900, 68903], [69446, 69456], [69633, 69633], [69688, 69702], [69759, 69761], [69811, 69814], [69817, 69818], [69821, 69821], [69837, 69837], [69888, 69890], [69927, 69931], [69933, 69940], [70003, 70003], [70016, 70017], [70070, 70078], [70089, 70092], [70191, 70193], [70196, 70196], [70198, 70199], [70206, 70206], [70367, 70367], [70371, 70378], [70400, 70401], [70459, 70460], [70464, 70464], [70502, 70508], [70512, 70516], [70712, 70719], [70722, 70724], [70726, 70726], [70750, 70750], [70835, 70840], [70842, 70842], [70847, 70848], [70850, 70851], [71090, 71093], [71100, 71101], [71103, 71104], [71132, 71133], [71219, 71226], [71229, 71229], [71231, 71232], [71339, 71339], [71341, 71341], [71344, 71349], [71351, 71351], [71453, 71455], [71458, 71461], [71463, 71467], [71727, 71735], [71737, 71738], [72148, 72151], [72154, 72155], [72160, 72160], [72193, 72202], [72243, 72248], [72251, 72254], [72263, 72263], [72273, 72278], [72281, 72283], [72330, 72342], [72344, 72345], [72752, 72758], [72760, 72765], [72767, 72767], [72850, 72871], [72874, 72880], [72882, 72883], [72885, 72886], [73009, 73014], [73018, 73018], [73020, 73021], [73023, 73029], [73031, 73031], [73104, 73105], [73109, 73109], [73111, 73111], [73459, 73460], [78896, 78904], [92912, 92916], [92976, 92982], [94031, 94031], [94095, 94098], [113821, 113822], [113824, 113827], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [121344, 121398], [121403, 121452], [121461, 121461], [121476, 121476], [121499, 121503], [121505, 121519], [122880, 122886], [122888, 122904], [122907, 122913], [122915, 122916], [122918, 122922], [123184, 123190], [123628, 123631], [125136, 125142], [125252, 125258], [917505, 917505], [917536, 917631], [917760, 917999]],
          o = [[4352, 4447], [8986, 8987], [9001, 9002], [9193, 9196], [9200, 9200], [9203, 9203], [9725, 9726], [9748, 9749], [9800, 9811], [9855, 9855], [9875, 9875], [9889, 9889], [9898, 9899], [9917, 9918], [9924, 9925], [9934, 9934], [9940, 9940], [9962, 9962], [9970, 9971], [9973, 9973], [9978, 9978], [9981, 9981], [9989, 9989], [9994, 9995], [10024, 10024], [10060, 10060], [10062, 10062], [10067, 10069], [10071, 10071], [10133, 10135], [10160, 10160], [10175, 10175], [11035, 11036], [11088, 11088], [11093, 11093], [11904, 11929], [11931, 12019], [12032, 12245], [12272, 12283], [12288, 12329], [12334, 12350], [12353, 12438], [12443, 12543], [12549, 12591], [12593, 12686], [12688, 12730], [12736, 12771], [12784, 12830], [12832, 12871], [12880, 19903], [19968, 42124], [42128, 42182], [43360, 43388], [44032, 55203], [63744, 64255], [65040, 65049], [65072, 65106], [65108, 65126], [65128, 65131], [65281, 65376], [65504, 65510]],
          c = [[94176, 94179], [94208, 100343], [100352, 101106], [110592, 110878], [110928, 110930], [110948, 110951], [110960, 111355], [126980, 126980], [127183, 127183], [127374, 127374], [127377, 127386], [127488, 127490], [127504, 127547], [127552, 127560], [127568, 127569], [127584, 127589], [127744, 127776], [127789, 127797], [127799, 127868], [127870, 127891], [127904, 127946], [127951, 127955], [127968, 127984], [127988, 127988], [127992, 128062], [128064, 128064], [128066, 128252], [128255, 128317], [128331, 128334], [128336, 128359], [128378, 128378], [128405, 128406], [128420, 128420], [128507, 128591], [128640, 128709], [128716, 128716], [128720, 128722], [128725, 128725], [128747, 128748], [128756, 128762], [128992, 129003], [129293, 129393], [129395, 129398], [129402, 129442], [129445, 129450], [129454, 129482], [129485, 129535], [129648, 129651], [129656, 129658], [129664, 129666], [129680, 129685], [131072, 196605], [196608, 262141]];
        let l;
        function d(e, t) {
          let i,
            r = 0,
            s = t.length - 1;
          if (e < t[0][0] || e > t[s][1]) return !1;
          for (; s >= r;) if (i = r + s >> 1, e > t[i][1]) r = i + 1;else {
            if (!(e < t[i][0])) return !0;
            s = i - 1;
          }
          return !1;
        }
        t.UnicodeV11 = class {
          constructor() {
            if (this.version = "11", !l) {
              l = new Uint8Array(65536), l.fill(1), l[0] = 0, l.fill(0, 1, 32), l.fill(0, 127, 160);
              for (let e = 0; e < s.length; ++e) l.fill(0, s[e][0], s[e][1] + 1);
              for (let e = 0; e < o.length; ++e) l.fill(2, o[e][0], o[e][1] + 1);
            }
          }
          wcwidth(e) {
            return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ? l[e] : d(e, n) ? 0 : d(e, c) ? 2 : 1;
          }
          charProperties(e, t) {
            let i = this.wcwidth(e),
              s = 0 === i && 0 !== t;
            if (s) {
              const e = r.UnicodeService.extractWidth(t);
              0 === e ? s = !1 : e > i && (i = e);
            }
            return r.UnicodeService.createPropertyValue(0, i, s);
          }
        };
      },
      345: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const i = [];
            for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
            for (let r = 0; r < i.length; r++) i[r].call(void 0, e, t);
          }
          dispose() {
            this.clearListeners(), this._disposed = !0;
          }
          clearListeners() {
            this._listeners && (this._listeners.length = 0);
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        }, t.runAndSubscribe = function (e, t) {
          return t(void 0), e(e => t(e));
        };
      },
      490: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.UnicodeV6 = void 0;
        const r = i(938),
          s = [[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]],
          n = [[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 o;
        t.UnicodeV6 = class {
          constructor() {
            if (this.version = "6", !o) {
              o = new Uint8Array(65536), o.fill(1), o[0] = 0, o.fill(0, 1, 32), o.fill(0, 127, 160), o.fill(2, 4352, 4448), o[9001] = 2, o[9002] = 2, o.fill(2, 11904, 42192), o[12351] = 1, o.fill(2, 44032, 55204), o.fill(2, 63744, 64256), o.fill(2, 65040, 65050), o.fill(2, 65072, 65136), o.fill(2, 65280, 65377), o.fill(2, 65504, 65511);
              for (let e = 0; e < s.length; ++e) o.fill(0, s[e][0], s[e][1] + 1);
            }
          }
          wcwidth(e) {
            return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ? o[e] : function (e, t) {
              let i,
                r = 0,
                s = t.length - 1;
              if (e < t[0][0] || e > t[s][1]) return !1;
              for (; s >= r;) if (i = r + s >> 1, e > t[i][1]) r = i + 1;else {
                if (!(e < t[i][0])) return !0;
                s = i - 1;
              }
              return !1;
            }(e, n) ? 0 : e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141 ? 2 : 1;
          }
          charProperties(e, t) {
            let i = this.wcwidth(e),
              s = 0 === i && 0 !== t;
            if (s) {
              const e = r.UnicodeService.extractWidth(t);
              0 === e ? s = !1 : e > i && (i = e);
            }
            return r.UnicodeService.createPropertyValue(0, i, s);
          }
        };
      },
      938: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.UnicodeService = void 0;
        const r = i(345),
          s = i(490);
        class n {
          static extractShouldJoin(e) {
            return 0 != (1 & e);
          }
          static extractWidth(e) {
            return e >> 1 & 3;
          }
          static extractCharKind(e) {
            return e >> 3;
          }
          static createPropertyValue(e, t, i = !1) {
            return (16777215 & e) << 3 | (3 & t) << 1 | (i ? 1 : 0);
          }
          constructor() {
            this._providers = Object.create(null), this._active = "", this._onChange = new r.EventEmitter(), this.onChange = this._onChange.event;
            const e = new s.UnicodeV6();
            this.register(e), this._active = e.version, this._activeProvider = e;
          }
          dispose() {
            this._onChange.dispose();
          }
          get versions() {
            return Object.keys(this._providers);
          }
          get activeVersion() {
            return this._active;
          }
          set activeVersion(e) {
            if (!this._providers[e]) throw new Error(`unknown Unicode version "${e}"`);
            this._active = e, this._activeProvider = this._providers[e], this._onChange.fire(e);
          }
          register(e) {
            this._providers[e.version] = e;
          }
          wcwidth(e) {
            return this._activeProvider.wcwidth(e);
          }
          getStringCellWidth(e) {
            let t = 0,
              i = 0;
            const r = e.length;
            for (let s = 0; s < r; ++s) {
              let o = e.charCodeAt(s);
              if (55296 <= o && o <= 56319) {
                if (++s >= r) return t + this.wcwidth(o);
                const i = e.charCodeAt(s);
                56320 <= i && i <= 57343 ? o = 1024 * (o - 55296) + i - 56320 + 65536 : t += this.wcwidth(i);
              }
              const c = this.charProperties(o, i);
              let l = n.extractWidth(c);
              n.extractShouldJoin(c) && (l -= n.extractWidth(i)), t += l, i = c;
            }
            return t;
          }
          charProperties(e, t) {
            return this._activeProvider.charProperties(e, t);
          }
        }
        t.UnicodeService = n;
      }
    },
    t = {};
  function i(r) {
    var s = t[r];
    if (void 0 !== s) return s.exports;
    var n = t[r] = {
      exports: {}
    };
    return e[r](n, n.exports, i), n.exports;
  }
  var r = {};
  return (() => {
    var e = r;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.Unicode11Addon = void 0;
    const t = i(433);
    e.Unicode11Addon = class {
      activate(e) {
        e.unicode.register(new t.UnicodeV11());
      }
      dispose() {}
    };
  })(), r;
})());

/***/ },

/***/ 3568
/*!*********************************************!*\
  !*** ./node_modules/zmodem.js/src/zmlib.js ***!
  \*********************************************/
(module) {

"use strict";


var Zmodem = module.exports;
const ZDLE = 0x18,
  XON = 0x11,
  XOFF = 0x13,
  XON_HIGH = 0x80 | XON,
  XOFF_HIGH = 0x80 | XOFF,
  CAN = 0x18 //NB: same character as ZDLE
;

/**
 * Tools and constants that are useful for ZMODEM.
 *
 * @exports ZMLIB
 */
Zmodem.ZMLIB = {
  /**
   * @property {number} The ZDLE constant, which ZMODEM uses for escaping
   */
  ZDLE: ZDLE,
  /**
   * @property {number} XON - ASCII XON
   */
  XON: XON,
  /**
   * @property {number} XOFF - ASCII XOFF
   */
  XOFF: XOFF,
  /**
   * @property {number[]} ABORT_SEQUENCE - ZMODEM’s abort sequence
   */
  ABORT_SEQUENCE: [CAN, CAN, CAN, CAN, CAN],
  /**
   * Remove octet values from the given array that ZMODEM always ignores.
   * This will mutate the given array.
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The passed-in array. This is the same object that is
   *      passed in.
   */
  strip_ignored_bytes: function strip_ignored_bytes(octets) {
    for (var o = octets.length - 1; o >= 0; o--) {
      switch (octets[o]) {
        case XON:
        case XON_HIGH:
        case XOFF:
        case XOFF_HIGH:
          octets.splice(o, 1);
          continue;
      }
    }
    return octets;
  },
  /**
   * Like Array.prototype.indexOf, but searches for a subarray
   * rather than just a particular value.
   *
   * @param {Array} haystack - The array to search, i.e., the bigger.
   *
   * @param {Array} needle - The array whose values to find,
   *      i.e., the smaller.
   *
   * @returns {number} The position in “haystack” where “needle”
   *      first appears—or, -1 if “needle” doesn’t appear anywhere
   *      in “haystack”.
   */
  find_subarray: function find_subarray(haystack, needle) {
    var h = 0,
      n;
    var start = Date.now();
    HAYSTACK: while (h !== -1) {
      h = haystack.indexOf(needle[0], h);
      if (h === -1) break HAYSTACK;
      for (n = 1; n < needle.length; n++) {
        if (haystack[h + n] !== needle[n]) {
          h++;
          continue HAYSTACK;
        }
      }
      return h;
    }
    return -1;
  }
};

/***/ },

/***/ 3606
/*!********************************************************************!*\
  !*** ../app/node_modules/regexp.prototype.flags/implementation.js ***!
  \********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var setFunctionName = __webpack_require__(/*! set-function-name */ 8323);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var $Object = Object;
module.exports = setFunctionName(function flags() {
  if (this == null || this !== $Object(this)) {
    throw new $TypeError('RegExp.prototype.flags getter called on non-object');
  }
  var result = '';
  if (this.hasIndices) {
    result += 'd';
  }
  if (this.global) {
    result += 'g';
  }
  if (this.ignoreCase) {
    result += 'i';
  }
  if (this.multiline) {
    result += 'm';
  }
  if (this.dotAll) {
    result += 's';
  }
  if (this.unicode) {
    result += 'u';
  }
  if (this.unicodeSets) {
    result += 'v';
  }
  if (this.sticky) {
    result += 'y';
  }
  return result;
}, 'get flags', true);

/***/ },

/***/ 3607
/*!***********************************************!*\
  !*** ../app/node_modules/is-weakset/index.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var callBound = __webpack_require__(/*! call-bound */ 4731);
var $WeakSet = GetIntrinsic('%WeakSet%', true);

/** @type {undefined | (<V>(thisArg: Set<V>, value: V) => boolean)} */
var $setHas = callBound('WeakSet.prototype.has', true);
if ($setHas) {
  /** @type {undefined | (<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean)} */
  var $mapHas = callBound('WeakMap.prototype.has', true);

  /** @type {import('.')} */
  module.exports = function isWeakSet(x) {
    if (!x || typeof x !== 'object') {
      return false;
    }
    try {
      // @ts-expect-error TS can't figure out that $setHas is always truthy here
      $setHas(x, $setHas);
      if ($mapHas) {
        try {
          // @ts-expect-error this indeed might not be a weak collection
          $mapHas(x, $mapHas);
        } catch (e) {
          return true;
        }
      }
      // @ts-expect-error TS can't figure out that $WeakSet is always truthy here
      return x instanceof $WeakSet; // core-js workaround, pre-v3
    } catch (e) {}
    return false;
  };
} else {
  /** @type {import('.')} */
  // @ts-expect-error
  module.exports = function isWeakSet(x) {
    // eslint-disable-line no-unused-vars
    // `WeakSet` does not exist, or does not have a `has` method
    return false;
  };
}

/***/ },

/***/ 3629
/*!**************************************************!*\
  !*** ../app/node_modules/math-intrinsics/pow.js ***!
  \**************************************************/
(module) {

"use strict";


/** @type {import('./pow')} */
module.exports = Math.pow;

/***/ },

/***/ 3651
/*!**************************************!*\
  !*** ./node_modules/crc-32/crc32.js ***!
  \**************************************/
(__unused_webpack_module, exports) {

/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported CRC32 */
var CRC32;
(function (factory) {
  /*jshint ignore:start */
  /*eslint-disable */
  if (typeof DO_NOT_EXPORT_CRC === 'undefined') {
    if (true) {
      factory(exports);
    } else // removed by dead control flow
{}
  } else {
    factory(CRC32 = {});
  }
  /*eslint-enable */
  /*jshint ignore:end */
})(function (CRC32) {
  CRC32.version = '1.2.0';
  /* see perf/crc32table.js */
  /*global Int32Array */
  function signed_crc_table() {
    var c = 0,
      table = new Array(256);
    for (var n = 0; n != 256; ++n) {
      c = n;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      table[n] = c;
    }
    return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;
  }
  var T = signed_crc_table();
  function crc32_bstr(bstr, seed) {
    var C = seed ^ -1,
      L = bstr.length - 1;
    for (var i = 0; i < L;) {
      C = C >>> 8 ^ T[(C ^ bstr.charCodeAt(i++)) & 0xFF];
      C = C >>> 8 ^ T[(C ^ bstr.charCodeAt(i++)) & 0xFF];
    }
    if (i === L) C = C >>> 8 ^ T[(C ^ bstr.charCodeAt(i)) & 0xFF];
    return C ^ -1;
  }
  function crc32_buf(buf, seed) {
    if (buf.length > 10000) return crc32_buf_8(buf, seed);
    var C = seed ^ -1,
      L = buf.length - 3;
    for (var i = 0; i < L;) {
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    }
    while (i < L + 3) C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    return C ^ -1;
  }
  function crc32_buf_8(buf, seed) {
    var C = seed ^ -1,
      L = buf.length - 7;
    for (var i = 0; i < L;) {
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    }
    while (i < L + 7) C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    return C ^ -1;
  }
  function crc32_str(str, seed) {
    var C = seed ^ -1;
    for (var i = 0, L = str.length, c, d; i < L;) {
      c = str.charCodeAt(i++);
      if (c < 0x80) {
        C = C >>> 8 ^ T[(C ^ c) & 0xFF];
      } else if (c < 0x800) {
        C = C >>> 8 ^ T[(C ^ (192 | c >> 6 & 31)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c & 63)) & 0xFF];
      } else if (c >= 0xD800 && c < 0xE000) {
        c = (c & 1023) + 64;
        d = str.charCodeAt(i++) & 1023;
        C = C >>> 8 ^ T[(C ^ (240 | c >> 8 & 7)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c >> 2 & 63)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | d & 63)) & 0xFF];
      } else {
        C = C >>> 8 ^ T[(C ^ (224 | c >> 12 & 15)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c >> 6 & 63)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c & 63)) & 0xFF];
      }
    }
    return C ^ -1;
  }
  CRC32.table = T;
  // $FlowIgnore
  CRC32.bstr = crc32_bstr;
  // $FlowIgnore
  CRC32.buf = crc32_buf;
  // $FlowIgnore
  CRC32.str = crc32_str;
});

/***/ },

/***/ 3656
/*!**************************************!*\
  !*** ./node_modules/hexer/render.js ***!
  \**************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var color = (__webpack_require__(/*! ansi-color */ 1852)/* .set */ .h);
function pad(c, s, width) {
  while (s.length < width) s = c + s;
  return s;
}
function byte2hex(b) {
  return pad('0', b.toString(16), 2);
}
function byte2char(c) {
  if (c > 0x1f && c < 0x7f) {
    return String.fromCharCode(c);
  } else {
    return '.';
  }
  // TODO: could provide perhaps some unicode renderings for certain control chars
}
function renderColoredHuman(c) {
  if (c > 0x1f && c < 0x7f) {
    return String.fromCharCode(c);
  } else {
    return color('.', 'black+bold');
  }
}

// istanbul ignore next
function stripColor(str) {
  while (true) {
    var i = str.indexOf('\x1b[');
    if (i < 0) return str;
    var j = str.indexOf('m', i);
    if (j < 0) return str;
    str = str.slice(0, i) + str.slice(j + 1);
  }
}
module.exports.coloredHeadSep = color(':', 'cyan') + ' ';
module.exports.coloredOptions = {
  headSep: module.exports.coloredHeadSep,
  renderHuman: renderColoredHuman
};
module.exports.pad = pad;
module.exports.byte2hex = byte2hex;
module.exports.byte2char = byte2char;
module.exports.renderHuman = renderColoredHuman;
module.exports.stripColor = stripColor;

/***/ },

/***/ 3688
/*!*****************************************************!*\
  !*** ../app/node_modules/side-channel-map/index.js ***!
  \*****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var callBound = __webpack_require__(/*! call-bound */ 4731);
var inspect = __webpack_require__(/*! object-inspect */ 3808);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var $Map = GetIntrinsic('%Map%', true);

/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
var $mapGet = callBound('Map.prototype.get', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
var $mapSet = callBound('Map.prototype.set', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
var $mapHas = callBound('Map.prototype.has', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
var $mapDelete = callBound('Map.prototype.delete', true);
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
var $mapSize = callBound('Map.prototype.size', true);

/** @type {import('.')} */
module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */function getSideChannelMap() {
  /** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
  /** @typedef {Parameters<Channel['get']>[0]} K */
  /** @typedef {Parameters<Channel['set']>[1]} V */

  /** @type {Map<K, V> | undefined} */var $m;

  /** @type {Channel} */
  var channel = {
    assert: function (key) {
      if (!channel.has(key)) {
        throw new $TypeError('Side channel does not contain ' + inspect(key));
      }
    },
    'delete': function (key) {
      if ($m) {
        var result = $mapDelete($m, key);
        if ($mapSize($m) === 0) {
          $m = void undefined;
        }
        return result;
      }
      return false;
    },
    get: function (key) {
      // eslint-disable-line consistent-return
      if ($m) {
        return $mapGet($m, key);
      }
    },
    has: function (key) {
      if ($m) {
        return $mapHas($m, key);
      }
      return false;
    },
    set: function (key, value) {
      if (!$m) {
        // @ts-expect-error TS can't handle narrowing a variable inside a closure
        $m = new $Map();
      }
      $mapSet($m, key, value);
    }
  };

  // @ts-expect-error TODO: figure out why TS is erroring here
  return channel;
};

/***/ },

/***/ 3700
/*!*********************************!*\
  !*** external "tabby-settings" ***!
  \*********************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3700__;

/***/ },

/***/ 3769
/*!***********************************************!*\
  !*** ./node_modules/zmodem.js/src/zsentry.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zmlib */ 3568), __webpack_require__(/*! ./zsession */ 2624));
const MIN_ZM_HEX_START_LENGTH = 20,
  MAX_ZM_HEX_START_LENGTH = 21,
  // **, ZDLE, 'B0'
  //ZRQINIT’s next byte will be '0'; ZRINIT’s will be '1'.
  COMMON_ZM_HEX_START = [42, 42, 24, 66, 48],
  SENTRY_CONSTRUCTOR_REQUIRED_ARGS = ["to_terminal", "on_detect", "on_retract", "sender"],
  ASTERISK = 42;

/**
 * An instance of this object is passed to the Sentry’s on_detect
 * callback each time the Sentry object sees what looks like the
 * start of a ZMODEM session.
 *
 * Note that it is possible for a detection to be “retracted”
 * if the Sentry consumes bytes afterward that are not ZMODEM.
 * When this happens, the Sentry’s `retract` event will fire,
 * after which the Detection object is no longer usable.
 */
class Detection {
  /**
   * Not called directly.
   */
  constructor(session_type, accepter, denier, checker) {
    //confirm() - user confirms that ZMODEM is desired
    this._confirmer = accepter;

    //deny() - user declines ZMODEM; send abort sequence
    //
    //TODO: It might be ideal to forgo the session “peaceably”,
    //i.e., such that the peer doesn’t end in error. That’s
    //possible if we’re the sender, we accept the session,
    //then we just send a close(), but it doesn’t seem to be
    //possible for a receiver. Thus, let’s just leave it so
    //it’s at least consistent (and simpler, too).
    this._denier = denier;
    this._is_valid = checker;
    this._session_type = session_type;
  }

  /**
   * Confirm that the detected ZMODEM sequence indicates the
   * start of a ZMODEM session.
   *
   * @return {Session} The ZMODEM Session object (i.e., either a
   *  Send or Receive instance).
   */
  confirm() {
    return this._confirmer.apply(this, arguments);
  }

  /**
   * Tell the Sentry that the detected bytes sequence is
   * **NOT** intended to be the start of a ZMODEM session.
   */
  deny() {
    return this._denier.apply(this, arguments);
  }

  /**
   * Tells whether the Detection is still valid; i.e., whether
   * the Sentry has `consume()`d bytes that invalidate the
   * Detection.
   *
   * @returns {boolean} Whether the Detection is valid.
   */
  is_valid() {
    return this._is_valid.apply(this, arguments);
  }

  /**
   * Gives the session’s role.
   *
   * @returns {string} One of:
   * - `receive`
   * - `send`
   */
  get_session_role() {
    return this._session_type;
  }
}

/**
 * Class that parses an input stream for the beginning of a
 * ZMODEM session. We look for the tell-tale signs
 * of a ZMODEM transfer and allow the client to determine whether
 * it’s really ZMODEM or not.
 *
 * This is the “mother” class for zmodem.js;
 * all other class instances are created, directly or indirectly,
 * by an instance of this class.
 *
 * This logic is not unlikely to need tweaking, and it can never
 * be fully bulletproof; if it could be bulletproof it would be
 * simpler since there wouldn’t need to be the .confirm()/.deny()
 * step.
 *
 * One thing you could do to make things a bit simpler *is* just
 * to make that assumption for your users--i.e., to .confirm()
 * Detection objects automatically. That’ll be one less step
 * for the user, but an unaccustomed user might find that a bit
 * confusing. It’s also then possible to have a “false positive”:
 * a text stream that contains a ZMODEM initialization string but
 * isn’t, in fact, meant to start a ZMODEM session.
 *
 * Workflow:
 *  - parse all input with .consume(). As long as nothing looks
 *      like ZMODEM, all the traffic will go to to_terminal().
 *
 *  - when a “tell-tale” sequence of bytes arrives, we create a
 *      Detection object and pass it to the “on_detect” handler.
 *
 *  - Either .confirm() or .deny() with the Detection object.
 *      This is the user’s chance to say, “yeah, I know those
 *      bytes look like ZMODEM, but they’re not. So back off!”
 *
 *      If you .confirm(), the Session object is returned, and
 *      further input that goes to the Sentry’s .consume() will
 *      go to the (now-active) Session object.
 *
 *  - Sometimes additional traffic arrives that makes it apparent
 *      that no ZMODEM session is intended to start; in this case,
 *      the Sentry marks the Detection as “stale” and calls the
 *      `on_retract` handler. Any attempt from here to .confirm()
 *      on the Detection object will prompt an exception.
 *
 *      (This “retraction” behavior will only happen prior to
 *      .confirm() or .deny() being called on the Detection object.
 *      Beyond that point, either the Session has to deal with the
 *      “garbage”, or it’s back to the terminal anyway.
 *
 *  - Once the Session object is done, the Sentry will again send
 *      all traffic to to_terminal().
 */
Zmodem.Sentry = class ZmodemSentry {
  /**
   * Invoked directly. Creates a new Sentry that inspects all
   * traffic before it goes to the terminal.
   *
   * @param {Object} options - The Sentry parameters
   *
   * @param {Function} options.to_terminal - Handler that sends
   * traffic to the terminal object. Receives an iterable object
   * (e.g., an Array) that contains octet numbers.
   *
   * @param {Function} options.on_detect - Handler for new
   * detection events. Receives a new Detection object.
   *
   * @param {Function} options.on_retract - Handler for retraction
   * events. Receives no input.
   *
   * @param {Function} options.sender - Handler that sends traffic to
   * the peer. If, for example, your application uses WebSocket to talk
   * to the peer, use this to send data to the WebSocket instance.
   */
  constructor(options) {
    if (!options) throw "Need options!";
    var sentry = this;
    SENTRY_CONSTRUCTOR_REQUIRED_ARGS.forEach(function (arg) {
      if (!options[arg]) {
        throw "Need “" + arg + "”!";
      }
      sentry["_" + arg] = options[arg];
    });
    this._cache = [];
  }
  _after_session_end() {
    this._zsession = null;
  }

  /**
   * “Consumes” a piece of input:
   *
   *  - If there is no active or pending ZMODEM session, the text is
   *      all output. (This is regardless of whether we’ve got a new
   *      Detection.)
   *
   *  - If there is no active ZMODEM session and the input **ends** with
   *      a ZRINIT or ZRQINIT, then a new Detection object is created,
   *      and it is passed to the “on_detect” function.
   *      If there was another pending Detection object, it is retracted.
   *
   *  - If there is no active ZMODEM session and the input does NOT end
   *      with a ZRINIT or ZRQINIT, then any pending Detection object is
   *      retracted.
   *
   *  - If there is an active ZMODEM session, the input is passed to it.
   *      Any non-ZMODEM data (i.e., “garbage”) parsed from the input
   *      is sent to output.
   *      If the ZMODEM session ends, any post-ZMODEM part of the input
   *      is sent to output.
   *
   *  @param {number[] | ArrayBuffer} input - Octets to parse as input.
   */
  consume(input) {
    if (!(input instanceof Array)) {
      input = Array.prototype.slice.call(new Uint8Array(input));
    }
    if (this._zsession) {
      var session_before_consume = this._zsession;
      session_before_consume.consume(input);
      if (session_before_consume.has_ended()) {
        if (session_before_consume.type === "receive") {
          input = session_before_consume.get_trailing_bytes();
        } else {
          input = [];
        }
      } else return;
    }
    var new_session = this._parse(input);
    var to_terminal = input;
    if (new_session) {
      let replacement_detect = !!this._parsed_session;
      if (replacement_detect) {
        //no terminal output if the new session is of the
        //same type as the old
        if (this._parsed_session.type === new_session.type) {
          to_terminal = [];
        }
        this._on_retract();
      }
      this._parsed_session = new_session;
      var sentry = this;
      function checker() {
        return sentry._parsed_session === new_session;
      }

      //This runs with the Sentry object as the context.
      function accepter() {
        if (!this.is_valid()) {
          throw "Stale ZMODEM session!";
        }
        new_session.on("garbage", sentry._to_terminal);
        new_session.on("session_end", sentry._after_session_end.bind(sentry));
        new_session.set_sender(sentry._sender);
        delete sentry._parsed_session;
        return sentry._zsession = new_session;
      }
      ;
      function denier() {
        if (!this.is_valid()) return;
      }
      ;
      this._on_detect(new Detection(new_session.type, accepter, this._send_abort.bind(this), checker));
    } else {
      /*
      if (this._parsed_session) {
          this._session_stale_because = 'Non-ZMODEM output received after ZMODEM initialization.';
      }
      */

      var expired_session = this._parsed_session;
      this._parsed_session = null;
      if (expired_session) {
        //If we got a single “C” after parsing a session,
        //that means our peer is trying to downgrade to YMODEM.
        //That won’t work, so we just send the ABORT_SEQUENCE
        //right away.
        if (to_terminal.length === 1 && to_terminal[0] === 67) {
          this._send_abort();
        }
        this._on_retract();
      }
    }
    this._to_terminal(to_terminal);
  }

  /**
   * @return {Session|null} The sentry’s current Session object, or
   *      null if there is none.
   */
  get_confirmed_session() {
    return this._zsession || null;
  }
  _send_abort() {
    this._sender(Zmodem.ZMLIB.ABORT_SEQUENCE);
  }

  /**
   * Parse an input stream and decide how much of it goes to the
   * terminal or to a new Session object.
   *
   * This will accommodate input strings that are fragmented
   * across calls to this function; e.g., if you send the first
   * two bytes at the end of one parse() call then send the rest
   * at the beginning of the next, parse() will recognize it as
   * the beginning of a ZMODEM session.
   *
   * In order to keep from blocking any actual useful data to the
   * terminal in real-time, this will send on the initial
   * ZRINIT/ZRQINIT bytes to the terminal. They’re meant to go to the
   * terminal anyway, so that should be fine.
   *
   * @private
   *
   * @param {Array|Uint8Array} array_like - The input bytes.
   *      Each member should be a number between 0 and 255 (inclusive).
   *
   * @return {Array} A two-member list:
   *      0) the bytes that should be printed on the terminal
   *      1) the created Session object (if any)
   */
  _parse(array_like) {
    var cache = this._cache;
    cache.push.apply(cache, array_like);
    while (true) {
      let common_hex_at = Zmodem.ZMLIB.find_subarray(cache, COMMON_ZM_HEX_START);
      if (-1 === common_hex_at) break;
      let before_common_hex = cache.splice(0, common_hex_at);
      let zsession;
      try {
        zsession = Zmodem.Session.parse(cache);
      } catch (err) {//ignore errors
        //console.log(err);
      }
      if (!zsession) break;

      //Don’t need to parse the trailing XON.
      if (cache.length === 1 && cache[0] === Zmodem.ZMLIB.XON) {
        cache.shift();
      }

      //If there are still bytes in the cache,
      //then we don’t have a ZMODEM session. This logic depends
      //on the sender only sending one initial header.
      return cache.length ? null : zsession;
    }
    cache.splice(MAX_ZM_HEX_START_LENGTH);
    return null;
  }
};

/***/ },

/***/ 3773
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/text.js ***!
  \********************************************/
(module) {

class _my_TextEncoder {
  encode(text) {
    text = unescape(encodeURIComponent(text));
    var bytes = new Array(text.length);
    for (var b = 0; b < text.length; b++) {
      bytes[b] = text.charCodeAt(b);
    }
    return new Uint8Array(bytes);
  }
}
class _my_TextDecoder {
  decode(bytes) {
    return decodeURIComponent(escape(String.fromCharCode.apply(String, bytes)));
  }
}
var Zmodem = module.exports;

/**
 * A limited-use compatibility shim for TextEncoder and TextDecoder.
 * Useful because both Edge and node.js still lack support for these
 * as of October 2017.
 *
 * @exports Text
 */
Zmodem.Text = {
  Encoder: typeof TextEncoder !== "undefined" ? TextEncoder : _my_TextEncoder,
  Decoder: typeof TextDecoder !== "undefined" ? TextDecoder : _my_TextDecoder
};

/***/ },

/***/ 3805
/*!**********************************************************************!*\
  !*** ./src/components/loginScriptsSettings.component.pug?ngResource ***!
  \**********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/loginScriptsSettings.component.pug?ngResource */ 5516);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 3808
/*!***************************************************!*\
  !*** ../app/node_modules/object-inspect/index.js ***!
  \***************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var hasMap = typeof Map === 'function' && Map.prototype;
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
var mapForEach = hasMap && Map.prototype.forEach;
var hasSet = typeof Set === 'function' && Set.prototype;
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
var setForEach = hasSet && Set.prototype.forEach;
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
var booleanValueOf = Boolean.prototype.valueOf;
var objectToString = Object.prototype.toString;
var functionToString = Function.prototype.toString;
var $match = String.prototype.match;
var $slice = String.prototype.slice;
var $replace = String.prototype.replace;
var $toUpperCase = String.prototype.toUpperCase;
var $toLowerCase = String.prototype.toLowerCase;
var $test = RegExp.prototype.test;
var $concat = Array.prototype.concat;
var $join = Array.prototype.join;
var $arrSlice = Array.prototype.slice;
var $floor = Math.floor;
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
var gOPS = Object.getOwnPropertySymbols;
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
// ie, `has-tostringtag/shams
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null;
var isEnumerable = Object.prototype.propertyIsEnumerable;
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype // eslint-disable-line no-proto
? function (O) {
  return O.__proto__; // eslint-disable-line no-proto
} : null);
function addNumericSeparator(num, str) {
  if (num === Infinity || num === -Infinity || num !== num || num && num > -1000 && num < 1000 || $test.call(/e/, str)) {
    return str;
  }
  var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  if (typeof num === 'number') {
    var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
    if (int !== num) {
      var intStr = String(int);
      var dec = $slice.call(str, intStr.length + 1);
      return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
    }
  }
  return $replace.call(str, sepRegex, '$&_');
}
var utilInspect = __webpack_require__(/*! ./util.inspect */ 9004);
var inspectCustom = utilInspect.custom;
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
var quotes = {
  __proto__: null,
  'double': '"',
  single: "'"
};
var quoteREs = {
  __proto__: null,
  'double': /(["\\])/g,
  single: /(['\\])/g
};
module.exports = function inspect_(obj, options, depth, seen) {
  var opts = options || {};
  if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {
    throw new TypeError('option "quoteStyle" must be "single" or "double"');
  }
  if (has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
    throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  }
  var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
    throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
  }
  if (has(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
    throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  }
  if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
    throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  }
  var numericSeparator = opts.numericSeparator;
  if (typeof obj === 'undefined') {
    return 'undefined';
  }
  if (obj === null) {
    return 'null';
  }
  if (typeof obj === 'boolean') {
    return obj ? 'true' : 'false';
  }
  if (typeof obj === 'string') {
    return inspectString(obj, opts);
  }
  if (typeof obj === 'number') {
    if (obj === 0) {
      return Infinity / obj > 0 ? '0' : '-0';
    }
    var str = String(obj);
    return numericSeparator ? addNumericSeparator(obj, str) : str;
  }
  if (typeof obj === 'bigint') {
    var bigIntStr = String(obj) + 'n';
    return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  }
  var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  if (typeof depth === 'undefined') {
    depth = 0;
  }
  if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
    return isArray(obj) ? '[Array]' : '[Object]';
  }
  var indent = getIndent(opts, depth);
  if (typeof seen === 'undefined') {
    seen = [];
  } else if (indexOf(seen, obj) >= 0) {
    return '[Circular]';
  }
  function inspect(value, from, noIndent) {
    if (from) {
      seen = $arrSlice.call(seen);
      seen.push(from);
    }
    if (noIndent) {
      var newOpts = {
        depth: opts.depth
      };
      if (has(opts, 'quoteStyle')) {
        newOpts.quoteStyle = opts.quoteStyle;
      }
      return inspect_(value, newOpts, depth + 1, seen);
    }
    return inspect_(value, opts, depth + 1, seen);
  }
  if (typeof obj === 'function' && !isRegExp(obj)) {
    // in older engines, regexes are callable
    var name = nameOf(obj);
    var keys = arrObjKeys(obj, inspect);
    return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
  }
  if (isSymbol(obj)) {
    var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
    return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
  }
  if (isElement(obj)) {
    var s = '<' + $toLowerCase.call(String(obj.nodeName));
    var attrs = obj.attributes || [];
    for (var i = 0; i < attrs.length; i++) {
      s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
    }
    s += '>';
    if (obj.childNodes && obj.childNodes.length) {
      s += '...';
    }
    s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
    return s;
  }
  if (isArray(obj)) {
    if (obj.length === 0) {
      return '[]';
    }
    var xs = arrObjKeys(obj, inspect);
    if (indent && !singleLineValues(xs)) {
      return '[' + indentedJoin(xs, indent) + ']';
    }
    return '[ ' + $join.call(xs, ', ') + ' ]';
  }
  if (isError(obj)) {
    var parts = arrObjKeys(obj, inspect);
    if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
      return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
    }
    if (parts.length === 0) {
      return '[' + String(obj) + ']';
    }
    return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
  }
  if (typeof obj === 'object' && customInspect) {
    if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
      return utilInspect(obj, {
        depth: maxDepth - depth
      });
    } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
      return obj.inspect();
    }
  }
  if (isMap(obj)) {
    var mapParts = [];
    if (mapForEach) {
      mapForEach.call(obj, function (value, key) {
        mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
      });
    }
    return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  }
  if (isSet(obj)) {
    var setParts = [];
    if (setForEach) {
      setForEach.call(obj, function (value) {
        setParts.push(inspect(value, obj));
      });
    }
    return collectionOf('Set', setSize.call(obj), setParts, indent);
  }
  if (isWeakMap(obj)) {
    return weakCollectionOf('WeakMap');
  }
  if (isWeakSet(obj)) {
    return weakCollectionOf('WeakSet');
  }
  if (isWeakRef(obj)) {
    return weakCollectionOf('WeakRef');
  }
  if (isNumber(obj)) {
    return markBoxed(inspect(Number(obj)));
  }
  if (isBigInt(obj)) {
    return markBoxed(inspect(bigIntValueOf.call(obj)));
  }
  if (isBoolean(obj)) {
    return markBoxed(booleanValueOf.call(obj));
  }
  if (isString(obj)) {
    return markBoxed(inspect(String(obj)));
  }
  // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
  /* eslint-env browser */
  if (typeof window !== 'undefined' && obj === window) {
    return '{ [object Window] }';
  }
  if (typeof globalThis !== 'undefined' && obj === globalThis || typeof global !== 'undefined' && obj === global) {
    return '{ [object globalThis] }';
  }
  if (!isDate(obj) && !isRegExp(obj)) {
    var ys = arrObjKeys(obj, inspect);
    var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
    var protoTag = obj instanceof Object ? '' : 'null prototype';
    var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
    var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
    var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
    if (ys.length === 0) {
      return tag + '{}';
    }
    if (indent) {
      return tag + '{' + indentedJoin(ys, indent) + '}';
    }
    return tag + '{ ' + $join.call(ys, ', ') + ' }';
  }
  return String(obj);
};
function wrapQuotes(s, defaultStyle, opts) {
  var style = opts.quoteStyle || defaultStyle;
  var quoteChar = quotes[style];
  return quoteChar + s + quoteChar;
}
function quote(s) {
  return $replace.call(String(s), /"/g, '&quot;');
}
function canTrustToString(obj) {
  return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
}
function isArray(obj) {
  return toStr(obj) === '[object Array]' && canTrustToString(obj);
}
function isDate(obj) {
  return toStr(obj) === '[object Date]' && canTrustToString(obj);
}
function isRegExp(obj) {
  return toStr(obj) === '[object RegExp]' && canTrustToString(obj);
}
function isError(obj) {
  return toStr(obj) === '[object Error]' && canTrustToString(obj);
}
function isString(obj) {
  return toStr(obj) === '[object String]' && canTrustToString(obj);
}
function isNumber(obj) {
  return toStr(obj) === '[object Number]' && canTrustToString(obj);
}
function isBoolean(obj) {
  return toStr(obj) === '[object Boolean]' && canTrustToString(obj);
}

// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
function isSymbol(obj) {
  if (hasShammedSymbols) {
    return obj && typeof obj === 'object' && obj instanceof Symbol;
  }
  if (typeof obj === 'symbol') {
    return true;
  }
  if (!obj || typeof obj !== 'object' || !symToString) {
    return false;
  }
  try {
    symToString.call(obj);
    return true;
  } catch (e) {}
  return false;
}
function isBigInt(obj) {
  if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
    return false;
  }
  try {
    bigIntValueOf.call(obj);
    return true;
  } catch (e) {}
  return false;
}
var hasOwn = Object.prototype.hasOwnProperty || function (key) {
  return key in this;
};
function has(obj, key) {
  return hasOwn.call(obj, key);
}
function toStr(obj) {
  return objectToString.call(obj);
}
function nameOf(f) {
  if (f.name) {
    return f.name;
  }
  var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  if (m) {
    return m[1];
  }
  return null;
}
function indexOf(xs, x) {
  if (xs.indexOf) {
    return xs.indexOf(x);
  }
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) {
      return i;
    }
  }
  return -1;
}
function isMap(x) {
  if (!mapSize || !x || typeof x !== 'object') {
    return false;
  }
  try {
    mapSize.call(x);
    try {
      setSize.call(x);
    } catch (s) {
      return true;
    }
    return x instanceof Map; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isWeakMap(x) {
  if (!weakMapHas || !x || typeof x !== 'object') {
    return false;
  }
  try {
    weakMapHas.call(x, weakMapHas);
    try {
      weakSetHas.call(x, weakSetHas);
    } catch (s) {
      return true;
    }
    return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isWeakRef(x) {
  if (!weakRefDeref || !x || typeof x !== 'object') {
    return false;
  }
  try {
    weakRefDeref.call(x);
    return true;
  } catch (e) {}
  return false;
}
function isSet(x) {
  if (!setSize || !x || typeof x !== 'object') {
    return false;
  }
  try {
    setSize.call(x);
    try {
      mapSize.call(x);
    } catch (m) {
      return true;
    }
    return x instanceof Set; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isWeakSet(x) {
  if (!weakSetHas || !x || typeof x !== 'object') {
    return false;
  }
  try {
    weakSetHas.call(x, weakSetHas);
    try {
      weakMapHas.call(x, weakMapHas);
    } catch (s) {
      return true;
    }
    return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isElement(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
    return true;
  }
  return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
}
function inspectString(str, opts) {
  if (str.length > opts.maxStringLength) {
    var remaining = str.length - opts.maxStringLength;
    var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
    return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  }
  var quoteRE = quoteREs[opts.quoteStyle || 'single'];
  quoteRE.lastIndex = 0;
  // eslint-disable-next-line no-control-regex
  var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
  return wrapQuotes(s, 'single', opts);
}
function lowbyte(c) {
  var n = c.charCodeAt(0);
  var x = {
    8: 'b',
    9: 't',
    10: 'n',
    12: 'f',
    13: 'r'
  }[n];
  if (x) {
    return '\\' + x;
  }
  return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
}
function markBoxed(str) {
  return 'Object(' + str + ')';
}
function weakCollectionOf(type) {
  return type + ' { ? }';
}
function collectionOf(type, size, entries, indent) {
  var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
  return type + ' (' + size + ') {' + joinedEntries + '}';
}
function singleLineValues(xs) {
  for (var i = 0; i < xs.length; i++) {
    if (indexOf(xs[i], '\n') >= 0) {
      return false;
    }
  }
  return true;
}
function getIndent(opts, depth) {
  var baseIndent;
  if (opts.indent === '\t') {
    baseIndent = '\t';
  } else if (typeof opts.indent === 'number' && opts.indent > 0) {
    baseIndent = $join.call(Array(opts.indent + 1), ' ');
  } else {
    return null;
  }
  return {
    base: baseIndent,
    prev: $join.call(Array(depth + 1), baseIndent)
  };
}
function indentedJoin(xs, indent) {
  if (xs.length === 0) {
    return '';
  }
  var lineJoiner = '\n' + indent.prev + indent.base;
  return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
}
function arrObjKeys(obj, inspect) {
  var isArr = isArray(obj);
  var xs = [];
  if (isArr) {
    xs.length = obj.length;
    for (var i = 0; i < obj.length; i++) {
      xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
    }
  }
  var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
  var symMap;
  if (hasShammedSymbols) {
    symMap = {};
    for (var k = 0; k < syms.length; k++) {
      symMap['$' + syms[k]] = syms[k];
    }
  }
  for (var key in obj) {
    // eslint-disable-line no-restricted-syntax
    if (!has(obj, key)) {
      continue;
    } // eslint-disable-line no-restricted-syntax, no-continue
    if (isArr && String(Number(key)) === key && key < obj.length) {
      continue;
    } // eslint-disable-line no-restricted-syntax, no-continue
    if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
      // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
      continue; // eslint-disable-line no-restricted-syntax, no-continue
    } else if ($test.call(/[^\w$]/, key)) {
      xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
    } else {
      xs.push(key + ': ' + inspect(obj[key], obj));
    }
  }
  if (typeof gOPS === 'function') {
    for (var j = 0; j < syms.length; j++) {
      if (isEnumerable.call(obj, syms[j])) {
        xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
      }
    }
  }
  return xs;
}

/***/ },

/***/ 3894
/*!*****************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/inputProcessingSettings.component.pug?ngResource ***!
  \*****************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EBackspace key mode\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cselect class=\"form-control\" [(ngModel)]=\"options.backspace\"\u003E\n    \u003Coption *ngFor=\"let mode of backspaceModes\" [value]=\"mode.key\"\u003E{{mode.name|translate}}\u003C\u002Foption\u003E\n  \u003C\u002Fselect\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 3911
/*!***********************!*\
  !*** external "path" ***!
  \***********************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3911__;

/***/ },

/***/ 3961
/*!***********************!*\
  !*** external "rxjs" ***!
  \***********************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3961__;

/***/ },

/***/ 3990
/*!**********************************************!*\
  !*** ../app/node_modules/call-bind/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var setFunctionLength = __webpack_require__(/*! set-function-length */ 4992);
var $defineProperty = __webpack_require__(/*! es-define-property */ 5832);
var callBindBasic = __webpack_require__(/*! call-bind-apply-helpers */ 5603);
var applyBind = __webpack_require__(/*! call-bind-apply-helpers/applyBind */ 5168);
module.exports = function callBind(originalFunction) {
  var func = callBindBasic(arguments);
  var adjustedLength = originalFunction.length - (arguments.length - 1);
  return setFunctionLength(func, 1 + (adjustedLength > 0 ? adjustedLength : 0), true);
};
if ($defineProperty) {
  $defineProperty(module.exports, 'apply', {
    value: applyBind
  });
} else {
  module.exports.apply = applyBind;
}

/***/ },

/***/ 4026
/*!**********************************************!*\
  !*** ../app/node_modules/is-bigint/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var hasBigInts = __webpack_require__(/*! has-bigints */ 7567)();
if (hasBigInts) {
  var bigIntValueOf = BigInt.prototype.valueOf;
  /** @type {(value: object) => value is BigInt} */
  var tryBigInt = function tryBigIntObject(value) {
    try {
      bigIntValueOf.call(value);
      return true;
    } catch (e) {}
    return false;
  };

  /** @type {import('.')} */
  module.exports = function isBigInt(value) {
    if (value === null || typeof value === 'undefined' || typeof value === 'boolean' || typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol' || typeof value === 'function') {
      return false;
    }
    if (typeof value === 'bigint') {
      return true;
    }
    return tryBigInt(value);
  };
} else {
  /** @type {import('.')} */
  module.exports = function isBigInt(value) {
    return  false && 0;
  };
}

/***/ },

/***/ 4031
/*!**********************************************!*\
  !*** ../app/node_modules/es-errors/range.js ***!
  \**********************************************/
(module) {

"use strict";


/** @type {import('./range')} */
module.exports = RangeError;

/***/ },

/***/ 4085
/*!**************************************************************************!*\
  !*** ./src/components/streamProcessingSettings.component.pug?ngResource ***!
  \**************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/streamProcessingSettings.component.pug?ngResource */ 6980);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 4139
/*!*************************************************!*\
  !*** ../app/node_modules/object.assign/shim.js ***!
  \*************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var define = __webpack_require__(/*! define-properties */ 2445);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 8349);
module.exports = function shimAssign() {
  var polyfill = getPolyfill();
  define(Object, {
    assign: polyfill
  }, {
    assign: function () {
      return Object.assign !== polyfill;
    }
  });
  return polyfill;
};

/***/ },

/***/ 4234
/*!*********************!*\
  !*** external "os" ***!
  \*********************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__4234__;

/***/ },

/***/ 4281
/*!******************************************************!*\
  !*** ../app/node_modules/is-boolean-object/index.js ***!
  \******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);
var $boolToStr = callBound('Boolean.prototype.toString');
var $toString = callBound('Object.prototype.toString');

/** @type {import('.')} */
var tryBooleanObject = function booleanBrandCheck(value) {
  try {
    $boolToStr(value);
    return true;
  } catch (e) {
    return false;
  }
};
var boolClass = '[object Boolean]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();

/** @type {import('.')} */
module.exports = function isBoolean(value) {
  if (typeof value === 'boolean') {
    return true;
  }
  if (value === null || typeof value !== 'object') {
    return false;
  }
  return hasToStringTag ? tryBooleanObject(value) : $toString(value) === boolClass;
};

/***/ },

/***/ 4301
/*!*********************************************!*\
  !*** ../node_modules/object-is/polyfill.js ***!
  \*********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 88);
module.exports = function getPolyfill() {
  return typeof Object.is === 'function' ? Object.is : implementation;
};

/***/ },

/***/ 4358
/*!**********************************!*\
  !*** external "@angular/common" ***!
  \**********************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__4358__;

/***/ },

/***/ 4448
/*!****************************************!*\
  !*** ../app/node_modules/gopd/gOPD.js ***!
  \****************************************/
(module) {

"use strict";


/** @type {import('./gOPD')} */
module.exports = Object.getOwnPropertyDescriptor;

/***/ },

/***/ 4466
/*!*********************************************************!*\
  !*** ../app/node_modules/define-data-property/index.js ***!
  \*********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var $defineProperty = __webpack_require__(/*! es-define-property */ 5832);
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ 6543);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var gopd = __webpack_require__(/*! gopd */ 1284);

/** @type {import('.')} */
module.exports = function defineDataProperty(obj, property, value) {
  if (!obj || typeof obj !== 'object' && typeof obj !== 'function') {
    throw new $TypeError('`obj` must be an object or a function`');
  }
  if (typeof property !== 'string' && typeof property !== 'symbol') {
    throw new $TypeError('`property` must be a string or a symbol`');
  }
  if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
    throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
  }
  if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
    throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
  }
  if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
    throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
  }
  if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
    throw new $TypeError('`loose`, if provided, must be a boolean');
  }
  var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
  var nonWritable = arguments.length > 4 ? arguments[4] : null;
  var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
  var loose = arguments.length > 6 ? arguments[6] : false;

  /* @type {false | TypedPropertyDescriptor<unknown>} */
  var desc = !!gopd && gopd(obj, property);
  if ($defineProperty) {
    $defineProperty(obj, property, {
      configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
      enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
      value: value,
      writable: nonWritable === null && desc ? desc.writable : !nonWritable
    });
  } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
    // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
    obj[property] = value; // eslint-disable-line no-param-reassign
  } else {
    throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
  }
};

/***/ },

/***/ 4523
/*!***************************************************!*\
  !*** ../app/node_modules/is-date-object/index.js ***!
  \***************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);
var getDay = callBound('Date.prototype.getDay');
/** @type {import('.')} */
var tryDateObject = function tryDateGetDayCall(value) {
  try {
    getDay(value);
    return true;
  } catch (e) {
    return false;
  }
};

/** @type {(value: unknown) => string} */
var toStr = callBound('Object.prototype.toString');
var dateClass = '[object Date]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();

/** @type {import('.')} */
module.exports = function isDateObject(value) {
  if (typeof value !== 'object' || value === null) {
    return false;
  }
  return hasToStringTag ? tryDateObject(value) : toStr(value) === dateClass;
};

/***/ },

/***/ 4623
/*!****************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
  \****************************************************************/
(module) {

"use strict";


/* istanbul ignore next  */
function apply(styleElement, options, obj) {
  var css = "";
  if (obj.supports) {
    css += "@supports (".concat(obj.supports, ") {");
  }
  if (obj.media) {
    css += "@media ".concat(obj.media, " {");
  }
  var needLayer = typeof obj.layer !== "undefined";
  if (needLayer) {
    css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
  }
  css += obj.css;
  if (needLayer) {
    css += "}";
  }
  if (obj.media) {
    css += "}";
  }
  if (obj.supports) {
    css += "}";
  }
  var sourceMap = obj.sourceMap;
  if (sourceMap && typeof btoa !== "undefined") {
    css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  }

  // For old IE
  /* istanbul ignore if  */
  options.styleTagTransform(css, styleElement, options.options);
}
function removeStyleElement(styleElement) {
  // istanbul ignore if
  if (styleElement.parentNode === null) {
    return false;
  }
  styleElement.parentNode.removeChild(styleElement);
}

/* istanbul ignore next  */
function domAPI(options) {
  if (typeof document === "undefined") {
    return {
      update: function update() {},
      remove: function remove() {}
    };
  }
  var styleElement = options.insertStyleElement(options);
  return {
    update: function update(obj) {
      apply(styleElement, options, obj);
    },
    remove: function remove() {
      removeStyleElement(styleElement);
    }
  };
}
module.exports = domAPI;

/***/ },

/***/ 4629
/*!**************************************************************!*\
  !*** ./node_modules/@xterm/addon-search/lib/addon-search.js ***!
  \**************************************************************/
(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, () => (() => {
  "use strict";

  var e = {
      345: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const i = [];
            for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
            for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
          }
          dispose() {
            this.clearListeners(), this._disposed = !0;
          }
          clearListeners() {
            this._listeners && (this._listeners.length = 0);
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        }, t.runAndSubscribe = function (e, t) {
          return t(void 0), e(e => t(e));
        };
      },
      859: (e, t) => {
        function i(e) {
          for (const t of e) t.dispose();
          e.length = 0;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.MutableDisposable = t.Disposable = void 0, t.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const e of this._disposables) e.dispose();
            this._disposables.length = 0;
          }
          register(e) {
            return this._disposables.push(e), e;
          }
          unregister(e) {
            const t = this._disposables.indexOf(e);
            -1 !== t && this._disposables.splice(t, 1);
          }
        }, t.MutableDisposable = class {
          constructor() {
            this._isDisposed = !1;
          }
          get value() {
            return this._isDisposed ? void 0 : this._value;
          }
          set value(e) {
            this._isDisposed || e === this._value || (this._value?.dispose(), this._value = e);
          }
          clear() {
            this.value = void 0;
          }
          dispose() {
            this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
          }
        }, t.toDisposable = function (e) {
          return {
            dispose: e
          };
        }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
          return {
            dispose: () => i(e)
          };
        };
      }
    },
    t = {};
  function i(s) {
    var r = t[s];
    if (void 0 !== r) return r.exports;
    var o = t[s] = {
      exports: {}
    };
    return e[s](o, o.exports, i), o.exports;
  }
  var s = {};
  return (() => {
    var e = s;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.SearchAddon = void 0;
    const t = i(345),
      r = i(859),
      o = " ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";
    class n extends r.Disposable {
      constructor(e) {
        super(), this._highlightedLines = new Set(), this._highlightDecorations = [], this._selectedDecoration = this.register(new r.MutableDisposable()), this._linesCacheTimeoutId = 0, this._onDidChangeResults = this.register(new t.EventEmitter()), this.onDidChangeResults = this._onDidChangeResults.event, this._highlightLimit = e?.highlightLimit ?? 1e3;
      }
      activate(e) {
        this._terminal = e, this.register(this._terminal.onWriteParsed(() => this._updateMatches())), this.register(this._terminal.onResize(() => this._updateMatches())), this.register((0, r.toDisposable)(() => this.clearDecorations()));
      }
      _updateMatches() {
        this._highlightTimeout && window.clearTimeout(this._highlightTimeout), this._cachedSearchTerm && this._lastSearchOptions?.decorations && (this._highlightTimeout = setTimeout(() => {
          const e = this._cachedSearchTerm;
          this._cachedSearchTerm = void 0, this.findPrevious(e, {
            ...this._lastSearchOptions,
            incremental: !0,
            noScroll: !0
          });
        }, 200));
      }
      clearDecorations(e) {
        this._selectedDecoration.clear(), (0, r.disposeArray)(this._highlightDecorations), this._highlightDecorations = [], this._highlightedLines.clear(), e || (this._cachedSearchTerm = void 0);
      }
      clearActiveDecoration() {
        this._selectedDecoration.clear();
      }
      findNext(e, t) {
        if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
        const i = !this._lastSearchOptions || this._didOptionsChange(this._lastSearchOptions, t);
        this._lastSearchOptions = t, t?.decorations && (void 0 === this._cachedSearchTerm || e !== this._cachedSearchTerm || i) && this._highlightAllMatches(e, t);
        const s = this._findNextAndSelect(e, t);
        return this._fireResults(t), this._cachedSearchTerm = e, s;
      }
      _highlightAllMatches(e, t) {
        if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
        if (!e || 0 === e.length) return void this.clearDecorations();
        t = t || {}, this.clearDecorations(!0);
        const i = [];
        let s,
          r = this._find(e, 0, 0, t);
        for (; r && (s?.row !== r.row || s?.col !== r.col) && !(i.length >= this._highlightLimit);) s = r, i.push(s), r = this._find(e, s.col + s.term.length >= this._terminal.cols ? s.row + 1 : s.row, s.col + s.term.length >= this._terminal.cols ? 0 : s.col + 1, t);
        for (const e of i) {
          const i = this._createResultDecoration(e, t.decorations);
          i && (this._highlightedLines.add(i.marker.line), this._highlightDecorations.push({
            decoration: i,
            match: e,
            dispose() {
              i.dispose();
            }
          }));
        }
      }
      _find(e, t, i, s) {
        if (!this._terminal || !e || 0 === e.length) return this._terminal?.clearSelection(), void this.clearDecorations();
        if (i > this._terminal.cols) throw new Error(`Invalid col: ${i} to search in terminal of ${this._terminal.cols} cols`);
        let r;
        this._initLinesCache();
        const o = {
          startRow: t,
          startCol: i
        };
        if (r = this._findInLine(e, o, s), !r) for (let i = t + 1; i < this._terminal.buffer.active.baseY + this._terminal.rows && (o.startRow = i, o.startCol = 0, r = this._findInLine(e, o, s), !r); i++);
        return r;
      }
      _findNextAndSelect(e, t) {
        if (!this._terminal || !e || 0 === e.length) return this._terminal?.clearSelection(), this.clearDecorations(), !1;
        const i = this._terminal.getSelectionPosition();
        this._terminal.clearSelection();
        let s = 0,
          r = 0;
        i && (this._cachedSearchTerm === e ? (s = i.end.x, r = i.end.y) : (s = i.start.x, r = i.start.y)), this._initLinesCache();
        const o = {
          startRow: r,
          startCol: s
        };
        let n = this._findInLine(e, o, t);
        if (!n) for (let i = r + 1; i < this._terminal.buffer.active.baseY + this._terminal.rows && (o.startRow = i, o.startCol = 0, n = this._findInLine(e, o, t), !n); i++);
        if (!n && 0 !== r) for (let i = 0; i < r && (o.startRow = i, o.startCol = 0, n = this._findInLine(e, o, t), !n); i++);
        return !n && i && (o.startRow = i.start.y, o.startCol = 0, n = this._findInLine(e, o, t)), this._selectResult(n, t?.decorations, t?.noScroll);
      }
      findPrevious(e, t) {
        if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
        const i = !this._lastSearchOptions || this._didOptionsChange(this._lastSearchOptions, t);
        this._lastSearchOptions = t, t?.decorations && (void 0 === this._cachedSearchTerm || e !== this._cachedSearchTerm || i) && this._highlightAllMatches(e, t);
        const s = this._findPreviousAndSelect(e, t);
        return this._fireResults(t), this._cachedSearchTerm = e, s;
      }
      _didOptionsChange(e, t) {
        return !!t && (e.caseSensitive !== t.caseSensitive || e.regex !== t.regex || e.wholeWord !== t.wholeWord);
      }
      _fireResults(e) {
        if (e?.decorations) {
          let e = -1;
          if (this._selectedDecoration.value) {
            const t = this._selectedDecoration.value.match;
            for (let i = 0; i < this._highlightDecorations.length; i++) {
              const s = this._highlightDecorations[i].match;
              if (s.row === t.row && s.col === t.col && s.size === t.size) {
                e = i;
                break;
              }
            }
          }
          this._onDidChangeResults.fire({
            resultIndex: e,
            resultCount: this._highlightDecorations.length
          });
        }
      }
      _findPreviousAndSelect(e, t) {
        if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
        if (!this._terminal || !e || 0 === e.length) return this._terminal?.clearSelection(), this.clearDecorations(), !1;
        const i = this._terminal.getSelectionPosition();
        this._terminal.clearSelection();
        let s = this._terminal.buffer.active.baseY + this._terminal.rows - 1,
          r = this._terminal.cols;
        const o = !0;
        this._initLinesCache();
        const n = {
          startRow: s,
          startCol: r
        };
        let h;
        if (i && (n.startRow = s = i.start.y, n.startCol = r = i.start.x, this._cachedSearchTerm !== e && (h = this._findInLine(e, n, t, !1), h || (n.startRow = s = i.end.y, n.startCol = r = i.end.x))), h || (h = this._findInLine(e, n, t, o)), !h) {
          n.startCol = Math.max(n.startCol, this._terminal.cols);
          for (let i = s - 1; i >= 0 && (n.startRow = i, h = this._findInLine(e, n, t, o), !h); i--);
        }
        if (!h && s !== this._terminal.buffer.active.baseY + this._terminal.rows - 1) for (let i = this._terminal.buffer.active.baseY + this._terminal.rows - 1; i >= s && (n.startRow = i, h = this._findInLine(e, n, t, o), !h); i--);
        return this._selectResult(h, t?.decorations, t?.noScroll);
      }
      _initLinesCache() {
        const e = this._terminal;
        this._linesCache || (this._linesCache = new Array(e.buffer.active.length), this._cursorMoveListener = e.onCursorMove(() => this._destroyLinesCache()), this._resizeListener = e.onResize(() => this._destroyLinesCache())), window.clearTimeout(this._linesCacheTimeoutId), this._linesCacheTimeoutId = window.setTimeout(() => this._destroyLinesCache(), 15e3);
      }
      _destroyLinesCache() {
        this._linesCache = void 0, this._cursorMoveListener && (this._cursorMoveListener.dispose(), this._cursorMoveListener = void 0), this._resizeListener && (this._resizeListener.dispose(), this._resizeListener = void 0), this._linesCacheTimeoutId && (window.clearTimeout(this._linesCacheTimeoutId), this._linesCacheTimeoutId = 0);
      }
      _isWholeWord(e, t, i) {
        return (0 === e || o.includes(t[e - 1])) && (e + i.length === t.length || o.includes(t[e + i.length]));
      }
      _findInLine(e, t, i = {}, s = !1) {
        const r = this._terminal,
          o = t.startRow,
          n = t.startCol,
          h = r.buffer.active.getLine(o);
        if (h?.isWrapped) return s ? void (t.startCol += r.cols) : (t.startRow--, t.startCol += r.cols, this._findInLine(e, t, i));
        let a = this._linesCache?.[o];
        a || (a = this._translateBufferLineToStringWithWrap(o, !0), this._linesCache && (this._linesCache[o] = a));
        const [l, c] = a,
          d = this._bufferColsToStringOffset(o, n),
          _ = i.caseSensitive ? e : e.toLowerCase(),
          u = i.caseSensitive ? l : l.toLowerCase();
        let f = -1;
        if (i.regex) {
          const t = RegExp(_, "g");
          let i;
          if (s) for (; i = t.exec(u.slice(0, d));) f = t.lastIndex - i[0].length, e = i[0], t.lastIndex -= e.length - 1;else i = t.exec(u.slice(d)), i && i[0].length > 0 && (f = d + (t.lastIndex - i[0].length), e = i[0]);
        } else s ? d - _.length >= 0 && (f = u.lastIndexOf(_, d - _.length)) : f = u.indexOf(_, d);
        if (f >= 0) {
          if (i.wholeWord && !this._isWholeWord(f, u, e)) return;
          let t = 0;
          for (; t < c.length - 1 && f >= c[t + 1];) t++;
          let s = t;
          for (; s < c.length - 1 && f + e.length >= c[s + 1];) s++;
          const n = f - c[t],
            h = f + e.length - c[s],
            a = this._stringLengthToBufferSize(o + t, n);
          return {
            term: e,
            col: a,
            row: o + t,
            size: this._stringLengthToBufferSize(o + s, h) - a + r.cols * (s - t)
          };
        }
      }
      _stringLengthToBufferSize(e, t) {
        const i = this._terminal.buffer.active.getLine(e);
        if (!i) return 0;
        for (let e = 0; e < t; e++) {
          const s = i.getCell(e);
          if (!s) break;
          const r = s.getChars();
          r.length > 1 && (t -= r.length - 1);
          const o = i.getCell(e + 1);
          o && 0 === o.getWidth() && t++;
        }
        return t;
      }
      _bufferColsToStringOffset(e, t) {
        const i = this._terminal;
        let s = e,
          r = 0,
          o = i.buffer.active.getLine(s);
        for (; t > 0 && o;) {
          for (let e = 0; e < t && e < i.cols; e++) {
            const t = o.getCell(e);
            if (!t) break;
            t.getWidth() && (r += 0 === t.getCode() ? 1 : t.getChars().length);
          }
          if (s++, o = i.buffer.active.getLine(s), o && !o.isWrapped) break;
          t -= i.cols;
        }
        return r;
      }
      _translateBufferLineToStringWithWrap(e, t) {
        const i = this._terminal,
          s = [],
          r = [0];
        let o = i.buffer.active.getLine(e);
        for (; o;) {
          const n = i.buffer.active.getLine(e + 1),
            h = !!n && n.isWrapped;
          let a = o.translateToString(!h && t);
          if (h && n) {
            const e = o.getCell(o.length - 1);
            e && 0 === e.getCode() && 1 === e.getWidth() && 2 === n.getCell(0)?.getWidth() && (a = a.slice(0, -1));
          }
          if (s.push(a), !h) break;
          r.push(r[r.length - 1] + a.length), e++, o = n;
        }
        return [s.join(""), r];
      }
      _selectResult(e, t, i) {
        const s = this._terminal;
        if (this._selectedDecoration.clear(), !e) return s.clearSelection(), !1;
        if (s.select(e.col, e.row, e.size), t) {
          const i = s.registerMarker(-s.buffer.active.baseY - s.buffer.active.cursorY + e.row);
          if (i) {
            const o = s.registerDecoration({
              marker: i,
              x: e.col,
              width: e.size,
              backgroundColor: t.activeMatchBackground,
              layer: "top",
              overviewRulerOptions: {
                color: t.activeMatchColorOverviewRuler
              }
            });
            if (o) {
              const s = [];
              s.push(i), s.push(o.onRender(e => this._applyStyles(e, t.activeMatchBorder, !0))), s.push(o.onDispose(() => (0, r.disposeArray)(s))), this._selectedDecoration.value = {
                decoration: o,
                match: e,
                dispose() {
                  o.dispose();
                }
              };
            }
          }
        }
        if (!i && (e.row >= s.buffer.active.viewportY + s.rows || e.row < s.buffer.active.viewportY)) {
          let t = e.row - s.buffer.active.viewportY;
          t -= Math.floor(s.rows / 2), s.scrollLines(t);
        }
        return !0;
      }
      _applyStyles(e, t, i) {
        e.classList.contains("xterm-find-result-decoration") || (e.classList.add("xterm-find-result-decoration"), t && (e.style.outline = `1px solid ${t}`)), i && e.classList.add("xterm-find-active-result-decoration");
      }
      _createResultDecoration(e, t) {
        const i = this._terminal,
          s = i.registerMarker(-i.buffer.active.baseY - i.buffer.active.cursorY + e.row);
        if (!s) return;
        const o = i.registerDecoration({
          marker: s,
          x: e.col,
          width: e.size,
          backgroundColor: t.matchBackground,
          overviewRulerOptions: this._highlightedLines.has(s.line) ? void 0 : {
            color: t.matchOverviewRuler,
            position: "center"
          }
        });
        if (o) {
          const e = [];
          e.push(s), e.push(o.onRender(e => this._applyStyles(e, t.matchBorder, !1))), e.push(o.onDispose(() => (0, r.disposeArray)(e)));
        }
        return o;
      }
    }
    e.SearchAddon = n;
  })(), s;
})());

/***/ },

/***/ 4731
/*!***********************************************!*\
  !*** ../app/node_modules/call-bound/index.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var callBindBasic = __webpack_require__(/*! call-bind-apply-helpers */ 5603);

/** @type {(thisArg: string, searchString: string, position?: number) => number} */
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);

/** @type {import('.')} */
module.exports = function callBoundIntrinsic(name, allowMissing) {
  /* eslint no-extra-parens: 0 */

  var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */GetIntrinsic(name, !!allowMissing);
  if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
    return callBindBasic(/** @type {const} */[intrinsic]);
  }
  return intrinsic;
};

/***/ },

/***/ 4732
/*!*******************************************!*\
  !*** ../node_modules/clone-deep/index.js ***!
  \*******************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


/**
 * Module dependenices
 */
const clone = __webpack_require__(/*! shallow-clone */ 4978);
const typeOf = __webpack_require__(/*! kind-of */ 7866);
const isPlainObject = __webpack_require__(/*! is-plain-object */ 2185);
function cloneDeep(val, instanceClone) {
  switch (typeOf(val)) {
    case 'object':
      return cloneObjectDeep(val, instanceClone);
    case 'array':
      return cloneArrayDeep(val, instanceClone);
    default:
      {
        return clone(val);
      }
  }
}
function cloneObjectDeep(val, instanceClone) {
  if (typeof instanceClone === 'function') {
    return instanceClone(val);
  }
  if (instanceClone || isPlainObject(val)) {
    const res = new val.constructor();
    for (let key in val) {
      res[key] = cloneDeep(val[key], instanceClone);
    }
    return res;
  }
  return val;
}
function cloneArrayDeep(val, instanceClone) {
  const res = new val.constructor(val.length);
  for (let i = 0; i < val.length; i++) {
    res[i] = cloneDeep(val[i], instanceClone);
  }
  return res;
}

/**
 * Expose `cloneDeep`
 */

module.exports = cloneDeep;

/***/ },

/***/ 4744
/*!************************************************!*\
  !*** ./node_modules/cli-spinner/spinners.json ***!
  \************************************************/
(module) {

"use strict";
module.exports = /*#__PURE__*/JSON.parse('["|/-\\\\","⠂-–—–-","◐◓◑◒","◴◷◶◵","◰◳◲◱","▖▘▝▗","■□▪▫","▌▀▐▄","▉▊▋▌▍▎▏▎▍▌▋▊▉","▁▃▄▅▆▇█▇▆▅▄▃","←↖↑↗→↘↓↙","┤┘┴└├┌┬┐","◢◣◤◥",".oO°Oo.",".oO@*",["🌍","🌎","🌏"],"◡◡ ⊙⊙ ◠◠","☱☲☴","⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏","⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓","⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆","⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋","⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁","⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈","⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈","⢄⢂⢁⡁⡈⡐⡠","⢹⢺⢼⣸⣇⡧⡗⡏","⣾⣽⣻⢿⡿⣟⣯⣷","⠁⠂⠄⡀⢀⠠⠐⠈",["🌑","🌒","🌓","🌔","🌕","🌝","🌖","🌗","🌘","🌚"],["🕛","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚"]]');

/***/ },

/***/ 4749
/*!*******************************************!*\
  !*** ../app/node_modules/is-map/index.js ***!
  \*******************************************/
(module) {

"use strict";


/** @const */
var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Map) {
  /** @type {import('.')} */
  // eslint-disable-next-line no-unused-vars
  exported = function isMap(x) {
    // `Map` is not present in this environment.
    return false;
  };
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$mapHas) {
  /** @type {import('.')} */
  // eslint-disable-next-line no-unused-vars
  exported = function isMap(x) {
    // `Map` does not have a `has` method
    return false;
  };
}

/** @type {import('.')} */
module.exports = exported || function isMap(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $mapHas.call(x);
    if ($setHas) {
      try {
        $setHas.call(x);
      } catch (e) {
        return true;
      }
    }
    // @ts-expect-error TS can't figure out that $Map is always truthy here
    return x instanceof $Map; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
};

/***/ },

/***/ 4848
/*!*************************************************!*\
  !*** ./node_modules/binstring/lib/binstring.js ***!
  \*************************************************/
(module) {

"use strict";


function bufferToBytes(data) {
  var rs = [];
  for (var i = 0; i < data.length; i++) {
    rs.push(data[i]);
  }
  return rs;
}
var binString = module.exports = function binString(data, options) {
  // Set default options
  options = options || {};
  if (Array.isArray(data)) {
    data = new Buffer(data);
  } else if (typeof data == 'number') {
    data = new Buffer(data.toString(16), 'hex');
  } else if (typeof data == 'string') {
    if (!options.in) {
      // Quack, quack! Duck-type the input
      if (data.slice(0, 2) == '0x') {
        data = new Buffer(data.slice(2), 'hex');
      } else {
        // Binary string
        data = new Buffer(data, 'binary');
      }
    } else {
      data = new Buffer(data, options.in);
    }
  }
  if (!options.out) options.out = 'buffer';

  // Convert
  switch (options.out) {
    case 'buffer':
      return data;
    case 'hex':
      return data.toString('hex');
    case 'binary':
      return data.toString('binary');
    case 'utf8':
      return data.toString('utf8');
    case 'base64':
      return data.toString('base64');
    case 'bytes':
      return bufferToBytes(data);
    default:
      throw new Error('Output format "' + options.out + '" not understood');
  }
};

/***/ },

/***/ 4900
/*!**************************************************!*\
  !*** ../app/node_modules/object.assign/index.js ***!
  \**************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var defineProperties = __webpack_require__(/*! define-properties */ 2445);
var callBind = __webpack_require__(/*! call-bind */ 3990);
var implementation = __webpack_require__(/*! ./implementation */ 6056);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 8349);
var shim = __webpack_require__(/*! ./shim */ 4139);
var polyfill = callBind.apply(getPolyfill());
// eslint-disable-next-line no-unused-vars
var bound = function assign(target, source1) {
  return polyfill(Object, arguments);
};
defineProperties(bound, {
  getPolyfill: getPolyfill,
  implementation: implementation,
  shim: shim
});
module.exports = bound;

/***/ },

/***/ 4902
/*!***************************!*\
  !*** external "readline" ***!
  \***************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__4902__;

/***/ },

/***/ 4978
/*!**********************************************!*\
  !*** ../node_modules/shallow-clone/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";
/*!
 * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
 *
 * Copyright (c) 2015-present, Jon Schlinkert.
 * Released under the MIT License.
 */



const valueOf = Symbol.prototype.valueOf;
const typeOf = __webpack_require__(/*! kind-of */ 7866);
function clone(val, deep) {
  switch (typeOf(val)) {
    case 'array':
      return val.slice();
    case 'object':
      return Object.assign({}, val);
    case 'date':
      return new val.constructor(Number(val));
    case 'map':
      return new Map(val);
    case 'set':
      return new Set(val);
    case 'buffer':
      return cloneBuffer(val);
    case 'symbol':
      return cloneSymbol(val);
    case 'arraybuffer':
      return cloneArrayBuffer(val);
    case 'float32array':
    case 'float64array':
    case 'int16array':
    case 'int32array':
    case 'int8array':
    case 'uint16array':
    case 'uint32array':
    case 'uint8clampedarray':
    case 'uint8array':
      return cloneTypedArray(val);
    case 'regexp':
      return cloneRegExp(val);
    case 'error':
      return Object.create(val);
    default:
      {
        return val;
      }
  }
}
function cloneRegExp(val) {
  const flags = val.flags !== void 0 ? val.flags : /\w+$/.exec(val) || void 0;
  const re = new val.constructor(val.source, flags);
  re.lastIndex = val.lastIndex;
  return re;
}
function cloneArrayBuffer(val) {
  const res = new val.constructor(val.byteLength);
  new Uint8Array(res).set(new Uint8Array(val));
  return res;
}
function cloneTypedArray(val, deep) {
  return new val.constructor(val.buffer, val.byteOffset, val.length);
}
function cloneBuffer(val) {
  const len = val.length;
  const buf = Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : Buffer.from(len);
  val.copy(buf);
  return buf;
}
function cloneSymbol(val) {
  return valueOf ? Object(valueOf.call(val)) : {};
}

/**
 * Expose `clone`
 */

module.exports = clone;

/***/ },

/***/ 4992
/*!********************************************************!*\
  !*** ../app/node_modules/set-function-length/index.js ***!
  \********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var define = __webpack_require__(/*! define-data-property */ 4466);
var hasDescriptors = __webpack_require__(/*! has-property-descriptors */ 947)();
var gOPD = __webpack_require__(/*! gopd */ 1284);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var $floor = GetIntrinsic('%Math.floor%');

/** @type {import('.')} */
module.exports = function setFunctionLength(fn, length) {
  if (typeof fn !== 'function') {
    throw new $TypeError('`fn` is not a function');
  }
  if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
    throw new $TypeError('`length` must be a positive 32-bit integer');
  }
  var loose = arguments.length > 2 && !!arguments[2];
  var functionLengthIsConfigurable = true;
  var functionLengthIsWritable = true;
  if ('length' in fn && gOPD) {
    var desc = gOPD(fn, 'length');
    if (desc && !desc.configurable) {
      functionLengthIsConfigurable = false;
    }
    if (desc && !desc.writable) {
      functionLengthIsWritable = false;
    }
  }
  if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
    if (hasDescriptors) {
      define(/** @type {Parameters<define>[0]} */fn, 'length', length, true, true);
    } else {
      define(/** @type {Parameters<define>[0]} */fn, 'length', length);
    }
  }
  return fn;
};

/***/ },

/***/ 5141
/*!************************************************!*\
  !*** ../app/node_modules/is-callable/index.js ***!
  \************************************************/
(module) {

"use strict";


var fnToStr = Function.prototype.toString;
var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
var badArrayLike;
var isCallableMarker;
if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
  try {
    badArrayLike = Object.defineProperty({}, 'length', {
      get: function () {
        throw isCallableMarker;
      }
    });
    isCallableMarker = {};
    // eslint-disable-next-line no-throw-literal
    reflectApply(function () {
      throw 42;
    }, null, badArrayLike);
  } catch (_) {
    if (_ !== isCallableMarker) {
      reflectApply = null;
    }
  }
} else {
  reflectApply = null;
}
var constructorRegex = /^\s*class\b/;
var isES6ClassFn = function isES6ClassFunction(value) {
  try {
    var fnStr = fnToStr.call(value);
    return constructorRegex.test(fnStr);
  } catch (e) {
    return false; // not a function
  }
};
var tryFunctionObject = function tryFunctionToStr(value) {
  try {
    if (isES6ClassFn(value)) {
      return false;
    }
    fnToStr.call(value);
    return true;
  } catch (e) {
    return false;
  }
};
var toStr = Object.prototype.toString;
var objectClass = '[object Object]';
var fnClass = '[object Function]';
var genClass = '[object GeneratorFunction]';
var ddaClass = '[object HTMLAllCollection]'; // IE 11
var ddaClass2 = '[object HTML document.all class]';
var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`

var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing

var isDDA = function isDocumentDotAll() {
  return false;
};
if (typeof document === 'object') {
  // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly
  var all = document.all;
  if (toStr.call(all) === toStr.call(document.all)) {
    isDDA = function isDocumentDotAll(value) {
      /* globals document: false */
      // in IE 6-8, typeof document.all is "object" and it's truthy
      if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {
        try {
          var str = toStr.call(value);
          return (str === ddaClass || str === ddaClass2 || str === ddaClass3 // opera 12.16
          || str === objectClass // IE 6-8
          ) && value('') == null; // eslint-disable-line eqeqeq
        } catch (e) {/**/}
      }
      return false;
    };
  }
}
module.exports = reflectApply ? function isCallable(value) {
  if (isDDA(value)) {
    return true;
  }
  if (!value) {
    return false;
  }
  if (typeof value !== 'function' && typeof value !== 'object') {
    return false;
  }
  try {
    reflectApply(value, null, badArrayLike);
  } catch (e) {
    if (e !== isCallableMarker) {
      return false;
    }
  }
  return !isES6ClassFn(value) && tryFunctionObject(value);
} : function isCallable(value) {
  if (isDDA(value)) {
    return true;
  }
  if (!value) {
    return false;
  }
  if (typeof value !== 'function' && typeof value !== 'object') {
    return false;
  }
  if (hasToStringTag) {
    return tryFunctionObject(value);
  }
  if (isES6ClassFn(value)) {
    return false;
  }
  var strClass = toStr.call(value);
  if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) {
    return false;
  }
  return tryFunctionObject(value);
};

/***/ },

/***/ 5168
/*!****************************************************************!*\
  !*** ../app/node_modules/call-bind-apply-helpers/applyBind.js ***!
  \****************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 438);
var $apply = __webpack_require__(/*! ./functionApply */ 6803);
var actualApply = __webpack_require__(/*! ./actualApply */ 6129);

/** @type {import('./applyBind')} */
module.exports = function applyBind() {
  return actualApply(bind, $apply, arguments);
};

/***/ },

/***/ 5250
/*!*************************************************************!*\
  !*** ./src/components/colorPicker.component.pug?ngResource ***!
  \*************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorPicker.component.pug?ngResource */ 2861);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 5334
/*!*****************************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
  \*****************************************************************************/
(module) {

"use strict";


var stylesInDOM = [];
function getIndexByIdentifier(identifier) {
  var result = -1;
  for (var i = 0; i < stylesInDOM.length; i++) {
    if (stylesInDOM[i].identifier === identifier) {
      result = i;
      break;
    }
  }
  return result;
}
function modulesToDom(list, options) {
  var idCountMap = {};
  var identifiers = [];
  for (var i = 0; i < list.length; i++) {
    var item = list[i];
    var id = options.base ? item[0] + options.base : item[0];
    var count = idCountMap[id] || 0;
    var identifier = "".concat(id, " ").concat(count);
    idCountMap[id] = count + 1;
    var indexByIdentifier = getIndexByIdentifier(identifier);
    var obj = {
      css: item[1],
      media: item[2],
      sourceMap: item[3],
      supports: item[4],
      layer: item[5]
    };
    if (indexByIdentifier !== -1) {
      stylesInDOM[indexByIdentifier].references++;
      stylesInDOM[indexByIdentifier].updater(obj);
    } else {
      var updater = addElementStyle(obj, options);
      options.byIndex = i;
      stylesInDOM.splice(i, 0, {
        identifier: identifier,
        updater: updater,
        references: 1
      });
    }
    identifiers.push(identifier);
  }
  return identifiers;
}
function addElementStyle(obj, options) {
  var api = options.domAPI(options);
  api.update(obj);
  var updater = function updater(newObj) {
    if (newObj) {
      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
        return;
      }
      api.update(obj = newObj);
    } else {
      api.remove();
    }
  };
  return updater;
}
module.exports = function (list, options) {
  options = options || {};
  list = list || [];
  var lastIdentifiers = modulesToDom(list, options);
  return function update(newList) {
    newList = newList || [];
    for (var i = 0; i < lastIdentifiers.length; i++) {
      var identifier = lastIdentifiers[i];
      var index = getIndexByIdentifier(identifier);
      stylesInDOM[index].references--;
    }
    var newLastIdentifiers = modulesToDom(newList, options);
    for (var _i = 0; _i < lastIdentifiers.length; _i++) {
      var _identifier = lastIdentifiers[_i];
      var _index = getIndexByIdentifier(_identifier);
      if (stylesInDOM[_index].references === 0) {
        stylesInDOM[_index].updater();
        stylesInDOM.splice(_index, 1);
      }
    }
    lastIdentifiers = newLastIdentifiers;
  };
};

/***/ },

/***/ 5367
/*!**********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
  \**********************************************************************/
(module) {

"use strict";


/* istanbul ignore next  */
function styleTagTransform(css, styleElement) {
  if (styleElement.styleSheet) {
    styleElement.styleSheet.cssText = css;
  } else {
    while (styleElement.firstChild) {
      styleElement.removeChild(styleElement.firstChild);
    }
    styleElement.appendChild(document.createTextNode(css));
  }
}
module.exports = styleTagTransform;

/***/ },

/***/ 5405
/*!*******************************************!*\
  !*** ../node_modules/deep-equal/index.js ***!
  \*******************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var objectKeys = __webpack_require__(/*! object-keys */ 2560);
var isArguments = __webpack_require__(/*! is-arguments */ 8303);
var is = __webpack_require__(/*! object-is */ 3479);
var isRegex = __webpack_require__(/*! is-regex */ 1476);
var flags = __webpack_require__(/*! regexp.prototype.flags */ 9470);
var isArray = __webpack_require__(/*! isarray */ 9547);
var isDate = __webpack_require__(/*! is-date-object */ 4523);
var whichBoxedPrimitive = __webpack_require__(/*! which-boxed-primitive */ 3010);
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var callBound = __webpack_require__(/*! call-bind/callBound */ 9414);
var whichCollection = __webpack_require__(/*! which-collection */ 7554);
var getIterator = __webpack_require__(/*! es-get-iterator */ 1055);
var getSideChannel = __webpack_require__(/*! side-channel */ 6227);
var whichTypedArray = __webpack_require__(/*! which-typed-array */ 6086);
var assign = __webpack_require__(/*! object.assign */ 4900);
var $getTime = callBound('Date.prototype.getTime');
var gPO = Object.getPrototypeOf;
var $objToString = callBound('Object.prototype.toString');
var $Set = GetIntrinsic('%Set%', true);
var $mapHas = callBound('Map.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSize = callBound('Map.prototype.size', true);
var $setAdd = callBound('Set.prototype.add', true);
var $setDelete = callBound('Set.prototype.delete', true);
var $setHas = callBound('Set.prototype.has', true);
var $setSize = callBound('Set.prototype.size', true);

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
function setHasEqualElement(set, val1, opts, channel) {
  var i = getIterator(set);
  var result;
  while ((result = i.next()) && !result.done) {
    if (internalDeepEqual(val1, result.value, opts, channel)) {
      // eslint-disable-line no-use-before-define
      // Remove the matching element to make sure we do not check that again.
      $setDelete(set, result.value);
      return true;
    }
  }
  return false;
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
function findLooseMatchingPrimitives(prim) {
  if (typeof prim === 'undefined') {
    return null;
  }
  if (typeof prim === 'object') {
    // Only pass in null as object!
    return void 0;
  }
  if (typeof prim === 'symbol') {
    return false;
  }
  if (typeof prim === 'string' || typeof prim === 'number') {
    // Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
    return +prim === +prim; // eslint-disable-line no-implicit-coercion
  }
  return true;
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
  var altValue = findLooseMatchingPrimitives(prim);
  if (altValue != null) {
    return altValue;
  }
  var curB = $mapGet(b, altValue);
  var looseOpts = assign({}, opts, {
    strict: false
  });
  if (typeof curB === 'undefined' && !$mapHas(b, altValue)
  // eslint-disable-next-line no-use-before-define
  || !internalDeepEqual(item, curB, looseOpts, channel)) {
    return false;
  }
  // eslint-disable-next-line no-use-before-define
  return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
function setMightHaveLoosePrim(a, b, prim) {
  var altValue = findLooseMatchingPrimitives(prim);
  if (altValue != null) {
    return altValue;
  }
  return $setHas(b, altValue) && !$setHas(a, altValue);
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
  var i = getIterator(set);
  var result;
  var key2;
  while ((result = i.next()) && !result.done) {
    key2 = result.value;
    if (
    // eslint-disable-next-line no-use-before-define
    internalDeepEqual(key1, key2, opts, channel)
    // eslint-disable-next-line no-use-before-define
    && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)) {
      $setDelete(set, key2);
      return true;
    }
  }
  return false;
}
function internalDeepEqual(actual, expected, options, channel) {
  var opts = options || {};

  // 7.1. All identical values are equivalent, as determined by ===.
  if (opts.strict ? is(actual, expected) : actual === expected) {
    return true;
  }
  var actualBoxed = whichBoxedPrimitive(actual);
  var expectedBoxed = whichBoxedPrimitive(expected);
  if (actualBoxed !== expectedBoxed) {
    return false;
  }

  // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
  if (!actual || !expected || typeof actual !== 'object' && typeof expected !== 'object') {
    return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
  }

  /*
   * 7.4. For all other Object pairs, including Array objects, equivalence is
   * determined by having the same number of owned properties (as verified
   * with Object.prototype.hasOwnProperty.call), the same set of keys
   * (although not necessarily the same order), equivalent values for every
   * corresponding key, and an identical 'prototype' property. Note: this
   * accounts for both named and indexed properties on Arrays.
   */
  // see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration

  var hasActual = channel.has(actual);
  var hasExpected = channel.has(expected);
  var sentinel;
  if (hasActual && hasExpected) {
    if (channel.get(actual) === channel.get(expected)) {
      return true;
    }
  } else {
    sentinel = {};
  }
  if (!hasActual) {
    channel.set(actual, sentinel);
  }
  if (!hasExpected) {
    channel.set(expected, sentinel);
  }

  // eslint-disable-next-line no-use-before-define
  return objEquiv(actual, expected, opts, channel);
}
function isBuffer(x) {
  if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
    return false;
  }
  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
    return false;
  }
  if (x.length > 0 && typeof x[0] !== 'number') {
    return false;
  }
  return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
}
function setEquiv(a, b, opts, channel) {
  if ($setSize(a) !== $setSize(b)) {
    return false;
  }
  var iA = getIterator(a);
  var iB = getIterator(b);
  var resultA;
  var resultB;
  var set;
  while ((resultA = iA.next()) && !resultA.done) {
    if (resultA.value && typeof resultA.value === 'object') {
      if (!set) {
        set = new $Set();
      }
      $setAdd(set, resultA.value);
    } else if (!$setHas(b, resultA.value)) {
      if (opts.strict) {
        return false;
      }
      if (!setMightHaveLoosePrim(a, b, resultA.value)) {
        return false;
      }
      if (!set) {
        set = new $Set();
      }
      $setAdd(set, resultA.value);
    }
  }
  if (set) {
    while ((resultB = iB.next()) && !resultB.done) {
      // We have to check if a primitive value is already matching and only if it's not, go hunting for it.
      if (resultB.value && typeof resultB.value === 'object') {
        if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
          return false;
        }
      } else if (!opts.strict && !$setHas(a, resultB.value) && !setHasEqualElement(set, resultB.value, opts.strict, channel)) {
        return false;
      }
    }
    return $setSize(set) === 0;
  }
  return true;
}
function mapEquiv(a, b, opts, channel) {
  if ($mapSize(a) !== $mapSize(b)) {
    return false;
  }
  var iA = getIterator(a);
  var iB = getIterator(b);
  var resultA;
  var resultB;
  var set;
  var key;
  var item1;
  var item2;
  while ((resultA = iA.next()) && !resultA.done) {
    key = resultA.value[0];
    item1 = resultA.value[1];
    if (key && typeof key === 'object') {
      if (!set) {
        set = new $Set();
      }
      $setAdd(set, key);
    } else {
      item2 = $mapGet(b, key);
      if (typeof item2 === 'undefined' && !$mapHas(b, key) || !internalDeepEqual(item1, item2, opts, channel)) {
        if (opts.strict) {
          return false;
        }
        if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
          return false;
        }
        if (!set) {
          set = new $Set();
        }
        $setAdd(set, key);
      }
    }
  }
  if (set) {
    while ((resultB = iB.next()) && !resultB.done) {
      key = resultB.value[0];
      item2 = resultB.value[1];
      if (key && typeof key === 'object') {
        if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
          return false;
        }
      } else if (!opts.strict && (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel)) && !mapHasEqualEntry(set, a, key, item2, assign({}, opts, {
        strict: false
      }), channel)) {
        return false;
      }
    }
    return $setSize(set) === 0;
  }
  return true;
}
function objEquiv(a, b, opts, channel) {
  /* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
  var i, key;
  if (typeof a !== typeof b) {
    return false;
  }
  if (a == null || b == null) {
    return false;
  }
  if ($objToString(a) !== $objToString(b)) {
    return false;
  }
  if (isArguments(a) !== isArguments(b)) {
    return false;
  }
  var aIsArray = isArray(a);
  var bIsArray = isArray(b);
  if (aIsArray !== bIsArray) {
    return false;
  }

  // TODO: replace when a cross-realm brand check is available
  var aIsError = a instanceof Error;
  var bIsError = b instanceof Error;
  if (aIsError !== bIsError) {
    return false;
  }
  if (aIsError || bIsError) {
    if (a.name !== b.name || a.message !== b.message) {
      return false;
    }
  }
  var aIsRegex = isRegex(a);
  var bIsRegex = isRegex(b);
  if (aIsRegex !== bIsRegex) {
    return false;
  }
  if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
    return false;
  }
  var aIsDate = isDate(a);
  var bIsDate = isDate(b);
  if (aIsDate !== bIsDate) {
    return false;
  }
  if (aIsDate || bIsDate) {
    // && would work too, because both are true or both false here
    if ($getTime(a) !== $getTime(b)) {
      return false;
    }
  }
  if (opts.strict && gPO && gPO(a) !== gPO(b)) {
    return false;
  }
  if (whichTypedArray(a) !== whichTypedArray(b)) {
    return false;
  }
  var aIsBuffer = isBuffer(a);
  var bIsBuffer = isBuffer(b);
  if (aIsBuffer !== bIsBuffer) {
    return false;
  }
  if (aIsBuffer || bIsBuffer) {
    // && would work too, because both are true or both false here
    if (a.length !== b.length) {
      return false;
    }
    for (i = 0; i < a.length; i++) {
      if (a[i] !== b[i]) {
        return false;
      }
    }
    return true;
  }
  if (typeof a !== typeof b) {
    return false;
  }
  var ka = objectKeys(a);
  var kb = objectKeys(b);
  // having the same number of owned properties (keys incorporates hasOwnProperty)
  if (ka.length !== kb.length) {
    return false;
  }

  // the same set of keys (although not necessarily the same order),
  ka.sort();
  kb.sort();
  // ~~~cheap key test
  for (i = ka.length - 1; i >= 0; i--) {
    if (ka[i] != kb[i]) {
      return false;
    } // eslint-disable-line eqeqeq
  }

  // equivalent values for every corresponding key, and ~~~possibly expensive deep test
  for (i = ka.length - 1; i >= 0; i--) {
    key = ka[i];
    if (!internalDeepEqual(a[key], b[key], opts, channel)) {
      return false;
    }
  }
  var aCollection = whichCollection(a);
  var bCollection = whichCollection(b);
  if (aCollection !== bCollection) {
    return false;
  }
  if (aCollection === 'Set' || bCollection === 'Set') {
    // aCollection === bCollection
    return setEquiv(a, b, opts, channel);
  }
  if (aCollection === 'Map') {
    // aCollection === bCollection
    return mapEquiv(a, b, opts, channel);
  }
  return true;
}
module.exports = function deepEqual(a, b, opts) {
  return internalDeepEqual(a, b, opts, getSideChannel());
};

/***/ },

/***/ 5516
/*!**************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/loginScriptsSettings.component.pug?ngResource ***!
  \**************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv\u003E\n  \u003C!--TODO ([sortablejs]='scripts')--\u003E\n  \u003Cdiv class=\"input-group flex-grow-1\" *ngFor=\"let script of scripts\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Expect\" [(ngModel)]=\"script.expect\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Send\" [(ngModel)]=\"script.send\"\u003E\n    \u003Cdiv class=\"input-group-text p-0 border-0\"\u003E\n      \u003Cdiv class=\"hover-reveal\" ngbDropdown\u003E\n        \u003Cbutton class=\"btn btn-link btn-sm\" ngbDropdownToggle\u003E\u003Ci class=\"fas fa-fw fa-cog\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n        \u003Cdiv class=\"dropdown-menu-right\" ngbDropdownMenu\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.isRegex = false\" [class.active]=\"!script.isRegex\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"!script.isRegex\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EExact match\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.isRegex = true\" [class.active]=\"script.isRegex\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"script.isRegex\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ERegex\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.optional = !script.optional\" [class.active]=\"script.optional\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"script.optional\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EOptional\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cbutton class=\"btn btn-link btn-sm hover-reveal\" (click)=\"deleteScript(script)\"\u003E\u003Ci class=\"fas fa-fw fa-trash-alt\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cbutton class=\"btn btn-secondary mt-2\" (click)=\"addScript()\"\u003E\u003Ci class=\"fas fa-plus\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ENew item\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 5534
/*!***************************************************!*\
  !*** ../app/node_modules/math-intrinsics/sign.js ***!
  \***************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var $isNaN = __webpack_require__(/*! ./isNaN */ 954);

/** @type {import('./sign')} */
module.exports = function sign(number) {
  if ($isNaN(number) || number === 0) {
    return number;
  }
  return number < 0 ? -1 : +1;
};

/***/ },

/***/ 5603
/*!************************************************************!*\
  !*** ../app/node_modules/call-bind-apply-helpers/index.js ***!
  \************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 438);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var $call = __webpack_require__(/*! ./functionCall */ 711);
var $actualApply = __webpack_require__(/*! ./actualApply */ 6129);

/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
module.exports = function callBindBasic(args) {
  if (args.length < 1 || typeof args[0] !== 'function') {
    throw new $TypeError('a function is required');
  }
  return $actualApply(bind, $call, args);
};

/***/ },

/***/ 5717
/*!***********************************************************************!*\
  !*** ./src/components/appearanceSettingsTab.component.pug?ngResource ***!
  \***********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/appearanceSettingsTab.component.pug?ngResource */ 9258);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 5743
/*!**********************!*\
  !*** ./src/bell.ogg ***!
  \**********************/
(module) {

"use strict";
module.exports = "data:audio/ogg;base64, ";

/***/ },

/***/ 5745
/*!********************************************************************!*\
  !*** ./node_modules/@xterm/addon-ligatures/lib/addon-ligatures.js ***!
  \********************************************************************/
(module, exports, __webpack_require__) {

/*! For license information please see addon-ligatures.js.LICENSE.txt */
!function (e, t) {
   true ? module.exports = t(__webpack_require__(/*! fs */ 2947), __webpack_require__(/*! path */ 3911), __webpack_require__(/*! util */ 9023), __webpack_require__(/*! stream */ 7748)) : 0;
}(self, (e, t, n, s) => (() => {
  var o = {
      185: (e, t) => {
        "use strict";

        function n(e) {
          const t = {};
          for (const [n, o] of Object.entries(e.individual)) t[n] = s(o);
          for (const {
            range: n,
            entry: o
          } of e.range) {
            const e = s(o);
            for (let s = n[0]; s < n[1]; s++) t[s] = e;
          }
          return t;
        }
        function s(e) {
          const t = {};
          return e.forward && (t.forward = n(e.forward)), e.reverse && (t.reverse = n(e.reverse)), e.lookup && (t.lookup = e.lookup), t;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = n;
      },
      98: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(602),
          o = n(593),
          r = n(233),
          a = n(694),
          i = n(532),
          l = n(595),
          u = n(223),
          c = n(439),
          p = n(349),
          f = n(185);
        class h {
          constructor(e, t) {
            this._lookupTrees = [], this._glyphLookups = {}, this._font = e, t.cacheSize > 0 && (this._cache = new o({
              max: t.cacheSize,
              length: (e, t) => t.length
            }));
            const n = (this._font.tables.gsub && this._font.tables.gsub.features.filter(e => "calt" === e.tag) || []).reduce((e, t) => [...e, ...t.feature.lookupListIndexes], []),
              s = this._font.tables.gsub && this._font.tables.gsub.lookups || [],
              a = s.filter((e, t) => n.some(e => e === t));
            for (const [e, t] of a.entries()) {
              const n = [];
              switch (t.lookupType) {
                case 6:
                  for (const [e, o] of t.subtables.entries()) switch (o.substFormat) {
                    case 1:
                      n.push(l.default(o, s, e));
                      break;
                    case 2:
                      n.push(u.default(o, s, e));
                      break;
                    case 3:
                      n.push(c.default(o, s, e));
                  }
                  break;
                case 8:
                  for (const [e, s] of t.subtables.entries()) n.push(p.default(s, e));
              }
              const o = f.default(r.default(n));
              this._lookupTrees.push({
                tree: o,
                processForward: 8 !== t.lookupType
              });
              for (const t of Object.keys(o)) this._glyphLookups[t] || (this._glyphLookups[t] = []), this._glyphLookups[t].push(e);
            }
          }
          findLigatures(e) {
            const t = this._cache && this._cache.get(e);
            if (t && !Array.isArray(t)) return t;
            const n = [];
            for (const t of e) n.push(this._font.charToGlyphIndex(t));
            if (0 === this._lookupTrees.length) return {
              inputGlyphs: n,
              outputGlyphs: n,
              contextRanges: []
            };
            const s = this._findInternal(n.slice()),
              o = {
                inputGlyphs: n,
                outputGlyphs: s.sequence,
                contextRanges: s.ranges
              };
            return this._cache && this._cache.set(e, o), o;
          }
          findLigatureRanges(e) {
            if (0 === this._lookupTrees.length) return [];
            const t = this._cache && this._cache.get(e);
            if (t) return Array.isArray(t) ? t : t.contextRanges;
            const n = [];
            for (const t of e) n.push(this._font.charToGlyphIndex(t));
            const s = this._findInternal(n);
            return this._cache && this._cache.set(e, s.ranges), s.ranges;
          }
          _findInternal(e) {
            const t = [];
            let n = this._getNextLookup(e, 0);
            for (; null !== n.index;) {
              const s = this._lookupTrees[n.index];
              if (s.processForward) {
                let o = n.last;
                for (let r = n.first; r < o; r++) {
                  const n = a.default(s.tree, e, r, r);
                  if (n) {
                    for (let t = 0; t < n.substitutions.length; t++) {
                      const s = n.substitutions[t];
                      null !== s && (e[r + t] = s);
                    }
                    i.default(t, n.contextRange[0] + r, n.contextRange[1] + r), r + n.length >= o && (o = r + n.length + 1), r += n.length - 1;
                  }
                }
              } else for (let o = n.last - 1; o >= n.first; o--) {
                const n = a.default(s.tree, e, o, o);
                if (n) {
                  for (let t = 0; t < n.substitutions.length; t++) {
                    const s = n.substitutions[t];
                    null !== s && (e[o + t] = s);
                  }
                  i.default(t, n.contextRange[0] + o, n.contextRange[1] + o), o -= n.length - 1;
                }
              }
              n = this._getNextLookup(e, n.index + 1);
            }
            return {
              sequence: e,
              ranges: t
            };
          }
          _getNextLookup(e, t) {
            const n = {
              index: null,
              first: 1 / 0,
              last: -1
            };
            for (let s = 0; s < e.length; s++) {
              const o = this._glyphLookups[e[s]];
              if (o) for (let e = 0; e < o.length; e++) {
                const r = o[e];
                if (r >= t) {
                  (null === n.index || r <= n.index) && (n.index = r, n.first > s && (n.first = s), n.last = s + 1);
                  break;
                }
              }
            }
            return n;
          }
        }
        async function d(e, t) {
          const o = await Promise.resolve().then(() => n(269)).then(t => t.promisify(s.load)(e));
          return new h(o, Object.assign({
            cacheSize: 0
          }, t));
        }
        t.load = async function (e, t) {
          const [s] = await Promise.resolve().then(() => n(781)).then(t => t.listVariants(e));
          if (!s) throw new Error(`Font ${e} not found`);
          return d(s.path, t);
        }, t.loadFile = d, t.loadBuffer = function (e, t) {
          const n = s.parse(e);
          return new h(n, Object.assign({
            cacheSize: 0
          }, t));
        };
      },
      233: (e, t) => {
        "use strict";

        function n(e, t) {
          for (const [n, o] of Object.entries(t.individual)) if (e.individual[n]) s(e.individual[n], o);else {
            let t = !1;
            for (const [a, {
              range: l,
              entry: u
            }] of e.range.entries()) {
              const c = r(Number(n), l);
              if (null !== c.both) {
                t = !0, e.individual[n] = o, s(e.individual[n], i(u)), e.range.splice(a, 1);
                for (const t of c.second) Array.isArray(t) ? e.range.push({
                  range: t,
                  entry: i(u)
                }) : e.individual[t] = i(u);
              }
            }
            t || (e.individual[n] = o);
          }
          for (const {
            range: n,
            entry: a
          } of t.range) {
            let t = [n];
            for (let n = 0; n < e.range.length; n++) {
              const {
                range: l,
                entry: u
              } = e.range[n];
              for (const [c, p] of t.entries()) {
                if (!Array.isArray(p)) {
                  const o = r(p, l);
                  if (null === o.both) continue;
                  e.individual[p] = i(a), s(e.individual[p], i(u)), e.range.splice(n, 1), n--;
                  for (const t of o.second) Array.isArray(t) ? e.range.push({
                    range: t,
                    entry: i(u)
                  }) : e.individual[t] = i(u);
                  t.splice(c, 1, ...o.first);
                  break;
                }
                {
                  const r = o(p, l);
                  if (null === r.both) continue;
                  e.range.splice(n, 1), n--;
                  const c = i(u);
                  Array.isArray(r.both) ? e.range.push({
                    range: r.both,
                    entry: c
                  }) : e.individual[r.both] = c, s(c, i(a));
                  for (const t of r.second) Array.isArray(t) ? e.range.push({
                    range: t,
                    entry: i(u)
                  }) : e.individual[t] = i(u);
                  t = r.first;
                }
              }
            }
            for (const n of Object.keys(e.individual)) for (const [o, l] of t.entries()) {
              if (Array.isArray(l)) {
                const u = r(Number(n), l);
                if (null === u.both) continue;
                s(e.individual[n], i(a)), t.splice(o, 1, ...u.second);
                break;
              }
              if (Number(n) === l) {
                s(e.individual[n], i(a));
                break;
              }
            }
            for (const n of t) Array.isArray(n) ? e.range.push({
              range: n,
              entry: i(a)
            }) : e.individual[n] = i(a);
          }
        }
        function s(e, t) {
          t.lookup && (!e.lookup || e.lookup.index > t.lookup.index || e.lookup.index === t.lookup.index && e.lookup.subIndex > t.lookup.subIndex) && (e.lookup = t.lookup), t.forward && (e.forward ? n(e.forward, t.forward) : e.forward = t.forward), t.reverse && (e.reverse ? n(e.reverse, t.reverse) : e.reverse = t.reverse);
        }
        function o(e, t) {
          const n = {
            first: [],
            second: [],
            both: null
          };
          if (e[0] < t[1] && t[0] < e[1]) {
            const s = Math.max(e[0], t[0]),
              o = Math.min(e[1], t[1]);
            n.both = a(s, o);
          }
          if (e[0] < t[0]) {
            const s = e[0],
              o = Math.min(t[0], e[1]);
            n.first.push(a(s, o));
          } else if (t[0] < e[0]) {
            const s = t[0],
              o = Math.min(t[1], e[0]);
            n.second.push(a(s, o));
          }
          if (e[1] > t[1]) {
            const s = Math.max(e[0], t[1]),
              o = e[1];
            n.first.push(a(s, o));
          } else if (t[1] > e[1]) {
            const s = Math.max(e[1], t[0]),
              o = t[1];
            n.second.push(a(s, o));
          }
          return n;
        }
        function r(e, t) {
          if (e < t[0] || e > t[1]) return {
            first: [e],
            second: [t],
            both: null
          };
          const n = {
            first: [],
            second: [],
            both: e
          };
          return t[0] < e && n.second.push(a(t[0], e)), t[1] > e && n.second.push(a(e + 1, t[1])), n;
        }
        function a(e, t) {
          return t - e == 1 ? e : [e, t];
        }
        function i(e) {
          const t = {};
          return e.forward && (t.forward = l(e.forward)), e.reverse && (t.reverse = l(e.reverse)), e.lookup && (t.lookup = {
            contextRange: e.lookup.contextRange.slice(),
            index: e.lookup.index,
            length: e.lookup.length,
            subIndex: e.lookup.subIndex,
            substitutions: e.lookup.substitutions.slice()
          }), t;
        }
        function l(e) {
          const t = {};
          for (const [n, s] of Object.entries(e.individual)) t[n] = i(s);
          return {
            individual: t,
            range: e.range.map(({
              range: e,
              entry: t
            }) => ({
              range: e.slice(),
              entry: i(t)
            }))
          };
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e) {
          const t = {
            individual: {},
            range: []
          };
          for (const s of e) n(t, s);
          return t;
        };
      },
      532: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e, t, n) {
          let s = !1;
          for (let o = 0; o < e.length; o++) {
            const r = e[o];
            if (s) {
              if (n <= r[0]) return e[o - 1][1] = n, e;
              if (n <= r[1]) return e[o - 1][1] = Math.max(n, r[1]), e.splice(o, 1), s = !1, e;
              e.splice(o, 1), o--;
            } else {
              if (n <= r[0]) return e.splice(o, 0, [t, n]), e;
              if (n <= r[1]) return r[0] = Math.min(t, r[0]), e;
              if (!(t < r[1])) continue;
              r[0] = Math.min(t, r[0]), s = !0;
            }
          }
          return s ? e[e.length - 1][1] = n : e.push([t, n]), e;
        };
      },
      595: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(283),
          o = n(267);
        t.default = function (e, t, n) {
          const r = {
              individual: {},
              range: []
            },
            a = s.listGlyphsByIndex(e.coverage);
          for (const {
            glyphId: s,
            index: i
          } of a) {
            const a = e.chainRuleSets[i];
            if (a) for (const [e, i] of a.entries()) {
              let a = o.getInputTree(r, i.lookupRecords, t, 0, s).map(({
                entry: e,
                substitution: t
              }) => ({
                entry: e,
                substitutions: [t]
              }));
              for (const [e, n] of i.input.entries()) a = o.processInputPosition([n], e + 1, a, i.lookupRecords, t);
              for (const e of i.lookahead) a = o.processLookaheadPosition([e], a);
              for (const e of i.backtrack) a = o.processBacktrackPosition([e], a);
              for (const {
                entry: t,
                substitutions: s
              } of a) t.lookup = {
                substitutions: s,
                length: i.input.length + 1,
                index: n,
                subIndex: e,
                contextRange: [-1 * i.backtrack.length, 1 + i.input.length + i.lookahead.length]
              };
            }
          }
          return r;
        };
      },
      223: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(233),
          o = n(283),
          r = n(91),
          a = n(267);
        t.default = function (e, t, n) {
          const i = [],
            l = o.listGlyphsByIndex(e.coverage);
          for (const {
            glyphId: s
          } of l) {
            const o = r.default(e.inputClassDef, s);
            for (const [s, l] of o.entries()) {
              if (null === l) continue;
              const o = e.chainClassSet[l];
              if (o) for (const [l, u] of o.entries()) {
                const o = {
                  individual: {},
                  range: []
                };
                let c = a.getInputTree(o, u.lookupRecords, t, 0, s).map(({
                  entry: e,
                  substitution: t
                }) => ({
                  entry: e,
                  substitutions: [t]
                }));
                for (const [n, s] of u.input.entries()) c = a.processInputPosition(r.listClassGlyphs(e.inputClassDef, s), n + 1, c, u.lookupRecords, t);
                for (const t of u.lookahead) c = a.processLookaheadPosition(r.listClassGlyphs(e.lookaheadClassDef, t), c);
                for (const t of u.backtrack) c = a.processBacktrackPosition(r.listClassGlyphs(e.backtrackClassDef, t), c);
                for (const {
                  entry: e,
                  substitutions: t
                } of c) e.lookup = {
                  substitutions: t,
                  index: n,
                  subIndex: l,
                  length: u.input.length + 1,
                  contextRange: [-1 * u.backtrack.length, 1 + u.input.length + u.lookahead.length]
                };
                i.push(o);
              }
            }
          }
          return s.default(i);
        };
      },
      439: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(283),
          o = n(267);
        t.default = function (e, t, n) {
          const r = {
              individual: {},
              range: []
            },
            a = s.listGlyphsByIndex(e.inputCoverage[0]);
          for (const {
            glyphId: i
          } of a) {
            let a = o.getInputTree(r, e.lookupRecords, t, 0, i).map(({
              entry: e,
              substitution: t
            }) => ({
              entry: e,
              substitutions: [t]
            }));
            for (const [n, r] of e.inputCoverage.slice(1).entries()) a = o.processInputPosition(s.listGlyphsByIndex(r).map(e => e.glyphId), n + 1, a, e.lookupRecords, t);
            for (const t of e.lookaheadCoverage) a = o.processLookaheadPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), a);
            for (const t of e.backtrackCoverage) a = o.processBacktrackPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), a);
            for (const {
              entry: t,
              substitutions: s
            } of a) t.lookup = {
              substitutions: s,
              index: n,
              subIndex: 0,
              length: e.inputCoverage.length,
              contextRange: [-1 * e.backtrackCoverage.length, e.inputCoverage.length + e.lookaheadCoverage.length]
            };
          }
          return r;
        };
      },
      349: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(283),
          o = n(267);
        t.default = function (e, t) {
          const n = {
              individual: {},
              range: []
            },
            r = s.listGlyphsByIndex(e.coverage);
          for (const {
            glyphId: a,
            index: i
          } of r) {
            const r = {};
            Array.isArray(a) ? n.range.push({
              entry: r,
              range: a
            }) : n.individual[a] = r;
            let l = [{
              entry: r,
              substitutions: [e.substitutes[i]]
            }];
            for (const t of e.lookaheadCoverage) l = o.processLookaheadPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), l);
            for (const t of e.backtrackCoverage) l = o.processBacktrackPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), l);
            for (const {
              entry: n,
              substitutions: s
            } of l) n.lookup = {
              substitutions: s,
              index: t,
              subIndex: 0,
              length: 1,
              contextRange: [-1 * e.backtrackCoverage.length, 1 + e.lookaheadCoverage.length]
            };
          }
          return n;
        };
      },
      91: (e, t) => {
        "use strict";

        function n(e, t) {
          for (const n of e.ranges) if (n.start <= t && n.end >= t) return n.classId;
          return null;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e, t) {
          return 2 === e.format ? Array.isArray(t) ? function (e, t) {
            let s = t[0],
              o = n(e, s),
              r = t[0] + 1;
            const a = new Map();
            for (; r < t[1];) n(e, r) !== o && (r - s <= 1 ? a.set(s, o) : a.set([s, r], o)), r++;
            return r - s <= 1 ? a.set(s, o) : a.set([s, r], o), a;
          }(e, t) : new Map([[t, n(e, t)]]) : new Map([[t, null]]);
        }, t.listClassGlyphs = function (e, t) {
          if (2 === e.format) {
            const n = [];
            for (const s of e.ranges) s.classId === t && (s.end === s.start ? n.push(s.start) : n.push([s.start, s.end + 1]));
            return n;
          }
          return [];
        };
      },
      283: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e, t) {
          switch (e.format) {
            case 1:
              const n = e.glyphs.indexOf(t);
              return -1 !== n ? n : null;
            case 2:
              const s = e.ranges.find(e => e.start <= t && e.end >= t);
              return s ? s.index : null;
          }
        }, t.listGlyphsByIndex = function (e) {
          switch (e.format) {
            case 1:
              return e.glyphs.map((e, t) => ({
                glyphId: e,
                index: t
              }));
            case 2:
              let t = [];
              for (const [n, s] of e.ranges.entries()) s.end === s.start ? t.push({
                glyphId: s.start,
                index: n
              }) : t.push({
                glyphId: [s.start, s.end + 1],
                index: n
              });
              return t;
          }
        };
      },
      267: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(603);
        function o(e, t, n, o, a) {
          const i = [];
          if (Array.isArray(a)) {
            const r = function (e, t, n, o) {
              for (const r of e.filter(e => e.sequenceIndex === n)) for (const e of t[r.lookupListIndex].subtables) {
                const t = s.getRangeSubstitutionGlyphs(e, o);
                if (!Array.from(t.values()).every(e => null !== e)) return t;
              }
              return new Map([[o, null]]);
            }(t, n, o, a);
            for (const [t, n] of r) {
              const s = {};
              Array.isArray(t) ? e.range.push({
                range: t,
                entry: s
              }) : e.individual[t] = {}, i.push({
                entry: s,
                substitution: n
              });
            }
          } else e.individual[a] = {}, i.push({
            entry: e.individual[a],
            substitution: r(t, n, o, a)
          });
          return i;
        }
        function r(e, t, n, o) {
          for (const r of e.filter(e => e.sequenceIndex === n)) for (const e of t[r.lookupListIndex].subtables) {
            const t = s.getIndividualSubstitutionGlyph(e, o);
            if (null !== t) return t;
          }
          return null;
        }
        t.processInputPosition = function (e, t, n, s, r) {
          const a = [];
          for (const i of n) {
            i.entry.forward = {
              individual: {},
              range: []
            };
            for (const n of e) a.push(...o(i.entry.forward, s, r, t, n).map(({
              entry: e,
              substitution: t
            }) => ({
              entry: e,
              substitutions: [...i.substitutions, t]
            })));
          }
          return a;
        }, t.processLookaheadPosition = function (e, t) {
          const n = [];
          for (const s of t) for (const t of e) {
            const e = {};
            s.entry.forward || (s.entry.forward = {
              individual: {},
              range: []
            }), n.push({
              entry: e,
              substitutions: s.substitutions
            }), Array.isArray(t) ? s.entry.forward.range.push({
              entry: e,
              range: t
            }) : s.entry.forward.individual[t] = e;
          }
          return n;
        }, t.processBacktrackPosition = function (e, t) {
          const n = [];
          for (const s of t) for (const t of e) {
            const e = {};
            s.entry.reverse || (s.entry.reverse = {
              individual: {},
              range: []
            }), n.push({
              entry: e,
              substitutions: s.substitutions
            }), Array.isArray(t) ? s.entry.reverse.range.push({
              entry: e,
              range: t
            }) : s.entry.reverse.individual[t] = e;
          }
          return n;
        }, t.getInputTree = o;
      },
      603: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(283);
        function o(e, t) {
          const n = s.default(e.coverage, t);
          if (null === n) return null;
          switch (e.substFormat) {
            case 1:
              return (t + e.deltaGlyphId) % 65536;
            case 2:
              return null != e.substitute[n] ? e.substitute[n] : null;
          }
        }
        t.getRangeSubstitutionGlyphs = function (e, t) {
          let n = t[0],
            s = o(e, n),
            r = t[0] + 1;
          const a = new Map();
          for (; r < t[1];) o(e, r) !== s && (r - n <= 1 ? a.set(n, s) : a.set([n, r], s)), r++;
          return r - n <= 1 ? a.set(n, s) : a.set([n, r], s), a;
        }, t.getIndividualSubstitutionGlyph = o;
      },
      694: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function e(t, n, s, o) {
          let r = t[n[o]];
          if (!r) return;
          let a = r.lookup;
          if (r.reverse) {
            const e = function (e, t, n) {
              let s = e[t[--n]],
                o = s && s.lookup;
              for (; s && ((!o && s.lookup || s.lookup && o && o.index > s.lookup.index) && (o = s.lookup), !(--n < 0) && s.reverse);) s = s.reverse[t[n]];
              return o;
            }(r.reverse, n, s);
            (!a && e || e && a && (a.index > e.index || a.index === e.index && a.subIndex > e.subIndex)) && (a = e);
          }
          if (++o >= n.length || !r.forward) return a;
          const i = e(r.forward, n, s, o);
          return (!a && i || i && a && (a.index > i.index || a.index === i.index && a.subIndex > i.subIndex)) && (a = i), a;
        };
      },
      814: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(82);
        var o, r;
        !function (e) {
          e.Serif = "serif", e.SansSerif = "sansSerif", e.Monospace = "monospace", e.Cursive = "cursive", e.Unknown = "unknown";
        }(o = t.Type || (t.Type = {})), function (e) {
          e.Regular = "regular", e.Italic = "italic", e.Oblique = "oblique", e.Bold = "bold", e.BoldItalic = "boldItalic", e.BoldOblique = "boldOblique", e.Other = "other";
        }(r = t.Style || (t.Style = {}));
        const a = [" Regular", " Bold", " Bold Italic", " Bold Oblique", " Italic", " Oblique"];
        function i(e) {
          if (!e.os2 && !e.head) return r.Other;
          const t = e.os2 ? 32 & e.os2.fsSelection : 1 & e.head.macStyle,
            n = e.os2 ? 1 & e.os2.fsSelection : e.post ? e.post.italicAngle < 0 : 2 & e.head.macStyle,
            s = e.os2 ? 512 & e.os2.fsSelection : e.post ? e.post.italicAngle > 0 : 0,
            o = e.os2 ? 320 & e.os2.fsSelection : 1;
          return t ? s ? r.BoldOblique : n ? r.BoldItalic : r.Bold : s ? r.Oblique : n ? r.Italic : o ? r.Regular : r.Other;
        }
        t.name = function (e, t) {
          const n = e.names.preferredFamily && e.names.preferredFamily[t] ? e.names.preferredFamily[t] : e.names.fontFamily[t];
          if ("win32" === s.platform()) {
            const s = `${n} ${e.names.preferredSubfamily && e.names.preferredSubfamily[t] ? e.names.preferredSubfamily[t] : e.names.fontSubfamily[t]}`;
            let o = -1;
            for (const e of a) {
              const t = s.lastIndexOf(e);
              if (-1 !== t) {
                o = t;
                break;
              }
            }
            return -1 !== o ? s.substring(0, o) : s;
          }
          return n;
        }, t.type = function (e) {
          if (e.os2) switch (e.os2.panose[0]) {
            case 2:
              return 9 === e.os2.panose[3] ? o.Monospace : e.os2.panose[1] >= 11 && e.os2.panose[1] <= 15 || 0 === e.os2.panose[1] ? o.SansSerif : o.Serif;
            case 3:
              return o.Cursive;
          } else if (e.post && e.post.isFixedPitch) return o.Monospace;
          return o.Unknown;
        }, t.style = i;
        const l = [r.Bold, r.BoldItalic, r.BoldOblique];
        t.weight = function (e) {
          return e.os2 ? e.os2.usWeightClass : l.includes(i(e)) ? 700 : 400;
        };
      },
      781: function (e, t, n) {
        "use strict";

        var s = this && this.__rest || function (e, t) {
          var n = {};
          for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && t.indexOf(s) < 0 && (n[s] = e[s]);
          if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
            var o = 0;
            for (s = Object.getOwnPropertySymbols(e); o < s.length; o++) t.indexOf(s[o]) < 0 && (n[s[o]] = e[s[o]]);
          }
          return n;
        };
        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const o = n(459),
          r = n(934),
          a = n(814);
        var i = n(814);
        async function l(e) {
          const t = Object.assign({
              concurrency: 4,
              language: "en"
            }, e),
            n = await o.default({
              extensions: ["ttf", "otf"]
            }),
            a = await async function (e, n, s) {
              const o = [];
              let a = 0;
              const i = async e => {
                  o.push(await (async e => {
                    try {
                      return u(e, await r.default(e), t.language);
                    } catch (e) {
                      if (["TypeError", "SyntaxError", "ReferenceError", "RangeError", "AssertionError"].includes(e.name)) throw e;
                    }
                  })(n[e])), a < n.length && (await i(a++));
                },
                l = [];
              for (; a < n.length && a < s; a++) l.push(i(a));
              return await Promise.all(l), o;
            }(0, n, t.concurrency),
            i = {};
          for (let e of a.filter(e => e)) {
            const {
                name: t
              } = e,
              n = s(e, ["name"]);
            i[t] || (i[t] = []), i[t].push(n);
          }
          return i;
        }
        function u(e, t, n) {
          return {
            name: a.name(t, n),
            path: e,
            type: a.type(t),
            weight: a.weight(t),
            style: a.style(t)
          };
        }
        t.Type = i.Type, t.Style = i.Style, t.list = l, t.listVariants = async function (e, t) {
          return (await l(t))[e] || [];
        }, t.get = async function (e, t) {
          const n = Object.assign({
            language: "en"
          }, t);
          return u(e, await r.default(e), n.language);
        };
      },
      934: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(89),
          o = n(896),
          r = n(380),
          a = n(879),
          i = n(130),
          l = n(731),
          u = n(954);
        var c;
        !function (e) {
          e[e.TrueType = 0] = "TrueType", e[e.CFF = 1] = "CFF", e[e.Woff = 2] = "Woff";
        }(c || (c = {}));
        const p = {
          name: {
            tag: Buffer.from("name"),
            parse: r.default
          },
          ltag: {
            tag: Buffer.from("ltag"),
            parse: a.default
          },
          os2: {
            tag: Buffer.from("OS/2"),
            parse: i.default
          },
          head: {
            tag: Buffer.from("head"),
            parse: l.default
          },
          post: {
            tag: Buffer.from("post"),
            parse: u.default
          }
        };
        t.default = async function (e) {
          return new Promise((t, n) => {
            (async () => {
              const t = o.default(),
                r = s.createReadStream(e);
              let a = !1;
              const i = () => {
                a = !0;
              };
              r.once("close", i), r.once("end", i), r.once("error", e => {
                a = !0, n(e);
              }), r.pipe(t);
              try {
                switch (function (e) {
                  if (e.equals(f.one) || e.equals(f.true) || e.equals(f.typ1)) return c.TrueType;
                  if (e.equals(f.otto)) return c.CFF;
                  if (e.equals(f.woff)) return c.Woff;
                  throw new Error(`Unsupported signature type: ${e}`);
                }(await t.read(4))) {
                  case c.TrueType:
                  case c.CFF:
                    const n = (await t.read(2)).readUInt16BE(0);
                    await t.skip(6);
                    const s = await async function (e, t) {
                        const n = {};
                        for (let s = 0; s < t; s++) {
                          const t = await e.read(4),
                            s = await e.read(12);
                          for (const [e, o] of Object.entries(p)) if (t.equals(o.tag) && (n[e] = {
                            offset: s.readUInt32BE(4),
                            length: s.readUInt32BE(8)
                          }, n.name && n.ltag && n.os2)) return n;
                        }
                        return n;
                      }(t, n),
                      o = Object.entries(s).sort((e, t) => e[1].offset - t[1].offset),
                      r = {};
                    for (const [e, n] of o) await t.skip(n.offset - t.offset), r[e] = await t.read(n.length);
                    let a = [];
                    if (r.ltag && (a = p.ltag.parse(r.ltag)), !r.name) throw new Error(`missing required OpenType table 'name' in font file: ${e}`);
                    return {
                      names: p.name.parse(r.name, a),
                      os2: r.os2 && p.os2.parse(r.os2),
                      head: r.head && p.head.parse(r.head),
                      post: r.post && p.post.parse(r.post)
                    };
                  case c.Woff:
                  default:
                    throw new Error("provided font type is not supported yet");
                }
              } finally {
                r.unpipe(t), a || (r.destroy(), t.destroy());
              }
            })().then(t, n);
          });
        };
        const f = {
          one: Buffer.from([0, 1, 0, 0]),
          otto: Buffer.from("OTTO"),
          true: Buffer.from("true"),
          typ1: Buffer.from("typ1"),
          woff: Buffer.from("wOFF")
        };
      },
      731: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(980);
        t.default = function (e) {
          return {
            version: s.formatFixed(e.readUInt16BE(0), e.readUInt16BE(2)),
            fontRevision: s.formatFixed(e.readUInt16BE(4), e.readUInt16BE(6)),
            checkSumAdjustment: e.readUInt32BE(8),
            magicNumber: e.readUInt32BE(12),
            flags: e.readUInt16BE(16),
            unitsPerEm: e.readUInt16BE(18),
            created: s.formatLongDateTime(e.readUInt32BE(20), e.readUInt32BE(24)),
            modified: s.formatLongDateTime(e.readUInt32BE(28), e.readUInt32BE(32)),
            xMin: e.readInt16BE(36),
            yMin: e.readInt16BE(38),
            xMax: e.readInt16BE(40),
            yMax: e.readInt16BE(42),
            macStyle: e.readUInt16BE(44),
            lowestRecPPEM: e.readUInt16BE(46),
            fontDirectionHint: e.readInt16BE(48),
            indexToLocFormat: e.readInt16BE(50),
            glyphDataFormat: e.readInt16BE(52)
          };
        };
      },
      879: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e) {
          if (1 !== e.readUInt32BE(0)) throw new Error("Unsupported ltag table version.");
          const t = e.readUInt32BE(8),
            n = [];
          for (let s = 0; s < t; s++) {
            let t = "";
            const o = e.readUInt16BE(12 + 4 * s),
              r = e.readUInt16BE(14 + 4 * s);
            for (let n = o; n < o + r; ++n) t += String.fromCharCode(e.readInt8(n));
            n.push(t);
          }
          return n;
        };
      },
      380: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const n = ["copyright", "fontFamily", "fontSubfamily", "uniqueID", "fullName", "version", "postScriptName", "trademark", "manufacturer", "designer", "description", "manufacturerURL", "designerURL", "license", "licenseURL", "reserved", "preferredFamily", "preferredSubfamily", "compatibleFullName", "sampleText", "postScriptFindFontName", "wwsFamily", "wwsSubfamily"],
          s = {
            0: "en",
            1: "fr",
            2: "de",
            3: "it",
            4: "nl",
            5: "sv",
            6: "es",
            7: "da",
            8: "pt",
            9: "no",
            10: "he",
            11: "ja",
            12: "ar",
            13: "fi",
            14: "el",
            15: "is",
            16: "mt",
            17: "tr",
            18: "hr",
            19: "zh-Hant",
            20: "ur",
            21: "hi",
            22: "th",
            23: "ko",
            24: "lt",
            25: "pl",
            26: "hu",
            27: "es",
            28: "lv",
            29: "se",
            30: "fo",
            31: "fa",
            32: "ru",
            33: "zh",
            34: "nl-BE",
            35: "ga",
            36: "sq",
            37: "ro",
            38: "cz",
            39: "sk",
            40: "si",
            41: "yi",
            42: "sr",
            43: "mk",
            44: "bg",
            45: "uk",
            46: "be",
            47: "uz",
            48: "kk",
            49: "az-Cyrl",
            50: "az-Arab",
            51: "hy",
            52: "ka",
            53: "mo",
            54: "ky",
            55: "tg",
            56: "tk",
            57: "mn-CN",
            58: "mn",
            59: "ps",
            60: "ks",
            61: "ku",
            62: "sd",
            63: "bo",
            64: "ne",
            65: "sa",
            66: "mr",
            67: "bn",
            68: "as",
            69: "gu",
            70: "pa",
            71: "or",
            72: "ml",
            73: "kn",
            74: "ta",
            75: "te",
            76: "si",
            77: "my",
            78: "km",
            79: "lo",
            80: "vi",
            81: "id",
            82: "tl",
            83: "ms",
            84: "ms-Arab",
            85: "am",
            86: "ti",
            87: "om",
            88: "so",
            89: "sw",
            90: "rw",
            91: "rn",
            92: "ny",
            93: "mg",
            94: "eo",
            128: "cy",
            129: "eu",
            130: "ca",
            131: "la",
            132: "qu",
            133: "gn",
            134: "ay",
            135: "tt",
            136: "ug",
            137: "dz",
            138: "jv",
            139: "su",
            140: "gl",
            141: "af",
            142: "br",
            143: "iu",
            144: "gd",
            145: "gv",
            146: "ga",
            147: "to",
            148: "el-polyton",
            149: "kl",
            150: "az",
            151: "nn"
          },
          o = {
            1078: "af",
            1052: "sq",
            1156: "gsw",
            1118: "am",
            5121: "ar-DZ",
            15361: "ar-BH",
            3073: "ar",
            2049: "ar-IQ",
            11265: "ar-JO",
            13313: "ar-KW",
            12289: "ar-LB",
            4097: "ar-LY",
            6145: "ary",
            8193: "ar-OM",
            16385: "ar-QA",
            1025: "ar-SA",
            10241: "ar-SY",
            7169: "aeb",
            14337: "ar-AE",
            9217: "ar-YE",
            1067: "hy",
            1101: "as",
            2092: "az-Cyrl",
            1068: "az",
            1133: "ba",
            1069: "eu",
            1059: "be",
            2117: "bn",
            1093: "bn-IN",
            8218: "bs-Cyrl",
            5146: "bs",
            1150: "br",
            1026: "bg",
            1027: "ca",
            3076: "zh-HK",
            5124: "zh-MO",
            2052: "zh",
            4100: "zh-SG",
            1028: "zh-TW",
            1155: "co",
            1050: "hr",
            4122: "hr-BA",
            1029: "cs",
            1030: "da",
            1164: "prs",
            1125: "dv",
            2067: "nl-BE",
            1043: "nl",
            3081: "en-AU",
            10249: "en-BZ",
            4105: "en-CA",
            9225: "en-029",
            16393: "en-IN",
            6153: "en-IE",
            8201: "en-JM",
            17417: "en-MY",
            5129: "en-NZ",
            13321: "en-PH",
            18441: "en-SG",
            7177: "en-ZA",
            11273: "en-TT",
            2057: "en-GB",
            1033: "en",
            12297: "en-ZW",
            1061: "et",
            1080: "fo",
            1124: "fil",
            1035: "fi",
            2060: "fr-BE",
            3084: "fr-CA",
            1036: "fr",
            5132: "fr-LU",
            6156: "fr-MC",
            4108: "fr-CH",
            1122: "fy",
            1110: "gl",
            1079: "ka",
            3079: "de-AT",
            1031: "de",
            5127: "de-LI",
            4103: "de-LU",
            2055: "de-CH",
            1032: "el",
            1135: "kl",
            1095: "gu",
            1128: "ha",
            1037: "he",
            1081: "hi",
            1038: "hu",
            1039: "is",
            1136: "ig",
            1057: "id",
            1117: "iu",
            2141: "iu-Latn",
            2108: "ga",
            1076: "xh",
            1077: "zu",
            1040: "it",
            2064: "it-CH",
            1041: "ja",
            1099: "kn",
            1087: "kk",
            1107: "km",
            1158: "quc",
            1159: "rw",
            1089: "sw",
            1111: "kok",
            1042: "ko",
            1088: "ky",
            1108: "lo",
            1062: "lv",
            1063: "lt",
            2094: "dsb",
            1134: "lb",
            1071: "mk",
            2110: "ms-BN",
            1086: "ms",
            1100: "ml",
            1082: "mt",
            1153: "mi",
            1146: "arn",
            1102: "mr",
            1148: "moh",
            1104: "mn",
            2128: "mn-CN",
            1121: "ne",
            1044: "nb",
            2068: "nn",
            1154: "oc",
            1096: "or",
            1123: "ps",
            1045: "pl",
            1046: "pt",
            2070: "pt-PT",
            1094: "pa",
            1131: "qu-BO",
            2155: "qu-EC",
            3179: "qu",
            1048: "ro",
            1047: "rm",
            1049: "ru",
            9275: "smn",
            4155: "smj-NO",
            5179: "smj",
            3131: "se-FI",
            1083: "se",
            2107: "se-SE",
            8251: "sms",
            6203: "sma-NO",
            7227: "sms",
            1103: "sa",
            7194: "sr-Cyrl-BA",
            3098: "sr",
            6170: "sr-Latn-BA",
            2074: "sr-Latn",
            1132: "nso",
            1074: "tn",
            1115: "si",
            1051: "sk",
            1060: "sl",
            11274: "es-AR",
            16394: "es-BO",
            13322: "es-CL",
            9226: "es-CO",
            5130: "es-CR",
            7178: "es-DO",
            12298: "es-EC",
            17418: "es-SV",
            4106: "es-GT",
            18442: "es-HN",
            2058: "es-MX",
            19466: "es-NI",
            6154: "es-PA",
            15370: "es-PY",
            10250: "es-PE",
            20490: "es-PR",
            3082: "es",
            1034: "es",
            21514: "es-US",
            14346: "es-UY",
            8202: "es-VE",
            2077: "sv-FI",
            1053: "sv",
            1114: "syr",
            1064: "tg",
            2143: "tzm",
            1097: "ta",
            1092: "tt",
            1098: "te",
            1054: "th",
            1105: "bo",
            1055: "tr",
            1090: "tk",
            1152: "ug",
            1058: "uk",
            1070: "hsb",
            1056: "ur",
            2115: "uz-Cyrl",
            1091: "uz",
            1066: "vi",
            1106: "cy",
            1160: "wo",
            1157: "sah",
            1144: "ii",
            1130: "yo"
          };
        function r(e, t, n) {
          switch (e) {
            case 0:
              if (65535 === t) return "und";
              if (n) return n[t];
              break;
            case 1:
              return s[t];
            case 3:
              return o[t];
          }
        }
        const a = "utf-16",
          i = {
            0: "macintosh",
            1: "x-mac-japanese",
            2: "x-mac-chinesetrad",
            3: "x-mac-korean",
            6: "x-mac-greek",
            7: "x-mac-cyrillic",
            9: "x-mac-devanagai",
            10: "x-mac-gurmukhi",
            11: "x-mac-gujarati",
            12: "x-mac-oriya",
            13: "x-mac-bengali",
            14: "x-mac-tamil",
            15: "x-mac-telugu",
            16: "x-mac-kannada",
            17: "x-mac-malayalam",
            18: "x-mac-sinhalese",
            19: "x-mac-burmese",
            20: "x-mac-khmer",
            21: "x-mac-thai",
            22: "x-mac-lao",
            23: "x-mac-georgian",
            24: "x-mac-armenian",
            25: "x-mac-chinesesimp",
            26: "x-mac-tibetan",
            27: "x-mac-mongolian",
            28: "x-mac-ethiopic",
            29: "x-mac-ce",
            30: "x-mac-vietnamese",
            31: "x-mac-extarabic"
          },
          l = {
            15: "x-mac-icelandic",
            17: "x-mac-turkish",
            18: "x-mac-croatian",
            24: "x-mac-ce",
            25: "x-mac-ce",
            26: "x-mac-ce",
            27: "x-mac-ce",
            28: "x-mac-ce",
            30: "x-mac-icelandic",
            37: "x-mac-romanian",
            38: "x-mac-ce",
            39: "x-mac-ce",
            40: "x-mac-ce",
            143: "x-mac-inuit",
            146: "x-mac-gaelic"
          };
        function u(e, t, n) {
          switch (e) {
            case 0:
              return a;
            case 1:
              return l[n] || i[t];
            case 3:
              if (1 === t || 10 === t) return a;
          }
        }
        t.default = function (e, t) {
          const s = {},
            o = e.readUInt16BE(2),
            i = e.readUInt16BE(4);
          let l = 6;
          for (let c = 0; c < o; c++) {
            const o = e.readUInt16BE(l + 0),
              c = e.readUInt16BE(l + 2),
              f = e.readUInt16BE(l + 4),
              h = e.readUInt16BE(l + 6),
              d = n[h] || String(h),
              g = e.readUInt16BE(l + 8),
              m = e.readUInt16BE(l + 10),
              y = r(o, f, t),
              v = u(o, c, f);
            if (l += 12, void 0 !== v && void 0 !== y) {
              let t;
              if (v === a) {
                const n = g / 2,
                  s = Array(n);
                for (let t = 0; t < n; t++) s[t] = e.readUInt16BE(i + m + 2 * t);
                t = String.fromCharCode(...s);
              } else t = p(e, i + m, g, v);
              if (t) {
                let e = s[d];
                void 0 === e && (e = s[d] = {}), e[y] = t;
              }
            }
          }
          return s;
        };
        const c = {
          "x-mac-croatian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ",
          "x-mac-cyrillic": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю",
          "x-mac-gaelic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ",
          "x-mac-greek": "Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­",
          "x-mac-icelandic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
          "x-mac-inuit": "ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł",
          "x-mac-ce": "ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",
          macintosh: "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
          "x-mac-romanian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
          "x-mac-turkish": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
        };
        function p(e, t, n, s) {
          const o = c[s];
          if (void 0 === o) return;
          let r = "";
          for (let s = 0; s < n; s++) {
            const n = e.readUInt8(t + s);
            r += n <= 127 ? String.fromCharCode(n) : o[127 & n];
          }
          return r;
        }
      },
      130: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e) {
          const t = {
            version: e.readUInt16BE(0),
            xAvgCharWidth: e.readUInt16BE(2),
            usWeightClass: e.readUInt16BE(4),
            usWidthClass: e.readUInt16BE(6),
            fsType: e.readUInt16BE(8),
            ySubscriptXSize: e.readInt16BE(10),
            ySubscriptYSize: e.readInt16BE(12),
            ySubscriptXOffset: e.readInt16BE(14),
            ySubscriptYOffset: e.readInt16BE(16),
            ySuperscriptXSize: e.readInt16BE(18),
            ySuperscriptYSize: e.readInt16BE(20),
            ySuperscriptXOffset: e.readInt16BE(22),
            ySuperscriptYOffset: e.readInt16BE(24),
            yStrikeoutSize: e.readInt16BE(26),
            yStrikeoutPosition: e.readInt16BE(28),
            sFamilyClass: e.readInt16BE(30),
            panose: [e.readUInt8(32), e.readUInt8(33), e.readUInt8(34), e.readUInt8(35), e.readUInt8(36), e.readUInt8(37), e.readUInt8(38), e.readUInt8(39), e.readUInt8(40), e.readUInt8(41)],
            ulUnicodeRange1: e.readUInt32BE(42),
            ulUnicodeRange2: e.readUInt32BE(46),
            ulUnicodeRange3: e.readUInt32BE(50),
            ulUnicodeRange4: e.readUInt32BE(54),
            achVendID: String.fromCharCode(e.readUInt8(58), e.readUInt8(59), e.readUInt8(60), e.readUInt8(61)),
            fsSelection: e.readUInt16BE(62),
            usFirstCharIndex: e.readUInt16BE(64),
            usLastCharIndex: e.readUInt16BE(66),
            sTypoAscender: e.readInt16BE(68),
            sTypoDescender: e.readInt16BE(70),
            sTypoLineGap: e.readInt16BE(72),
            usWinAscent: e.readUInt16BE(74),
            usWinDescent: e.readUInt16BE(76)
          };
          return t.version >= 1 && (t.ulCodePageRange1 = e.readUInt32BE(78), t.ulCodePageRange2 = e.readUInt32BE(82)), t.version >= 2 && (t.sxHeight = e.readInt16BE(86), t.sCapHeight = e.readInt16BE(88), t.usDefaultChar = e.readUInt16BE(90), t.usBreakChar = e.readUInt16BE(92), t.usMaxContent = e.readUInt16BE(94)), t;
        };
      },
      954: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(980);
        t.default = function (e) {
          return {
            version: s.formatFixed(e.readUInt16BE(0), e.readUInt16BE(2)),
            italicAngle: s.formatFixed(e.readUInt16BE(4), e.readUInt16BE(6)),
            underlinePosition: e.readInt16BE(8),
            underlineThickness: e.readInt16BE(10),
            isFixedPitch: e.readUInt32BE(12),
            minMemType42: e.readUInt32BE(16),
            maxMemType42: e.readUInt32BE(20),
            minMemType1: e.readUInt32BE(24),
            maxMemType1: e.readUInt32BE(28)
          };
        };
      },
      980: (e, t) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.formatFixed = function (e, t) {
          return e + t / 65536;
        }, t.formatLongDateTime = function (e, t) {
          return 1e3 * (e * 2 ** 32 + t - 2082844800);
        };
      },
      459: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(56),
          o = n(456),
          r = n(49),
          a = {
            win32: () => process.env.WINDIR ? [s.join(process.env.WINDIR, "Fonts")] : ["C:\\Windows\\Fonts"],
            darwin: () => {
              const e = o.homedir();
              return [...(e ? [s.join(e, "/Library/Fonts")] : []), "/Library/Fonts", "/Network/Library/Fonts", "/System/Library/Fonts", "/System Folder/Fonts"];
            },
            linux: () => {
              const e = o.homedir();
              return ["/usr/share/fonts", "/usr/local/share/fonts", ...(e ? [s.join(e, ".fonts"), s.join(e, ".local/share/fonts")] : [])];
            }
          };
        function i(e) {
          const t = Object.assign({
              extensions: ["ttf", "otf", "ttc", "woff", "woff2"],
              additionalFolders: []
            }, e),
            n = o.platform(),
            s = a[n];
          if (!s) throw new Error(`Unsupported platform: ${n}`);
          const i = s();
          return r.default([...i, ...t.additionalFolders], t.extensions);
        }
        e.exports = Object.assign(i, {
          default: i
        }), t.default = i;
      },
      49: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(89),
          o = n(269),
          r = n(56),
          a = o.promisify(s.readdir),
          i = o.promisify(s.stat);
        async function l(e, t, n = 10) {
          if (n <= 0) return [];
          let s;
          try {
            s = await a(e);
          } catch (e) {
            return [];
          }
          const o = [];
          return await Promise.all(s.map(async s => {
            const a = r.join(e, s);
            let u;
            try {
              u = await i(a);
            } catch (e) {
              return;
            }
            u.isFile() && t.test(a) ? o.push(a) : u.isDirectory() && o.push(...(await l(a, t, n - 1)));
          })), o;
        }
        t.default = async function (e, t) {
          const n = new Set();
          return await Promise.all(e.map(async e => {
            const s = await l(r.resolve(e), new RegExp(`\\.${t.map(e => `(?:${e})`).join("|")}$`));
            for (const e of s) n.add(e);
          })), [...n];
        };
      },
      593: (e, t, n) => {
        "use strict";

        const s = n(411),
          o = Symbol("max"),
          r = Symbol("length"),
          a = Symbol("lengthCalculator"),
          i = Symbol("allowStale"),
          l = Symbol("maxAge"),
          u = Symbol("dispose"),
          c = Symbol("noDisposeOnSet"),
          p = Symbol("lruList"),
          f = Symbol("cache"),
          h = Symbol("updateAgeOnGet"),
          d = () => 1,
          g = (e, t, n) => {
            const s = e[f].get(t);
            if (s) {
              const t = s.value;
              if (m(e, t)) {
                if (v(e, s), !e[i]) return;
              } else n && (e[h] && (s.value.now = Date.now()), e[p].unshiftNode(s));
              return t.value;
            }
          },
          m = (e, t) => {
            if (!t || !t.maxAge && !e[l]) return !1;
            const n = Date.now() - t.now;
            return t.maxAge ? n > t.maxAge : e[l] && n > e[l];
          },
          y = e => {
            if (e[r] > e[o]) for (let t = e[p].tail; e[r] > e[o] && null !== t;) {
              const n = t.prev;
              v(e, t), t = n;
            }
          },
          v = (e, t) => {
            if (t) {
              const n = t.value;
              e[u] && e[u](n.key, n.value), e[r] -= n.length, e[f].delete(n.key), e[p].removeNode(t);
            }
          };
        class b {
          constructor(e, t, n, s, o) {
            this.key = e, this.value = t, this.length = n, this.now = s, this.maxAge = o || 0;
          }
        }
        const x = (e, t, n, s) => {
          let o = n.value;
          m(e, o) && (v(e, n), e[i] || (o = void 0)), o && t.call(s, o.value, o.key, e);
        };
        e.exports = class {
          constructor(e) {
            if ("number" == typeof e && (e = {
              max: e
            }), e || (e = {}), e.max && ("number" != typeof e.max || e.max < 0)) throw new TypeError("max must be a non-negative number");
            this[o] = e.max || 1 / 0;
            const t = e.length || d;
            if (this[a] = "function" != typeof t ? d : t, this[i] = e.stale || !1, e.maxAge && "number" != typeof e.maxAge) throw new TypeError("maxAge must be a number");
            this[l] = e.maxAge || 0, this[u] = e.dispose, this[c] = e.noDisposeOnSet || !1, this[h] = e.updateAgeOnGet || !1, this.reset();
          }
          set max(e) {
            if ("number" != typeof e || e < 0) throw new TypeError("max must be a non-negative number");
            this[o] = e || 1 / 0, y(this);
          }
          get max() {
            return this[o];
          }
          set allowStale(e) {
            this[i] = !!e;
          }
          get allowStale() {
            return this[i];
          }
          set maxAge(e) {
            if ("number" != typeof e) throw new TypeError("maxAge must be a non-negative number");
            this[l] = e, y(this);
          }
          get maxAge() {
            return this[l];
          }
          set lengthCalculator(e) {
            "function" != typeof e && (e = d), e !== this[a] && (this[a] = e, this[r] = 0, this[p].forEach(e => {
              e.length = this[a](e.value, e.key), this[r] += e.length;
            })), y(this);
          }
          get lengthCalculator() {
            return this[a];
          }
          get length() {
            return this[r];
          }
          get itemCount() {
            return this[p].length;
          }
          rforEach(e, t) {
            t = t || this;
            for (let n = this[p].tail; null !== n;) {
              const s = n.prev;
              x(this, e, n, t), n = s;
            }
          }
          forEach(e, t) {
            t = t || this;
            for (let n = this[p].head; null !== n;) {
              const s = n.next;
              x(this, e, n, t), n = s;
            }
          }
          keys() {
            return this[p].toArray().map(e => e.key);
          }
          values() {
            return this[p].toArray().map(e => e.value);
          }
          reset() {
            this[u] && this[p] && this[p].length && this[p].forEach(e => this[u](e.key, e.value)), this[f] = new Map(), this[p] = new s(), this[r] = 0;
          }
          dump() {
            return this[p].map(e => !m(this, e) && {
              k: e.key,
              v: e.value,
              e: e.now + (e.maxAge || 0)
            }).toArray().filter(e => e);
          }
          dumpLru() {
            return this[p];
          }
          set(e, t, n) {
            if ((n = n || this[l]) && "number" != typeof n) throw new TypeError("maxAge must be a number");
            const s = n ? Date.now() : 0,
              i = this[a](t, e);
            if (this[f].has(e)) {
              if (i > this[o]) return v(this, this[f].get(e)), !1;
              const a = this[f].get(e).value;
              return this[u] && (this[c] || this[u](e, a.value)), a.now = s, a.maxAge = n, a.value = t, this[r] += i - a.length, a.length = i, this.get(e), y(this), !0;
            }
            const h = new b(e, t, i, s, n);
            return h.length > this[o] ? (this[u] && this[u](e, t), !1) : (this[r] += h.length, this[p].unshift(h), this[f].set(e, this[p].head), y(this), !0);
          }
          has(e) {
            if (!this[f].has(e)) return !1;
            const t = this[f].get(e).value;
            return !m(this, t);
          }
          get(e) {
            return g(this, e, !0);
          }
          peek(e) {
            return g(this, e, !1);
          }
          pop() {
            const e = this[p].tail;
            return e ? (v(this, e), e.value) : null;
          }
          del(e) {
            v(this, this[f].get(e));
          }
          load(e) {
            this.reset();
            const t = Date.now();
            for (let n = e.length - 1; n >= 0; n--) {
              const s = e[n],
                o = s.e || 0;
              if (0 === o) this.set(s.k, s.v);else {
                const e = o - t;
                e > 0 && this.set(s.k, s.v, e);
              }
            }
          }
          prune() {
            this[f].forEach((e, t) => g(this, t, !1));
          }
        };
      },
      602: (e, t, n) => {
        "use strict";

        n.r(t), n.d(t, {
          BoundingBox: () => i,
          Font: () => gn,
          Glyph: () => ie,
          Path: () => u,
          _parse: () => z,
          load: () => Cn,
          loadSync: () => Dn,
          parse: () => Bn
        });
        var s = n(311),
          o = n.n(s);
        function r(e, t, n, s, o) {
          return Math.pow(1 - o, 3) * e + 3 * Math.pow(1 - o, 2) * o * t + 3 * (1 - o) * Math.pow(o, 2) * n + Math.pow(o, 3) * s;
        }
        function a() {
          this.x1 = Number.NaN, this.y1 = Number.NaN, this.x2 = Number.NaN, this.y2 = Number.NaN;
        }
        a.prototype.isEmpty = function () {
          return isNaN(this.x1) || isNaN(this.y1) || isNaN(this.x2) || isNaN(this.y2);
        }, a.prototype.addPoint = function (e, t) {
          "number" == typeof e && ((isNaN(this.x1) || isNaN(this.x2)) && (this.x1 = e, this.x2 = e), e < this.x1 && (this.x1 = e), e > this.x2 && (this.x2 = e)), "number" == typeof t && ((isNaN(this.y1) || isNaN(this.y2)) && (this.y1 = t, this.y2 = t), t < this.y1 && (this.y1 = t), t > this.y2 && (this.y2 = t));
        }, a.prototype.addX = function (e) {
          this.addPoint(e, null);
        }, a.prototype.addY = function (e) {
          this.addPoint(null, e);
        }, a.prototype.addBezier = function (e, t, n, s, o, a, i, l) {
          const u = [e, t],
            c = [n, s],
            p = [o, a],
            f = [i, l];
          this.addPoint(e, t), this.addPoint(i, l);
          for (let e = 0; e <= 1; e++) {
            const t = 6 * u[e] - 12 * c[e] + 6 * p[e],
              n = -3 * u[e] + 9 * c[e] - 9 * p[e] + 3 * f[e],
              s = 3 * c[e] - 3 * u[e];
            if (0 === n) {
              if (0 === t) continue;
              const n = -s / t;
              0 < n && n < 1 && (0 === e && this.addX(r(u[e], c[e], p[e], f[e], n)), 1 === e && this.addY(r(u[e], c[e], p[e], f[e], n)));
              continue;
            }
            const o = Math.pow(t, 2) - 4 * s * n;
            if (o < 0) continue;
            const a = (-t + Math.sqrt(o)) / (2 * n);
            0 < a && a < 1 && (0 === e && this.addX(r(u[e], c[e], p[e], f[e], a)), 1 === e && this.addY(r(u[e], c[e], p[e], f[e], a)));
            const i = (-t - Math.sqrt(o)) / (2 * n);
            0 < i && i < 1 && (0 === e && this.addX(r(u[e], c[e], p[e], f[e], i)), 1 === e && this.addY(r(u[e], c[e], p[e], f[e], i)));
          }
        }, a.prototype.addQuad = function (e, t, n, s, o, r) {
          const a = e + 2 / 3 * (n - e),
            i = t + 2 / 3 * (s - t),
            l = a + 1 / 3 * (o - e),
            u = i + 1 / 3 * (r - t);
          this.addBezier(e, t, a, i, l, u, o, r);
        };
        const i = a;
        function l() {
          this.commands = [], this.fill = "black", this.stroke = null, this.strokeWidth = 1;
        }
        l.prototype.moveTo = function (e, t) {
          this.commands.push({
            type: "M",
            x: e,
            y: t
          });
        }, l.prototype.lineTo = function (e, t) {
          this.commands.push({
            type: "L",
            x: e,
            y: t
          });
        }, l.prototype.curveTo = l.prototype.bezierCurveTo = function (e, t, n, s, o, r) {
          this.commands.push({
            type: "C",
            x1: e,
            y1: t,
            x2: n,
            y2: s,
            x: o,
            y: r
          });
        }, l.prototype.quadTo = l.prototype.quadraticCurveTo = function (e, t, n, s) {
          this.commands.push({
            type: "Q",
            x1: e,
            y1: t,
            x: n,
            y: s
          });
        }, l.prototype.close = l.prototype.closePath = function () {
          this.commands.push({
            type: "Z"
          });
        }, l.prototype.extend = function (e) {
          if (e.commands) e = e.commands;else if (e instanceof i) {
            const t = e;
            return this.moveTo(t.x1, t.y1), this.lineTo(t.x2, t.y1), this.lineTo(t.x2, t.y2), this.lineTo(t.x1, t.y2), void this.close();
          }
          Array.prototype.push.apply(this.commands, e);
        }, l.prototype.getBoundingBox = function () {
          const e = new i();
          let t = 0,
            n = 0,
            s = 0,
            o = 0;
          for (let r = 0; r < this.commands.length; r++) {
            const a = this.commands[r];
            switch (a.type) {
              case "M":
                e.addPoint(a.x, a.y), t = s = a.x, n = o = a.y;
                break;
              case "L":
                e.addPoint(a.x, a.y), s = a.x, o = a.y;
                break;
              case "Q":
                e.addQuad(s, o, a.x1, a.y1, a.x, a.y), s = a.x, o = a.y;
                break;
              case "C":
                e.addBezier(s, o, a.x1, a.y1, a.x2, a.y2, a.x, a.y), s = a.x, o = a.y;
                break;
              case "Z":
                s = t, o = n;
                break;
              default:
                throw new Error("Unexpected path command " + a.type);
            }
          }
          return e.isEmpty() && e.addPoint(0, 0), e;
        }, l.prototype.draw = function (e) {
          e.beginPath();
          for (let t = 0; t < this.commands.length; t += 1) {
            const n = this.commands[t];
            "M" === n.type ? e.moveTo(n.x, n.y) : "L" === n.type ? e.lineTo(n.x, n.y) : "C" === n.type ? e.bezierCurveTo(n.x1, n.y1, n.x2, n.y2, n.x, n.y) : "Q" === n.type ? e.quadraticCurveTo(n.x1, n.y1, n.x, n.y) : "Z" === n.type && e.closePath();
          }
          this.fill && (e.fillStyle = this.fill, e.fill()), this.stroke && (e.strokeStyle = this.stroke, e.lineWidth = this.strokeWidth, e.stroke());
        }, l.prototype.toPathData = function (e) {
          function t(t) {
            return Math.round(t) === t ? "" + Math.round(t) : t.toFixed(e);
          }
          function n() {
            let e = "";
            for (let n = 0; n < arguments.length; n += 1) {
              const s = arguments[n];
              s >= 0 && n > 0 && (e += " "), e += t(s);
            }
            return e;
          }
          e = void 0 !== e ? e : 2;
          let s = "";
          for (let e = 0; e < this.commands.length; e += 1) {
            const t = this.commands[e];
            "M" === t.type ? s += "M" + n(t.x, t.y) : "L" === t.type ? s += "L" + n(t.x, t.y) : "C" === t.type ? s += "C" + n(t.x1, t.y1, t.x2, t.y2, t.x, t.y) : "Q" === t.type ? s += "Q" + n(t.x1, t.y1, t.x, t.y) : "Z" === t.type && (s += "Z");
          }
          return s;
        }, l.prototype.toSVG = function (e) {
          let t = '<path d="';
          return t += this.toPathData(e), t += '"', this.fill && "black" !== this.fill && (null === this.fill ? t += ' fill="none"' : t += ' fill="' + this.fill + '"'), this.stroke && (t += ' stroke="' + this.stroke + '" stroke-width="' + this.strokeWidth + '"'), t += "/>", t;
        }, l.prototype.toDOMElement = function (e) {
          const t = this.toPathData(e),
            n = document.createElementNS("http://www.w3.org/2000/svg", "path");
          return n.setAttribute("d", t), n;
        };
        const u = l;
        function c(e) {
          throw new Error(e);
        }
        function p(e, t) {
          e || c(t);
        }
        const f = {
            fail: c,
            argument: p,
            assert: p
          },
          h = 2147483648,
          d = {},
          g = {},
          m = {};
        function y(e) {
          return function () {
            return e;
          };
        }
        g.BYTE = function (e) {
          return f.argument(e >= 0 && e <= 255, "Byte value should be between 0 and 255."), [e];
        }, m.BYTE = y(1), g.CHAR = function (e) {
          return [e.charCodeAt(0)];
        }, m.CHAR = y(1), g.CHARARRAY = function (e) {
          const t = [];
          for (let n = 0; n < e.length; n += 1) t[n] = e.charCodeAt(n);
          return t;
        }, m.CHARARRAY = function (e) {
          return e.length;
        }, g.USHORT = function (e) {
          return [e >> 8 & 255, 255 & e];
        }, m.USHORT = y(2), g.SHORT = function (e) {
          return e >= 32768 && (e = -(65536 - e)), [e >> 8 & 255, 255 & e];
        }, m.SHORT = y(2), g.UINT24 = function (e) {
          return [e >> 16 & 255, e >> 8 & 255, 255 & e];
        }, m.UINT24 = y(3), g.ULONG = function (e) {
          return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
        }, m.ULONG = y(4), g.LONG = function (e) {
          return e >= h && (e = -(2 * h - e)), [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
        }, m.LONG = y(4), g.FIXED = g.ULONG, m.FIXED = m.ULONG, g.FWORD = g.SHORT, m.FWORD = m.SHORT, g.UFWORD = g.USHORT, m.UFWORD = m.USHORT, g.LONGDATETIME = function (e) {
          return [0, 0, 0, 0, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
        }, m.LONGDATETIME = y(8), g.TAG = function (e) {
          return f.argument(4 === e.length, "Tag should be exactly 4 ASCII characters."), [e.charCodeAt(0), e.charCodeAt(1), e.charCodeAt(2), e.charCodeAt(3)];
        }, m.TAG = y(4), g.Card8 = g.BYTE, m.Card8 = m.BYTE, g.Card16 = g.USHORT, m.Card16 = m.USHORT, g.OffSize = g.BYTE, m.OffSize = m.BYTE, g.SID = g.USHORT, m.SID = m.USHORT, g.NUMBER = function (e) {
          return e >= -107 && e <= 107 ? [e + 139] : e >= 108 && e <= 1131 ? [247 + ((e -= 108) >> 8), 255 & e] : e >= -1131 && e <= -108 ? [251 + ((e = -e - 108) >> 8), 255 & e] : e >= -32768 && e <= 32767 ? g.NUMBER16(e) : g.NUMBER32(e);
        }, m.NUMBER = function (e) {
          return g.NUMBER(e).length;
        }, g.NUMBER16 = function (e) {
          return [28, e >> 8 & 255, 255 & e];
        }, m.NUMBER16 = y(3), g.NUMBER32 = function (e) {
          return [29, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
        }, m.NUMBER32 = y(5), g.REAL = function (e) {
          let t = e.toString();
          const n = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);
          if (n) {
            const s = parseFloat("1e" + ((n[2] ? +n[2] : 0) + n[1].length));
            t = (Math.round(e * s) / s).toString();
          }
          let s = "";
          for (let e = 0, n = t.length; e < n; e += 1) {
            const n = t[e];
            s += "e" === n ? "-" === t[++e] ? "c" : "b" : "." === n ? "a" : "-" === n ? "e" : n;
          }
          s += 1 & s.length ? "f" : "ff";
          const o = [30];
          for (let e = 0, t = s.length; e < t; e += 2) o.push(parseInt(s.substr(e, 2), 16));
          return o;
        }, m.REAL = function (e) {
          return g.REAL(e).length;
        }, g.NAME = g.CHARARRAY, m.NAME = m.CHARARRAY, g.STRING = g.CHARARRAY, m.STRING = m.CHARARRAY, d.UTF8 = function (e, t, n) {
          const s = [],
            o = n;
          for (let n = 0; n < o; n++, t += 1) s[n] = e.getUint8(t);
          return String.fromCharCode.apply(null, s);
        }, d.UTF16 = function (e, t, n) {
          const s = [],
            o = n / 2;
          for (let n = 0; n < o; n++, t += 2) s[n] = e.getUint16(t);
          return String.fromCharCode.apply(null, s);
        }, g.UTF16 = function (e) {
          const t = [];
          for (let n = 0; n < e.length; n += 1) {
            const s = e.charCodeAt(n);
            t[t.length] = s >> 8 & 255, t[t.length] = 255 & s;
          }
          return t;
        }, m.UTF16 = function (e) {
          return 2 * e.length;
        };
        const v = {
          "x-mac-croatian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ",
          "x-mac-cyrillic": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю",
          "x-mac-gaelic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ",
          "x-mac-greek": "Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­",
          "x-mac-icelandic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
          "x-mac-inuit": "ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł",
          "x-mac-ce": "ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",
          macintosh: "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
          "x-mac-romanian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
          "x-mac-turkish": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
        };
        d.MACSTRING = function (e, t, n, s) {
          const o = v[s];
          if (void 0 === o) return;
          let r = "";
          for (let s = 0; s < n; s++) {
            const n = e.getUint8(t + s);
            r += n <= 127 ? String.fromCharCode(n) : o[127 & n];
          }
          return r;
        };
        const b = "function" == typeof WeakMap && new WeakMap();
        let x;
        function S(e) {
          return e >= -128 && e <= 127;
        }
        function U(e, t, n) {
          let s = 0;
          const o = e.length;
          for (; t < o && s < 64 && 0 === e[t];) ++t, ++s;
          return n.push(128 | s - 1), t;
        }
        function k(e, t, n) {
          let s = 0;
          const o = e.length;
          let r = t;
          for (; r < o && s < 64;) {
            const t = e[r];
            if (!S(t)) break;
            if (0 === t && r + 1 < o && 0 === e[r + 1]) break;
            ++r, ++s;
          }
          n.push(s - 1);
          for (let s = t; s < r; ++s) n.push(e[s] + 256 & 255);
          return r;
        }
        function T(e, t, n) {
          let s = 0;
          const o = e.length;
          let r = t;
          for (; r < o && s < 64;) {
            const t = e[r];
            if (0 === t) break;
            if (S(t) && r + 1 < o && S(e[r + 1])) break;
            ++r, ++s;
          }
          n.push(64 | s - 1);
          for (let s = t; s < r; ++s) {
            const t = e[s];
            n.push(t + 65536 >> 8 & 255, t + 256 & 255);
          }
          return r;
        }
        g.MACSTRING = function (e, t) {
          const n = function (e) {
            if (!x) {
              x = {};
              for (let e in v) x[e] = new String(e);
            }
            const t = x[e];
            if (void 0 === t) return;
            if (b) {
              const e = b.get(t);
              if (void 0 !== e) return e;
            }
            const n = v[e];
            if (void 0 === n) return;
            const s = {};
            for (let e = 0; e < n.length; e++) s[n.charCodeAt(e)] = e + 128;
            return b && b.set(t, s), s;
          }(t);
          if (void 0 === n) return;
          const s = [];
          for (let t = 0; t < e.length; t++) {
            let o = e.charCodeAt(t);
            if (o >= 128 && (o = n[o], void 0 === o)) return;
            s[t] = o;
          }
          return s;
        }, m.MACSTRING = function (e, t) {
          const n = g.MACSTRING(e, t);
          return void 0 !== n ? n.length : 0;
        }, g.VARDELTAS = function (e) {
          let t = 0;
          const n = [];
          for (; t < e.length;) {
            const s = e[t];
            t = 0 === s ? U(e, t, n) : s >= -128 && s <= 127 ? k(e, t, n) : T(e, t, n);
          }
          return n;
        }, g.INDEX = function (e) {
          let t = 1;
          const n = [t],
            s = [];
          for (let o = 0; o < e.length; o += 1) {
            const r = g.OBJECT(e[o]);
            Array.prototype.push.apply(s, r), t += r.length, n.push(t);
          }
          if (0 === s.length) return [0, 0];
          const o = [],
            r = 1 + Math.floor(Math.log(t) / Math.log(2)) / 8 | 0,
            a = [void 0, g.BYTE, g.USHORT, g.UINT24, g.ULONG][r];
          for (let e = 0; e < n.length; e += 1) {
            const t = a(n[e]);
            Array.prototype.push.apply(o, t);
          }
          return Array.prototype.concat(g.Card16(e.length), g.OffSize(r), o, s);
        }, m.INDEX = function (e) {
          return g.INDEX(e).length;
        }, g.DICT = function (e) {
          let t = [];
          const n = Object.keys(e),
            s = n.length;
          for (let o = 0; o < s; o += 1) {
            const s = parseInt(n[o], 0),
              r = e[s];
            t = t.concat(g.OPERAND(r.value, r.type)), t = t.concat(g.OPERATOR(s));
          }
          return t;
        }, m.DICT = function (e) {
          return g.DICT(e).length;
        }, g.OPERATOR = function (e) {
          return e < 1200 ? [e] : [12, e - 1200];
        }, g.OPERAND = function (e, t) {
          let n = [];
          if (Array.isArray(t)) for (let s = 0; s < t.length; s += 1) f.argument(e.length === t.length, "Not enough arguments given for type" + t), n = n.concat(g.OPERAND(e[s], t[s]));else if ("SID" === t) n = n.concat(g.NUMBER(e));else if ("offset" === t) n = n.concat(g.NUMBER32(e));else if ("number" === t) n = n.concat(g.NUMBER(e));else {
            if ("real" !== t) throw new Error("Unknown operand type " + t);
            n = n.concat(g.REAL(e));
          }
          return n;
        }, g.OP = g.BYTE, m.OP = m.BYTE;
        const E = "function" == typeof WeakMap && new WeakMap();
        function w(e, t, n) {
          for (let e = 0; e < t.length; e += 1) {
            const n = t[e];
            this[n.name] = n.value;
          }
          if (this.tableName = e, this.fields = t, n) {
            const e = Object.keys(n);
            for (let t = 0; t < e.length; t += 1) {
              const s = e[t],
                o = n[s];
              void 0 !== this[s] && (this[s] = o);
            }
          }
        }
        function O(e, t, n) {
          void 0 === n && (n = t.length);
          const s = new Array(t.length + 1);
          s[0] = {
            name: e + "Count",
            type: "USHORT",
            value: n
          };
          for (let n = 0; n < t.length; n++) s[n + 1] = {
            name: e + n,
            type: "USHORT",
            value: t[n]
          };
          return s;
        }
        function I(e, t, n) {
          const s = t.length,
            o = new Array(s + 1);
          o[0] = {
            name: e + "Count",
            type: "USHORT",
            value: s
          };
          for (let r = 0; r < s; r++) o[r + 1] = {
            name: e + r,
            type: "TABLE",
            value: n(t[r], r)
          };
          return o;
        }
        function R(e, t, n) {
          const s = t.length;
          let o = [];
          o[0] = {
            name: e + "Count",
            type: "USHORT",
            value: s
          };
          for (let e = 0; e < s; e++) o = o.concat(n(t[e], e));
          return o;
        }
        function L(e) {
          1 === e.format ? w.call(this, "coverageTable", [{
            name: "coverageFormat",
            type: "USHORT",
            value: 1
          }].concat(O("glyph", e.glyphs))) : f.assert(!1, "Can't create coverage table format 2 yet.");
        }
        function B(e) {
          w.call(this, "scriptListTable", R("scriptRecord", e, function (e, t) {
            const n = e.script;
            let s = n.defaultLangSys;
            return f.assert(!!s, "Unable to write GSUB: script " + e.tag + " has no default language system."), [{
              name: "scriptTag" + t,
              type: "TAG",
              value: e.tag
            }, {
              name: "script" + t,
              type: "TABLE",
              value: new w("scriptTable", [{
                name: "defaultLangSys",
                type: "TABLE",
                value: new w("defaultLangSys", [{
                  name: "lookupOrder",
                  type: "USHORT",
                  value: 0
                }, {
                  name: "reqFeatureIndex",
                  type: "USHORT",
                  value: s.reqFeatureIndex
                }].concat(O("featureIndex", s.featureIndexes)))
              }].concat(R("langSys", n.langSysRecords, function (e, t) {
                const n = e.langSys;
                return [{
                  name: "langSysTag" + t,
                  type: "TAG",
                  value: e.tag
                }, {
                  name: "langSys" + t,
                  type: "TABLE",
                  value: new w("langSys", [{
                    name: "lookupOrder",
                    type: "USHORT",
                    value: 0
                  }, {
                    name: "reqFeatureIndex",
                    type: "USHORT",
                    value: n.reqFeatureIndex
                  }].concat(O("featureIndex", n.featureIndexes)))
                }];
              })))
            }];
          }));
        }
        function C(e) {
          w.call(this, "featureListTable", R("featureRecord", e, function (e, t) {
            const n = e.feature;
            return [{
              name: "featureTag" + t,
              type: "TAG",
              value: e.tag
            }, {
              name: "feature" + t,
              type: "TABLE",
              value: new w("featureTable", [{
                name: "featureParams",
                type: "USHORT",
                value: n.featureParams
              }].concat(O("lookupListIndex", n.lookupListIndexes)))
            }];
          }));
        }
        function D(e, t) {
          w.call(this, "lookupListTable", I("lookup", e, function (e) {
            let n = t[e.lookupType];
            return f.assert(!!n, "Unable to write GSUB lookup type " + e.lookupType + " tables."), new w("lookupTable", [{
              name: "lookupType",
              type: "USHORT",
              value: e.lookupType
            }, {
              name: "lookupFlag",
              type: "USHORT",
              value: e.lookupFlag
            }].concat(I("subtable", e.subtables, n)));
          }));
        }
        g.CHARSTRING = function (e) {
          if (E) {
            const t = E.get(e);
            if (void 0 !== t) return t;
          }
          let t = [];
          const n = e.length;
          for (let s = 0; s < n; s += 1) {
            const n = e[s];
            t = t.concat(g[n.type](n.value));
          }
          return E && E.set(e, t), t;
        }, m.CHARSTRING = function (e) {
          return g.CHARSTRING(e).length;
        }, g.OBJECT = function (e) {
          const t = g[e.type];
          return f.argument(void 0 !== t, "No encoding function for type " + e.type), t(e.value);
        }, m.OBJECT = function (e) {
          const t = m[e.type];
          return f.argument(void 0 !== t, "No sizeOf function for type " + e.type), t(e.value);
        }, g.TABLE = function (e) {
          let t = [];
          const n = e.fields.length,
            s = [],
            o = [];
          for (let r = 0; r < n; r += 1) {
            const n = e.fields[r],
              a = g[n.type];
            f.argument(void 0 !== a, "No encoding function for field type " + n.type + " (" + n.name + ")");
            let i = e[n.name];
            void 0 === i && (i = n.value);
            const l = a(i);
            "TABLE" === n.type ? (o.push(t.length), t = t.concat([0, 0]), s.push(l)) : t = t.concat(l);
          }
          for (let n = 0; n < s.length; n += 1) {
            const r = o[n],
              a = t.length;
            f.argument(a < 65536, "Table " + e.tableName + " too big."), t[r] = a >> 8, t[r + 1] = 255 & a, t = t.concat(s[n]);
          }
          return t;
        }, m.TABLE = function (e) {
          let t = 0;
          const n = e.fields.length;
          for (let s = 0; s < n; s += 1) {
            const n = e.fields[s],
              o = m[n.type];
            f.argument(void 0 !== o, "No sizeOf function for field type " + n.type + " (" + n.name + ")");
            let r = e[n.name];
            void 0 === r && (r = n.value), t += o(r), "TABLE" === n.type && (t += 2);
          }
          return t;
        }, g.RECORD = g.TABLE, m.RECORD = m.TABLE, g.LITERAL = function (e) {
          return e;
        }, m.LITERAL = function (e) {
          return e.length;
        }, w.prototype.encode = function () {
          return g.TABLE(this);
        }, w.prototype.sizeOf = function () {
          return m.TABLE(this);
        }, L.prototype = Object.create(w.prototype), L.prototype.constructor = L, B.prototype = Object.create(w.prototype), B.prototype.constructor = B, C.prototype = Object.create(w.prototype), C.prototype.constructor = C, D.prototype = Object.create(w.prototype), D.prototype.constructor = D;
        const M = {
          Table: w,
          Record: w,
          Coverage: L,
          ScriptList: B,
          FeatureList: C,
          LookupList: D,
          ushortList: O,
          tableList: I,
          recordList: R
        };
        function A(e, t) {
          return e.getUint8(t);
        }
        function P(e, t) {
          return e.getUint16(t, !1);
        }
        function G(e, t) {
          return e.getUint32(t, !1);
        }
        function N(e, t) {
          return e.getInt16(t, !1) + e.getUint16(t + 2, !1) / 65535;
        }
        const F = {
          byte: 1,
          uShort: 2,
          short: 2,
          uLong: 4,
          fixed: 4,
          longDateTime: 8,
          tag: 4
        };
        function _(e, t) {
          this.data = e, this.offset = t, this.relativeOffset = 0;
        }
        _.prototype.parseByte = function () {
          const e = this.data.getUint8(this.offset + this.relativeOffset);
          return this.relativeOffset += 1, e;
        }, _.prototype.parseChar = function () {
          const e = this.data.getInt8(this.offset + this.relativeOffset);
          return this.relativeOffset += 1, e;
        }, _.prototype.parseCard8 = _.prototype.parseByte, _.prototype.parseUShort = function () {
          const e = this.data.getUint16(this.offset + this.relativeOffset);
          return this.relativeOffset += 2, e;
        }, _.prototype.parseCard16 = _.prototype.parseUShort, _.prototype.parseSID = _.prototype.parseUShort, _.prototype.parseOffset16 = _.prototype.parseUShort, _.prototype.parseShort = function () {
          const e = this.data.getInt16(this.offset + this.relativeOffset);
          return this.relativeOffset += 2, e;
        }, _.prototype.parseF2Dot14 = function () {
          const e = this.data.getInt16(this.offset + this.relativeOffset) / 16384;
          return this.relativeOffset += 2, e;
        }, _.prototype.parseULong = function () {
          const e = G(this.data, this.offset + this.relativeOffset);
          return this.relativeOffset += 4, e;
        }, _.prototype.parseOffset32 = _.prototype.parseULong, _.prototype.parseFixed = function () {
          const e = N(this.data, this.offset + this.relativeOffset);
          return this.relativeOffset += 4, e;
        }, _.prototype.parseString = function (e) {
          const t = this.data,
            n = this.offset + this.relativeOffset;
          let s = "";
          this.relativeOffset += e;
          for (let o = 0; o < e; o++) s += String.fromCharCode(t.getUint8(n + o));
          return s;
        }, _.prototype.parseTag = function () {
          return this.parseString(4);
        }, _.prototype.parseLongDateTime = function () {
          let e = G(this.data, this.offset + this.relativeOffset + 4);
          return e -= 2082844800, this.relativeOffset += 8, e;
        }, _.prototype.parseVersion = function (e) {
          const t = P(this.data, this.offset + this.relativeOffset),
            n = P(this.data, this.offset + this.relativeOffset + 2);
          return this.relativeOffset += 4, void 0 === e && (e = 4096), t + n / e / 10;
        }, _.prototype.skip = function (e, t) {
          void 0 === t && (t = 1), this.relativeOffset += F[e] * t;
        }, _.prototype.parseULongList = function (e) {
          void 0 === e && (e = this.parseULong());
          const t = new Array(e),
            n = this.data;
          let s = this.offset + this.relativeOffset;
          for (let o = 0; o < e; o++) t[o] = n.getUint32(s), s += 4;
          return this.relativeOffset += 4 * e, t;
        }, _.prototype.parseOffset16List = _.prototype.parseUShortList = function (e) {
          void 0 === e && (e = this.parseUShort());
          const t = new Array(e),
            n = this.data;
          let s = this.offset + this.relativeOffset;
          for (let o = 0; o < e; o++) t[o] = n.getUint16(s), s += 2;
          return this.relativeOffset += 2 * e, t;
        }, _.prototype.parseShortList = function (e) {
          const t = new Array(e),
            n = this.data;
          let s = this.offset + this.relativeOffset;
          for (let o = 0; o < e; o++) t[o] = n.getInt16(s), s += 2;
          return this.relativeOffset += 2 * e, t;
        }, _.prototype.parseByteList = function (e) {
          const t = new Array(e),
            n = this.data;
          let s = this.offset + this.relativeOffset;
          for (let o = 0; o < e; o++) t[o] = n.getUint8(s++);
          return this.relativeOffset += e, t;
        }, _.prototype.parseList = function (e, t) {
          t || (t = e, e = this.parseUShort());
          const n = new Array(e);
          for (let s = 0; s < e; s++) n[s] = t.call(this);
          return n;
        }, _.prototype.parseList32 = function (e, t) {
          t || (t = e, e = this.parseULong());
          const n = new Array(e);
          for (let s = 0; s < e; s++) n[s] = t.call(this);
          return n;
        }, _.prototype.parseRecordList = function (e, t) {
          t || (t = e, e = this.parseUShort());
          const n = new Array(e),
            s = Object.keys(t);
          for (let o = 0; o < e; o++) {
            const e = {};
            for (let n = 0; n < s.length; n++) {
              const o = s[n],
                r = t[o];
              e[o] = r.call(this);
            }
            n[o] = e;
          }
          return n;
        }, _.prototype.parseRecordList32 = function (e, t) {
          t || (t = e, e = this.parseULong());
          const n = new Array(e),
            s = Object.keys(t);
          for (let o = 0; o < e; o++) {
            const e = {};
            for (let n = 0; n < s.length; n++) {
              const o = s[n],
                r = t[o];
              e[o] = r.call(this);
            }
            n[o] = e;
          }
          return n;
        }, _.prototype.parseStruct = function (e) {
          if ("function" == typeof e) return e.call(this);
          {
            const t = Object.keys(e),
              n = {};
            for (let s = 0; s < t.length; s++) {
              const o = t[s],
                r = e[o];
              n[o] = r.call(this);
            }
            return n;
          }
        }, _.prototype.parseValueRecord = function (e) {
          if (void 0 === e && (e = this.parseUShort()), 0 === e) return;
          const t = {};
          return 1 & e && (t.xPlacement = this.parseShort()), 2 & e && (t.yPlacement = this.parseShort()), 4 & e && (t.xAdvance = this.parseShort()), 8 & e && (t.yAdvance = this.parseShort()), 16 & e && (t.xPlaDevice = void 0, this.parseShort()), 32 & e && (t.yPlaDevice = void 0, this.parseShort()), 64 & e && (t.xAdvDevice = void 0, this.parseShort()), 128 & e && (t.yAdvDevice = void 0, this.parseShort()), t;
        }, _.prototype.parseValueRecordList = function () {
          const e = this.parseUShort(),
            t = this.parseUShort(),
            n = new Array(t);
          for (let s = 0; s < t; s++) n[s] = this.parseValueRecord(e);
          return n;
        }, _.prototype.parsePointer = function (e) {
          const t = this.parseOffset16();
          if (t > 0) return new _(this.data, this.offset + t).parseStruct(e);
        }, _.prototype.parsePointer32 = function (e) {
          const t = this.parseOffset32();
          if (t > 0) return new _(this.data, this.offset + t).parseStruct(e);
        }, _.prototype.parseListOfLists = function (e) {
          const t = this.parseOffset16List(),
            n = t.length,
            s = this.relativeOffset,
            o = new Array(n);
          for (let s = 0; s < n; s++) {
            const n = t[s];
            if (0 !== n) {
              if (this.relativeOffset = n, e) {
                const t = this.parseOffset16List(),
                  r = new Array(t.length);
                for (let s = 0; s < t.length; s++) this.relativeOffset = n + t[s], r[s] = e.call(this);
                o[s] = r;
              } else o[s] = this.parseUShortList();
            } else o[s] = void 0;
          }
          return this.relativeOffset = s, o;
        }, _.prototype.parseCoverage = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort(),
            n = this.parseUShort();
          if (1 === t) return {
            format: 1,
            glyphs: this.parseUShortList(n)
          };
          if (2 === t) {
            const e = new Array(n);
            for (let t = 0; t < n; t++) e[t] = {
              start: this.parseUShort(),
              end: this.parseUShort(),
              index: this.parseUShort()
            };
            return {
              format: 2,
              ranges: e
            };
          }
          throw new Error("0x" + e.toString(16) + ": Coverage format must be 1 or 2.");
        }, _.prototype.parseClassDef = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort();
          if (1 === t) return {
            format: 1,
            startGlyph: this.parseUShort(),
            classes: this.parseUShortList()
          };
          if (2 === t) return {
            format: 2,
            ranges: this.parseRecordList({
              start: _.uShort,
              end: _.uShort,
              classId: _.uShort
            })
          };
          throw new Error("0x" + e.toString(16) + ": ClassDef format must be 1 or 2.");
        }, _.list = function (e, t) {
          return function () {
            return this.parseList(e, t);
          };
        }, _.list32 = function (e, t) {
          return function () {
            return this.parseList32(e, t);
          };
        }, _.recordList = function (e, t) {
          return function () {
            return this.parseRecordList(e, t);
          };
        }, _.recordList32 = function (e, t) {
          return function () {
            return this.parseRecordList32(e, t);
          };
        }, _.pointer = function (e) {
          return function () {
            return this.parsePointer(e);
          };
        }, _.pointer32 = function (e) {
          return function () {
            return this.parsePointer32(e);
          };
        }, _.tag = _.prototype.parseTag, _.byte = _.prototype.parseByte, _.uShort = _.offset16 = _.prototype.parseUShort, _.uShortList = _.prototype.parseUShortList, _.uLong = _.offset32 = _.prototype.parseULong, _.uLongList = _.prototype.parseULongList, _.struct = _.prototype.parseStruct, _.coverage = _.prototype.parseCoverage, _.classDef = _.prototype.parseClassDef;
        const H = {
          reserved: _.uShort,
          reqFeatureIndex: _.uShort,
          featureIndexes: _.uShortList
        };
        _.prototype.parseScriptList = function () {
          return this.parsePointer(_.recordList({
            tag: _.tag,
            script: _.pointer({
              defaultLangSys: _.pointer(H),
              langSysRecords: _.recordList({
                tag: _.tag,
                langSys: _.pointer(H)
              })
            })
          })) || [];
        }, _.prototype.parseFeatureList = function () {
          return this.parsePointer(_.recordList({
            tag: _.tag,
            feature: _.pointer({
              featureParams: _.offset16,
              lookupListIndexes: _.uShortList
            })
          })) || [];
        }, _.prototype.parseLookupList = function (e) {
          return this.parsePointer(_.list(_.pointer(function () {
            const t = this.parseUShort();
            f.argument(1 <= t && t <= 9, "GPOS/GSUB lookup type " + t + " unknown.");
            const n = this.parseUShort(),
              s = 16 & n;
            return {
              lookupType: t,
              lookupFlag: n,
              subtables: this.parseList(_.pointer(e[t])),
              markFilteringSet: s ? this.parseUShort() : void 0
            };
          }))) || [];
        }, _.prototype.parseFeatureVariationsList = function () {
          return this.parsePointer32(function () {
            const e = this.parseUShort(),
              t = this.parseUShort();
            return f.argument(1 === e && t < 1, "GPOS/GSUB feature variations table unknown."), this.parseRecordList32({
              conditionSetOffset: _.offset32,
              featureTableSubstitutionOffset: _.offset32
            });
          }) || [];
        };
        const z = {
          getByte: A,
          getCard8: A,
          getUShort: P,
          getCard16: P,
          getShort: function (e, t) {
            return e.getInt16(t, !1);
          },
          getULong: G,
          getFixed: N,
          getTag: function (e, t) {
            let n = "";
            for (let s = t; s < t + 4; s += 1) n += String.fromCharCode(e.getInt8(s));
            return n;
          },
          getOffset: function (e, t, n) {
            let s = 0;
            for (let o = 0; o < n; o += 1) s <<= 8, s += e.getUint8(t + o);
            return s;
          },
          getBytes: function (e, t, n) {
            const s = [];
            for (let o = t; o < n; o += 1) s.push(e.getUint8(o));
            return s;
          },
          bytesToString: function (e) {
            let t = "";
            for (let n = 0; n < e.length; n += 1) t += String.fromCharCode(e[n]);
            return t;
          },
          Parser: _
        };
        function W(e, t, n) {
          e.segments.push({
            end: t,
            start: t,
            delta: -(t - n),
            offset: 0,
            glyphIndex: n
          });
        }
        const q = {
            parse: function (e, t) {
              const n = {};
              n.version = z.getUShort(e, t), f.argument(0 === n.version, "cmap table version should be 0."), n.numTables = z.getUShort(e, t + 2);
              let s = -1;
              for (let o = n.numTables - 1; o >= 0; o -= 1) {
                const n = z.getUShort(e, t + 4 + 8 * o),
                  r = z.getUShort(e, t + 4 + 8 * o + 2);
                if (3 === n && (0 === r || 1 === r || 10 === r)) {
                  s = z.getULong(e, t + 4 + 8 * o + 4);
                  break;
                }
              }
              if (-1 === s) throw new Error("No valid cmap sub-tables found.");
              const o = new z.Parser(e, t + s);
              if (n.format = o.parseUShort(), 12 === n.format) !function (e, t) {
                let n;
                t.parseUShort(), e.length = t.parseULong(), e.language = t.parseULong(), e.groupCount = n = t.parseULong(), e.glyphIndexMap = {};
                for (let s = 0; s < n; s += 1) {
                  const n = t.parseULong(),
                    s = t.parseULong();
                  let o = t.parseULong();
                  for (let t = n; t <= s; t += 1) e.glyphIndexMap[t] = o, o++;
                }
              }(n, o);else {
                if (4 !== n.format) throw new Error("Only format 4 and 12 cmap tables are supported (found format " + n.format + ").");
                !function (e, t, n, s, o) {
                  let r;
                  e.length = t.parseUShort(), e.language = t.parseUShort(), e.segCount = r = t.parseUShort() >> 1, t.skip("uShort", 3), e.glyphIndexMap = {};
                  const a = new z.Parser(n, s + o + 14),
                    i = new z.Parser(n, s + o + 16 + 2 * r),
                    l = new z.Parser(n, s + o + 16 + 4 * r),
                    u = new z.Parser(n, s + o + 16 + 6 * r);
                  let c = s + o + 16 + 8 * r;
                  for (let t = 0; t < r - 1; t += 1) {
                    let t;
                    const s = a.parseUShort(),
                      o = i.parseUShort(),
                      r = l.parseShort(),
                      p = u.parseUShort();
                    for (let a = o; a <= s; a += 1) 0 !== p ? (c = u.offset + u.relativeOffset - 2, c += p, c += 2 * (a - o), t = z.getUShort(n, c), 0 !== t && (t = t + r & 65535)) : t = a + r & 65535, e.glyphIndexMap[a] = t;
                  }
                }(n, o, e, t, s);
              }
              return n;
            },
            make: function (e) {
              let t,
                n = !0;
              for (t = e.length - 1; t > 0; t -= 1) if (e.get(t).unicode > 65535) {
                console.log("Adding CMAP format 12 (needed!)"), n = !1;
                break;
              }
              let s = [{
                name: "version",
                type: "USHORT",
                value: 0
              }, {
                name: "numTables",
                type: "USHORT",
                value: n ? 1 : 2
              }, {
                name: "platformID",
                type: "USHORT",
                value: 3
              }, {
                name: "encodingID",
                type: "USHORT",
                value: 1
              }, {
                name: "offset",
                type: "ULONG",
                value: n ? 12 : 20
              }];
              n || (s = s.concat([{
                name: "cmap12PlatformID",
                type: "USHORT",
                value: 3
              }, {
                name: "cmap12EncodingID",
                type: "USHORT",
                value: 10
              }, {
                name: "cmap12Offset",
                type: "ULONG",
                value: 0
              }])), s = s.concat([{
                name: "format",
                type: "USHORT",
                value: 4
              }, {
                name: "cmap4Length",
                type: "USHORT",
                value: 0
              }, {
                name: "language",
                type: "USHORT",
                value: 0
              }, {
                name: "segCountX2",
                type: "USHORT",
                value: 0
              }, {
                name: "searchRange",
                type: "USHORT",
                value: 0
              }, {
                name: "entrySelector",
                type: "USHORT",
                value: 0
              }, {
                name: "rangeShift",
                type: "USHORT",
                value: 0
              }]);
              const o = new M.Table("cmap", s);
              for (o.segments = [], t = 0; t < e.length; t += 1) {
                const n = e.get(t);
                for (let e = 0; e < n.unicodes.length; e += 1) W(o, n.unicodes[e], t);
                o.segments = o.segments.sort(function (e, t) {
                  return e.start - t.start;
                });
              }
              !function (e) {
                e.segments.push({
                  end: 65535,
                  start: 65535,
                  delta: 1,
                  offset: 0
                });
              }(o);
              const r = o.segments.length;
              let a = 0,
                i = [],
                l = [],
                u = [],
                c = [],
                p = [],
                f = [];
              for (t = 0; t < r; t += 1) {
                const e = o.segments[t];
                e.end <= 65535 && e.start <= 65535 ? (i = i.concat({
                  name: "end_" + t,
                  type: "USHORT",
                  value: e.end
                }), l = l.concat({
                  name: "start_" + t,
                  type: "USHORT",
                  value: e.start
                }), u = u.concat({
                  name: "idDelta_" + t,
                  type: "SHORT",
                  value: e.delta
                }), c = c.concat({
                  name: "idRangeOffset_" + t,
                  type: "USHORT",
                  value: e.offset
                }), void 0 !== e.glyphId && (p = p.concat({
                  name: "glyph_" + t,
                  type: "USHORT",
                  value: e.glyphId
                }))) : a += 1, n || void 0 === e.glyphIndex || (f = f.concat({
                  name: "cmap12Start_" + t,
                  type: "ULONG",
                  value: e.start
                }), f = f.concat({
                  name: "cmap12End_" + t,
                  type: "ULONG",
                  value: e.end
                }), f = f.concat({
                  name: "cmap12Glyph_" + t,
                  type: "ULONG",
                  value: e.glyphIndex
                }));
              }
              if (o.segCountX2 = 2 * (r - a), o.searchRange = 2 * Math.pow(2, Math.floor(Math.log(r - a) / Math.log(2))), o.entrySelector = Math.log(o.searchRange / 2) / Math.log(2), o.rangeShift = o.segCountX2 - o.searchRange, o.fields = o.fields.concat(i), o.fields.push({
                name: "reservedPad",
                type: "USHORT",
                value: 0
              }), o.fields = o.fields.concat(l), o.fields = o.fields.concat(u), o.fields = o.fields.concat(c), o.fields = o.fields.concat(p), o.cmap4Length = 14 + 2 * i.length + 2 + 2 * l.length + 2 * u.length + 2 * c.length + 2 * p.length, !n) {
                const e = 16 + 4 * f.length;
                o.cmap12Offset = 20 + o.cmap4Length, o.fields = o.fields.concat([{
                  name: "cmap12Format",
                  type: "USHORT",
                  value: 12
                }, {
                  name: "cmap12Reserved",
                  type: "USHORT",
                  value: 0
                }, {
                  name: "cmap12Length",
                  type: "ULONG",
                  value: e
                }, {
                  name: "cmap12Language",
                  type: "ULONG",
                  value: 0
                }, {
                  name: "cmap12nGroups",
                  type: "ULONG",
                  value: f.length / 3
                }]), o.fields = o.fields.concat(f);
              }
              return o;
            }
          },
          j = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "266 ff", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"],
          X = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "", "endash", "dagger", "daggerdbl", "periodcentered", "", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "", "questiondown", "", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "", "ring", "cedilla", "", "hungarumlaut", "ogonek", "caron", "emdash", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AE", "", "ordfeminine", "", "", "", "", "Lslash", "Oslash", "OE", "ordmasculine", "", "", "", "", "", "ae", "", "", "", "dotlessi", "", "", "lslash", "oslash", "oe", "germandbls"],
          V = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "", "", "isuperior", "", "", "lsuperior", "msuperior", "nsuperior", "osuperior", "", "", "rsuperior", "ssuperior", "tsuperior", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdownsmall", "centoldstyle", "Lslashsmall", "", "", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "", "Dotaccentsmall", "", "", "Macronsmall", "", "", "figuredash", "hypheninferior", "", "", "Ogoneksmall", "Ringsmall", "Cedillasmall", "", "", "", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"],
          Y = [".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "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", "braceleft", "bar", "braceright", "asciitilde", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", "Scaron", "scaron", "Zcaron", "zcaron", "brokenbar", "Eth", "eth", "Yacute", "yacute", "Thorn", "thorn", "minus", "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve", "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", "Ccaron", "ccaron", "dcroat"];
        function Z(e) {
          this.font = e;
        }
        function Q(e) {
          this.cmap = e;
        }
        function J(e, t) {
          this.encoding = e, this.charset = t;
        }
        function K(e) {
          switch (e.version) {
            case 1:
              this.names = Y.slice();
              break;
            case 2:
              this.names = new Array(e.numberOfGlyphs);
              for (let t = 0; t < e.numberOfGlyphs; t++) e.glyphNameIndex[t] < Y.length ? this.names[t] = Y[e.glyphNameIndex[t]] : this.names[t] = e.names[e.glyphNameIndex[t] - Y.length];
              break;
            case 2.5:
              this.names = new Array(e.numberOfGlyphs);
              for (let t = 0; t < e.numberOfGlyphs; t++) this.names[t] = Y[t + e.glyphNameIndex[t]];
              break;
            default:
              this.names = [];
          }
        }
        Z.prototype.charToGlyphIndex = function (e) {
          const t = e.charCodeAt(0),
            n = this.font.glyphs;
          if (n) for (let e = 0; e < n.length; e += 1) {
            const s = n.get(e);
            for (let n = 0; n < s.unicodes.length; n += 1) if (s.unicodes[n] === t) return e;
          }
          return null;
        }, Q.prototype.charToGlyphIndex = function (e) {
          return this.cmap.glyphIndexMap[e.charCodeAt(0)] || 0;
        }, J.prototype.charToGlyphIndex = function (e) {
          const t = e.charCodeAt(0),
            n = this.encoding[t];
          return this.charset.indexOf(n);
        }, K.prototype.nameToGlyphIndex = function (e) {
          return this.names.indexOf(e);
        }, K.prototype.glyphIndexToName = function (e) {
          return this.names[e];
        };
        const $ = function (e, t, n, s, o) {
          e.beginPath(), e.moveTo(t, n), e.lineTo(s, o), e.stroke();
        };
        function ee(e, t, n, s, o) {
          let r;
          return (t & s) > 0 ? (r = e.parseByte(), 0 == (t & o) && (r = -r), r = n + r) : r = (t & o) > 0 ? n : n + e.parseShort(), r;
        }
        function te(e, t, n) {
          const s = new z.Parser(t, n);
          let o, r;
          if (e.numberOfContours = s.parseShort(), e._xMin = s.parseShort(), e._yMin = s.parseShort(), e._xMax = s.parseShort(), e._yMax = s.parseShort(), e.numberOfContours > 0) {
            const t = e.endPointIndices = [];
            for (let n = 0; n < e.numberOfContours; n += 1) t.push(s.parseUShort());
            e.instructionLength = s.parseUShort(), e.instructions = [];
            for (let t = 0; t < e.instructionLength; t += 1) e.instructions.push(s.parseByte());
            const n = t[t.length - 1] + 1;
            o = [];
            for (let e = 0; e < n; e += 1) if (r = s.parseByte(), o.push(r), (8 & r) > 0) {
              const t = s.parseByte();
              for (let n = 0; n < t; n += 1) o.push(r), e += 1;
            }
            if (f.argument(o.length === n, "Bad flags."), t.length > 0) {
              const a = [];
              let i;
              if (n > 0) {
                for (let e = 0; e < n; e += 1) r = o[e], i = {}, i.onCurve = !!(1 & r), i.lastPointOfContour = t.indexOf(e) >= 0, a.push(i);
                let e = 0;
                for (let t = 0; t < n; t += 1) r = o[t], i = a[t], i.x = ee(s, r, e, 2, 16), e = i.x;
                let l = 0;
                for (let e = 0; e < n; e += 1) r = o[e], i = a[e], i.y = ee(s, r, l, 4, 32), l = i.y;
              }
              e.points = a;
            } else e.points = [];
          } else if (0 === e.numberOfContours) e.points = [];else {
            e.isComposite = !0, e.points = [], e.components = [];
            let t = !0;
            for (; t;) {
              o = s.parseUShort();
              const n = {
                glyphIndex: s.parseUShort(),
                xScale: 1,
                scale01: 0,
                scale10: 0,
                yScale: 1,
                dx: 0,
                dy: 0
              };
              (1 & o) > 0 ? (2 & o) > 0 ? (n.dx = s.parseShort(), n.dy = s.parseShort()) : n.matchedPoints = [s.parseUShort(), s.parseUShort()] : (2 & o) > 0 ? (n.dx = s.parseChar(), n.dy = s.parseChar()) : n.matchedPoints = [s.parseByte(), s.parseByte()], (8 & o) > 0 ? n.xScale = n.yScale = s.parseF2Dot14() : (64 & o) > 0 ? (n.xScale = s.parseF2Dot14(), n.yScale = s.parseF2Dot14()) : (128 & o) > 0 && (n.xScale = s.parseF2Dot14(), n.scale01 = s.parseF2Dot14(), n.scale10 = s.parseF2Dot14(), n.yScale = s.parseF2Dot14()), e.components.push(n), t = !!(32 & o);
            }
            if (256 & o) {
              e.instructionLength = s.parseUShort(), e.instructions = [];
              for (let t = 0; t < e.instructionLength; t += 1) e.instructions.push(s.parseByte());
            }
          }
        }
        function ne(e, t) {
          const n = [];
          for (let s = 0; s < e.length; s += 1) {
            const o = e[s],
              r = {
                x: t.xScale * o.x + t.scale01 * o.y + t.dx,
                y: t.scale10 * o.x + t.yScale * o.y + t.dy,
                onCurve: o.onCurve,
                lastPointOfContour: o.lastPointOfContour
              };
            n.push(r);
          }
          return n;
        }
        function se(e) {
          const t = new u();
          if (!e) return t;
          const n = function (e) {
            const t = [];
            let n = [];
            for (let s = 0; s < e.length; s += 1) {
              const o = e[s];
              n.push(o), o.lastPointOfContour && (t.push(n), n = []);
            }
            return f.argument(0 === n.length, "There are still points left in the current contour."), t;
          }(e);
          for (let e = 0; e < n.length; ++e) {
            const s = n[e];
            let o = null,
              r = s[s.length - 1],
              a = s[0];
            if (r.onCurve) t.moveTo(r.x, r.y);else if (a.onCurve) t.moveTo(a.x, a.y);else {
              const e = {
                x: .5 * (r.x + a.x),
                y: .5 * (r.y + a.y)
              };
              t.moveTo(e.x, e.y);
            }
            for (let e = 0; e < s.length; ++e) if (o = r, r = a, a = s[(e + 1) % s.length], r.onCurve) t.lineTo(r.x, r.y);else {
              let e = o,
                n = a;
              o.onCurve || (e = {
                x: .5 * (r.x + o.x),
                y: .5 * (r.y + o.y)
              }, t.lineTo(e.x, e.y)), a.onCurve || (n = {
                x: .5 * (r.x + a.x),
                y: .5 * (r.y + a.y)
              }), t.lineTo(e.x, e.y), t.quadraticCurveTo(r.x, r.y, n.x, n.y);
            }
            t.closePath();
          }
          return t;
        }
        function oe(e, t) {
          if (t.isComposite) for (let n = 0; n < t.components.length; n += 1) {
            const s = t.components[n],
              o = e.get(s.glyphIndex);
            if (o.getPath(), o.points) {
              let e;
              if (void 0 === s.matchedPoints) e = ne(o.points, s);else {
                if (s.matchedPoints[0] > t.points.length - 1 || s.matchedPoints[1] > o.points.length - 1) throw Error("Matched points out of range in " + t.name);
                const n = t.points[s.matchedPoints[0]];
                let r = o.points[s.matchedPoints[1]];
                const a = {
                  xScale: s.xScale,
                  scale01: s.scale01,
                  scale10: s.scale10,
                  yScale: s.yScale,
                  dx: 0,
                  dy: 0
                };
                r = ne([r], a)[0], a.dx = n.x - r.x, a.dy = n.y - r.y, e = ne(o.points, a);
              }
              t.points = t.points.concat(e);
            }
          }
          return se(t.points);
        }
        const re = {
          getPath: se,
          parse: function (e, t, n, s) {
            const o = new ce.GlyphSet(s);
            for (let r = 0; r < n.length - 1; r += 1) {
              const a = n[r];
              a !== n[r + 1] ? o.push(r, ce.ttfGlyphLoader(s, r, te, e, t + a, oe)) : o.push(r, ce.glyphLoader(s, r));
            }
            return o;
          }
        };
        function ae(e) {
          this.bindConstructorValues(e);
        }
        ae.prototype.bindConstructorValues = function (e) {
          this.index = e.index || 0, this.name = e.name || null, this.unicode = e.unicode || void 0, this.unicodes = e.unicodes || void 0 !== e.unicode ? [e.unicode] : [], e.xMin && (this.xMin = e.xMin), e.yMin && (this.yMin = e.yMin), e.xMax && (this.xMax = e.xMax), e.yMax && (this.yMax = e.yMax), e.advanceWidth && (this.advanceWidth = e.advanceWidth), Object.defineProperty(this, "path", function (e, t) {
            let n = t || new u();
            return {
              configurable: !0,
              get: function () {
                return "function" == typeof n && (n = n()), n;
              },
              set: function (e) {
                n = e;
              }
            };
          }(0, e.path));
        }, ae.prototype.addUnicode = function (e) {
          0 === this.unicodes.length && (this.unicode = e), this.unicodes.push(e);
        }, ae.prototype.getBoundingBox = function () {
          return this.path.getBoundingBox();
        }, ae.prototype.getPath = function (e, t, n, s, o) {
          let r, a;
          e = void 0 !== e ? e : 0, t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 72, s || (s = {});
          let i = s.xScale,
            l = s.yScale;
          if (s.hinting && o && o.hinting && (a = this.path && o.hinting.exec(this, n)), a) r = re.getPath(a).commands, e = Math.round(e), t = Math.round(t), i = l = 1;else {
            r = this.path.commands;
            const e = 1 / this.path.unitsPerEm * n;
            void 0 === i && (i = e), void 0 === l && (l = e);
          }
          const c = new u();
          for (let n = 0; n < r.length; n += 1) {
            const s = r[n];
            "M" === s.type ? c.moveTo(e + s.x * i, t + -s.y * l) : "L" === s.type ? c.lineTo(e + s.x * i, t + -s.y * l) : "Q" === s.type ? c.quadraticCurveTo(e + s.x1 * i, t + -s.y1 * l, e + s.x * i, t + -s.y * l) : "C" === s.type ? c.curveTo(e + s.x1 * i, t + -s.y1 * l, e + s.x2 * i, t + -s.y2 * l, e + s.x * i, t + -s.y * l) : "Z" === s.type && c.closePath();
          }
          return c;
        }, ae.prototype.getContours = function () {
          if (void 0 === this.points) return [];
          const e = [];
          let t = [];
          for (let n = 0; n < this.points.length; n += 1) {
            const s = this.points[n];
            t.push(s), s.lastPointOfContour && (e.push(t), t = []);
          }
          return f.argument(0 === t.length, "There are still points left in the current contour."), e;
        }, ae.prototype.getMetrics = function () {
          const e = this.path.commands,
            t = [],
            n = [];
          for (let s = 0; s < e.length; s += 1) {
            const o = e[s];
            "Z" !== o.type && (t.push(o.x), n.push(o.y)), "Q" !== o.type && "C" !== o.type || (t.push(o.x1), n.push(o.y1)), "C" === o.type && (t.push(o.x2), n.push(o.y2));
          }
          const s = {
            xMin: Math.min.apply(null, t),
            yMin: Math.min.apply(null, n),
            xMax: Math.max.apply(null, t),
            yMax: Math.max.apply(null, n),
            leftSideBearing: this.leftSideBearing
          };
          return isFinite(s.xMin) || (s.xMin = 0), isFinite(s.xMax) || (s.xMax = this.advanceWidth), isFinite(s.yMin) || (s.yMin = 0), isFinite(s.yMax) || (s.yMax = 0), s.rightSideBearing = this.advanceWidth - s.leftSideBearing - (s.xMax - s.xMin), s;
        }, ae.prototype.draw = function (e, t, n, s, o) {
          this.getPath(t, n, s, o).draw(e);
        }, ae.prototype.drawPoints = function (e, t, n, s) {
          function o(t, n, s, o) {
            const r = 2 * Math.PI;
            e.beginPath();
            for (let a = 0; a < t.length; a += 1) e.moveTo(n + t[a].x * o, s + t[a].y * o), e.arc(n + t[a].x * o, s + t[a].y * o, 2, 0, r, !1);
            e.closePath(), e.fill();
          }
          t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 24;
          const r = 1 / this.path.unitsPerEm * s,
            a = [],
            i = [],
            l = this.path;
          for (let e = 0; e < l.commands.length; e += 1) {
            const t = l.commands[e];
            void 0 !== t.x && a.push({
              x: t.x,
              y: -t.y
            }), void 0 !== t.x1 && i.push({
              x: t.x1,
              y: -t.y1
            }), void 0 !== t.x2 && i.push({
              x: t.x2,
              y: -t.y2
            });
          }
          e.fillStyle = "blue", o(a, t, n, r), e.fillStyle = "red", o(i, t, n, r);
        }, ae.prototype.drawMetrics = function (e, t, n, s) {
          let o;
          t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 24, o = 1 / this.path.unitsPerEm * s, e.lineWidth = 1, e.strokeStyle = "black", $(e, t, -1e4, t, 1e4), $(e, -1e4, n, 1e4, n);
          const r = this.xMin || 0;
          let a = this.yMin || 0;
          const i = this.xMax || 0;
          let l = this.yMax || 0;
          const u = this.advanceWidth || 0;
          e.strokeStyle = "blue", $(e, t + r * o, -1e4, t + r * o, 1e4), $(e, t + i * o, -1e4, t + i * o, 1e4), $(e, -1e4, n + -a * o, 1e4, n + -a * o), $(e, -1e4, n + -l * o, 1e4, n + -l * o), e.strokeStyle = "green", $(e, t + u * o, -1e4, t + u * o, 1e4);
        };
        const ie = ae;
        function le(e, t, n) {
          Object.defineProperty(e, t, {
            get: function () {
              return e.path, e[n];
            },
            set: function (t) {
              e[n] = t;
            },
            enumerable: !0,
            configurable: !0
          });
        }
        function ue(e, t) {
          if (this.font = e, this.glyphs = {}, Array.isArray(t)) for (let e = 0; e < t.length; e++) this.glyphs[e] = t[e];
          this.length = t && t.length || 0;
        }
        ue.prototype.get = function (e) {
          return "function" == typeof this.glyphs[e] && (this.glyphs[e] = this.glyphs[e]()), this.glyphs[e];
        }, ue.prototype.push = function (e, t) {
          this.glyphs[e] = t, this.length++;
        };
        const ce = {
          GlyphSet: ue,
          glyphLoader: function (e, t) {
            return new ie({
              index: t,
              font: e
            });
          },
          ttfGlyphLoader: function (e, t, n, s, o, r) {
            return function () {
              const a = new ie({
                index: t,
                font: e
              });
              return a.path = function () {
                n(a, s, o);
                const t = r(e.glyphs, a);
                return t.unitsPerEm = e.unitsPerEm, t;
              }, le(a, "xMin", "_xMin"), le(a, "xMax", "_xMax"), le(a, "yMin", "_yMin"), le(a, "yMax", "_yMax"), a;
            };
          },
          cffGlyphLoader: function (e, t, n, s) {
            return function () {
              const o = new ie({
                index: t,
                font: e
              });
              return o.path = function () {
                const t = n(e, o, s);
                return t.unitsPerEm = e.unitsPerEm, t;
              }, o;
            };
          }
        };
        function pe(e, t) {
          if (e === t) return !0;
          if (Array.isArray(e) && Array.isArray(t)) {
            if (e.length !== t.length) return !1;
            for (let n = 0; n < e.length; n += 1) if (!pe(e[n], t[n])) return !1;
            return !0;
          }
          return !1;
        }
        function fe(e) {
          let t;
          return t = e.length < 1240 ? 107 : e.length < 33900 ? 1131 : 32768, t;
        }
        function he(e, t, n) {
          const s = [],
            o = [],
            r = z.getCard16(e, t);
          let a, i;
          if (0 !== r) {
            const n = z.getByte(e, t + 2);
            a = t + (r + 1) * n + 2;
            let o = t + 3;
            for (let t = 0; t < r + 1; t += 1) s.push(z.getOffset(e, o, n)), o += n;
            i = a + s[r];
          } else i = t + 2;
          for (let t = 0; t < s.length - 1; t += 1) {
            let r = z.getBytes(e, a + s[t], a + s[t + 1]);
            n && (r = n(r)), o.push(r);
          }
          return {
            objects: o,
            startOffset: t,
            endOffset: i
          };
        }
        function de(e, t) {
          let n, s, o, r;
          if (28 === t) return n = e.parseByte(), s = e.parseByte(), n << 8 | s;
          if (29 === t) return n = e.parseByte(), s = e.parseByte(), o = e.parseByte(), r = e.parseByte(), n << 24 | s << 16 | o << 8 | r;
          if (30 === t) return function (e) {
            let t = "";
            const n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"];
            for (;;) {
              const s = e.parseByte(),
                o = s >> 4,
                r = 15 & s;
              if (15 === o) break;
              if (t += n[o], 15 === r) break;
              t += n[r];
            }
            return parseFloat(t);
          }(e);
          if (t >= 32 && t <= 246) return t - 139;
          if (t >= 247 && t <= 250) return n = e.parseByte(), 256 * (t - 247) + n + 108;
          if (t >= 251 && t <= 254) return n = e.parseByte(), 256 * -(t - 251) - n - 108;
          throw new Error("Invalid b0 " + t);
        }
        function ge(e, t, n) {
          t = void 0 !== t ? t : 0;
          const s = new z.Parser(e, t),
            o = [];
          let r = [];
          for (n = void 0 !== n ? n : e.length; s.relativeOffset < n;) {
            let e = s.parseByte();
            e <= 21 ? (12 === e && (e = 1200 + s.parseByte()), o.push([e, r]), r = []) : r.push(de(s, e));
          }
          return function (e) {
            const t = {};
            for (let n = 0; n < e.length; n += 1) {
              const s = e[n][0],
                o = e[n][1];
              let r;
              if (r = 1 === o.length ? o[0] : o, t.hasOwnProperty(s) && !isNaN(t[s])) throw new Error("Object " + t + " already has key " + s);
              t[s] = r;
            }
            return t;
          }(o);
        }
        function me(e, t) {
          return t <= 390 ? j[t] : e[t - 391];
        }
        function ye(e, t, n) {
          const s = {};
          let o;
          for (let r = 0; r < t.length; r += 1) {
            const a = t[r];
            if (Array.isArray(a.type)) {
              const t = [];
              t.length = a.type.length;
              for (let s = 0; s < a.type.length; s++) o = void 0 !== e[a.op] ? e[a.op][s] : void 0, void 0 === o && (o = void 0 !== a.value && void 0 !== a.value[s] ? a.value[s] : null), "SID" === a.type[s] && (o = me(n, o)), t[s] = o;
              s[a.name] = t;
            } else o = e[a.op], void 0 === o && (o = void 0 !== a.value ? a.value : null), "SID" === a.type && (o = me(n, o)), s[a.name] = o;
          }
          return s;
        }
        const ve = [{
            name: "version",
            op: 0,
            type: "SID"
          }, {
            name: "notice",
            op: 1,
            type: "SID"
          }, {
            name: "copyright",
            op: 1200,
            type: "SID"
          }, {
            name: "fullName",
            op: 2,
            type: "SID"
          }, {
            name: "familyName",
            op: 3,
            type: "SID"
          }, {
            name: "weight",
            op: 4,
            type: "SID"
          }, {
            name: "isFixedPitch",
            op: 1201,
            type: "number",
            value: 0
          }, {
            name: "italicAngle",
            op: 1202,
            type: "number",
            value: 0
          }, {
            name: "underlinePosition",
            op: 1203,
            type: "number",
            value: -100
          }, {
            name: "underlineThickness",
            op: 1204,
            type: "number",
            value: 50
          }, {
            name: "paintType",
            op: 1205,
            type: "number",
            value: 0
          }, {
            name: "charstringType",
            op: 1206,
            type: "number",
            value: 2
          }, {
            name: "fontMatrix",
            op: 1207,
            type: ["real", "real", "real", "real", "real", "real"],
            value: [.001, 0, 0, .001, 0, 0]
          }, {
            name: "uniqueId",
            op: 13,
            type: "number"
          }, {
            name: "fontBBox",
            op: 5,
            type: ["number", "number", "number", "number"],
            value: [0, 0, 0, 0]
          }, {
            name: "strokeWidth",
            op: 1208,
            type: "number",
            value: 0
          }, {
            name: "xuid",
            op: 14,
            type: [],
            value: null
          }, {
            name: "charset",
            op: 15,
            type: "offset",
            value: 0
          }, {
            name: "encoding",
            op: 16,
            type: "offset",
            value: 0
          }, {
            name: "charStrings",
            op: 17,
            type: "offset",
            value: 0
          }, {
            name: "private",
            op: 18,
            type: ["number", "offset"],
            value: [0, 0]
          }, {
            name: "ros",
            op: 1230,
            type: ["SID", "SID", "number"]
          }, {
            name: "cidFontVersion",
            op: 1231,
            type: "number",
            value: 0
          }, {
            name: "cidFontRevision",
            op: 1232,
            type: "number",
            value: 0
          }, {
            name: "cidFontType",
            op: 1233,
            type: "number",
            value: 0
          }, {
            name: "cidCount",
            op: 1234,
            type: "number",
            value: 8720
          }, {
            name: "uidBase",
            op: 1235,
            type: "number"
          }, {
            name: "fdArray",
            op: 1236,
            type: "offset"
          }, {
            name: "fdSelect",
            op: 1237,
            type: "offset"
          }, {
            name: "fontName",
            op: 1238,
            type: "SID"
          }],
          be = [{
            name: "subrs",
            op: 19,
            type: "offset",
            value: 0
          }, {
            name: "defaultWidthX",
            op: 20,
            type: "number",
            value: 0
          }, {
            name: "nominalWidthX",
            op: 21,
            type: "number",
            value: 0
          }];
        function xe(e, t) {
          return ye(ge(e, 0, e.byteLength), ve, t);
        }
        function Se(e, t, n, s) {
          return ye(ge(e, t, n), be, s);
        }
        function Ue(e, t, n, s) {
          const o = [];
          for (let r = 0; r < n.length; r += 1) {
            const a = xe(new DataView(new Uint8Array(n[r]).buffer), s);
            a._subrs = [], a._subrsBias = 0;
            const i = a.private[0],
              l = a.private[1];
            if (0 !== i && 0 !== l) {
              const n = Se(e, l + t, i, s);
              if (a._defaultWidthX = n.defaultWidthX, a._nominalWidthX = n.nominalWidthX, 0 !== n.subrs) {
                const s = he(e, l + n.subrs + t);
                a._subrs = s.objects, a._subrsBias = fe(a._subrs);
              }
              a._privateDict = n;
            }
            o.push(a);
          }
          return o;
        }
        function ke(e, t, n) {
          let s, o, r, a;
          const i = new u(),
            l = [];
          let c,
            p,
            f,
            h,
            d = 0,
            g = !1,
            m = !1,
            y = 0,
            v = 0;
          if (e.isCIDFont) {
            const n = e.tables.cff.topDict._fdSelect[t.index],
              s = e.tables.cff.topDict._fdArray[n];
            c = s._subrs, p = s._subrsBias, f = s._defaultWidthX, h = s._nominalWidthX;
          } else c = e.tables.cff.topDict._subrs, p = e.tables.cff.topDict._subrsBias, f = e.tables.cff.topDict._defaultWidthX, h = e.tables.cff.topDict._nominalWidthX;
          let b = f;
          function x(e, t) {
            m && i.closePath(), i.moveTo(e, t), m = !0;
          }
          function S() {
            let e;
            e = l.length % 2 != 0, e && !g && (b = l.shift() + h), d += l.length >> 1, l.length = 0, g = !0;
          }
          return function n(u) {
            let f,
              U,
              k,
              T,
              E,
              w,
              O,
              I,
              R,
              L,
              B,
              C,
              D = 0;
            for (; D < u.length;) {
              let M = u[D];
              switch (D += 1, M) {
                case 1:
                case 3:
                case 18:
                case 23:
                  S();
                  break;
                case 4:
                  l.length > 1 && !g && (b = l.shift() + h, g = !0), v += l.pop(), x(y, v);
                  break;
                case 5:
                  for (; l.length > 0;) y += l.shift(), v += l.shift(), i.lineTo(y, v);
                  break;
                case 6:
                  for (; l.length > 0 && (y += l.shift(), i.lineTo(y, v), 0 !== l.length);) v += l.shift(), i.lineTo(y, v);
                  break;
                case 7:
                  for (; l.length > 0 && (v += l.shift(), i.lineTo(y, v), 0 !== l.length);) y += l.shift(), i.lineTo(y, v);
                  break;
                case 8:
                  for (; l.length > 0;) s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                  break;
                case 10:
                  E = l.pop() + p, w = c[E], w && n(w);
                  break;
                case 11:
                  return;
                case 12:
                  switch (M = u[D], D += 1, M) {
                    case 35:
                      s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a + l.shift(), R = O + l.shift(), L = I + l.shift(), B = R + l.shift(), C = L + l.shift(), y = B + l.shift(), v = C + l.shift(), l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                      break;
                    case 34:
                      s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a, R = O + l.shift(), L = a, B = R + l.shift(), C = v, y = B + l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                      break;
                    case 36:
                      s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a, R = O + l.shift(), L = a, B = R + l.shift(), C = L + l.shift(), y = B + l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                      break;
                    case 37:
                      s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a + l.shift(), R = O + l.shift(), L = I + l.shift(), B = R + l.shift(), C = L + l.shift(), Math.abs(B - y) > Math.abs(C - v) ? y = B + l.shift() : v = C + l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                      break;
                    default:
                      console.log("Glyph " + t.index + ": unknown operator 1200" + M), l.length = 0;
                  }
                  break;
                case 14:
                  l.length > 0 && !g && (b = l.shift() + h, g = !0), m && (i.closePath(), m = !1);
                  break;
                case 19:
                case 20:
                  S(), D += d + 7 >> 3;
                  break;
                case 21:
                  l.length > 2 && !g && (b = l.shift() + h, g = !0), v += l.pop(), y += l.pop(), x(y, v);
                  break;
                case 22:
                  l.length > 1 && !g && (b = l.shift() + h, g = !0), y += l.pop(), x(y, v);
                  break;
                case 24:
                  for (; l.length > 2;) s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                  y += l.shift(), v += l.shift(), i.lineTo(y, v);
                  break;
                case 25:
                  for (; l.length > 6;) y += l.shift(), v += l.shift(), i.lineTo(y, v);
                  s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                  break;
                case 26:
                  for (l.length % 2 && (y += l.shift()); l.length > 0;) s = y, o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r, v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                  break;
                case 27:
                  for (l.length % 2 && (v += l.shift()); l.length > 0;) s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a, i.curveTo(s, o, r, a, y, v);
                  break;
                case 28:
                  f = u[D], U = u[D + 1], l.push((f << 24 | U << 16) >> 16), D += 2;
                  break;
                case 29:
                  E = l.pop() + e.gsubrsBias, w = e.gsubrs[E], w && n(w);
                  break;
                case 30:
                  for (; l.length > 0 && (s = y, o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v), 0 !== l.length);) s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), v = a + l.shift(), y = r + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v);
                  break;
                case 31:
                  for (; l.length > 0 && (s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), v = a + l.shift(), y = r + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v), 0 !== l.length);) s = y, o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v);
                  break;
                default:
                  M < 32 ? console.log("Glyph " + t.index + ": unknown operator " + M) : M < 247 ? l.push(M - 139) : M < 251 ? (f = u[D], D += 1, l.push(256 * (M - 247) + f + 108)) : M < 255 ? (f = u[D], D += 1, l.push(256 * -(M - 251) - f - 108)) : (f = u[D], U = u[D + 1], k = u[D + 2], T = u[D + 3], D += 4, l.push((f << 24 | U << 16 | k << 8 | T) / 65536));
              }
            }
          }(n), t.advanceWidth = b, i;
        }
        function Te(e, t) {
          let n,
            s = j.indexOf(e);
          return s >= 0 && (n = s), s = t.indexOf(e), s >= 0 ? n = s + j.length : (n = j.length + t.length, t.push(e)), n;
        }
        function Ee(e, t, n) {
          const s = {};
          for (let o = 0; o < e.length; o += 1) {
            const r = e[o];
            let a = t[r.name];
            void 0 === a || pe(a, r.value) || ("SID" === r.type && (a = Te(a, n)), s[r.op] = {
              name: r.name,
              type: r.type,
              value: a
            });
          }
          return s;
        }
        function we(e, t) {
          const n = new M.Record("Top DICT", [{
            name: "dict",
            type: "DICT",
            value: {}
          }]);
          return n.dict = Ee(ve, e, t), n;
        }
        function Oe(e) {
          const t = new M.Record("Top DICT INDEX", [{
            name: "topDicts",
            type: "INDEX",
            value: []
          }]);
          return t.topDicts = [{
            name: "topDict_0",
            type: "TABLE",
            value: e
          }], t;
        }
        function Ie(e) {
          const t = [],
            n = e.path;
          t.push({
            name: "width",
            type: "NUMBER",
            value: e.advanceWidth
          });
          let s = 0,
            o = 0;
          for (let e = 0; e < n.commands.length; e += 1) {
            let r,
              a,
              i = n.commands[e];
            if ("Q" === i.type) {
              const e = 1 / 3,
                t = 2 / 3;
              i = {
                type: "C",
                x: i.x,
                y: i.y,
                x1: e * s + t * i.x1,
                y1: e * o + t * i.y1,
                x2: e * i.x + t * i.x1,
                y2: e * i.y + t * i.y1
              };
            }
            if ("M" === i.type) r = Math.round(i.x - s), a = Math.round(i.y - o), t.push({
              name: "dx",
              type: "NUMBER",
              value: r
            }), t.push({
              name: "dy",
              type: "NUMBER",
              value: a
            }), t.push({
              name: "rmoveto",
              type: "OP",
              value: 21
            }), s = Math.round(i.x), o = Math.round(i.y);else if ("L" === i.type) r = Math.round(i.x - s), a = Math.round(i.y - o), t.push({
              name: "dx",
              type: "NUMBER",
              value: r
            }), t.push({
              name: "dy",
              type: "NUMBER",
              value: a
            }), t.push({
              name: "rlineto",
              type: "OP",
              value: 5
            }), s = Math.round(i.x), o = Math.round(i.y);else if ("C" === i.type) {
              const e = Math.round(i.x1 - s),
                n = Math.round(i.y1 - o),
                l = Math.round(i.x2 - i.x1),
                u = Math.round(i.y2 - i.y1);
              r = Math.round(i.x - i.x2), a = Math.round(i.y - i.y2), t.push({
                name: "dx1",
                type: "NUMBER",
                value: e
              }), t.push({
                name: "dy1",
                type: "NUMBER",
                value: n
              }), t.push({
                name: "dx2",
                type: "NUMBER",
                value: l
              }), t.push({
                name: "dy2",
                type: "NUMBER",
                value: u
              }), t.push({
                name: "dx",
                type: "NUMBER",
                value: r
              }), t.push({
                name: "dy",
                type: "NUMBER",
                value: a
              }), t.push({
                name: "rrcurveto",
                type: "OP",
                value: 8
              }), s = Math.round(i.x), o = Math.round(i.y);
            }
          }
          return t.push({
            name: "endchar",
            type: "OP",
            value: 14
          }), t;
        }
        const Re = {
            parse: function (e, t, n) {
              n.tables.cff = {};
              const s = function (e, t) {
                  const n = {};
                  return n.formatMajor = z.getCard8(e, t), n.formatMinor = z.getCard8(e, t + 1), n.size = z.getCard8(e, t + 2), n.offsetSize = z.getCard8(e, t + 3), n.startOffset = t, n.endOffset = t + 4, n;
                }(e, t),
                o = he(e, s.endOffset, z.bytesToString),
                r = he(e, o.endOffset),
                a = he(e, r.endOffset, z.bytesToString),
                i = he(e, a.endOffset);
              n.gsubrs = i.objects, n.gsubrsBias = fe(n.gsubrs);
              const l = Ue(e, t, r.objects, a.objects);
              if (1 !== l.length) throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + l.length);
              const u = l[0];
              if (n.tables.cff.topDict = u, u._privateDict && (n.defaultWidthX = u._privateDict.defaultWidthX, n.nominalWidthX = u._privateDict.nominalWidthX), void 0 !== u.ros[0] && void 0 !== u.ros[1] && (n.isCIDFont = !0), n.isCIDFont) {
                let s = u.fdArray,
                  o = u.fdSelect;
                if (0 === s || 0 === o) throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
                s += t;
                const r = Ue(e, t, he(e, s).objects, a.objects);
                u._fdArray = r, o += t, u._fdSelect = function (e, t, n, s) {
                  const o = [];
                  let r;
                  const a = new z.Parser(e, t),
                    i = a.parseCard8();
                  if (0 === i) for (let e = 0; e < n; e++) {
                    if (r = a.parseCard8(), r >= s) throw new Error("CFF table CID Font FDSelect has bad FD index value " + r + " (FD count " + s + ")");
                    o.push(r);
                  } else {
                    if (3 !== i) throw new Error("CFF Table CID Font FDSelect table has unsupported format " + i);
                    {
                      const e = a.parseCard16();
                      let t,
                        i = a.parseCard16();
                      if (0 !== i) throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID " + i);
                      for (let l = 0; l < e; l++) {
                        if (r = a.parseCard8(), t = a.parseCard16(), r >= s) throw new Error("CFF table CID Font FDSelect has bad FD index value " + r + " (FD count " + s + ")");
                        if (t > n) throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID " + t);
                        for (; i < t; i++) o.push(r);
                        i = t;
                      }
                      if (t !== n) throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID " + t);
                    }
                  }
                  return o;
                }(e, o, n.numGlyphs, r.length);
              }
              const c = t + u.private[1],
                p = Se(e, c, u.private[0], a.objects);
              if (n.defaultWidthX = p.defaultWidthX, n.nominalWidthX = p.nominalWidthX, 0 !== p.subrs) {
                const t = he(e, c + p.subrs);
                n.subrs = t.objects, n.subrsBias = fe(n.subrs);
              } else n.subrs = [], n.subrsBias = 0;
              const f = he(e, t + u.charStrings);
              n.nGlyphs = f.objects.length;
              const h = function (e, t, n, s) {
                let o, r;
                const a = new z.Parser(e, t);
                n -= 1;
                const i = [".notdef"],
                  l = a.parseCard8();
                if (0 === l) for (let e = 0; e < n; e += 1) o = a.parseSID(), i.push(me(s, o));else if (1 === l) for (; i.length <= n;) {
                  o = a.parseSID(), r = a.parseCard8();
                  for (let e = 0; e <= r; e += 1) i.push(me(s, o)), o += 1;
                } else {
                  if (2 !== l) throw new Error("Unknown charset format " + l);
                  for (; i.length <= n;) {
                    o = a.parseSID(), r = a.parseCard16();
                    for (let e = 0; e <= r; e += 1) i.push(me(s, o)), o += 1;
                  }
                }
                return i;
              }(e, t + u.charset, n.nGlyphs, a.objects);
              0 === u.encoding ? n.cffEncoding = new J(X, h) : 1 === u.encoding ? n.cffEncoding = new J(V, h) : n.cffEncoding = function (e, t, n) {
                let s;
                const o = {},
                  r = new z.Parser(e, t),
                  a = r.parseCard8();
                if (0 === a) {
                  const e = r.parseCard8();
                  for (let t = 0; t < e; t += 1) s = r.parseCard8(), o[s] = t;
                } else {
                  if (1 !== a) throw new Error("Unknown encoding format " + a);
                  {
                    const e = r.parseCard8();
                    s = 1;
                    for (let t = 0; t < e; t += 1) {
                      const e = r.parseCard8(),
                        t = r.parseCard8();
                      for (let n = e; n <= e + t; n += 1) o[n] = s, s += 1;
                    }
                  }
                }
                return new J(o, n);
              }(e, t + u.encoding, h), n.encoding = n.encoding || n.cffEncoding, n.glyphs = new ce.GlyphSet(n);
              for (let e = 0; e < n.nGlyphs; e += 1) {
                const t = f.objects[e];
                n.glyphs.push(e, ce.cffGlyphLoader(n, e, ke, t));
              }
            },
            make: function (e, t) {
              const n = new M.Table("CFF ", [{
                  name: "header",
                  type: "RECORD"
                }, {
                  name: "nameIndex",
                  type: "RECORD"
                }, {
                  name: "topDictIndex",
                  type: "RECORD"
                }, {
                  name: "stringIndex",
                  type: "RECORD"
                }, {
                  name: "globalSubrIndex",
                  type: "RECORD"
                }, {
                  name: "charsets",
                  type: "RECORD"
                }, {
                  name: "charStringsIndex",
                  type: "RECORD"
                }, {
                  name: "privateDict",
                  type: "RECORD"
                }]),
                s = 1 / t.unitsPerEm,
                o = {
                  version: t.version,
                  fullName: t.fullName,
                  familyName: t.familyName,
                  weight: t.weightName,
                  fontBBox: t.fontBBox || [0, 0, 0, 0],
                  fontMatrix: [s, 0, 0, s, 0, 0],
                  charset: 999,
                  encoding: 0,
                  charStrings: 999,
                  private: [0, 999]
                },
                r = [];
              let a;
              for (let t = 1; t < e.length; t += 1) a = e.get(t), r.push(a.name);
              const i = [];
              n.header = new M.Record("Header", [{
                name: "major",
                type: "Card8",
                value: 1
              }, {
                name: "minor",
                type: "Card8",
                value: 0
              }, {
                name: "hdrSize",
                type: "Card8",
                value: 4
              }, {
                name: "major",
                type: "Card8",
                value: 1
              }]), n.nameIndex = function (e) {
                const t = new M.Record("Name INDEX", [{
                  name: "names",
                  type: "INDEX",
                  value: []
                }]);
                t.names = [];
                for (let n = 0; n < e.length; n += 1) t.names.push({
                  name: "name_" + n,
                  type: "NAME",
                  value: e[n]
                });
                return t;
              }([t.postScriptName]);
              let l = we(o, i);
              n.topDictIndex = Oe(l), n.globalSubrIndex = new M.Record("Global Subr INDEX", [{
                name: "subrs",
                type: "INDEX",
                value: []
              }]), n.charsets = function (e, t) {
                const n = new M.Record("Charsets", [{
                  name: "format",
                  type: "Card8",
                  value: 0
                }]);
                for (let s = 0; s < e.length; s += 1) {
                  const o = Te(e[s], t);
                  n.fields.push({
                    name: "glyph_" + s,
                    type: "SID",
                    value: o
                  });
                }
                return n;
              }(r, i), n.charStringsIndex = function (e) {
                const t = new M.Record("CharStrings INDEX", [{
                  name: "charStrings",
                  type: "INDEX",
                  value: []
                }]);
                for (let n = 0; n < e.length; n += 1) {
                  const s = e.get(n),
                    o = Ie(s);
                  t.charStrings.push({
                    name: s.name,
                    type: "CHARSTRING",
                    value: o
                  });
                }
                return t;
              }(e), n.privateDict = function (e, t) {
                const n = new M.Record("Private DICT", [{
                  name: "dict",
                  type: "DICT",
                  value: {}
                }]);
                return n.dict = Ee(be, {}, t), n;
              }(0, i), n.stringIndex = function (e) {
                const t = new M.Record("String INDEX", [{
                  name: "strings",
                  type: "INDEX",
                  value: []
                }]);
                t.strings = [];
                for (let n = 0; n < e.length; n += 1) t.strings.push({
                  name: "string_" + n,
                  type: "STRING",
                  value: e[n]
                });
                return t;
              }(i);
              const u = n.header.sizeOf() + n.nameIndex.sizeOf() + n.topDictIndex.sizeOf() + n.stringIndex.sizeOf() + n.globalSubrIndex.sizeOf();
              return o.charset = u, o.encoding = 0, o.charStrings = o.charset + n.charsets.sizeOf(), o.private[1] = o.charStrings + n.charStringsIndex.sizeOf(), l = we(o, i), n.topDictIndex = Oe(l), n;
            }
          },
          Le = {
            parse: function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              return n.version = s.parseVersion(), n.fontRevision = Math.round(1e3 * s.parseFixed()) / 1e3, n.checkSumAdjustment = s.parseULong(), n.magicNumber = s.parseULong(), f.argument(1594834165 === n.magicNumber, "Font header has wrong magic number."), n.flags = s.parseUShort(), n.unitsPerEm = s.parseUShort(), n.created = s.parseLongDateTime(), n.modified = s.parseLongDateTime(), n.xMin = s.parseShort(), n.yMin = s.parseShort(), n.xMax = s.parseShort(), n.yMax = s.parseShort(), n.macStyle = s.parseUShort(), n.lowestRecPPEM = s.parseUShort(), n.fontDirectionHint = s.parseShort(), n.indexToLocFormat = s.parseShort(), n.glyphDataFormat = s.parseShort(), n;
            },
            make: function (e) {
              const t = Math.round(new Date().getTime() / 1e3) + 2082844800;
              let n = t;
              return e.createdTimestamp && (n = e.createdTimestamp + 2082844800), new M.Table("head", [{
                name: "version",
                type: "FIXED",
                value: 65536
              }, {
                name: "fontRevision",
                type: "FIXED",
                value: 65536
              }, {
                name: "checkSumAdjustment",
                type: "ULONG",
                value: 0
              }, {
                name: "magicNumber",
                type: "ULONG",
                value: 1594834165
              }, {
                name: "flags",
                type: "USHORT",
                value: 0
              }, {
                name: "unitsPerEm",
                type: "USHORT",
                value: 1e3
              }, {
                name: "created",
                type: "LONGDATETIME",
                value: n
              }, {
                name: "modified",
                type: "LONGDATETIME",
                value: t
              }, {
                name: "xMin",
                type: "SHORT",
                value: 0
              }, {
                name: "yMin",
                type: "SHORT",
                value: 0
              }, {
                name: "xMax",
                type: "SHORT",
                value: 0
              }, {
                name: "yMax",
                type: "SHORT",
                value: 0
              }, {
                name: "macStyle",
                type: "USHORT",
                value: 0
              }, {
                name: "lowestRecPPEM",
                type: "USHORT",
                value: 0
              }, {
                name: "fontDirectionHint",
                type: "SHORT",
                value: 2
              }, {
                name: "indexToLocFormat",
                type: "SHORT",
                value: 0
              }, {
                name: "glyphDataFormat",
                type: "SHORT",
                value: 0
              }], e);
            }
          },
          Be = {
            parse: function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              return n.version = s.parseVersion(), n.ascender = s.parseShort(), n.descender = s.parseShort(), n.lineGap = s.parseShort(), n.advanceWidthMax = s.parseUShort(), n.minLeftSideBearing = s.parseShort(), n.minRightSideBearing = s.parseShort(), n.xMaxExtent = s.parseShort(), n.caretSlopeRise = s.parseShort(), n.caretSlopeRun = s.parseShort(), n.caretOffset = s.parseShort(), s.relativeOffset += 8, n.metricDataFormat = s.parseShort(), n.numberOfHMetrics = s.parseUShort(), n;
            },
            make: function (e) {
              return new M.Table("hhea", [{
                name: "version",
                type: "FIXED",
                value: 65536
              }, {
                name: "ascender",
                type: "FWORD",
                value: 0
              }, {
                name: "descender",
                type: "FWORD",
                value: 0
              }, {
                name: "lineGap",
                type: "FWORD",
                value: 0
              }, {
                name: "advanceWidthMax",
                type: "UFWORD",
                value: 0
              }, {
                name: "minLeftSideBearing",
                type: "FWORD",
                value: 0
              }, {
                name: "minRightSideBearing",
                type: "FWORD",
                value: 0
              }, {
                name: "xMaxExtent",
                type: "FWORD",
                value: 0
              }, {
                name: "caretSlopeRise",
                type: "SHORT",
                value: 1
              }, {
                name: "caretSlopeRun",
                type: "SHORT",
                value: 0
              }, {
                name: "caretOffset",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved1",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved2",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved3",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved4",
                type: "SHORT",
                value: 0
              }, {
                name: "metricDataFormat",
                type: "SHORT",
                value: 0
              }, {
                name: "numberOfHMetrics",
                type: "USHORT",
                value: 0
              }], e);
            }
          },
          Ce = {
            parse: function (e, t, n, s, o) {
              let r, a;
              const i = new z.Parser(e, t);
              for (let e = 0; e < s; e += 1) {
                e < n && (r = i.parseUShort(), a = i.parseShort());
                const t = o.get(e);
                t.advanceWidth = r, t.leftSideBearing = a;
              }
            },
            make: function (e) {
              const t = new M.Table("hmtx", []);
              for (let n = 0; n < e.length; n += 1) {
                const s = e.get(n),
                  o = s.advanceWidth || 0,
                  r = s.leftSideBearing || 0;
                t.fields.push({
                  name: "advanceWidth_" + n,
                  type: "USHORT",
                  value: o
                }), t.fields.push({
                  name: "leftSideBearing_" + n,
                  type: "SHORT",
                  value: r
                });
              }
              return t;
            }
          },
          De = {
            make: function (e) {
              const t = new M.Table("ltag", [{
                name: "version",
                type: "ULONG",
                value: 1
              }, {
                name: "flags",
                type: "ULONG",
                value: 0
              }, {
                name: "numTags",
                type: "ULONG",
                value: e.length
              }]);
              let n = "";
              const s = 12 + 4 * e.length;
              for (let o = 0; o < e.length; ++o) {
                let r = n.indexOf(e[o]);
                r < 0 && (r = n.length, n += e[o]), t.fields.push({
                  name: "offset " + o,
                  type: "USHORT",
                  value: s + r
                }), t.fields.push({
                  name: "length " + o,
                  type: "USHORT",
                  value: e[o].length
                });
              }
              return t.fields.push({
                name: "stringPool",
                type: "CHARARRAY",
                value: n
              }), t;
            },
            parse: function (e, t) {
              const n = new z.Parser(e, t),
                s = n.parseULong();
              f.argument(1 === s, "Unsupported ltag table version."), n.skip("uLong", 1);
              const o = n.parseULong(),
                r = [];
              for (let s = 0; s < o; s++) {
                let s = "";
                const o = t + n.parseUShort(),
                  a = n.parseUShort();
                for (let t = o; t < o + a; ++t) s += String.fromCharCode(e.getInt8(t));
                r.push(s);
              }
              return r;
            }
          },
          Me = {
            parse: function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              return n.version = s.parseVersion(), n.numGlyphs = s.parseUShort(), 1 === n.version && (n.maxPoints = s.parseUShort(), n.maxContours = s.parseUShort(), n.maxCompositePoints = s.parseUShort(), n.maxCompositeContours = s.parseUShort(), n.maxZones = s.parseUShort(), n.maxTwilightPoints = s.parseUShort(), n.maxStorage = s.parseUShort(), n.maxFunctionDefs = s.parseUShort(), n.maxInstructionDefs = s.parseUShort(), n.maxStackElements = s.parseUShort(), n.maxSizeOfInstructions = s.parseUShort(), n.maxComponentElements = s.parseUShort(), n.maxComponentDepth = s.parseUShort()), n;
            },
            make: function (e) {
              return new M.Table("maxp", [{
                name: "version",
                type: "FIXED",
                value: 20480
              }, {
                name: "numGlyphs",
                type: "USHORT",
                value: e
              }]);
            }
          },
          Ae = ["copyright", "fontFamily", "fontSubfamily", "uniqueID", "fullName", "version", "postScriptName", "trademark", "manufacturer", "designer", "description", "manufacturerURL", "designerURL", "license", "licenseURL", "reserved", "preferredFamily", "preferredSubfamily", "compatibleFullName", "sampleText", "postScriptFindFontName", "wwsFamily", "wwsSubfamily"],
          Pe = {
            0: "en",
            1: "fr",
            2: "de",
            3: "it",
            4: "nl",
            5: "sv",
            6: "es",
            7: "da",
            8: "pt",
            9: "no",
            10: "he",
            11: "ja",
            12: "ar",
            13: "fi",
            14: "el",
            15: "is",
            16: "mt",
            17: "tr",
            18: "hr",
            19: "zh-Hant",
            20: "ur",
            21: "hi",
            22: "th",
            23: "ko",
            24: "lt",
            25: "pl",
            26: "hu",
            27: "es",
            28: "lv",
            29: "se",
            30: "fo",
            31: "fa",
            32: "ru",
            33: "zh",
            34: "nl-BE",
            35: "ga",
            36: "sq",
            37: "ro",
            38: "cz",
            39: "sk",
            40: "si",
            41: "yi",
            42: "sr",
            43: "mk",
            44: "bg",
            45: "uk",
            46: "be",
            47: "uz",
            48: "kk",
            49: "az-Cyrl",
            50: "az-Arab",
            51: "hy",
            52: "ka",
            53: "mo",
            54: "ky",
            55: "tg",
            56: "tk",
            57: "mn-CN",
            58: "mn",
            59: "ps",
            60: "ks",
            61: "ku",
            62: "sd",
            63: "bo",
            64: "ne",
            65: "sa",
            66: "mr",
            67: "bn",
            68: "as",
            69: "gu",
            70: "pa",
            71: "or",
            72: "ml",
            73: "kn",
            74: "ta",
            75: "te",
            76: "si",
            77: "my",
            78: "km",
            79: "lo",
            80: "vi",
            81: "id",
            82: "tl",
            83: "ms",
            84: "ms-Arab",
            85: "am",
            86: "ti",
            87: "om",
            88: "so",
            89: "sw",
            90: "rw",
            91: "rn",
            92: "ny",
            93: "mg",
            94: "eo",
            128: "cy",
            129: "eu",
            130: "ca",
            131: "la",
            132: "qu",
            133: "gn",
            134: "ay",
            135: "tt",
            136: "ug",
            137: "dz",
            138: "jv",
            139: "su",
            140: "gl",
            141: "af",
            142: "br",
            143: "iu",
            144: "gd",
            145: "gv",
            146: "ga",
            147: "to",
            148: "el-polyton",
            149: "kl",
            150: "az",
            151: "nn"
          },
          Ge = {
            0: 0,
            1: 0,
            2: 0,
            3: 0,
            4: 0,
            5: 0,
            6: 0,
            7: 0,
            8: 0,
            9: 0,
            10: 5,
            11: 1,
            12: 4,
            13: 0,
            14: 6,
            15: 0,
            16: 0,
            17: 0,
            18: 0,
            19: 2,
            20: 4,
            21: 9,
            22: 21,
            23: 3,
            24: 29,
            25: 29,
            26: 29,
            27: 29,
            28: 29,
            29: 0,
            30: 0,
            31: 4,
            32: 7,
            33: 25,
            34: 0,
            35: 0,
            36: 0,
            37: 0,
            38: 29,
            39: 29,
            40: 0,
            41: 5,
            42: 7,
            43: 7,
            44: 7,
            45: 7,
            46: 7,
            47: 7,
            48: 7,
            49: 7,
            50: 4,
            51: 24,
            52: 23,
            53: 7,
            54: 7,
            55: 7,
            56: 7,
            57: 27,
            58: 7,
            59: 4,
            60: 4,
            61: 4,
            62: 4,
            63: 26,
            64: 9,
            65: 9,
            66: 9,
            67: 13,
            68: 13,
            69: 11,
            70: 10,
            71: 12,
            72: 17,
            73: 16,
            74: 14,
            75: 15,
            76: 18,
            77: 19,
            78: 20,
            79: 22,
            80: 30,
            81: 0,
            82: 0,
            83: 0,
            84: 4,
            85: 28,
            86: 28,
            87: 28,
            88: 0,
            89: 0,
            90: 0,
            91: 0,
            92: 0,
            93: 0,
            94: 0,
            128: 0,
            129: 0,
            130: 0,
            131: 0,
            132: 0,
            133: 0,
            134: 0,
            135: 7,
            136: 4,
            137: 26,
            138: 0,
            139: 0,
            140: 0,
            141: 0,
            142: 0,
            143: 28,
            144: 0,
            145: 0,
            146: 0,
            147: 0,
            148: 6,
            149: 0,
            150: 0,
            151: 0
          },
          Ne = {
            1078: "af",
            1052: "sq",
            1156: "gsw",
            1118: "am",
            5121: "ar-DZ",
            15361: "ar-BH",
            3073: "ar",
            2049: "ar-IQ",
            11265: "ar-JO",
            13313: "ar-KW",
            12289: "ar-LB",
            4097: "ar-LY",
            6145: "ary",
            8193: "ar-OM",
            16385: "ar-QA",
            1025: "ar-SA",
            10241: "ar-SY",
            7169: "aeb",
            14337: "ar-AE",
            9217: "ar-YE",
            1067: "hy",
            1101: "as",
            2092: "az-Cyrl",
            1068: "az",
            1133: "ba",
            1069: "eu",
            1059: "be",
            2117: "bn",
            1093: "bn-IN",
            8218: "bs-Cyrl",
            5146: "bs",
            1150: "br",
            1026: "bg",
            1027: "ca",
            3076: "zh-HK",
            5124: "zh-MO",
            2052: "zh",
            4100: "zh-SG",
            1028: "zh-TW",
            1155: "co",
            1050: "hr",
            4122: "hr-BA",
            1029: "cs",
            1030: "da",
            1164: "prs",
            1125: "dv",
            2067: "nl-BE",
            1043: "nl",
            3081: "en-AU",
            10249: "en-BZ",
            4105: "en-CA",
            9225: "en-029",
            16393: "en-IN",
            6153: "en-IE",
            8201: "en-JM",
            17417: "en-MY",
            5129: "en-NZ",
            13321: "en-PH",
            18441: "en-SG",
            7177: "en-ZA",
            11273: "en-TT",
            2057: "en-GB",
            1033: "en",
            12297: "en-ZW",
            1061: "et",
            1080: "fo",
            1124: "fil",
            1035: "fi",
            2060: "fr-BE",
            3084: "fr-CA",
            1036: "fr",
            5132: "fr-LU",
            6156: "fr-MC",
            4108: "fr-CH",
            1122: "fy",
            1110: "gl",
            1079: "ka",
            3079: "de-AT",
            1031: "de",
            5127: "de-LI",
            4103: "de-LU",
            2055: "de-CH",
            1032: "el",
            1135: "kl",
            1095: "gu",
            1128: "ha",
            1037: "he",
            1081: "hi",
            1038: "hu",
            1039: "is",
            1136: "ig",
            1057: "id",
            1117: "iu",
            2141: "iu-Latn",
            2108: "ga",
            1076: "xh",
            1077: "zu",
            1040: "it",
            2064: "it-CH",
            1041: "ja",
            1099: "kn",
            1087: "kk",
            1107: "km",
            1158: "quc",
            1159: "rw",
            1089: "sw",
            1111: "kok",
            1042: "ko",
            1088: "ky",
            1108: "lo",
            1062: "lv",
            1063: "lt",
            2094: "dsb",
            1134: "lb",
            1071: "mk",
            2110: "ms-BN",
            1086: "ms",
            1100: "ml",
            1082: "mt",
            1153: "mi",
            1146: "arn",
            1102: "mr",
            1148: "moh",
            1104: "mn",
            2128: "mn-CN",
            1121: "ne",
            1044: "nb",
            2068: "nn",
            1154: "oc",
            1096: "or",
            1123: "ps",
            1045: "pl",
            1046: "pt",
            2070: "pt-PT",
            1094: "pa",
            1131: "qu-BO",
            2155: "qu-EC",
            3179: "qu",
            1048: "ro",
            1047: "rm",
            1049: "ru",
            9275: "smn",
            4155: "smj-NO",
            5179: "smj",
            3131: "se-FI",
            1083: "se",
            2107: "se-SE",
            8251: "sms",
            6203: "sma-NO",
            7227: "sms",
            1103: "sa",
            7194: "sr-Cyrl-BA",
            3098: "sr",
            6170: "sr-Latn-BA",
            2074: "sr-Latn",
            1132: "nso",
            1074: "tn",
            1115: "si",
            1051: "sk",
            1060: "sl",
            11274: "es-AR",
            16394: "es-BO",
            13322: "es-CL",
            9226: "es-CO",
            5130: "es-CR",
            7178: "es-DO",
            12298: "es-EC",
            17418: "es-SV",
            4106: "es-GT",
            18442: "es-HN",
            2058: "es-MX",
            19466: "es-NI",
            6154: "es-PA",
            15370: "es-PY",
            10250: "es-PE",
            20490: "es-PR",
            3082: "es",
            1034: "es",
            21514: "es-US",
            14346: "es-UY",
            8202: "es-VE",
            2077: "sv-FI",
            1053: "sv",
            1114: "syr",
            1064: "tg",
            2143: "tzm",
            1097: "ta",
            1092: "tt",
            1098: "te",
            1054: "th",
            1105: "bo",
            1055: "tr",
            1090: "tk",
            1152: "ug",
            1058: "uk",
            1070: "hsb",
            1056: "ur",
            2115: "uz-Cyrl",
            1091: "uz",
            1066: "vi",
            1106: "cy",
            1160: "wo",
            1157: "sah",
            1144: "ii",
            1130: "yo"
          };
        function Fe(e, t, n) {
          switch (e) {
            case 0:
              if (65535 === t) return "und";
              if (n) return n[t];
              break;
            case 1:
              return Pe[t];
            case 3:
              return Ne[t];
          }
        }
        const _e = "utf-16",
          He = {
            0: "macintosh",
            1: "x-mac-japanese",
            2: "x-mac-chinesetrad",
            3: "x-mac-korean",
            6: "x-mac-greek",
            7: "x-mac-cyrillic",
            9: "x-mac-devanagai",
            10: "x-mac-gurmukhi",
            11: "x-mac-gujarati",
            12: "x-mac-oriya",
            13: "x-mac-bengali",
            14: "x-mac-tamil",
            15: "x-mac-telugu",
            16: "x-mac-kannada",
            17: "x-mac-malayalam",
            18: "x-mac-sinhalese",
            19: "x-mac-burmese",
            20: "x-mac-khmer",
            21: "x-mac-thai",
            22: "x-mac-lao",
            23: "x-mac-georgian",
            24: "x-mac-armenian",
            25: "x-mac-chinesesimp",
            26: "x-mac-tibetan",
            27: "x-mac-mongolian",
            28: "x-mac-ethiopic",
            29: "x-mac-ce",
            30: "x-mac-vietnamese",
            31: "x-mac-extarabic"
          },
          ze = {
            15: "x-mac-icelandic",
            17: "x-mac-turkish",
            18: "x-mac-croatian",
            24: "x-mac-ce",
            25: "x-mac-ce",
            26: "x-mac-ce",
            27: "x-mac-ce",
            28: "x-mac-ce",
            30: "x-mac-icelandic",
            37: "x-mac-romanian",
            38: "x-mac-ce",
            39: "x-mac-ce",
            40: "x-mac-ce",
            143: "x-mac-inuit",
            146: "x-mac-gaelic"
          };
        function We(e, t, n) {
          switch (e) {
            case 0:
              return _e;
            case 1:
              return ze[n] || He[t];
            case 3:
              if (1 === t || 10 === t) return _e;
          }
        }
        function qe(e) {
          const t = {};
          for (let n in e) t[e[n]] = parseInt(n);
          return t;
        }
        function je(e, t, n, s, o, r) {
          return new M.Record("NameRecord", [{
            name: "platformID",
            type: "USHORT",
            value: e
          }, {
            name: "encodingID",
            type: "USHORT",
            value: t
          }, {
            name: "languageID",
            type: "USHORT",
            value: n
          }, {
            name: "nameID",
            type: "USHORT",
            value: s
          }, {
            name: "length",
            type: "USHORT",
            value: o
          }, {
            name: "offset",
            type: "USHORT",
            value: r
          }]);
        }
        function Xe(e, t) {
          let n = function (e, t) {
            const n = e.length,
              s = t.length - n + 1;
            e: for (let o = 0; o < s; o++) for (; o < s; o++) {
              for (let s = 0; s < n; s++) if (t[o + s] !== e[s]) continue e;
              return o;
            }
            return -1;
          }(e, t);
          if (n < 0) {
            n = t.length;
            let s = 0;
            const o = e.length;
            for (; s < o; ++s) t.push(e[s]);
          }
          return n;
        }
        const Ve = {
            parse: function (e, t, n) {
              const s = {},
                o = new z.Parser(e, t),
                r = o.parseUShort(),
                a = o.parseUShort(),
                i = o.offset + o.parseUShort();
              for (let t = 0; t < a; t++) {
                const t = o.parseUShort(),
                  r = o.parseUShort(),
                  a = o.parseUShort(),
                  l = o.parseUShort(),
                  u = Ae[l] || l,
                  c = o.parseUShort(),
                  p = o.parseUShort(),
                  f = Fe(t, a, n),
                  h = We(t, r, a);
                if (void 0 !== h && void 0 !== f) {
                  let t;
                  if (t = h === _e ? d.UTF16(e, i + p, c) : d.MACSTRING(e, i + p, c, h), t) {
                    let e = s[u];
                    void 0 === e && (e = s[u] = {}), e[f] = t;
                  }
                }
              }
              let l = 0;
              return 1 === r && o.parseUShort(), s;
            },
            make: function (e, t) {
              let n;
              const s = [],
                o = {},
                r = qe(Ae);
              for (let t in e) {
                let a = r[t];
                if (void 0 === a && (a = t), n = parseInt(a), isNaN(n)) throw new Error('Name table entry "' + t + '" does not exist, see nameTableNames for complete list.');
                o[n] = e[t], s.push(n);
              }
              const a = qe(Pe),
                i = qe(Ne),
                l = [],
                u = [];
              for (let e = 0; e < s.length; e++) {
                n = s[e];
                const r = o[n];
                for (let e in r) {
                  const s = r[e];
                  let o = 1,
                    c = a[e],
                    p = Ge[c];
                  const f = We(o, p, c);
                  let h = g.MACSTRING(s, f);
                  void 0 === h && (o = 0, c = t.indexOf(e), c < 0 && (c = t.length, t.push(e)), p = 4, h = g.UTF16(s));
                  const d = Xe(h, u);
                  l.push(je(o, p, c, n, h.length, d));
                  const m = i[e];
                  if (void 0 !== m) {
                    const e = g.UTF16(s),
                      t = Xe(e, u);
                    l.push(je(3, 1, m, n, e.length, t));
                  }
                }
              }
              l.sort(function (e, t) {
                return e.platformID - t.platformID || e.encodingID - t.encodingID || e.languageID - t.languageID || e.nameID - t.nameID;
              });
              const c = new M.Table("name", [{
                name: "format",
                type: "USHORT",
                value: 0
              }, {
                name: "count",
                type: "USHORT",
                value: l.length
              }, {
                name: "stringOffset",
                type: "USHORT",
                value: 6 + 12 * l.length
              }]);
              for (let e = 0; e < l.length; e++) c.fields.push({
                name: "record_" + e,
                type: "RECORD",
                value: l[e]
              });
              return c.fields.push({
                name: "strings",
                type: "LITERAL",
                value: u
              }), c;
            }
          },
          Ye = [{
            begin: 0,
            end: 127
          }, {
            begin: 128,
            end: 255
          }, {
            begin: 256,
            end: 383
          }, {
            begin: 384,
            end: 591
          }, {
            begin: 592,
            end: 687
          }, {
            begin: 688,
            end: 767
          }, {
            begin: 768,
            end: 879
          }, {
            begin: 880,
            end: 1023
          }, {
            begin: 11392,
            end: 11519
          }, {
            begin: 1024,
            end: 1279
          }, {
            begin: 1328,
            end: 1423
          }, {
            begin: 1424,
            end: 1535
          }, {
            begin: 42240,
            end: 42559
          }, {
            begin: 1536,
            end: 1791
          }, {
            begin: 1984,
            end: 2047
          }, {
            begin: 2304,
            end: 2431
          }, {
            begin: 2432,
            end: 2559
          }, {
            begin: 2560,
            end: 2687
          }, {
            begin: 2688,
            end: 2815
          }, {
            begin: 2816,
            end: 2943
          }, {
            begin: 2944,
            end: 3071
          }, {
            begin: 3072,
            end: 3199
          }, {
            begin: 3200,
            end: 3327
          }, {
            begin: 3328,
            end: 3455
          }, {
            begin: 3584,
            end: 3711
          }, {
            begin: 3712,
            end: 3839
          }, {
            begin: 4256,
            end: 4351
          }, {
            begin: 6912,
            end: 7039
          }, {
            begin: 4352,
            end: 4607
          }, {
            begin: 7680,
            end: 7935
          }, {
            begin: 7936,
            end: 8191
          }, {
            begin: 8192,
            end: 8303
          }, {
            begin: 8304,
            end: 8351
          }, {
            begin: 8352,
            end: 8399
          }, {
            begin: 8400,
            end: 8447
          }, {
            begin: 8448,
            end: 8527
          }, {
            begin: 8528,
            end: 8591
          }, {
            begin: 8592,
            end: 8703
          }, {
            begin: 8704,
            end: 8959
          }, {
            begin: 8960,
            end: 9215
          }, {
            begin: 9216,
            end: 9279
          }, {
            begin: 9280,
            end: 9311
          }, {
            begin: 9312,
            end: 9471
          }, {
            begin: 9472,
            end: 9599
          }, {
            begin: 9600,
            end: 9631
          }, {
            begin: 9632,
            end: 9727
          }, {
            begin: 9728,
            end: 9983
          }, {
            begin: 9984,
            end: 10175
          }, {
            begin: 12288,
            end: 12351
          }, {
            begin: 12352,
            end: 12447
          }, {
            begin: 12448,
            end: 12543
          }, {
            begin: 12544,
            end: 12591
          }, {
            begin: 12592,
            end: 12687
          }, {
            begin: 43072,
            end: 43135
          }, {
            begin: 12800,
            end: 13055
          }, {
            begin: 13056,
            end: 13311
          }, {
            begin: 44032,
            end: 55215
          }, {
            begin: 55296,
            end: 57343
          }, {
            begin: 67840,
            end: 67871
          }, {
            begin: 19968,
            end: 40959
          }, {
            begin: 57344,
            end: 63743
          }, {
            begin: 12736,
            end: 12783
          }, {
            begin: 64256,
            end: 64335
          }, {
            begin: 64336,
            end: 65023
          }, {
            begin: 65056,
            end: 65071
          }, {
            begin: 65040,
            end: 65055
          }, {
            begin: 65104,
            end: 65135
          }, {
            begin: 65136,
            end: 65279
          }, {
            begin: 65280,
            end: 65519
          }, {
            begin: 65520,
            end: 65535
          }, {
            begin: 3840,
            end: 4095
          }, {
            begin: 1792,
            end: 1871
          }, {
            begin: 1920,
            end: 1983
          }, {
            begin: 3456,
            end: 3583
          }, {
            begin: 4096,
            end: 4255
          }, {
            begin: 4608,
            end: 4991
          }, {
            begin: 5024,
            end: 5119
          }, {
            begin: 5120,
            end: 5759
          }, {
            begin: 5760,
            end: 5791
          }, {
            begin: 5792,
            end: 5887
          }, {
            begin: 6016,
            end: 6143
          }, {
            begin: 6144,
            end: 6319
          }, {
            begin: 10240,
            end: 10495
          }, {
            begin: 40960,
            end: 42127
          }, {
            begin: 5888,
            end: 5919
          }, {
            begin: 66304,
            end: 66351
          }, {
            begin: 66352,
            end: 66383
          }, {
            begin: 66560,
            end: 66639
          }, {
            begin: 118784,
            end: 119039
          }, {
            begin: 119808,
            end: 120831
          }, {
            begin: 1044480,
            end: 1048573
          }, {
            begin: 65024,
            end: 65039
          }, {
            begin: 917504,
            end: 917631
          }, {
            begin: 6400,
            end: 6479
          }, {
            begin: 6480,
            end: 6527
          }, {
            begin: 6528,
            end: 6623
          }, {
            begin: 6656,
            end: 6687
          }, {
            begin: 11264,
            end: 11359
          }, {
            begin: 11568,
            end: 11647
          }, {
            begin: 19904,
            end: 19967
          }, {
            begin: 43008,
            end: 43055
          }, {
            begin: 65536,
            end: 65663
          }, {
            begin: 65856,
            end: 65935
          }, {
            begin: 66432,
            end: 66463
          }, {
            begin: 66464,
            end: 66527
          }, {
            begin: 66640,
            end: 66687
          }, {
            begin: 66688,
            end: 66735
          }, {
            begin: 67584,
            end: 67647
          }, {
            begin: 68096,
            end: 68191
          }, {
            begin: 119552,
            end: 119647
          }, {
            begin: 73728,
            end: 74751
          }, {
            begin: 119648,
            end: 119679
          }, {
            begin: 7040,
            end: 7103
          }, {
            begin: 7168,
            end: 7247
          }, {
            begin: 7248,
            end: 7295
          }, {
            begin: 43136,
            end: 43231
          }, {
            begin: 43264,
            end: 43311
          }, {
            begin: 43312,
            end: 43359
          }, {
            begin: 43520,
            end: 43615
          }, {
            begin: 65936,
            end: 65999
          }, {
            begin: 66e3,
            end: 66047
          }, {
            begin: 66208,
            end: 66271
          }, {
            begin: 127024,
            end: 127135
          }],
          Ze = {
            parse: function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              n.version = s.parseUShort(), n.xAvgCharWidth = s.parseShort(), n.usWeightClass = s.parseUShort(), n.usWidthClass = s.parseUShort(), n.fsType = s.parseUShort(), n.ySubscriptXSize = s.parseShort(), n.ySubscriptYSize = s.parseShort(), n.ySubscriptXOffset = s.parseShort(), n.ySubscriptYOffset = s.parseShort(), n.ySuperscriptXSize = s.parseShort(), n.ySuperscriptYSize = s.parseShort(), n.ySuperscriptXOffset = s.parseShort(), n.ySuperscriptYOffset = s.parseShort(), n.yStrikeoutSize = s.parseShort(), n.yStrikeoutPosition = s.parseShort(), n.sFamilyClass = s.parseShort(), n.panose = [];
              for (let e = 0; e < 10; e++) n.panose[e] = s.parseByte();
              return n.ulUnicodeRange1 = s.parseULong(), n.ulUnicodeRange2 = s.parseULong(), n.ulUnicodeRange3 = s.parseULong(), n.ulUnicodeRange4 = s.parseULong(), n.achVendID = String.fromCharCode(s.parseByte(), s.parseByte(), s.parseByte(), s.parseByte()), n.fsSelection = s.parseUShort(), n.usFirstCharIndex = s.parseUShort(), n.usLastCharIndex = s.parseUShort(), n.sTypoAscender = s.parseShort(), n.sTypoDescender = s.parseShort(), n.sTypoLineGap = s.parseShort(), n.usWinAscent = s.parseUShort(), n.usWinDescent = s.parseUShort(), n.version >= 1 && (n.ulCodePageRange1 = s.parseULong(), n.ulCodePageRange2 = s.parseULong()), n.version >= 2 && (n.sxHeight = s.parseShort(), n.sCapHeight = s.parseShort(), n.usDefaultChar = s.parseUShort(), n.usBreakChar = s.parseUShort(), n.usMaxContent = s.parseUShort()), n;
            },
            make: function (e) {
              return new M.Table("OS/2", [{
                name: "version",
                type: "USHORT",
                value: 3
              }, {
                name: "xAvgCharWidth",
                type: "SHORT",
                value: 0
              }, {
                name: "usWeightClass",
                type: "USHORT",
                value: 0
              }, {
                name: "usWidthClass",
                type: "USHORT",
                value: 0
              }, {
                name: "fsType",
                type: "USHORT",
                value: 0
              }, {
                name: "ySubscriptXSize",
                type: "SHORT",
                value: 650
              }, {
                name: "ySubscriptYSize",
                type: "SHORT",
                value: 699
              }, {
                name: "ySubscriptXOffset",
                type: "SHORT",
                value: 0
              }, {
                name: "ySubscriptYOffset",
                type: "SHORT",
                value: 140
              }, {
                name: "ySuperscriptXSize",
                type: "SHORT",
                value: 650
              }, {
                name: "ySuperscriptYSize",
                type: "SHORT",
                value: 699
              }, {
                name: "ySuperscriptXOffset",
                type: "SHORT",
                value: 0
              }, {
                name: "ySuperscriptYOffset",
                type: "SHORT",
                value: 479
              }, {
                name: "yStrikeoutSize",
                type: "SHORT",
                value: 49
              }, {
                name: "yStrikeoutPosition",
                type: "SHORT",
                value: 258
              }, {
                name: "sFamilyClass",
                type: "SHORT",
                value: 0
              }, {
                name: "bFamilyType",
                type: "BYTE",
                value: 0
              }, {
                name: "bSerifStyle",
                type: "BYTE",
                value: 0
              }, {
                name: "bWeight",
                type: "BYTE",
                value: 0
              }, {
                name: "bProportion",
                type: "BYTE",
                value: 0
              }, {
                name: "bContrast",
                type: "BYTE",
                value: 0
              }, {
                name: "bStrokeVariation",
                type: "BYTE",
                value: 0
              }, {
                name: "bArmStyle",
                type: "BYTE",
                value: 0
              }, {
                name: "bLetterform",
                type: "BYTE",
                value: 0
              }, {
                name: "bMidline",
                type: "BYTE",
                value: 0
              }, {
                name: "bXHeight",
                type: "BYTE",
                value: 0
              }, {
                name: "ulUnicodeRange1",
                type: "ULONG",
                value: 0
              }, {
                name: "ulUnicodeRange2",
                type: "ULONG",
                value: 0
              }, {
                name: "ulUnicodeRange3",
                type: "ULONG",
                value: 0
              }, {
                name: "ulUnicodeRange4",
                type: "ULONG",
                value: 0
              }, {
                name: "achVendID",
                type: "CHARARRAY",
                value: "XXXX"
              }, {
                name: "fsSelection",
                type: "USHORT",
                value: 0
              }, {
                name: "usFirstCharIndex",
                type: "USHORT",
                value: 0
              }, {
                name: "usLastCharIndex",
                type: "USHORT",
                value: 0
              }, {
                name: "sTypoAscender",
                type: "SHORT",
                value: 0
              }, {
                name: "sTypoDescender",
                type: "SHORT",
                value: 0
              }, {
                name: "sTypoLineGap",
                type: "SHORT",
                value: 0
              }, {
                name: "usWinAscent",
                type: "USHORT",
                value: 0
              }, {
                name: "usWinDescent",
                type: "USHORT",
                value: 0
              }, {
                name: "ulCodePageRange1",
                type: "ULONG",
                value: 0
              }, {
                name: "ulCodePageRange2",
                type: "ULONG",
                value: 0
              }, {
                name: "sxHeight",
                type: "SHORT",
                value: 0
              }, {
                name: "sCapHeight",
                type: "SHORT",
                value: 0
              }, {
                name: "usDefaultChar",
                type: "USHORT",
                value: 0
              }, {
                name: "usBreakChar",
                type: "USHORT",
                value: 0
              }, {
                name: "usMaxContext",
                type: "USHORT",
                value: 0
              }], e);
            },
            unicodeRanges: Ye,
            getUnicodeRange: function (e) {
              for (let t = 0; t < Ye.length; t += 1) {
                const n = Ye[t];
                if (e >= n.begin && e < n.end) return t;
              }
              return -1;
            }
          },
          Qe = {
            parse: function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              switch (n.version = s.parseVersion(), n.italicAngle = s.parseFixed(), n.underlinePosition = s.parseShort(), n.underlineThickness = s.parseShort(), n.isFixedPitch = s.parseULong(), n.minMemType42 = s.parseULong(), n.maxMemType42 = s.parseULong(), n.minMemType1 = s.parseULong(), n.maxMemType1 = s.parseULong(), n.version) {
                case 1:
                  n.names = Y.slice();
                  break;
                case 2:
                  n.numberOfGlyphs = s.parseUShort(), n.glyphNameIndex = new Array(n.numberOfGlyphs);
                  for (let e = 0; e < n.numberOfGlyphs; e++) n.glyphNameIndex[e] = s.parseUShort();
                  n.names = [];
                  for (let e = 0; e < n.numberOfGlyphs; e++) if (n.glyphNameIndex[e] >= Y.length) {
                    const e = s.parseChar();
                    n.names.push(s.parseString(e));
                  }
                  break;
                case 2.5:
                  n.numberOfGlyphs = s.parseUShort(), n.offset = new Array(n.numberOfGlyphs);
                  for (let e = 0; e < n.numberOfGlyphs; e++) n.offset[e] = s.parseChar();
              }
              return n;
            },
            make: function () {
              return new M.Table("post", [{
                name: "version",
                type: "FIXED",
                value: 196608
              }, {
                name: "italicAngle",
                type: "FIXED",
                value: 0
              }, {
                name: "underlinePosition",
                type: "FWORD",
                value: 0
              }, {
                name: "underlineThickness",
                type: "FWORD",
                value: 0
              }, {
                name: "isFixedPitch",
                type: "ULONG",
                value: 0
              }, {
                name: "minMemType42",
                type: "ULONG",
                value: 0
              }, {
                name: "maxMemType42",
                type: "ULONG",
                value: 0
              }, {
                name: "minMemType1",
                type: "ULONG",
                value: 0
              }, {
                name: "maxMemType1",
                type: "ULONG",
                value: 0
              }]);
            }
          },
          Je = new Array(9);
        Je[1] = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort();
          return 1 === t ? {
            substFormat: 1,
            coverage: this.parsePointer(_.coverage),
            deltaGlyphId: this.parseUShort()
          } : 2 === t ? {
            substFormat: 2,
            coverage: this.parsePointer(_.coverage),
            substitute: this.parseOffset16List()
          } : void f.assert(!1, "0x" + e.toString(16) + ": lookup type 1 format must be 1 or 2.");
        }, Je[2] = function () {
          const e = this.parseUShort();
          return f.argument(1 === e, "GSUB Multiple Substitution Subtable identifier-format must be 1"), {
            substFormat: e,
            coverage: this.parsePointer(_.coverage),
            sequences: this.parseListOfLists()
          };
        }, Je[3] = function () {
          const e = this.parseUShort();
          return f.argument(1 === e, "GSUB Alternate Substitution Subtable identifier-format must be 1"), {
            substFormat: e,
            coverage: this.parsePointer(_.coverage),
            alternateSets: this.parseListOfLists()
          };
        }, Je[4] = function () {
          const e = this.parseUShort();
          return f.argument(1 === e, "GSUB ligature table identifier-format must be 1"), {
            substFormat: e,
            coverage: this.parsePointer(_.coverage),
            ligatureSets: this.parseListOfLists(function () {
              return {
                ligGlyph: this.parseUShort(),
                components: this.parseUShortList(this.parseUShort() - 1)
              };
            })
          };
        };
        const Ke = {
          sequenceIndex: _.uShort,
          lookupListIndex: _.uShort
        };
        Je[5] = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort();
          if (1 === t) return {
            substFormat: t,
            coverage: this.parsePointer(_.coverage),
            ruleSets: this.parseListOfLists(function () {
              const e = this.parseUShort(),
                t = this.parseUShort();
              return {
                input: this.parseUShortList(e - 1),
                lookupRecords: this.parseRecordList(t, Ke)
              };
            })
          };
          if (2 === t) return {
            substFormat: t,
            coverage: this.parsePointer(_.coverage),
            classDef: this.parsePointer(_.classDef),
            classSets: this.parseListOfLists(function () {
              const e = this.parseUShort(),
                t = this.parseUShort();
              return {
                classes: this.parseUShortList(e - 1),
                lookupRecords: this.parseRecordList(t, Ke)
              };
            })
          };
          if (3 === t) {
            const e = this.parseUShort(),
              n = this.parseUShort();
            return {
              substFormat: t,
              coverages: this.parseList(e, _.pointer(_.coverage)),
              lookupRecords: this.parseRecordList(n, Ke)
            };
          }
          f.assert(!1, "0x" + e.toString(16) + ": lookup type 5 format must be 1, 2 or 3.");
        }, Je[6] = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort();
          return 1 === t ? {
            substFormat: 1,
            coverage: this.parsePointer(_.coverage),
            chainRuleSets: this.parseListOfLists(function () {
              return {
                backtrack: this.parseUShortList(),
                input: this.parseUShortList(this.parseShort() - 1),
                lookahead: this.parseUShortList(),
                lookupRecords: this.parseRecordList(Ke)
              };
            })
          } : 2 === t ? {
            substFormat: 2,
            coverage: this.parsePointer(_.coverage),
            backtrackClassDef: this.parsePointer(_.classDef),
            inputClassDef: this.parsePointer(_.classDef),
            lookaheadClassDef: this.parsePointer(_.classDef),
            chainClassSet: this.parseListOfLists(function () {
              return {
                backtrack: this.parseUShortList(),
                input: this.parseUShortList(this.parseShort() - 1),
                lookahead: this.parseUShortList(),
                lookupRecords: this.parseRecordList(Ke)
              };
            })
          } : 3 === t ? {
            substFormat: 3,
            backtrackCoverage: this.parseList(_.pointer(_.coverage)),
            inputCoverage: this.parseList(_.pointer(_.coverage)),
            lookaheadCoverage: this.parseList(_.pointer(_.coverage)),
            lookupRecords: this.parseRecordList(Ke)
          } : void f.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
        }, Je[7] = function () {
          const e = this.parseUShort();
          f.argument(1 === e, "GSUB Extension Substitution subtable identifier-format must be 1");
          const t = this.parseUShort(),
            n = new _(this.data, this.offset + this.parseULong());
          return {
            substFormat: 1,
            lookupType: t,
            extension: Je[t].call(n)
          };
        }, Je[8] = function () {
          const e = this.parseUShort();
          return f.argument(1 === e, "GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"), {
            substFormat: e,
            coverage: this.parsePointer(_.coverage),
            backtrackCoverage: this.parseList(_.pointer(_.coverage)),
            lookaheadCoverage: this.parseList(_.pointer(_.coverage)),
            substitutes: this.parseUShortList()
          };
        };
        const $e = new Array(9);
        $e[1] = function (e) {
          return 1 === e.substFormat ? new M.Table("substitutionTable", [{
            name: "substFormat",
            type: "USHORT",
            value: 1
          }, {
            name: "coverage",
            type: "TABLE",
            value: new M.Coverage(e.coverage)
          }, {
            name: "deltaGlyphID",
            type: "USHORT",
            value: e.deltaGlyphId
          }]) : new M.Table("substitutionTable", [{
            name: "substFormat",
            type: "USHORT",
            value: 2
          }, {
            name: "coverage",
            type: "TABLE",
            value: new M.Coverage(e.coverage)
          }].concat(M.ushortList("substitute", e.substitute)));
        }, $e[3] = function (e) {
          return f.assert(1 === e.substFormat, "Lookup type 3 substFormat must be 1."), new M.Table("substitutionTable", [{
            name: "substFormat",
            type: "USHORT",
            value: 1
          }, {
            name: "coverage",
            type: "TABLE",
            value: new M.Coverage(e.coverage)
          }].concat(M.tableList("altSet", e.alternateSets, function (e) {
            return new M.Table("alternateSetTable", M.ushortList("alternate", e));
          })));
        }, $e[4] = function (e) {
          return f.assert(1 === e.substFormat, "Lookup type 4 substFormat must be 1."), new M.Table("substitutionTable", [{
            name: "substFormat",
            type: "USHORT",
            value: 1
          }, {
            name: "coverage",
            type: "TABLE",
            value: new M.Coverage(e.coverage)
          }].concat(M.tableList("ligSet", e.ligatureSets, function (e) {
            return new M.Table("ligatureSetTable", M.tableList("ligature", e, function (e) {
              return new M.Table("ligatureTable", [{
                name: "ligGlyph",
                type: "USHORT",
                value: e.ligGlyph
              }].concat(M.ushortList("component", e.components, e.components.length + 1)));
            }));
          })));
        };
        const et = {
            parse: function (e, t) {
              const n = new _(e, t = t || 0),
                s = n.parseVersion(1);
              return f.argument(1 === s || 1.1 === s, "Unsupported GSUB table version."), 1 === s ? {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(Je)
              } : {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(Je),
                variations: n.parseFeatureVariationsList()
              };
            },
            make: function (e) {
              return new M.Table("GSUB", [{
                name: "version",
                type: "ULONG",
                value: 65536
              }, {
                name: "scripts",
                type: "TABLE",
                value: new M.ScriptList(e.scripts)
              }, {
                name: "features",
                type: "TABLE",
                value: new M.FeatureList(e.features)
              }, {
                name: "lookups",
                type: "TABLE",
                value: new M.LookupList(e.lookups, $e)
              }]);
            }
          },
          tt = {
            parse: function (e, t) {
              const n = new z.Parser(e, t),
                s = n.parseULong();
              f.argument(1 === s, "Unsupported META table version."), n.parseULong(), n.parseULong();
              const o = n.parseULong(),
                r = {};
              for (let s = 0; s < o; s++) {
                const s = n.parseTag(),
                  o = n.parseULong(),
                  a = n.parseULong(),
                  i = d.UTF8(e, t + o, a);
                r[s] = i;
              }
              return r;
            },
            make: function (e) {
              const t = Object.keys(e).length;
              let n = "";
              const s = 16 + 12 * t,
                o = new M.Table("meta", [{
                  name: "version",
                  type: "ULONG",
                  value: 1
                }, {
                  name: "flags",
                  type: "ULONG",
                  value: 0
                }, {
                  name: "offset",
                  type: "ULONG",
                  value: s
                }, {
                  name: "numTags",
                  type: "ULONG",
                  value: t
                }]);
              for (let t in e) {
                const r = n.length;
                n += e[t], o.fields.push({
                  name: "tag " + t,
                  type: "TAG",
                  value: t
                }), o.fields.push({
                  name: "offset " + t,
                  type: "ULONG",
                  value: s + r
                }), o.fields.push({
                  name: "length " + t,
                  type: "ULONG",
                  value: e[t].length
                });
              }
              return o.fields.push({
                name: "stringPool",
                type: "CHARARRAY",
                value: n
              }), o;
            }
          };
        function nt(e) {
          return Math.log(e) / Math.log(2) | 0;
        }
        function st(e) {
          for (; e.length % 4 != 0;) e.push(0);
          let t = 0;
          for (let n = 0; n < e.length; n += 4) t += (e[n] << 24) + (e[n + 1] << 16) + (e[n + 2] << 8) + e[n + 3];
          return t %= Math.pow(2, 32), t;
        }
        function ot(e, t, n, s) {
          return new M.Record("Table Record", [{
            name: "tag",
            type: "TAG",
            value: void 0 !== e ? e : ""
          }, {
            name: "checkSum",
            type: "ULONG",
            value: void 0 !== t ? t : 0
          }, {
            name: "offset",
            type: "ULONG",
            value: void 0 !== n ? n : 0
          }, {
            name: "length",
            type: "ULONG",
            value: void 0 !== s ? s : 0
          }]);
        }
        function rt(e) {
          const t = new M.Table("sfnt", [{
            name: "version",
            type: "TAG",
            value: "OTTO"
          }, {
            name: "numTables",
            type: "USHORT",
            value: 0
          }, {
            name: "searchRange",
            type: "USHORT",
            value: 0
          }, {
            name: "entrySelector",
            type: "USHORT",
            value: 0
          }, {
            name: "rangeShift",
            type: "USHORT",
            value: 0
          }]);
          t.tables = e, t.numTables = e.length;
          const n = Math.pow(2, nt(t.numTables));
          t.searchRange = 16 * n, t.entrySelector = nt(n), t.rangeShift = 16 * t.numTables - t.searchRange;
          const s = [],
            o = [];
          let r = t.sizeOf() + ot().sizeOf() * t.numTables;
          for (; r % 4 != 0;) r += 1, o.push({
            name: "padding",
            type: "BYTE",
            value: 0
          });
          for (let t = 0; t < e.length; t += 1) {
            const n = e[t];
            f.argument(4 === n.tableName.length, "Table name" + n.tableName + " is invalid.");
            const a = n.sizeOf(),
              i = ot(n.tableName, st(n.encode()), r, a);
            for (s.push({
              name: i.tag + " Table Record",
              type: "RECORD",
              value: i
            }), o.push({
              name: n.tableName + " table",
              type: "RECORD",
              value: n
            }), r += a, f.argument(!isNaN(r), "Something went wrong calculating the offset."); r % 4 != 0;) r += 1, o.push({
              name: "padding",
              type: "BYTE",
              value: 0
            });
          }
          return s.sort(function (e, t) {
            return e.value.tag > t.value.tag ? 1 : -1;
          }), t.fields = t.fields.concat(s), t.fields = t.fields.concat(o), t;
        }
        function at(e, t, n) {
          for (let n = 0; n < t.length; n += 1) {
            const s = e.charToGlyphIndex(t[n]);
            if (s > 0) return e.glyphs.get(s).getMetrics();
          }
          return n;
        }
        function it(e) {
          let t = 0;
          for (let n = 0; n < e.length; n += 1) t += e[n];
          return t / e.length;
        }
        const lt = function (e) {
          const t = [],
            n = [],
            s = [],
            o = [],
            r = [],
            a = [],
            i = [];
          let l,
            u = 0,
            c = 0,
            p = 0,
            f = 0,
            h = 0;
          for (let d = 0; d < e.glyphs.length; d += 1) {
            const g = e.glyphs.get(d),
              m = 0 | g.unicode;
            if (isNaN(g.advanceWidth)) throw new Error("Glyph " + g.name + " (" + d + "): advanceWidth is not a number.");
            (l > m || void 0 === l) && m > 0 && (l = m), u < m && (u = m);
            const y = Ze.getUnicodeRange(m);
            if (y < 32) c |= 1 << y;else if (y < 64) p |= 1 << y - 32;else if (y < 96) f |= 1 << y - 64;else {
              if (!(y < 123)) throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
              h |= 1 << y - 96;
            }
            if (".notdef" === g.name) continue;
            const v = g.getMetrics();
            t.push(v.xMin), n.push(v.yMin), s.push(v.xMax), o.push(v.yMax), a.push(v.leftSideBearing), i.push(v.rightSideBearing), r.push(g.advanceWidth);
          }
          const d = {
            xMin: Math.min.apply(null, t),
            yMin: Math.min.apply(null, n),
            xMax: Math.max.apply(null, s),
            yMax: Math.max.apply(null, o),
            advanceWidthMax: Math.max.apply(null, r),
            advanceWidthAvg: it(r),
            minLeftSideBearing: Math.min.apply(null, a),
            maxLeftSideBearing: Math.max.apply(null, a),
            minRightSideBearing: Math.min.apply(null, i)
          };
          d.ascender = e.ascender, d.descender = e.descender;
          const g = Le.make({
              flags: 3,
              unitsPerEm: e.unitsPerEm,
              xMin: d.xMin,
              yMin: d.yMin,
              xMax: d.xMax,
              yMax: d.yMax,
              lowestRecPPEM: 3,
              createdTimestamp: e.createdTimestamp
            }),
            m = Be.make({
              ascender: d.ascender,
              descender: d.descender,
              advanceWidthMax: d.advanceWidthMax,
              minLeftSideBearing: d.minLeftSideBearing,
              minRightSideBearing: d.minRightSideBearing,
              xMaxExtent: d.maxLeftSideBearing + (d.xMax - d.xMin),
              numberOfHMetrics: e.glyphs.length
            }),
            y = Me.make(e.glyphs.length),
            v = Ze.make({
              xAvgCharWidth: Math.round(d.advanceWidthAvg),
              usWeightClass: e.tables.os2.usWeightClass,
              usWidthClass: e.tables.os2.usWidthClass,
              usFirstCharIndex: l,
              usLastCharIndex: u,
              ulUnicodeRange1: c,
              ulUnicodeRange2: p,
              ulUnicodeRange3: f,
              ulUnicodeRange4: h,
              fsSelection: e.tables.os2.fsSelection,
              sTypoAscender: d.ascender,
              sTypoDescender: d.descender,
              sTypoLineGap: 0,
              usWinAscent: d.yMax,
              usWinDescent: Math.abs(d.yMin),
              ulCodePageRange1: 1,
              sxHeight: at(e, "xyvw", {
                yMax: Math.round(d.ascender / 2)
              }).yMax,
              sCapHeight: at(e, "HIKLEFJMNTZBDPRAGOQSUVWXY", d).yMax,
              usDefaultChar: e.hasChar(" ") ? 32 : 0,
              usBreakChar: e.hasChar(" ") ? 32 : 0
            }),
            b = Ce.make(e.glyphs),
            x = q.make(e.glyphs),
            S = e.getEnglishName("fontFamily"),
            U = e.getEnglishName("fontSubfamily"),
            k = S + " " + U;
          let T = e.getEnglishName("postScriptName");
          T || (T = S.replace(/\s/g, "") + "-" + U);
          const E = {};
          for (let t in e.names) E[t] = e.names[t];
          E.uniqueID || (E.uniqueID = {
            en: e.getEnglishName("manufacturer") + ":" + k
          }), E.postScriptName || (E.postScriptName = {
            en: T
          }), E.preferredFamily || (E.preferredFamily = e.names.fontFamily), E.preferredSubfamily || (E.preferredSubfamily = e.names.fontSubfamily);
          const w = [],
            O = Ve.make(E, w),
            I = w.length > 0 ? De.make(w) : void 0,
            R = Qe.make(),
            L = Re.make(e.glyphs, {
              version: e.getEnglishName("version"),
              fullName: k,
              familyName: S,
              weightName: U,
              postScriptName: T,
              unitsPerEm: e.unitsPerEm,
              fontBBox: [0, d.yMin, d.ascender, d.advanceWidthMax]
            }),
            B = e.metas && Object.keys(e.metas).length > 0 ? tt.make(e.metas) : void 0,
            C = [g, m, y, v, O, x, R, L, b];
          I && C.push(I), e.tables.gsub && C.push(et.make(e.tables.gsub)), B && C.push(B);
          const D = rt(C),
            M = st(D.encode()),
            A = D.fields;
          let P = !1;
          for (let e = 0; e < A.length; e += 1) if ("head table" === A[e].name) {
            A[e].value.checkSumAdjustment = 2981146554 - M, P = !0;
            break;
          }
          if (!P) throw new Error("Could not find head table with checkSum to adjust.");
          return D;
        };
        function ut(e, t) {
          let n = 0,
            s = e.length - 1;
          for (; n <= s;) {
            const o = n + s >>> 1,
              r = e[o].tag;
            if (r === t) return o;
            r < t ? n = o + 1 : s = o - 1;
          }
          return -n - 1;
        }
        function ct(e, t) {
          let n = 0,
            s = e.length - 1;
          for (; n <= s;) {
            const o = n + s >>> 1,
              r = e[o];
            if (r === t) return o;
            r < t ? n = o + 1 : s = o - 1;
          }
          return -n - 1;
        }
        function pt(e, t) {
          let n,
            s = 0,
            o = e.length - 1;
          for (; s <= o;) {
            const r = s + o >>> 1;
            n = e[r];
            const a = n.start;
            if (a === t) return n;
            a < t ? s = r + 1 : o = r - 1;
          }
          if (s > 0) return n = e[s - 1], t > n.end ? 0 : n;
        }
        function ft(e, t) {
          this.font = e, this.tableName = t;
        }
        ft.prototype = {
          searchTag: ut,
          binSearch: ct,
          getTable: function (e) {
            let t = this.font.tables[this.tableName];
            return !t && e && (t = this.font.tables[this.tableName] = this.createDefaultTable()), t;
          },
          getScriptNames: function () {
            let e = this.getTable();
            return e ? e.scripts.map(function (e) {
              return e.tag;
            }) : [];
          },
          getDefaultScriptName: function () {
            let e = this.getTable();
            if (!e) return;
            let t = !1;
            for (let n = 0; n < e.scripts.length; n++) {
              const s = e.scripts[n].tag;
              if ("DFLT" === s) return s;
              "latn" === s && (t = !0);
            }
            return t ? "latn" : void 0;
          },
          getScriptTable: function (e, t) {
            const n = this.getTable(t);
            if (n) {
              e = e || "DFLT";
              const s = n.scripts,
                o = ut(n.scripts, e);
              if (o >= 0) return s[o].script;
              if (t) {
                const t = {
                  tag: e,
                  script: {
                    defaultLangSys: {
                      reserved: 0,
                      reqFeatureIndex: 65535,
                      featureIndexes: []
                    },
                    langSysRecords: []
                  }
                };
                return s.splice(-1 - o, 0, t), t.script;
              }
            }
          },
          getLangSysTable: function (e, t, n) {
            const s = this.getScriptTable(e, n);
            if (s) {
              if (!t || "dflt" === t || "DFLT" === t) return s.defaultLangSys;
              const e = ut(s.langSysRecords, t);
              if (e >= 0) return s.langSysRecords[e].langSys;
              if (n) {
                const n = {
                  tag: t,
                  langSys: {
                    reserved: 0,
                    reqFeatureIndex: 65535,
                    featureIndexes: []
                  }
                };
                return s.langSysRecords.splice(-1 - e, 0, n), n.langSys;
              }
            }
          },
          getFeatureTable: function (e, t, n, s) {
            const o = this.getLangSysTable(e, t, s);
            if (o) {
              let e;
              const t = o.featureIndexes,
                r = this.font.tables[this.tableName].features;
              for (let s = 0; s < t.length; s++) if (e = r[t[s]], e.tag === n) return e.feature;
              if (s) {
                const s = r.length;
                return f.assert(0 === s || n >= r[s - 1].tag, "Features must be added in alphabetical order."), e = {
                  tag: n,
                  feature: {
                    params: 0,
                    lookupListIndexes: []
                  }
                }, r.push(e), t.push(s), e.feature;
              }
            }
          },
          getLookupTables: function (e, t, n, s, o) {
            const r = this.getFeatureTable(e, t, n, o),
              a = [];
            if (r) {
              let e;
              const t = r.lookupListIndexes,
                n = this.font.tables[this.tableName].lookups;
              for (let o = 0; o < t.length; o++) e = n[t[o]], e.lookupType === s && a.push(e);
              if (0 === a.length && o) {
                e = {
                  lookupType: s,
                  lookupFlag: 0,
                  subtables: [],
                  markFilteringSet: void 0
                };
                const o = n.length;
                return n.push(e), t.push(o), [e];
              }
            }
            return a;
          },
          getGlyphClass: function (e, t) {
            switch (e.format) {
              case 1:
                return e.startGlyph <= t && t < e.startGlyph + e.classes.length ? e.classes[t - e.startGlyph] : 0;
              case 2:
                const n = pt(e.ranges, t);
                return n ? n.classId : 0;
            }
          },
          getCoverageIndex: function (e, t) {
            switch (e.format) {
              case 1:
                const n = ct(e.glyphs, t);
                return n >= 0 ? n : -1;
              case 2:
                const s = pt(e.ranges, t);
                return s ? s.index + t - s.start : -1;
            }
          },
          expandCoverage: function (e) {
            if (1 === e.format) return e.glyphs;
            {
              const t = [],
                n = e.ranges;
              for (let e = 0; e < n.length; e++) {
                const s = n[e],
                  o = s.start,
                  r = s.end;
                for (let e = o; e <= r; e++) t.push(e);
              }
              return t;
            }
          }
        };
        const ht = ft;
        function dt(e) {
          ht.call(this, e, "gpos");
        }
        dt.prototype = ht.prototype, dt.prototype.getKerningValue = function (e, t, n) {
          for (let s = 0; s < e.length; s++) {
            const o = e[s].subtables;
            for (let e = 0; e < o.length; e++) {
              const s = o[e],
                r = this.getCoverageIndex(s.coverage, t);
              if (!(r < 0)) switch (s.posFormat) {
                case 1:
                  let e = s.pairSets[r];
                  for (let t = 0; t < e.length; t++) {
                    let s = e[t];
                    if (s.secondGlyph === n) return s.value1 && s.value1.xAdvance || 0;
                  }
                  break;
                case 2:
                  const o = this.getGlyphClass(s.classDef1, t),
                    a = this.getGlyphClass(s.classDef2, n),
                    i = s.classRecords[o][a];
                  return i.value1 && i.value1.xAdvance || 0;
              }
            }
          }
          return 0;
        }, dt.prototype.getKerningTables = function (e, t) {
          if (this.font.tables.gpos) return this.getLookupTables(e, t, "kern", 2);
        };
        const gt = dt;
        function mt(e) {
          ht.call(this, e, "gsub");
        }
        function yt(e, t) {
          const n = e.length;
          if (n !== t.length) return !1;
          for (let s = 0; s < n; s++) if (e[s] !== t[s]) return !1;
          return !0;
        }
        function vt(e, t, n) {
          const s = e.subtables;
          for (let e = 0; e < s.length; e++) {
            const n = s[e];
            if (n.substFormat === t) return n;
          }
          if (n) return s.push(n), n;
        }
        mt.prototype = ht.prototype, mt.prototype.createDefaultTable = function () {
          return {
            version: 1,
            scripts: [{
              tag: "DFLT",
              script: {
                defaultLangSys: {
                  reserved: 0,
                  reqFeatureIndex: 65535,
                  featureIndexes: []
                },
                langSysRecords: []
              }
            }],
            features: [],
            lookups: []
          };
        }, mt.prototype.getSingle = function (e, t, n) {
          const s = [],
            o = this.getLookupTables(t, n, e, 1);
          for (let e = 0; e < o.length; e++) {
            const t = o[e].subtables;
            for (let e = 0; e < t.length; e++) {
              const n = t[e],
                o = this.expandCoverage(n.coverage);
              let r;
              if (1 === n.substFormat) {
                const e = n.deltaGlyphId;
                for (r = 0; r < o.length; r++) {
                  const t = o[r];
                  s.push({
                    sub: t,
                    by: t + e
                  });
                }
              } else {
                const e = n.substitute;
                for (r = 0; r < o.length; r++) s.push({
                  sub: o[r],
                  by: e[r]
                });
              }
            }
          }
          return s;
        }, mt.prototype.getAlternates = function (e, t, n) {
          const s = [],
            o = this.getLookupTables(t, n, e, 3);
          for (let e = 0; e < o.length; e++) {
            const t = o[e].subtables;
            for (let e = 0; e < t.length; e++) {
              const n = t[e],
                o = this.expandCoverage(n.coverage),
                r = n.alternateSets;
              for (let e = 0; e < o.length; e++) s.push({
                sub: o[e],
                by: r[e]
              });
            }
          }
          return s;
        }, mt.prototype.getLigatures = function (e, t, n) {
          const s = [],
            o = this.getLookupTables(t, n, e, 4);
          for (let e = 0; e < o.length; e++) {
            const t = o[e].subtables;
            for (let e = 0; e < t.length; e++) {
              const n = t[e],
                o = this.expandCoverage(n.coverage),
                r = n.ligatureSets;
              for (let e = 0; e < o.length; e++) {
                const t = o[e],
                  n = r[e];
                for (let e = 0; e < n.length; e++) {
                  const o = n[e];
                  s.push({
                    sub: [t].concat(o.components),
                    by: o.ligGlyph
                  });
                }
              }
            }
          }
          return s;
        }, mt.prototype.addSingle = function (e, t, n, s) {
          const o = vt(this.getLookupTables(n, s, e, 1, !0)[0], 2, {
            substFormat: 2,
            coverage: {
              format: 1,
              glyphs: []
            },
            substitute: []
          });
          f.assert(1 === o.coverage.format, "Ligature: unable to modify coverage table format " + o.coverage.format);
          const r = t.sub;
          let a = this.binSearch(o.coverage.glyphs, r);
          a < 0 && (a = -1 - a, o.coverage.glyphs.splice(a, 0, r), o.substitute.splice(a, 0, 0)), o.substitute[a] = t.by;
        }, mt.prototype.addAlternate = function (e, t, n, s) {
          const o = vt(this.getLookupTables(n, s, e, 3, !0)[0], 1, {
            substFormat: 1,
            coverage: {
              format: 1,
              glyphs: []
            },
            alternateSets: []
          });
          f.assert(1 === o.coverage.format, "Ligature: unable to modify coverage table format " + o.coverage.format);
          const r = t.sub;
          let a = this.binSearch(o.coverage.glyphs, r);
          a < 0 && (a = -1 - a, o.coverage.glyphs.splice(a, 0, r), o.alternateSets.splice(a, 0, 0)), o.alternateSets[a] = t.by;
        }, mt.prototype.addLigature = function (e, t, n, s) {
          const o = this.getLookupTables(n, s, e, 4, !0)[0];
          let r = o.subtables[0];
          r || (r = {
            substFormat: 1,
            coverage: {
              format: 1,
              glyphs: []
            },
            ligatureSets: []
          }, o.subtables[0] = r), f.assert(1 === r.coverage.format, "Ligature: unable to modify coverage table format " + r.coverage.format);
          const a = t.sub[0],
            i = t.sub.slice(1),
            l = {
              ligGlyph: t.by,
              components: i
            };
          let u = this.binSearch(r.coverage.glyphs, a);
          if (u >= 0) {
            const e = r.ligatureSets[u];
            for (let t = 0; t < e.length; t++) if (yt(e[t].components, i)) return;
            e.push(l);
          } else u = -1 - u, r.coverage.glyphs.splice(u, 0, a), r.ligatureSets.splice(u, 0, [l]);
        }, mt.prototype.getFeature = function (e, t, n) {
          if (/ss\d\d/.test(e)) return this.getSingle(e, t, n);
          switch (e) {
            case "aalt":
            case "salt":
              return this.getSingle(e, t, n).concat(this.getAlternates(e, t, n));
            case "dlig":
            case "liga":
            case "rlig":
              return this.getLigatures(e, t, n);
          }
        }, mt.prototype.add = function (e, t, n, s) {
          if (/ss\d\d/.test(e)) return this.addSingle(e, t, n, s);
          switch (e) {
            case "aalt":
            case "salt":
              return "number" == typeof t.by ? this.addSingle(e, t, n, s) : this.addAlternate(e, t, n, s);
            case "dlig":
            case "liga":
            case "rlig":
              return this.addLigature(e, t, n, s);
          }
        };
        const bt = mt;
        function xt(e) {
          const t = new ArrayBuffer(e.length),
            n = new Uint8Array(t);
          for (let t = 0; t < e.length; ++t) n[t] = e[t];
          return t;
        }
        function St(e, t) {
          if (!e) throw t;
        }
        let Ut, kt, Tt, Et;
        function wt(e) {
          this.font = e, this._fpgmState = this._prepState = void 0, this._errorState = 0;
        }
        function Ot(e) {
          return e;
        }
        function It(e) {
          return Math.sign(e) * Math.round(Math.abs(e));
        }
        function Rt(e) {
          return Math.sign(e) * Math.round(Math.abs(2 * e)) / 2;
        }
        function Lt(e) {
          return Math.sign(e) * (Math.round(Math.abs(e) + .5) - .5);
        }
        function Bt(e) {
          return Math.sign(e) * Math.ceil(Math.abs(e));
        }
        function Ct(e) {
          return Math.sign(e) * Math.floor(Math.abs(e));
        }
        const Dt = function (e) {
            const t = this.srPeriod;
            let n = this.srPhase,
              s = 1;
            return e < 0 && (e = -e, s = -1), e += this.srThreshold - n, e = Math.trunc(e / t) * t, (e += n) < 0 ? n * s : e * s;
          },
          Mt = {
            x: 1,
            y: 0,
            axis: "x",
            distance: function (e, t, n, s) {
              return (n ? e.xo : e.x) - (s ? t.xo : t.x);
            },
            interpolate: function (e, t, n, s) {
              let o, r, a, i, l, u, c;
              if (!s || s === this) return o = e.xo - t.xo, r = e.xo - n.xo, l = t.x - t.xo, u = n.x - n.xo, a = Math.abs(o), i = Math.abs(r), c = a + i, 0 === c ? void (e.x = e.xo + (l + u) / 2) : void (e.x = e.xo + (l * i + u * a) / c);
              o = s.distance(e, t, !0, !0), r = s.distance(e, n, !0, !0), l = s.distance(t, t, !1, !0), u = s.distance(n, n, !1, !0), a = Math.abs(o), i = Math.abs(r), c = a + i, 0 !== c ? Mt.setRelative(e, e, (l * i + u * a) / c, s, !0) : Mt.setRelative(e, e, (l + u) / 2, s, !0);
            },
            normalSlope: Number.NEGATIVE_INFINITY,
            setRelative: function (e, t, n, s, o) {
              if (!s || s === this) return void (e.x = (o ? t.xo : t.x) + n);
              const r = o ? t.xo : t.x,
                a = o ? t.yo : t.y,
                i = r + n * s.x,
                l = a + n * s.y;
              e.x = i + (e.y - l) / s.normalSlope;
            },
            slope: 0,
            touch: function (e) {
              e.xTouched = !0;
            },
            touched: function (e) {
              return e.xTouched;
            },
            untouch: function (e) {
              e.xTouched = !1;
            }
          },
          At = {
            x: 0,
            y: 1,
            axis: "y",
            distance: function (e, t, n, s) {
              return (n ? e.yo : e.y) - (s ? t.yo : t.y);
            },
            interpolate: function (e, t, n, s) {
              let o, r, a, i, l, u, c;
              if (!s || s === this) return o = e.yo - t.yo, r = e.yo - n.yo, l = t.y - t.yo, u = n.y - n.yo, a = Math.abs(o), i = Math.abs(r), c = a + i, 0 === c ? void (e.y = e.yo + (l + u) / 2) : void (e.y = e.yo + (l * i + u * a) / c);
              o = s.distance(e, t, !0, !0), r = s.distance(e, n, !0, !0), l = s.distance(t, t, !1, !0), u = s.distance(n, n, !1, !0), a = Math.abs(o), i = Math.abs(r), c = a + i, 0 !== c ? At.setRelative(e, e, (l * i + u * a) / c, s, !0) : At.setRelative(e, e, (l + u) / 2, s, !0);
            },
            normalSlope: 0,
            setRelative: function (e, t, n, s, o) {
              if (!s || s === this) return void (e.y = (o ? t.yo : t.y) + n);
              const r = o ? t.xo : t.x,
                a = o ? t.yo : t.y,
                i = r + n * s.x,
                l = a + n * s.y;
              e.y = l + s.normalSlope * (e.x - i);
            },
            slope: Number.POSITIVE_INFINITY,
            touch: function (e) {
              e.yTouched = !0;
            },
            touched: function (e) {
              return e.yTouched;
            },
            untouch: function (e) {
              e.yTouched = !1;
            }
          };
        function Pt(e, t) {
          this.x = e, this.y = t, this.axis = void 0, this.slope = t / e, this.normalSlope = -e / t, Object.freeze(this);
        }
        function Gt(e, t) {
          const n = Math.sqrt(e * e + t * t);
          return t /= n, 1 == (e /= n) && 0 === t ? Mt : 0 === e && 1 === t ? At : new Pt(e, t);
        }
        function Nt(e, t, n, s) {
          this.x = this.xo = Math.round(64 * e) / 64, this.y = this.yo = Math.round(64 * t) / 64, this.lastPointOfContour = n, this.onCurve = s, this.prevPointOnContour = void 0, this.nextPointOnContour = void 0, this.xTouched = !1, this.yTouched = !1, Object.preventExtensions(this);
        }
        Object.freeze(Mt), Object.freeze(At), Pt.prototype.distance = function (e, t, n, s) {
          return this.x * Mt.distance(e, t, n, s) + this.y * At.distance(e, t, n, s);
        }, Pt.prototype.interpolate = function (e, t, n, s) {
          let o, r, a, i, l, u, c;
          a = s.distance(e, t, !0, !0), i = s.distance(e, n, !0, !0), o = s.distance(t, t, !1, !0), r = s.distance(n, n, !1, !0), l = Math.abs(a), u = Math.abs(i), c = l + u, 0 !== c ? this.setRelative(e, e, (o * u + r * l) / c, s, !0) : this.setRelative(e, e, (o + r) / 2, s, !0);
        }, Pt.prototype.setRelative = function (e, t, n, s, o) {
          s = s || this;
          const r = o ? t.xo : t.x,
            a = o ? t.yo : t.y,
            i = r + n * s.x,
            l = a + n * s.y,
            u = s.normalSlope,
            c = this.slope,
            p = e.x,
            f = e.y;
          e.x = (c * p - u * i + l - f) / (c - u), e.y = c * (e.x - p) + f;
        }, Pt.prototype.touch = function (e) {
          e.xTouched = !0, e.yTouched = !0;
        }, Nt.prototype.nextTouched = function (e) {
          let t = this.nextPointOnContour;
          for (; !e.touched(t) && t !== this;) t = t.nextPointOnContour;
          return t;
        }, Nt.prototype.prevTouched = function (e) {
          let t = this.prevPointOnContour;
          for (; !e.touched(t) && t !== this;) t = t.prevPointOnContour;
          return t;
        };
        const Ft = Object.freeze(new Nt(0, 0)),
          _t = {
            cvCutIn: 17 / 16,
            deltaBase: 9,
            deltaShift: .125,
            loop: 1,
            minDis: 1,
            autoFlip: !0
          };
        function Ht(e, t) {
          switch (this.env = e, this.stack = [], this.prog = t, e) {
            case "glyf":
              this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
            case "prep":
              this.fv = this.pv = this.dpv = Mt, this.round = It;
          }
        }
        function zt(e) {
          const t = e.tZone = new Array(e.gZone.length);
          for (let e = 0; e < t.length; e++) t[e] = new Nt(0, 0);
        }
        function Wt(e, t) {
          const n = e.prog;
          let s,
            o = e.ip,
            r = 1;
          do {
            if (s = n[++o], 88 === s) r++;else if (89 === s) r--;else if (64 === s) o += n[o + 1] + 1;else if (65 === s) o += 2 * n[o + 1] + 1;else if (s >= 176 && s <= 183) o += s - 176 + 1;else if (s >= 184 && s <= 191) o += 2 * (s - 184 + 1);else if (t && 1 === r && 27 === s) break;
          } while (r > 0);
          e.ip = o;
        }
        function qt(e, t) {
          exports.DEBUG && console.log(t.step, "SVTCA[" + e.axis + "]"), t.fv = t.pv = t.dpv = e;
        }
        function jt(e, t) {
          exports.DEBUG && console.log(t.step, "SPVTCA[" + e.axis + "]"), t.pv = t.dpv = e;
        }
        function Xt(e, t) {
          exports.DEBUG && console.log(t.step, "SFVTCA[" + e.axis + "]"), t.fv = e;
        }
        function Vt(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = n.pop(),
            r = t.z2[s],
            a = t.z1[o];
          let i, l;
          exports.DEBUG && console.log("SPVTL[" + e + "]", s, o), e ? (i = r.y - a.y, l = a.x - r.x) : (i = a.x - r.x, l = a.y - r.y), t.pv = t.dpv = Gt(i, l);
        }
        function Yt(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = n.pop(),
            r = t.z2[s],
            a = t.z1[o];
          let i, l;
          exports.DEBUG && console.log("SFVTL[" + e + "]", s, o), e ? (i = r.y - a.y, l = a.x - r.x) : (i = a.x - r.x, l = a.y - r.y), t.fv = Gt(i, l);
        }
        function Zt(e) {
          exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop();
        }
        function Qt(e, t) {
          const n = t.stack.pop(),
            s = t.z0[n],
            o = t.fv,
            r = t.pv;
          exports.DEBUG && console.log(t.step, "MDAP[" + e + "]", n);
          let a = r.distance(s, Ft);
          e && (a = t.round(a)), o.setRelative(s, Ft, a, r), o.touch(s), t.rp0 = t.rp1 = n;
        }
        function Jt(e, t) {
          const n = t.z2,
            s = n.length - 2;
          let o, r, a;
          exports.DEBUG && console.log(t.step, "IUP[" + e.axis + "]");
          for (let t = 0; t < s; t++) o = n[t], e.touched(o) || (r = o.prevTouched(e), r !== o && (a = o.nextTouched(e), r === a && e.setRelative(o, o, e.distance(r, r, !1, !0), e, !0), e.interpolate(o, r, a, e)));
        }
        function Kt(e, t) {
          const n = t.stack,
            s = e ? t.rp1 : t.rp2,
            o = (e ? t.z0 : t.z1)[s],
            r = t.fv,
            a = t.pv;
          let i = t.loop;
          const l = t.z2;
          for (; i--;) {
            const s = n.pop(),
              u = l[s],
              c = a.distance(o, o, !1, !0);
            r.setRelative(u, u, c, a), r.touch(u), exports.DEBUG && console.log(t.step, (t.loop > 1 ? "loop " + (t.loop - i) + ": " : "") + "SHP[" + (e ? "rp1" : "rp2") + "]", s);
          }
          t.loop = 1;
        }
        function $t(e, t) {
          const n = t.stack,
            s = e ? t.rp1 : t.rp2,
            o = (e ? t.z0 : t.z1)[s],
            r = t.fv,
            a = t.pv,
            i = n.pop(),
            l = t.z2[t.contours[i]];
          let u = l;
          exports.DEBUG && console.log(t.step, "SHC[" + e + "]", i);
          const c = a.distance(o, o, !1, !0);
          do {
            u !== o && r.setRelative(u, u, c, a), u = u.nextPointOnContour;
          } while (u !== l);
        }
        function en(e, t) {
          const n = t.stack,
            s = e ? t.rp1 : t.rp2,
            o = (e ? t.z0 : t.z1)[s],
            r = t.fv,
            a = t.pv,
            i = n.pop();
          let l, u;
          switch (exports.DEBUG && console.log(t.step, "SHZ[" + e + "]", i), i) {
            case 0:
              l = t.tZone;
              break;
            case 1:
              l = t.gZone;
              break;
            default:
              throw new Error("Invalid zone");
          }
          const c = a.distance(o, o, !1, !0),
            p = l.length - 2;
          for (let e = 0; e < p; e++) u = l[e], r.setRelative(u, u, c, a);
        }
        function tn(e, t) {
          const n = t.stack,
            s = n.pop() / 64,
            o = n.pop(),
            r = t.z1[o],
            a = t.z0[t.rp0],
            i = t.fv,
            l = t.pv;
          i.setRelative(r, a, s, l), i.touch(r), exports.DEBUG && console.log(t.step, "MSIRP[" + e + "]", s, o), t.rp1 = t.rp0, t.rp2 = o, e && (t.rp0 = o);
        }
        function nn(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = n.pop(),
            r = t.z0[o],
            a = t.fv,
            i = t.pv;
          let l = t.cvt[s];
          exports.DEBUG && console.log(t.step, "MIAP[" + e + "]", s, "(", l, ")", o);
          let u = i.distance(r, Ft);
          e && (Math.abs(u - l) < t.cvCutIn && (u = l), u = t.round(u)), a.setRelative(r, Ft, u, i), 0 === t.zp0 && (r.xo = r.x, r.yo = r.y), a.touch(r), t.rp0 = t.rp1 = o;
        }
        function sn(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = t.z2[s];
          exports.DEBUG && console.log(t.step, "GC[" + e + "]", s), n.push(64 * t.dpv.distance(o, Ft, e, !1));
        }
        function on(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = n.pop(),
            r = t.z1[s],
            a = t.z0[o],
            i = t.dpv.distance(a, r, e, e);
          exports.DEBUG && console.log(t.step, "MD[" + e + "]", s, o, "->", i), t.stack.push(Math.round(64 * i));
        }
        function rn(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = t.fv,
            r = t.pv,
            a = t.ppem,
            i = t.deltaBase + 16 * (e - 1),
            l = t.deltaShift,
            u = t.z0;
          exports.DEBUG && console.log(t.step, "DELTAP[" + e + "]", s, n);
          for (let e = 0; e < s; e++) {
            const e = n.pop(),
              s = n.pop();
            if (i + ((240 & s) >> 4) !== a) continue;
            let c = (15 & s) - 8;
            c >= 0 && c++, exports.DEBUG && console.log(t.step, "DELTAPFIX", e, "by", c * l);
            const p = u[e];
            o.setRelative(p, p, c * l, r);
          }
        }
        function an(e, t) {
          const n = t.stack,
            s = n.pop();
          exports.DEBUG && console.log(t.step, "ROUND[]"), n.push(64 * t.round(s / 64));
        }
        function ln(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = t.ppem,
            r = t.deltaBase + 16 * (e - 1),
            a = t.deltaShift;
          exports.DEBUG && console.log(t.step, "DELTAC[" + e + "]", s, n);
          for (let e = 0; e < s; e++) {
            const e = n.pop(),
              s = n.pop();
            if (r + ((240 & s) >> 4) !== o) continue;
            let i = (15 & s) - 8;
            i >= 0 && i++;
            const l = i * a;
            exports.DEBUG && console.log(t.step, "DELTACFIX", e, "by", l), t.cvt[e] += l;
          }
        }
        function un(e, t) {
          const n = t.stack,
            s = n.pop(),
            o = n.pop(),
            r = t.z2[s],
            a = t.z1[o];
          let i, l;
          exports.DEBUG && console.log(t.step, "SDPVTL[" + e + "]", s, o), e ? (i = r.y - a.y, l = a.x - r.x) : (i = a.x - r.x, l = a.y - r.y), t.dpv = Gt(i, l);
        }
        function cn(e, t) {
          const n = t.stack,
            s = t.prog;
          let o = t.ip;
          exports.DEBUG && console.log(t.step, "PUSHB[" + e + "]");
          for (let t = 0; t < e; t++) n.push(s[++o]);
          t.ip = o;
        }
        function pn(e, t) {
          let n = t.ip;
          const s = t.prog,
            o = t.stack;
          exports.DEBUG && console.log(t.ip, "PUSHW[" + e + "]");
          for (let t = 0; t < e; t++) {
            let e = s[++n] << 8 | s[++n];
            32768 & e && (e = -(1 + (65535 ^ e))), o.push(e);
          }
          t.ip = n;
        }
        function fn(e, t, n, s, o, r) {
          const a = r.stack,
            i = e && a.pop(),
            l = a.pop(),
            u = r.rp0,
            c = r.z0[u],
            p = r.z1[l],
            f = r.minDis,
            h = r.fv,
            d = r.dpv;
          let g, m, y, v;
          m = g = d.distance(p, c, !0, !0), y = m >= 0 ? 1 : -1, m = Math.abs(m), e && (v = r.cvt[i], s && Math.abs(m - v) < r.cvCutIn && (m = v)), n && m < f && (m = f), s && (m = r.round(m)), h.setRelative(p, c, y * m, d), h.touch(p), exports.DEBUG && console.log(r.step, (e ? "MIRP[" : "MDRP[") + (t ? "M" : "m") + (n ? ">" : "_") + (s ? "R" : "_") + (0 === o ? "Gr" : 1 === o ? "Bl" : 2 === o ? "Wh" : "") + "]", e ? i + "(" + r.cvt[i] + "," + v + ")" : "", l, "(d =", g, "->", y * m, ")"), r.rp1 = r.rp0, r.rp2 = l, t && (r.rp0 = l);
        }
        wt.prototype.exec = function (e, t) {
          if ("number" != typeof t) throw new Error("Point size is not a number!");
          if (this._errorState > 2) return;
          const n = this.font;
          let s = this._prepState;
          if (!s || s.ppem !== t) {
            let e = this._fpgmState;
            if (!e) {
              Ht.prototype = _t, e = this._fpgmState = new Ht("fpgm", n.tables.fpgm), e.funcs = [], e.font = n, exports.DEBUG && (console.log("---EXEC FPGM---"), e.step = -1);
              try {
                kt(e);
              } catch (e) {
                return console.log("Hinting error in FPGM:" + e), void (this._errorState = 3);
              }
            }
            Ht.prototype = e, s = this._prepState = new Ht("prep", n.tables.prep), s.ppem = t;
            const o = n.tables.cvt;
            if (o) {
              const e = s.cvt = new Array(o.length),
                r = t / n.unitsPerEm;
              for (let t = 0; t < o.length; t++) e[t] = o[t] * r;
            } else s.cvt = [];
            exports.DEBUG && (console.log("---EXEC PREP---"), s.step = -1);
            try {
              kt(s);
            } catch (e) {
              this._errorState < 2 && console.log("Hinting error in PREP:" + e), this._errorState = 2;
            }
          }
          if (!(this._errorState > 1)) try {
            return Tt(e, s);
          } catch (e) {
            return this._errorState < 1 && (console.log("Hinting error:" + e), console.log("Note: further hinting errors are silenced")), void (this._errorState = 1);
          }
        }, Tt = function (e, t) {
          const n = t.ppem / t.font.unitsPerEm,
            s = n;
          let o,
            r,
            a,
            i = e.components;
          if (Ht.prototype = t, i) {
            const l = t.font;
            r = [], o = [];
            for (let e = 0; e < i.length; e++) {
              const t = i[e],
                u = l.glyphs.get(t.glyphIndex);
              a = new Ht("glyf", u.instructions), exports.DEBUG && (console.log("---EXEC COMP " + e + "---"), a.step = -1), Et(u, a, n, s);
              const c = Math.round(t.dx * n),
                p = Math.round(t.dy * s),
                f = a.gZone,
                h = a.contours;
              for (let e = 0; e < f.length; e++) {
                const t = f[e];
                t.xTouched = t.yTouched = !1, t.xo = t.x = t.x + c, t.yo = t.y = t.y + p;
              }
              const d = r.length;
              r.push.apply(r, f);
              for (let e = 0; e < h.length; e++) o.push(h[e] + d);
            }
            e.instructions && !a.inhibitGridFit && (a = new Ht("glyf", e.instructions), a.gZone = a.z0 = a.z1 = a.z2 = r, a.contours = o, r.push(new Nt(0, 0), new Nt(Math.round(e.advanceWidth * n), 0)), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), a.step = -1), kt(a), r.length -= 2);
          } else a = new Ht("glyf", e.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), a.step = -1), Et(e, a, n, s), r = a.gZone;
          return r;
        }, Et = function (e, t, n, s) {
          const o = e.points || [],
            r = o.length,
            a = t.gZone = t.z0 = t.z1 = t.z2 = [],
            i = t.contours = [];
          let l, u, c;
          for (let e = 0; e < r; e++) l = o[e], a[e] = new Nt(l.x * n, l.y * s, l.lastPointOfContour, l.onCurve);
          for (let e = 0; e < r; e++) l = a[e], u || (u = l, i.push(e)), l.lastPointOfContour ? (l.nextPointOnContour = u, u.prevPointOnContour = l, u = void 0) : (c = a[e + 1], l.nextPointOnContour = c, c.prevPointOnContour = l);
          if (!t.inhibitGridFit) {
            if (exports.DEBUG) {
              console.log("PROCESSING GLYPH", t.stack);
              for (let e = 0; e < r; e++) console.log(e, a[e].x, a[e].y);
            }
            if (a.push(new Nt(0, 0), new Nt(Math.round(e.advanceWidth * n), 0)), kt(t), a.length -= 2, exports.DEBUG) {
              console.log("FINISHED GLYPH", t.stack);
              for (let e = 0; e < r; e++) console.log(e, a[e].x, a[e].y);
            }
          }
        }, kt = function (e) {
          let t = e.prog;
          if (!t) return;
          const n = t.length;
          let s;
          for (e.ip = 0; e.ip < n; e.ip++) {
            if (exports.DEBUG && e.step++, s = Ut[t[e.ip]], !s) throw new Error("unknown instruction: 0x" + Number(t[e.ip]).toString(16));
            s(e);
          }
        }, Ut = [qt.bind(void 0, At), qt.bind(void 0, Mt), jt.bind(void 0, At), jt.bind(void 0, Mt), Xt.bind(void 0, At), Xt.bind(void 0, Mt), Vt.bind(void 0, 0), Vt.bind(void 0, 1), Yt.bind(void 0, 0), Yt.bind(void 0, 1), function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "SPVFS[]", n, s), e.pv = e.dpv = Gt(s, n);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "SPVFS[]", n, s), e.fv = Gt(s, n);
        }, function (e) {
          const t = e.stack,
            n = e.pv;
          exports.DEBUG && console.log(e.step, "GPV[]"), t.push(16384 * n.x), t.push(16384 * n.y);
        }, function (e) {
          const t = e.stack,
            n = e.fv;
          exports.DEBUG && console.log(e.step, "GFV[]"), t.push(16384 * n.x), t.push(16384 * n.y);
        }, function (e) {
          e.fv = e.pv, exports.DEBUG && console.log(e.step, "SFVTPV[]");
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop(),
            o = t.pop(),
            r = t.pop(),
            a = t.pop(),
            i = e.z0,
            l = e.z1,
            u = i[n],
            c = i[s],
            p = l[o],
            f = l[r],
            h = e.z2[a];
          exports.DEBUG && console.log("ISECT[], ", n, s, o, r, a);
          const d = u.x,
            g = u.y,
            m = c.x,
            y = c.y,
            v = p.x,
            b = p.y,
            x = f.x,
            S = f.y,
            U = (d - m) * (b - S) - (g - y) * (v - x),
            k = d * y - g * m,
            T = v * S - b * x;
          h.x = (k * (v - x) - T * (d - m)) / U, h.y = (k * (b - S) - T * (g - y)) / U;
        }, function (e) {
          e.rp0 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
        }, function (e) {
          e.rp1 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
        }, function (e) {
          e.rp2 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
        }, function (e) {
          const t = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "SZP0[]", t), e.zp0 = t, t) {
            case 0:
              e.tZone || zt(e), e.z0 = e.tZone;
              break;
            case 1:
              e.z0 = e.gZone;
              break;
            default:
              throw new Error("Invalid zone pointer");
          }
        }, function (e) {
          const t = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "SZP1[]", t), e.zp1 = t, t) {
            case 0:
              e.tZone || zt(e), e.z1 = e.tZone;
              break;
            case 1:
              e.z1 = e.gZone;
              break;
            default:
              throw new Error("Invalid zone pointer");
          }
        }, function (e) {
          const t = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "SZP2[]", t), e.zp2 = t, t) {
            case 0:
              e.tZone || zt(e), e.z2 = e.tZone;
              break;
            case 1:
              e.z2 = e.gZone;
              break;
            default:
              throw new Error("Invalid zone pointer");
          }
        }, function (e) {
          const t = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "SZPS[]", t), e.zp0 = e.zp1 = e.zp2 = t, t) {
            case 0:
              e.tZone || zt(e), e.z0 = e.z1 = e.z2 = e.tZone;
              break;
            case 1:
              e.z0 = e.z1 = e.z2 = e.gZone;
              break;
            default:
              throw new Error("Invalid zone pointer");
          }
        }, function (e) {
          e.loop = e.stack.pop(), exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
        }, function (e) {
          exports.DEBUG && console.log(e.step, "RTG[]"), e.round = It;
        }, function (e) {
          exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Lt;
        }, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "SMD[]", t), e.minDis = t / 64;
        }, function (e) {
          exports.DEBUG && console.log(e.step, "ELSE[]"), Wt(e, !1);
        }, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "JMPR[]", t), e.ip += t - 1;
        }, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "SCVTCI[]", t), e.cvCutIn = t / 64;
        }, void 0, void 0, function (e) {
          const t = e.stack;
          exports.DEBUG && console.log(e.step, "DUP[]"), t.push(t[t.length - 1]);
        }, Zt, function (e) {
          exports.DEBUG && console.log(e.step, "CLEAR[]"), e.stack.length = 0;
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "SWAP[]"), t.push(n), t.push(s);
        }, function (e) {
          const t = e.stack;
          exports.DEBUG && console.log(e.step, "DEPTH[]"), t.push(t.length);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "CINDEX[]", n), t.push(t[t.length - n]);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "MINDEX[]", n), t.push(t.splice(t.length - n, 1)[0]);
        }, void 0, void 0, void 0, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "LOOPCALL[]", n, s);
          const o = e.ip,
            r = e.prog;
          e.prog = e.funcs[n];
          for (let t = 0; t < s; t++) kt(e), exports.DEBUG && console.log(++e.step, t + 1 < s ? "next loopcall" : "done loopcall", t);
          e.ip = o, e.prog = r;
        }, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "CALL[]", t);
          const n = e.ip,
            s = e.prog;
          e.prog = e.funcs[t], kt(e), e.ip = n, e.prog = s, exports.DEBUG && console.log(++e.step, "returning from", t);
        }, function (e) {
          if ("fpgm" !== e.env) throw new Error("FDEF not allowed here");
          const t = e.stack,
            n = e.prog;
          let s = e.ip;
          const o = t.pop(),
            r = s;
          for (exports.DEBUG && console.log(e.step, "FDEF[]", o); 45 !== n[++s];);
          e.ip = s, e.funcs[o] = n.slice(r + 1, s);
        }, void 0, Qt.bind(void 0, 0), Qt.bind(void 0, 1), Jt.bind(void 0, At), Jt.bind(void 0, Mt), Kt.bind(void 0, 0), Kt.bind(void 0, 1), $t.bind(void 0, 0), $t.bind(void 0, 1), en.bind(void 0, 0), en.bind(void 0, 1), function (e) {
          const t = e.stack;
          let n = e.loop;
          const s = e.fv,
            o = t.pop() / 64,
            r = e.z2;
          for (; n--;) {
            const a = t.pop(),
              i = r[a];
            exports.DEBUG && console.log(e.step, (e.loop > 1 ? "loop " + (e.loop - n) + ": " : "") + "SHPIX[]", a, o), s.setRelative(i, i, o), s.touch(i);
          }
          e.loop = 1;
        }, function (e) {
          const t = e.stack,
            n = e.rp1,
            s = e.rp2;
          let o = e.loop;
          const r = e.z0[n],
            a = e.z1[s],
            i = e.fv,
            l = e.dpv,
            u = e.z2;
          for (; o--;) {
            const c = t.pop(),
              p = u[c];
            exports.DEBUG && console.log(e.step, (e.loop > 1 ? "loop " + (e.loop - o) + ": " : "") + "IP[]", c, n, "<->", s), i.interpolate(p, r, a, l), i.touch(p);
          }
          e.loop = 1;
        }, tn.bind(void 0, 0), tn.bind(void 0, 1), function (e) {
          const t = e.stack,
            n = e.rp0,
            s = e.z0[n];
          let o = e.loop;
          const r = e.fv,
            a = e.pv,
            i = e.z1;
          for (; o--;) {
            const n = t.pop(),
              l = i[n];
            exports.DEBUG && console.log(e.step, (e.loop > 1 ? "loop " + (e.loop - o) + ": " : "") + "ALIGNRP[]", n), r.setRelative(l, s, 0, a), r.touch(l);
          }
          e.loop = 1;
        }, function (e) {
          exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Rt;
        }, nn.bind(void 0, 0), nn.bind(void 0, 1), function (e) {
          const t = e.prog;
          let n = e.ip;
          const s = e.stack,
            o = t[++n];
          exports.DEBUG && console.log(e.step, "NPUSHB[]", o);
          for (let e = 0; e < o; e++) s.push(t[++n]);
          e.ip = n;
        }, function (e) {
          let t = e.ip;
          const n = e.prog,
            s = e.stack,
            o = n[++t];
          exports.DEBUG && console.log(e.step, "NPUSHW[]", o);
          for (let e = 0; e < o; e++) {
            let e = n[++t] << 8 | n[++t];
            32768 & e && (e = -(1 + (65535 ^ e))), s.push(e);
          }
          e.ip = t;
        }, function (e) {
          const t = e.stack;
          let n = e.store;
          n || (n = e.store = []);
          const s = t.pop(),
            o = t.pop();
          exports.DEBUG && console.log(e.step, "WS", s, o), n[o] = s;
        }, function (e) {
          const t = e.stack,
            n = e.store,
            s = t.pop();
          exports.DEBUG && console.log(e.step, "RS", s);
          const o = n && n[s] || 0;
          t.push(o);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "WCVTP", n, s), e.cvt[s] = n / 64;
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "RCVT", n), t.push(64 * e.cvt[n]);
        }, sn.bind(void 0, 0), sn.bind(void 0, 1), void 0, on.bind(void 0, 0), on.bind(void 0, 1), function (e) {
          exports.DEBUG && console.log(e.step, "MPPEM[]"), e.stack.push(e.ppem);
        }, void 0, function (e) {
          exports.DEBUG && console.log(e.step, "FLIPON[]"), e.autoFlip = !0;
        }, void 0, void 0, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "LT[]", n, s), t.push(s < n ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "LTEQ[]", n, s), t.push(s <= n ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "GT[]", n, s), t.push(s > n ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "GTEQ[]", n, s), t.push(s >= n ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "EQ[]", n, s), t.push(n === s ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "NEQ[]", n, s), t.push(n !== s ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "ODD[]", n), t.push(Math.trunc(n) % 2 ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "EVEN[]", n), t.push(Math.trunc(n) % 2 ? 0 : 1);
        }, function (e) {
          let t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "IF[]", t), t || (Wt(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
        }, function (e) {
          exports.DEBUG && console.log(e.step, "EIF[]");
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "AND[]", n, s), t.push(n && s ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "OR[]", n, s), t.push(n || s ? 1 : 0);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "NOT[]", n), t.push(n ? 0 : 1);
        }, rn.bind(void 0, 1), function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "SDB[]", t), e.deltaBase = t;
        }, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "SDS[]", t), e.deltaShift = Math.pow(.5, t);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "ADD[]", n, s), t.push(s + n);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "SUB[]", n, s), t.push(s - n);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "DIV[]", n, s), t.push(64 * s / n);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "MUL[]", n, s), t.push(s * n / 64);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "ABS[]", n), t.push(Math.abs(n));
        }, function (e) {
          const t = e.stack;
          let n = t.pop();
          exports.DEBUG && console.log(e.step, "NEG[]", n), t.push(-n);
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "FLOOR[]", n), t.push(64 * Math.floor(n / 64));
        }, function (e) {
          const t = e.stack,
            n = t.pop();
          exports.DEBUG && console.log(e.step, "CEILING[]", n), t.push(64 * Math.ceil(n / 64));
        }, an.bind(void 0, 0), an.bind(void 0, 1), an.bind(void 0, 2), an.bind(void 0, 3), void 0, void 0, void 0, void 0, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "WCVTF[]", n, s), e.cvt[s] = n * e.ppem / e.font.unitsPerEm;
        }, rn.bind(void 0, 2), rn.bind(void 0, 3), ln.bind(void 0, 1), ln.bind(void 0, 2), ln.bind(void 0, 3), function (e) {
          let t,
            n = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "SROUND[]", n), e.round = Dt, 192 & n) {
            case 0:
              t = .5;
              break;
            case 64:
              t = 1;
              break;
            case 128:
              t = 2;
              break;
            default:
              throw new Error("invalid SROUND value");
          }
          switch (e.srPeriod = t, 48 & n) {
            case 0:
              e.srPhase = 0;
              break;
            case 16:
              e.srPhase = .25 * t;
              break;
            case 32:
              e.srPhase = .5 * t;
              break;
            case 48:
              e.srPhase = .75 * t;
              break;
            default:
              throw new Error("invalid SROUND value");
          }
          n &= 15, e.srThreshold = 0 === n ? 0 : (n / 8 - .5) * t;
        }, function (e) {
          let t,
            n = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "S45ROUND[]", n), e.round = Dt, 192 & n) {
            case 0:
              t = Math.sqrt(2) / 2;
              break;
            case 64:
              t = Math.sqrt(2);
              break;
            case 128:
              t = 2 * Math.sqrt(2);
              break;
            default:
              throw new Error("invalid S45ROUND value");
          }
          switch (e.srPeriod = t, 48 & n) {
            case 0:
              e.srPhase = 0;
              break;
            case 16:
              e.srPhase = .25 * t;
              break;
            case 32:
              e.srPhase = .5 * t;
              break;
            case 48:
              e.srPhase = .75 * t;
              break;
            default:
              throw new Error("invalid S45ROUND value");
          }
          n &= 15, e.srThreshold = 0 === n ? 0 : (n / 8 - .5) * t;
        }, void 0, void 0, function (e) {
          exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Ot;
        }, void 0, function (e) {
          exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Bt;
        }, function (e) {
          exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Ct;
        }, Zt, Zt, void 0, void 0, void 0, void 0, void 0, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "SCANCTRL[]", t);
        }, un.bind(void 0, 0), un.bind(void 0, 1), function (e) {
          const t = e.stack,
            n = t.pop();
          let s = 0;
          exports.DEBUG && console.log(e.step, "GETINFO[]", n), 1 & n && (s = 35), 32 & n && (s |= 4096), t.push(s);
        }, void 0, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop(),
            o = t.pop();
          exports.DEBUG && console.log(e.step, "ROLL[]"), t.push(s), t.push(n), t.push(o);
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "MAX[]", n, s), t.push(Math.max(s, n));
        }, function (e) {
          const t = e.stack,
            n = t.pop(),
            s = t.pop();
          exports.DEBUG && console.log(e.step, "MIN[]", n, s), t.push(Math.min(s, n));
        }, function (e) {
          const t = e.stack.pop();
          exports.DEBUG && console.log(e.step, "SCANTYPE[]", t);
        }, function (e) {
          const t = e.stack.pop();
          let n = e.stack.pop();
          switch (exports.DEBUG && console.log(e.step, "INSTCTRL[]", t, n), t) {
            case 1:
              return void (e.inhibitGridFit = !!n);
            case 2:
              return void (e.ignoreCvt = !!n);
            default:
              throw new Error("invalid INSTCTRL[] selector");
          }
        }, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, cn.bind(void 0, 1), cn.bind(void 0, 2), cn.bind(void 0, 3), cn.bind(void 0, 4), cn.bind(void 0, 5), cn.bind(void 0, 6), cn.bind(void 0, 7), cn.bind(void 0, 8), pn.bind(void 0, 1), pn.bind(void 0, 2), pn.bind(void 0, 3), pn.bind(void 0, 4), pn.bind(void 0, 5), pn.bind(void 0, 6), pn.bind(void 0, 7), pn.bind(void 0, 8), fn.bind(void 0, 0, 0, 0, 0, 0), fn.bind(void 0, 0, 0, 0, 0, 1), fn.bind(void 0, 0, 0, 0, 0, 2), fn.bind(void 0, 0, 0, 0, 0, 3), fn.bind(void 0, 0, 0, 0, 1, 0), fn.bind(void 0, 0, 0, 0, 1, 1), fn.bind(void 0, 0, 0, 0, 1, 2), fn.bind(void 0, 0, 0, 0, 1, 3), fn.bind(void 0, 0, 0, 1, 0, 0), fn.bind(void 0, 0, 0, 1, 0, 1), fn.bind(void 0, 0, 0, 1, 0, 2), fn.bind(void 0, 0, 0, 1, 0, 3), fn.bind(void 0, 0, 0, 1, 1, 0), fn.bind(void 0, 0, 0, 1, 1, 1), fn.bind(void 0, 0, 0, 1, 1, 2), fn.bind(void 0, 0, 0, 1, 1, 3), fn.bind(void 0, 0, 1, 0, 0, 0), fn.bind(void 0, 0, 1, 0, 0, 1), fn.bind(void 0, 0, 1, 0, 0, 2), fn.bind(void 0, 0, 1, 0, 0, 3), fn.bind(void 0, 0, 1, 0, 1, 0), fn.bind(void 0, 0, 1, 0, 1, 1), fn.bind(void 0, 0, 1, 0, 1, 2), fn.bind(void 0, 0, 1, 0, 1, 3), fn.bind(void 0, 0, 1, 1, 0, 0), fn.bind(void 0, 0, 1, 1, 0, 1), fn.bind(void 0, 0, 1, 1, 0, 2), fn.bind(void 0, 0, 1, 1, 0, 3), fn.bind(void 0, 0, 1, 1, 1, 0), fn.bind(void 0, 0, 1, 1, 1, 1), fn.bind(void 0, 0, 1, 1, 1, 2), fn.bind(void 0, 0, 1, 1, 1, 3), fn.bind(void 0, 1, 0, 0, 0, 0), fn.bind(void 0, 1, 0, 0, 0, 1), fn.bind(void 0, 1, 0, 0, 0, 2), fn.bind(void 0, 1, 0, 0, 0, 3), fn.bind(void 0, 1, 0, 0, 1, 0), fn.bind(void 0, 1, 0, 0, 1, 1), fn.bind(void 0, 1, 0, 0, 1, 2), fn.bind(void 0, 1, 0, 0, 1, 3), fn.bind(void 0, 1, 0, 1, 0, 0), fn.bind(void 0, 1, 0, 1, 0, 1), fn.bind(void 0, 1, 0, 1, 0, 2), fn.bind(void 0, 1, 0, 1, 0, 3), fn.bind(void 0, 1, 0, 1, 1, 0), fn.bind(void 0, 1, 0, 1, 1, 1), fn.bind(void 0, 1, 0, 1, 1, 2), fn.bind(void 0, 1, 0, 1, 1, 3), fn.bind(void 0, 1, 1, 0, 0, 0), fn.bind(void 0, 1, 1, 0, 0, 1), fn.bind(void 0, 1, 1, 0, 0, 2), fn.bind(void 0, 1, 1, 0, 0, 3), fn.bind(void 0, 1, 1, 0, 1, 0), fn.bind(void 0, 1, 1, 0, 1, 1), fn.bind(void 0, 1, 1, 0, 1, 2), fn.bind(void 0, 1, 1, 0, 1, 3), fn.bind(void 0, 1, 1, 1, 0, 0), fn.bind(void 0, 1, 1, 1, 0, 1), fn.bind(void 0, 1, 1, 1, 0, 2), fn.bind(void 0, 1, 1, 1, 0, 3), fn.bind(void 0, 1, 1, 1, 1, 0), fn.bind(void 0, 1, 1, 1, 1, 1), fn.bind(void 0, 1, 1, 1, 1, 2), fn.bind(void 0, 1, 1, 1, 1, 3)];
        const hn = wt;
        function dn(e) {
          (e = e || {}).empty || (St(e.familyName, "When creating a new Font object, familyName is required."), St(e.styleName, "When creating a new Font object, styleName is required."), St(e.unitsPerEm, "When creating a new Font object, unitsPerEm is required."), St(e.ascender, "When creating a new Font object, ascender is required."), St(e.descender, "When creating a new Font object, descender is required."), St(e.descender < 0, "Descender should be negative (e.g. -512)."), this.names = {
            fontFamily: {
              en: e.familyName || " "
            },
            fontSubfamily: {
              en: e.styleName || " "
            },
            fullName: {
              en: e.fullName || e.familyName + " " + e.styleName
            },
            postScriptName: {
              en: e.postScriptName || e.familyName + e.styleName
            },
            designer: {
              en: e.designer || " "
            },
            designerURL: {
              en: e.designerURL || " "
            },
            manufacturer: {
              en: e.manufacturer || " "
            },
            manufacturerURL: {
              en: e.manufacturerURL || " "
            },
            license: {
              en: e.license || " "
            },
            licenseURL: {
              en: e.licenseURL || " "
            },
            version: {
              en: e.version || "Version 0.1"
            },
            description: {
              en: e.description || " "
            },
            copyright: {
              en: e.copyright || " "
            },
            trademark: {
              en: e.trademark || " "
            }
          }, this.unitsPerEm = e.unitsPerEm || 1e3, this.ascender = e.ascender, this.descender = e.descender, this.createdTimestamp = e.createdTimestamp, this.tables = {
            os2: {
              usWeightClass: e.weightClass || this.usWeightClasses.MEDIUM,
              usWidthClass: e.widthClass || this.usWidthClasses.MEDIUM,
              fsSelection: e.fsSelection || this.fsSelectionValues.REGULAR
            }
          }), this.supported = !0, this.glyphs = new ce.GlyphSet(this, e.glyphs || []), this.encoding = new Z(this), this.position = new gt(this), this.substitution = new bt(this), this.tables = this.tables || {}, Object.defineProperty(this, "hinting", {
            get: function () {
              return this._hinting ? this._hinting : "truetype" === this.outlinesFormat ? this._hinting = new hn(this) : void 0;
            }
          });
        }
        dn.prototype.hasChar = function (e) {
          return null !== this.encoding.charToGlyphIndex(e);
        }, dn.prototype.charToGlyphIndex = function (e) {
          return this.encoding.charToGlyphIndex(e);
        }, dn.prototype.charToGlyph = function (e) {
          const t = this.charToGlyphIndex(e);
          let n = this.glyphs.get(t);
          return n || (n = this.glyphs.get(0)), n;
        }, dn.prototype.stringToGlyphs = function (e, t) {
          t = t || this.defaultRenderOptions;
          const n = [];
          for (let t = 0; t < e.length; t += 1) {
            const s = e[t];
            n.push(this.charToGlyphIndex(s));
          }
          let s = n.length;
          if (t.features) {
            const e = t.script || this.substitution.getDefaultScriptName();
            let o = [];
            t.features.liga && (o = o.concat(this.substitution.getFeature("liga", e, t.language))), t.features.rlig && (o = o.concat(this.substitution.getFeature("rlig", e, t.language)));
            for (let e = 0; e < s; e += 1) for (let t = 0; t < o.length; t++) {
              const r = o[t],
                a = r.sub,
                i = a.length;
              let l = 0;
              for (; l < i && a[l] === n[e + l];) l++;
              l === i && (n.splice(e, i, r.by), s = s - i + 1);
            }
          }
          const o = new Array(s),
            r = this.glyphs.get(0);
          for (let e = 0; e < s; e += 1) o[e] = this.glyphs.get(n[e]) || r;
          return o;
        }, dn.prototype.nameToGlyphIndex = function (e) {
          return this.glyphNames.nameToGlyphIndex(e);
        }, dn.prototype.nameToGlyph = function (e) {
          const t = this.nameToGlyphIndex(e);
          let n = this.glyphs.get(t);
          return n || (n = this.glyphs.get(0)), n;
        }, dn.prototype.glyphIndexToName = function (e) {
          return this.glyphNames.glyphIndexToName ? this.glyphNames.glyphIndexToName(e) : "";
        }, dn.prototype.getKerningValue = function (e, t) {
          return e = e.index || e, t = t.index || t, this.kerningPairs[e + "," + t] || 0;
        }, dn.prototype.defaultRenderOptions = {
          kerning: !0,
          features: {
            liga: !0,
            rlig: !0
          }
        }, dn.prototype.forEachGlyph = function (e, t, n, s, o, r) {
          t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 72, o = o || this.defaultRenderOptions;
          const a = 1 / this.unitsPerEm * s,
            i = this.stringToGlyphs(e, o);
          let l;
          if (o.kerning) {
            const e = o.script || this.position.getDefaultScriptName();
            l = this.position.getKerningTables(e, o.language);
          }
          for (let e = 0; e < i.length; e += 1) {
            const u = i[e];
            r.call(this, u, t, n, s, o), u.advanceWidth && (t += u.advanceWidth * a), o.kerning && e < i.length - 1 && (t += (l ? this.position.getKerningValue(l, u.index, i[e + 1].index) : this.getKerningValue(u, i[e + 1])) * a), o.letterSpacing ? t += o.letterSpacing * s : o.tracking && (t += o.tracking / 1e3 * s);
          }
          return t;
        }, dn.prototype.getPath = function (e, t, n, s, o) {
          const r = new u();
          return this.forEachGlyph(e, t, n, s, o, function (e, t, n, s) {
            const a = e.getPath(t, n, s, o, this);
            r.extend(a);
          }), r;
        }, dn.prototype.getPaths = function (e, t, n, s, o) {
          const r = [];
          return this.forEachGlyph(e, t, n, s, o, function (e, t, n, s) {
            const a = e.getPath(t, n, s, o, this);
            r.push(a);
          }), r;
        }, dn.prototype.getAdvanceWidth = function (e, t, n) {
          return this.forEachGlyph(e, 0, 0, t, n, function () {});
        }, dn.prototype.draw = function (e, t, n, s, o, r) {
          this.getPath(t, n, s, o, r).draw(e);
        }, dn.prototype.drawPoints = function (e, t, n, s, o, r) {
          this.forEachGlyph(t, n, s, o, r, function (t, n, s, o) {
            t.drawPoints(e, n, s, o);
          });
        }, dn.prototype.drawMetrics = function (e, t, n, s, o, r) {
          this.forEachGlyph(t, n, s, o, r, function (t, n, s, o) {
            t.drawMetrics(e, n, s, o);
          });
        }, dn.prototype.getEnglishName = function (e) {
          const t = this.names[e];
          if (t) return t.en;
        }, dn.prototype.validate = function () {
          const e = [],
            t = this;
          function n(t, n) {
            t || e.push(n);
          }
          function s(e) {
            const s = t.getEnglishName(e);
            n(s && s.trim().length > 0, "No English " + e + " specified.");
          }
          s("fontFamily"), s("weightName"), s("manufacturer"), s("copyright"), s("version"), n(this.unitsPerEm > 0, "No unitsPerEm specified.");
        }, dn.prototype.toTables = function () {
          return lt(this);
        }, dn.prototype.toBuffer = function () {
          return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
        }, dn.prototype.toArrayBuffer = function () {
          const e = this.toTables().encode(),
            t = new ArrayBuffer(e.length),
            n = new Uint8Array(t);
          for (let t = 0; t < e.length; t++) n[t] = e[t];
          return t;
        }, dn.prototype.download = function (e) {
          const t = this.getEnglishName("fontFamily"),
            s = this.getEnglishName("fontSubfamily");
          e = e || t.replace(/\s/g, "") + "-" + s + ".otf";
          const o = this.toArrayBuffer();
          if ("undefined" != typeof window) window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem, window.requestFileSystem(window.TEMPORARY, o.byteLength, function (t) {
            t.root.getFile(e, {
              create: !0
            }, function (e) {
              e.createWriter(function (t) {
                const n = new DataView(o),
                  s = new Blob([n], {
                    type: "font/opentype"
                  });
                t.write(s), t.addEventListener("writeend", function () {
                  location.href = e.toURL();
                }, !1);
              });
            });
          }, function (e) {
            throw new Error(e.name + ": " + e.message);
          });else {
            const t = n(89),
              s = function (e) {
                const t = new Buffer(e.byteLength),
                  n = new Uint8Array(e);
                for (let e = 0; e < t.length; ++e) t[e] = n[e];
                return t;
              }(o);
            t.writeFileSync(e, s);
          }
        }, dn.prototype.fsSelectionValues = {
          ITALIC: 1,
          UNDERSCORE: 2,
          NEGATIVE: 4,
          OUTLINED: 8,
          STRIKEOUT: 16,
          BOLD: 32,
          REGULAR: 64,
          USER_TYPO_METRICS: 128,
          WWS: 256,
          OBLIQUE: 512
        }, dn.prototype.usWidthClasses = {
          ULTRA_CONDENSED: 1,
          EXTRA_CONDENSED: 2,
          CONDENSED: 3,
          SEMI_CONDENSED: 4,
          MEDIUM: 5,
          SEMI_EXPANDED: 6,
          EXPANDED: 7,
          EXTRA_EXPANDED: 8,
          ULTRA_EXPANDED: 9
        }, dn.prototype.usWeightClasses = {
          THIN: 100,
          EXTRA_LIGHT: 200,
          LIGHT: 300,
          NORMAL: 400,
          MEDIUM: 500,
          SEMI_BOLD: 600,
          BOLD: 700,
          EXTRA_BOLD: 800,
          BLACK: 900
        };
        const gn = dn;
        function mn(e, t) {
          const n = JSON.stringify(e);
          let s = 256;
          for (let e in t) {
            let o = parseInt(e);
            if (o && !(o < 256)) {
              if (JSON.stringify(t[e]) === n) return o;
              s <= o && (s = o + 1);
            }
          }
          return t[s] = e, s;
        }
        function yn(e, t, n) {
          const s = mn(t.name, n);
          return [{
            name: "tag_" + e,
            type: "TAG",
            value: t.tag
          }, {
            name: "minValue_" + e,
            type: "FIXED",
            value: t.minValue << 16
          }, {
            name: "defaultValue_" + e,
            type: "FIXED",
            value: t.defaultValue << 16
          }, {
            name: "maxValue_" + e,
            type: "FIXED",
            value: t.maxValue << 16
          }, {
            name: "flags_" + e,
            type: "USHORT",
            value: 0
          }, {
            name: "nameID_" + e,
            type: "USHORT",
            value: s
          }];
        }
        function vn(e, t, n) {
          const s = {},
            o = new z.Parser(e, t);
          return s.tag = o.parseTag(), s.minValue = o.parseFixed(), s.defaultValue = o.parseFixed(), s.maxValue = o.parseFixed(), o.skip("uShort", 1), s.name = n[o.parseUShort()] || {}, s;
        }
        function bn(e, t, n, s) {
          const o = [{
            name: "nameID_" + e,
            type: "USHORT",
            value: mn(t.name, s)
          }, {
            name: "flags_" + e,
            type: "USHORT",
            value: 0
          }];
          for (let s = 0; s < n.length; ++s) {
            const r = n[s].tag;
            o.push({
              name: "axis_" + e + " " + r,
              type: "FIXED",
              value: t.coordinates[r] << 16
            });
          }
          return o;
        }
        function xn(e, t, n, s) {
          const o = {},
            r = new z.Parser(e, t);
          o.name = s[r.parseUShort()] || {}, r.skip("uShort", 1), o.coordinates = {};
          for (let e = 0; e < n.length; ++e) o.coordinates[n[e].tag] = r.parseFixed();
          return o;
        }
        const Sn = {
            make: function (e, t) {
              const n = new M.Table("fvar", [{
                name: "version",
                type: "ULONG",
                value: 65536
              }, {
                name: "offsetToData",
                type: "USHORT",
                value: 0
              }, {
                name: "countSizePairs",
                type: "USHORT",
                value: 2
              }, {
                name: "axisCount",
                type: "USHORT",
                value: e.axes.length
              }, {
                name: "axisSize",
                type: "USHORT",
                value: 20
              }, {
                name: "instanceCount",
                type: "USHORT",
                value: e.instances.length
              }, {
                name: "instanceSize",
                type: "USHORT",
                value: 4 + 4 * e.axes.length
              }]);
              n.offsetToData = n.sizeOf();
              for (let s = 0; s < e.axes.length; s++) n.fields = n.fields.concat(yn(s, e.axes[s], t));
              for (let s = 0; s < e.instances.length; s++) n.fields = n.fields.concat(bn(s, e.instances[s], e.axes, t));
              return n;
            },
            parse: function (e, t, n) {
              const s = new z.Parser(e, t),
                o = s.parseULong();
              f.argument(65536 === o, "Unsupported fvar table version.");
              const r = s.parseOffset16();
              s.skip("uShort", 1);
              const a = s.parseUShort(),
                i = s.parseUShort(),
                l = s.parseUShort(),
                u = s.parseUShort(),
                c = [];
              for (let s = 0; s < a; s++) c.push(vn(e, t + r + s * i, n));
              const p = [],
                h = t + r + a * i;
              for (let t = 0; t < l; t++) p.push(xn(e, h + t * u, c, n));
              return {
                axes: c,
                instances: p
              };
            }
          },
          Un = new Array(10);
        Un[1] = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort();
          return 1 === t ? {
            posFormat: 1,
            coverage: this.parsePointer(_.coverage),
            value: this.parseValueRecord()
          } : 2 === t ? {
            posFormat: 2,
            coverage: this.parsePointer(_.coverage),
            values: this.parseValueRecordList()
          } : void f.assert(!1, "0x" + e.toString(16) + ": GPOS lookup type 1 format must be 1 or 2.");
        }, Un[2] = function () {
          const e = this.offset + this.relativeOffset,
            t = this.parseUShort(),
            n = this.parsePointer(_.coverage),
            s = this.parseUShort(),
            o = this.parseUShort();
          if (1 === t) return {
            posFormat: t,
            coverage: n,
            valueFormat1: s,
            valueFormat2: o,
            pairSets: this.parseList(_.pointer(_.list(function () {
              return {
                secondGlyph: this.parseUShort(),
                value1: this.parseValueRecord(s),
                value2: this.parseValueRecord(o)
              };
            })))
          };
          if (2 === t) {
            const e = this.parsePointer(_.classDef),
              r = this.parsePointer(_.classDef),
              a = this.parseUShort(),
              i = this.parseUShort();
            return {
              posFormat: t,
              coverage: n,
              valueFormat1: s,
              valueFormat2: o,
              classDef1: e,
              classDef2: r,
              class1Count: a,
              class2Count: i,
              classRecords: this.parseList(a, _.list(i, function () {
                return {
                  value1: this.parseValueRecord(s),
                  value2: this.parseValueRecord(o)
                };
              }))
            };
          }
          f.assert(!1, "0x" + e.toString(16) + ": GPOS lookup type 2 format must be 1 or 2.");
        }, Un[3] = function () {
          return {
            error: "GPOS Lookup 3 not supported"
          };
        }, Un[4] = function () {
          return {
            error: "GPOS Lookup 4 not supported"
          };
        }, Un[5] = function () {
          return {
            error: "GPOS Lookup 5 not supported"
          };
        }, Un[6] = function () {
          return {
            error: "GPOS Lookup 6 not supported"
          };
        }, Un[7] = function () {
          return {
            error: "GPOS Lookup 7 not supported"
          };
        }, Un[8] = function () {
          return {
            error: "GPOS Lookup 8 not supported"
          };
        }, Un[9] = function () {
          return {
            error: "GPOS Lookup 9 not supported"
          };
        };
        const kn = new Array(10),
          Tn = {
            parse: function (e, t) {
              const n = new _(e, t = t || 0),
                s = n.parseVersion(1);
              return f.argument(1 === s || 1.1 === s, "Unsupported GPOS table version " + s), 1 === s ? {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(Un)
              } : {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(Un),
                variations: n.parseFeatureVariationsList()
              };
            },
            make: function (e) {
              return new M.Table("GPOS", [{
                name: "version",
                type: "ULONG",
                value: 65536
              }, {
                name: "scripts",
                type: "TABLE",
                value: new M.ScriptList(e.scripts)
              }, {
                name: "features",
                type: "TABLE",
                value: new M.FeatureList(e.features)
              }, {
                name: "lookups",
                type: "TABLE",
                value: new M.LookupList(e.lookups, kn)
              }]);
            }
          },
          En = {
            parse: function (e, t) {
              const n = new z.Parser(e, t),
                s = n.parseUShort();
              if (0 === s) return function (e) {
                const t = {};
                e.skip("uShort");
                const n = e.parseUShort();
                f.argument(0 === n, "Unsupported kern sub-table version."), e.skip("uShort", 2);
                const s = e.parseUShort();
                e.skip("uShort", 3);
                for (let n = 0; n < s; n += 1) {
                  const n = e.parseUShort(),
                    s = e.parseUShort(),
                    o = e.parseShort();
                  t[n + "," + s] = o;
                }
                return t;
              }(n);
              if (1 === s) return function (e) {
                const t = {};
                e.skip("uShort"), e.parseULong() > 1 && console.warn("Only the first kern subtable is supported."), e.skip("uLong");
                const n = 255 & e.parseUShort();
                if (e.skip("uShort"), 0 === n) {
                  const n = e.parseUShort();
                  e.skip("uShort", 3);
                  for (let s = 0; s < n; s += 1) {
                    const n = e.parseUShort(),
                      s = e.parseUShort(),
                      o = e.parseShort();
                    t[n + "," + s] = o;
                  }
                }
                return t;
              }(n);
              throw new Error("Unsupported kern table version (" + s + ").");
            }
          },
          wn = {
            parse: function (e, t, n, s) {
              const o = new z.Parser(e, t),
                r = s ? o.parseUShort : o.parseULong,
                a = [];
              for (let e = 0; e < n + 1; e += 1) {
                let e = r.call(o);
                s && (e *= 2), a.push(e);
              }
              return a;
            }
          };
        function On(e, t) {
          n(89).readFile(e, function (e, n) {
            if (e) return t(e.message);
            t(null, xt(n));
          });
        }
        function In(e, t) {
          const n = new XMLHttpRequest();
          n.open("get", e, !0), n.responseType = "arraybuffer", n.onload = function () {
            return n.response ? t(null, n.response) : t("Font could not be loaded: " + n.statusText);
          }, n.onerror = function () {
            t("Font could not be loaded");
          }, n.send();
        }
        function Rn(e, t) {
          const n = [];
          let s = 12;
          for (let o = 0; o < t; o += 1) {
            const t = z.getTag(e, s),
              o = z.getULong(e, s + 4),
              r = z.getULong(e, s + 8),
              a = z.getULong(e, s + 12);
            n.push({
              tag: t,
              checksum: o,
              offset: r,
              length: a,
              compression: !1
            }), s += 16;
          }
          return n;
        }
        function Ln(e, t) {
          if ("WOFF" === t.compression) {
            const n = new Uint8Array(e.buffer, t.offset + 2, t.compressedLength - 2),
              s = new Uint8Array(t.length);
            if (o()(n, s), s.byteLength !== t.length) throw new Error("Decompression error: " + t.tag + " decompressed length doesn't match recorded length");
            return {
              data: new DataView(s.buffer, 0),
              offset: 0
            };
          }
          return {
            data: e,
            offset: t.offset
          };
        }
        function Bn(e) {
          let t, n;
          const s = new gn({
              empty: !0
            }),
            o = new DataView(e, 0);
          let r,
            a = [];
          const i = z.getTag(o, 0);
          if (i === String.fromCharCode(0, 1, 0, 0) || "true" === i || "typ1" === i) s.outlinesFormat = "truetype", r = z.getUShort(o, 4), a = Rn(o, r);else if ("OTTO" === i) s.outlinesFormat = "cff", r = z.getUShort(o, 4), a = Rn(o, r);else {
            if ("wOFF" !== i) throw new Error("Unsupported OpenType signature " + i);
            {
              const e = z.getTag(o, 4);
              if (e === String.fromCharCode(0, 1, 0, 0)) s.outlinesFormat = "truetype";else {
                if ("OTTO" !== e) throw new Error("Unsupported OpenType flavor " + i);
                s.outlinesFormat = "cff";
              }
              r = z.getUShort(o, 12), a = function (e, t) {
                const n = [];
                let s = 44;
                for (let o = 0; o < t; o += 1) {
                  const t = z.getTag(e, s),
                    o = z.getULong(e, s + 4),
                    r = z.getULong(e, s + 8),
                    a = z.getULong(e, s + 12);
                  let i;
                  i = r < a && "WOFF", n.push({
                    tag: t,
                    offset: o,
                    compression: i,
                    compressedLength: r,
                    length: a
                  }), s += 20;
                }
                return n;
              }(o, r);
            }
          }
          let l, u, c, p, f, h, d, g, m, y, v;
          for (let e = 0; e < r; e += 1) {
            const r = a[e];
            let i;
            switch (r.tag) {
              case "cmap":
                i = Ln(o, r), s.tables.cmap = q.parse(i.data, i.offset), s.encoding = new Q(s.tables.cmap);
                break;
              case "cvt ":
                i = Ln(o, r), v = new z.Parser(i.data, i.offset), s.tables.cvt = v.parseShortList(r.length / 2);
                break;
              case "fvar":
                u = r;
                break;
              case "fpgm":
                i = Ln(o, r), v = new z.Parser(i.data, i.offset), s.tables.fpgm = v.parseByteList(r.length);
                break;
              case "head":
                i = Ln(o, r), s.tables.head = Le.parse(i.data, i.offset), s.unitsPerEm = s.tables.head.unitsPerEm, t = s.tables.head.indexToLocFormat;
                break;
              case "hhea":
                i = Ln(o, r), s.tables.hhea = Be.parse(i.data, i.offset), s.ascender = s.tables.hhea.ascender, s.descender = s.tables.hhea.descender, s.numberOfHMetrics = s.tables.hhea.numberOfHMetrics;
                break;
              case "hmtx":
                h = r;
                break;
              case "ltag":
                i = Ln(o, r), n = De.parse(i.data, i.offset);
                break;
              case "maxp":
                i = Ln(o, r), s.tables.maxp = Me.parse(i.data, i.offset), s.numGlyphs = s.tables.maxp.numGlyphs;
                break;
              case "name":
                m = r;
                break;
              case "OS/2":
                i = Ln(o, r), s.tables.os2 = Ze.parse(i.data, i.offset);
                break;
              case "post":
                i = Ln(o, r), s.tables.post = Qe.parse(i.data, i.offset), s.glyphNames = new K(s.tables.post);
                break;
              case "prep":
                i = Ln(o, r), v = new z.Parser(i.data, i.offset), s.tables.prep = v.parseByteList(r.length);
                break;
              case "glyf":
                c = r;
                break;
              case "loca":
                g = r;
                break;
              case "CFF ":
                l = r;
                break;
              case "kern":
                d = r;
                break;
              case "GPOS":
                p = r;
                break;
              case "GSUB":
                f = r;
                break;
              case "meta":
                y = r;
            }
          }
          const b = Ln(o, m);
          if (s.tables.name = Ve.parse(b.data, b.offset, n), s.names = s.tables.name, c && g) {
            const e = 0 === t,
              n = Ln(o, g),
              r = wn.parse(n.data, n.offset, s.numGlyphs, e),
              a = Ln(o, c);
            s.glyphs = re.parse(a.data, a.offset, r, s);
          } else {
            if (!l) throw new Error("Font doesn't contain TrueType or CFF outlines.");
            {
              const e = Ln(o, l);
              Re.parse(e.data, e.offset, s);
            }
          }
          const x = Ln(o, h);
          if (Ce.parse(x.data, x.offset, s.numberOfHMetrics, s.numGlyphs, s.glyphs), function (e) {
            let t;
            const n = e.tables.cmap.glyphIndexMap,
              s = Object.keys(n);
            for (let o = 0; o < s.length; o += 1) {
              const r = s[o],
                a = n[r];
              t = e.glyphs.get(a), t.addUnicode(parseInt(r));
            }
            for (let n = 0; n < e.glyphs.length; n += 1) t = e.glyphs.get(n), e.cffEncoding ? e.isCIDFont ? t.name = "gid" + n : t.name = e.cffEncoding.charset[n] : e.glyphNames.names && (t.name = e.glyphNames.glyphIndexToName(n));
          }(s), d) {
            const e = Ln(o, d);
            s.kerningPairs = En.parse(e.data, e.offset);
          } else s.kerningPairs = {};
          if (p) {
            const e = Ln(o, p);
            s.tables.gpos = Tn.parse(e.data, e.offset);
          }
          if (f) {
            const e = Ln(o, f);
            s.tables.gsub = et.parse(e.data, e.offset);
          }
          if (u) {
            const e = Ln(o, u);
            s.tables.fvar = Sn.parse(e.data, e.offset, s.names);
          }
          if (y) {
            const e = Ln(o, y);
            s.tables.meta = tt.parse(e.data, e.offset), s.metas = s.tables.meta;
          }
          return s;
        }
        function Cn(e, t) {
          ("undefined" == typeof window ? On : In)(e, function (e, n) {
            if (e) return t(e);
            let s;
            try {
              s = Bn(n);
            } catch (e) {
              return t(e, null);
            }
            return t(null, s);
          });
        }
        function Dn(e) {
          return Bn(xt(n(89).readFileSync(e)));
        }
      },
      896: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(978);
        class o extends s.Writable {
          constructor() {
            super(...arguments), this.offset = 0, this._waiters = [], this._closed = !1;
          }
          _write(e, t, n) {
            let s = 0;
            const o = () => {
              for (; this._waiters.length > 0;) {
                const t = this._waiters[0];
                if (this._buffer) {
                  const o = this._buffer.size - this._buffer.offset;
                  if (!(o + e.length >= t.size)) {
                    if (!t.skip) {
                      const t = Buffer.alloc(o + e.length);
                      this._buffer.buf.copy(t, 0, this._buffer.offset, this._buffer.size), e.copy(t, o, 0, e.length), this._buffer.buf = t;
                    }
                    this._buffer.offset = 0, this._buffer.size = o + e.length, n();
                    break;
                  }
                  if (t.skip) this._buffer = void 0, t.resolve();else {
                    const n = Math.min(o, t.size),
                      s = Buffer.alloc(t.size);
                    this._buffer.buf.copy(s, 0, this._buffer.offset, this._buffer.offset + n), e.copy(s, n, 0, t.size - n), t.resolve(s);
                  }
                  if (this.offset += t.size, this._waiters.shift(), this._buffer = void 0, o + e.length === t.size) {
                    n();
                    break;
                  }
                  s += t.size - o;
                } else {
                  if (!(e.length - s >= t.size)) {
                    this._buffer = {
                      buf: t.skip ? void 0 : e.slice(s),
                      offset: 0,
                      size: e.length - s
                    }, s = e.length, n();
                    break;
                  }
                  if (t.skip ? t.resolve() : t.resolve(e.slice(s, s + t.size)), this.offset += t.size, this._waiters.shift(), s += t.size, e.length === s) {
                    n();
                    break;
                  }
                }
              }
              this._processTrigger = e.length - s > 0 ? o : void 0;
            };
            o();
          }
          _destroy(e, t) {
            this._processTrigger = void 0;
            for (const t of this._waiters) t.reject(e || new Error("stream destroyed"));
            this._waiters = [], this._closed = !0;
          }
          _final(e) {
            this._processTrigger = void 0;
            for (const e of this._waiters) e.reject(new Error("not enough data in stream"));
            this._waiters = [], this._closed = !0;
          }
          read(e) {
            return new Promise((t, n) => {
              this._closed && n(new Error("stream is closed")), this._waiters.push({
                resolve: t,
                reject: n,
                size: e,
                skip: !1
              }), this._processTrigger && this._processTrigger();
            });
          }
          skip(e) {
            return new Promise((t, n) => {
              this._closed && n(new Error("stream is closed")), this._waiters.push({
                resolve: t,
                reject: n,
                size: e,
                skip: !0
              }), this._processTrigger && this._processTrigger();
            });
          }
        }
        function r() {
          return new o();
        }
        e.exports = Object.assign(r, {
          default: r
        }), t.default = r;
      },
      311: e => {
        function t() {
          this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
        }
        function n(e, n) {
          this.source = e, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = n, this.destLen = 0, this.ltree = new t(), this.dtree = new t();
        }
        var s = new t(),
          o = new t(),
          r = new Uint8Array(30),
          a = new Uint16Array(30),
          i = new Uint8Array(30),
          l = new Uint16Array(30),
          u = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
          c = new t(),
          p = new Uint8Array(320);
        function f(e, t, n, s) {
          var o, r;
          for (o = 0; o < n; ++o) e[o] = 0;
          for (o = 0; o < 30 - n; ++o) e[o + n] = o / n | 0;
          for (r = s, o = 0; o < 30; ++o) t[o] = r, r += 1 << e[o];
        }
        var h = new Uint16Array(16);
        function d(e, t, n, s) {
          var o, r;
          for (o = 0; o < 16; ++o) e.table[o] = 0;
          for (o = 0; o < s; ++o) e.table[t[n + o]]++;
          for (e.table[0] = 0, r = 0, o = 0; o < 16; ++o) h[o] = r, r += e.table[o];
          for (o = 0; o < s; ++o) t[n + o] && (e.trans[h[t[n + o]]++] = o);
        }
        function g(e) {
          e.bitcount-- || (e.tag = e.source[e.sourceIndex++], e.bitcount = 7);
          var t = 1 & e.tag;
          return e.tag >>>= 1, t;
        }
        function m(e, t, n) {
          if (!t) return n;
          for (; e.bitcount < 24;) e.tag |= e.source[e.sourceIndex++] << e.bitcount, e.bitcount += 8;
          var s = e.tag & 65535 >>> 16 - t;
          return e.tag >>>= t, e.bitcount -= t, s + n;
        }
        function y(e, t) {
          for (; e.bitcount < 24;) e.tag |= e.source[e.sourceIndex++] << e.bitcount, e.bitcount += 8;
          var n = 0,
            s = 0,
            o = 0,
            r = e.tag;
          do {
            s = 2 * s + (1 & r), r >>>= 1, ++o, n += t.table[o], s -= t.table[o];
          } while (s >= 0);
          return e.tag = r, e.bitcount -= o, t.trans[n + s];
        }
        function v(e, t, n) {
          var s, o, r, a, i, l;
          for (s = m(e, 5, 257), o = m(e, 5, 1), r = m(e, 4, 4), a = 0; a < 19; ++a) p[a] = 0;
          for (a = 0; a < r; ++a) {
            var f = m(e, 3, 0);
            p[u[a]] = f;
          }
          for (d(c, p, 0, 19), i = 0; i < s + o;) {
            var h = y(e, c);
            switch (h) {
              case 16:
                var g = p[i - 1];
                for (l = m(e, 2, 3); l; --l) p[i++] = g;
                break;
              case 17:
                for (l = m(e, 3, 3); l; --l) p[i++] = 0;
                break;
              case 18:
                for (l = m(e, 7, 11); l; --l) p[i++] = 0;
                break;
              default:
                p[i++] = h;
            }
          }
          d(t, p, 0, s), d(n, p, s, o);
        }
        function b(e, t, n) {
          for (;;) {
            var s,
              o,
              u,
              c,
              p = y(e, t);
            if (256 === p) return 0;
            if (p < 256) e.dest[e.destLen++] = p;else for (s = m(e, r[p -= 257], a[p]), o = y(e, n), c = u = e.destLen - m(e, i[o], l[o]); c < u + s; ++c) e.dest[e.destLen++] = e.dest[c];
          }
        }
        function x(e) {
          for (var t, n; e.bitcount > 8;) e.sourceIndex--, e.bitcount -= 8;
          if ((t = 256 * (t = e.source[e.sourceIndex + 1]) + e.source[e.sourceIndex]) !== (65535 & ~(256 * e.source[e.sourceIndex + 3] + e.source[e.sourceIndex + 2]))) return -3;
          for (e.sourceIndex += 4, n = t; n; --n) e.dest[e.destLen++] = e.source[e.sourceIndex++];
          return e.bitcount = 0, 0;
        }
        !function (e, t) {
          var n;
          for (n = 0; n < 7; ++n) e.table[n] = 0;
          for (e.table[7] = 24, e.table[8] = 152, e.table[9] = 112, n = 0; n < 24; ++n) e.trans[n] = 256 + n;
          for (n = 0; n < 144; ++n) e.trans[24 + n] = n;
          for (n = 0; n < 8; ++n) e.trans[168 + n] = 280 + n;
          for (n = 0; n < 112; ++n) e.trans[176 + n] = 144 + n;
          for (n = 0; n < 5; ++n) t.table[n] = 0;
          for (t.table[5] = 32, n = 0; n < 32; ++n) t.trans[n] = n;
        }(s, o), f(r, a, 4, 3), f(i, l, 2, 1), r[28] = 0, a[28] = 258, e.exports = function (e, t) {
          var r,
            a,
            i = new n(e, t);
          do {
            switch (r = g(i), m(i, 2, 0)) {
              case 0:
                a = x(i);
                break;
              case 1:
                a = b(i, s, o);
                break;
              case 2:
                v(i, i.ltree, i.dtree), a = b(i, i.ltree, i.dtree);
                break;
              default:
                a = -3;
            }
            if (0 !== a) throw new Error("Data error");
          } while (!r);
          return i.destLen < i.dest.length ? "function" == typeof i.dest.slice ? i.dest.slice(0, i.destLen) : i.dest.subarray(0, i.destLen) : i.dest;
        };
      },
      371: e => {
        "use strict";

        e.exports = function (e) {
          e.prototype[Symbol.iterator] = function* () {
            for (let e = this.head; e; e = e.next) yield e.value;
          };
        };
      },
      411: (e, t, n) => {
        "use strict";

        function s(e) {
          var t = this;
          if (t instanceof s || (t = new s()), t.tail = null, t.head = null, t.length = 0, e && "function" == typeof e.forEach) e.forEach(function (e) {
            t.push(e);
          });else if (arguments.length > 0) for (var n = 0, o = arguments.length; n < o; n++) t.push(arguments[n]);
          return t;
        }
        function o(e, t, n) {
          var s = t === e.head ? new i(n, null, t, e) : new i(n, t, t.next, e);
          return null === s.next && (e.tail = s), null === s.prev && (e.head = s), e.length++, s;
        }
        function r(e, t) {
          e.tail = new i(t, e.tail, null, e), e.head || (e.head = e.tail), e.length++;
        }
        function a(e, t) {
          e.head = new i(t, null, e.head, e), e.tail || (e.tail = e.head), e.length++;
        }
        function i(e, t, n, s) {
          if (!(this instanceof i)) return new i(e, t, n, s);
          this.list = s, this.value = e, t ? (t.next = this, this.prev = t) : this.prev = null, n ? (n.prev = this, this.next = n) : this.next = null;
        }
        e.exports = s, s.Node = i, s.create = s, s.prototype.removeNode = function (e) {
          if (e.list !== this) throw new Error("removing node which does not belong to this list");
          var t = e.next,
            n = e.prev;
          return t && (t.prev = n), n && (n.next = t), e === this.head && (this.head = t), e === this.tail && (this.tail = n), e.list.length--, e.next = null, e.prev = null, e.list = null, t;
        }, s.prototype.unshiftNode = function (e) {
          if (e !== this.head) {
            e.list && e.list.removeNode(e);
            var t = this.head;
            e.list = this, e.next = t, t && (t.prev = e), this.head = e, this.tail || (this.tail = e), this.length++;
          }
        }, s.prototype.pushNode = function (e) {
          if (e !== this.tail) {
            e.list && e.list.removeNode(e);
            var t = this.tail;
            e.list = this, e.prev = t, t && (t.next = e), this.tail = e, this.head || (this.head = e), this.length++;
          }
        }, s.prototype.push = function () {
          for (var e = 0, t = arguments.length; e < t; e++) r(this, arguments[e]);
          return this.length;
        }, s.prototype.unshift = function () {
          for (var e = 0, t = arguments.length; e < t; e++) a(this, arguments[e]);
          return this.length;
        }, s.prototype.pop = function () {
          if (this.tail) {
            var e = this.tail.value;
            return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, e;
          }
        }, s.prototype.shift = function () {
          if (this.head) {
            var e = this.head.value;
            return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, e;
          }
        }, s.prototype.forEach = function (e, t) {
          t = t || this;
          for (var n = this.head, s = 0; null !== n; s++) e.call(t, n.value, s, this), n = n.next;
        }, s.prototype.forEachReverse = function (e, t) {
          t = t || this;
          for (var n = this.tail, s = this.length - 1; null !== n; s--) e.call(t, n.value, s, this), n = n.prev;
        }, s.prototype.get = function (e) {
          for (var t = 0, n = this.head; null !== n && t < e; t++) n = n.next;
          if (t === e && null !== n) return n.value;
        }, s.prototype.getReverse = function (e) {
          for (var t = 0, n = this.tail; null !== n && t < e; t++) n = n.prev;
          if (t === e && null !== n) return n.value;
        }, s.prototype.map = function (e, t) {
          t = t || this;
          for (var n = new s(), o = this.head; null !== o;) n.push(e.call(t, o.value, this)), o = o.next;
          return n;
        }, s.prototype.mapReverse = function (e, t) {
          t = t || this;
          for (var n = new s(), o = this.tail; null !== o;) n.push(e.call(t, o.value, this)), o = o.prev;
          return n;
        }, s.prototype.reduce = function (e, t) {
          var n,
            s = this.head;
          if (arguments.length > 1) n = t;else {
            if (!this.head) throw new TypeError("Reduce of empty list with no initial value");
            s = this.head.next, n = this.head.value;
          }
          for (var o = 0; null !== s; o++) n = e(n, s.value, o), s = s.next;
          return n;
        }, s.prototype.reduceReverse = function (e, t) {
          var n,
            s = this.tail;
          if (arguments.length > 1) n = t;else {
            if (!this.tail) throw new TypeError("Reduce of empty list with no initial value");
            s = this.tail.prev, n = this.tail.value;
          }
          for (var o = this.length - 1; null !== s; o--) n = e(n, s.value, o), s = s.prev;
          return n;
        }, s.prototype.toArray = function () {
          for (var e = new Array(this.length), t = 0, n = this.head; null !== n; t++) e[t] = n.value, n = n.next;
          return e;
        }, s.prototype.toArrayReverse = function () {
          for (var e = new Array(this.length), t = 0, n = this.tail; null !== n; t++) e[t] = n.value, n = n.prev;
          return e;
        }, s.prototype.slice = function (e, t) {
          (t = t || this.length) < 0 && (t += this.length), (e = e || 0) < 0 && (e += this.length);
          var n = new s();
          if (t < e || t < 0) return n;
          e < 0 && (e = 0), t > this.length && (t = this.length);
          for (var o = 0, r = this.head; null !== r && o < e; o++) r = r.next;
          for (; null !== r && o < t; o++, r = r.next) n.push(r.value);
          return n;
        }, s.prototype.sliceReverse = function (e, t) {
          (t = t || this.length) < 0 && (t += this.length), (e = e || 0) < 0 && (e += this.length);
          var n = new s();
          if (t < e || t < 0) return n;
          e < 0 && (e = 0), t > this.length && (t = this.length);
          for (var o = this.length, r = this.tail; null !== r && o > t; o--) r = r.prev;
          for (; null !== r && o > e; o--, r = r.prev) n.push(r.value);
          return n;
        }, s.prototype.splice = function (e, t, ...n) {
          e > this.length && (e = this.length - 1), e < 0 && (e = this.length + e);
          for (var s = 0, r = this.head; null !== r && s < e; s++) r = r.next;
          var a = [];
          for (s = 0; r && s < t; s++) a.push(r.value), r = this.removeNode(r);
          for (null === r && (r = this.tail), r !== this.head && r !== this.tail && (r = r.prev), s = 0; s < n.length; s++) r = o(this, r, n[s]);
          return a;
        }, s.prototype.reverse = function () {
          for (var e = this.head, t = this.tail, n = e; null !== n; n = n.prev) {
            var s = n.prev;
            n.prev = n.next, n.next = s;
          }
          return this.head = t, this.tail = e, this;
        };
        try {
          n(371)(s);
        } catch (e) {}
      },
      109: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        });
        const s = n(98),
          o = n(104);
        let r;
        t.default = async function (e, t) {
          var n, i;
          if (!r) {
            if ("undefined" != typeof navigator && "fonts" in navigator) {
              try {
                const e = await (null === (i = (n = navigator.permissions).request) || void 0 === i ? void 0 : i.call(n, {
                  name: "local-fonts"
                }));
                if (e && "granted" !== e.state) throw new Error("Permission to access local fonts not granted.");
              } catch (e) {
                if ("TypeError" !== e.name) throw e;
              }
              const e = {};
              try {
                const t = await navigator.fonts.query();
                for (const n of t) e.hasOwnProperty(n.family) || (e[n.family] = []), e[n.family].push(n);
                r = Promise.resolve(e);
              } catch (e) {
                console.error(e.name, e.message);
              }
            } else if ("undefined" != typeof window && "queryLocalFonts" in window) {
              const e = {};
              try {
                const t = await window.queryLocalFonts();
                for (const n of t) e.hasOwnProperty(n.family) || (e[n.family] = []), e[n.family].push(n);
                r = Promise.resolve(e);
              } catch (e) {
                console.error(e.name, e.message);
              }
            }
            r || (r = Promise.resolve({}));
          }
          const l = await r;
          for (const n of (0, o.default)(e)) {
            if (a.includes(n)) return;
            if (l.hasOwnProperty(n) && l[n].length > 0) {
              const e = l[n][0];
              if ("blob" in e) {
                const n = await e.blob(),
                  o = await n.arrayBuffer();
                return (0, s.loadBuffer)(o, {
                  cacheSize: t
                });
              }
              return;
            }
          }
        };
        const a = ["serif", "sans-serif", "cursive", "fantasy", "monospace", "system-ui", "emoji", "math", "fangsong"];
      },
      833: (e, t, n) => {
        "use strict";

        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.enableLigatures = void 0;
        const s = n(109);
        t.enableLigatures = function (e, t = []) {
          let n,
            o,
            r,
            a = 0;
          return e.registerCharacterJoiner(i => {
            const l = e.options.fontFamily;
            if (l && (0 === a || n !== l)) {
              o = void 0, a = 1, n = l;
              const t = n;
              (0, s.default)(t, 1e5).then(n => {
                t === e.options.fontFamily && (a = 2, o = n, n && e.refresh(0, e.rows - 1));
              }).catch(n => {
                t === e.options.fontFamily && (a = 3, "debug" === e.options.logLevel && console.debug(r, new Error("Failure while loading font")), o = void 0, r = n);
              });
            }
            return o && 2 === a ? o.findLigatureRanges(i).map(e => [e[0], e[1]]) : function (e, t) {
              const n = [];
              for (let s = 0; s < e.length; s++) for (let o = 0; o < t.length; o++) if (e.startsWith(t[o], s)) {
                n.push([s, s + t[o].length]), s += t[o].length - 1;
                break;
              }
              return n;
            }(i, t);
          });
        };
      },
      104: (e, t) => {
        "use strict";

        function n(e, t) {
          let n = "",
            s = !1;
          for (; e.offset < e.input.length;) {
            const r = e.input[e.offset++];
            if (s) /[\dA-Fa-f]/.test(r) ? (e.offset--, n += o(e)) : "\n" !== r && (n += r), s = !1;else switch (r) {
              case t:
                return n;
              case "\\":
                s = !0;
                break;
              default:
                n += r;
            }
          }
          throw new Error("Unterminated string");
        }
        function s(e) {
          let t = "",
            n = !1;
          for (; e.offset < e.input.length;) {
            const s = e.input[e.offset++];
            if (n) /[\dA-Fa-f]/.test(s) ? (e.offset--, t += o(e)) : t += s, n = !1;else switch (s) {
              case "\\":
                n = !0;
                break;
              case ",":
                return t;
              default:
                /\s/.test(s) ? t.endsWith(" ") || (t += " ") : t += s;
            }
          }
          return t;
        }
        function o(e) {
          let t = "";
          for (; e.offset < e.input.length;) {
            const n = e.input[e.offset++];
            if (/\s/.test(n)) return r(t);
            if (t.length >= 6 || !/[\dA-Fa-f]/.test(n)) return e.offset--, r(t);
            t += n;
          }
          return r(t);
        }
        function r(e) {
          return String.fromCodePoint(parseInt(e, 16));
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = function (e) {
          if ("string" != typeof e) throw new Error("Font family must be a string");
          const t = {
              input: e,
              offset: 0
            },
            o = [];
          let r = "";
          for (; t.offset < t.input.length;) {
            const e = t.input[t.offset++];
            switch (e) {
              case "'":
              case '"':
                r += n(t, e);
                break;
              case ",":
                o.push(r), r = "";
                break;
              default:
                /\s/.test(e) || (t.offset--, r += s(t), o.push(r), r = "");
            }
          }
          return o;
        };
      },
      89: t => {
        "use strict";

        t.exports = e;
      },
      56: e => {
        "use strict";

        e.exports = t;
      },
      978: e => {
        "use strict";

        e.exports = s;
      },
      269: e => {
        "use strict";

        e.exports = n;
      },
      82: () => {},
      456: () => {}
    },
    r = {};
  function a(e) {
    var t = r[e];
    if (void 0 !== t) return t.exports;
    var n = r[e] = {
      exports: {}
    };
    return o[e].call(n.exports, n, n.exports, a), n.exports;
  }
  a.n = e => {
    var t = e && e.__esModule ? () => e.default : () => e;
    return a.d(t, {
      a: t
    }), t;
  }, a.d = (e, t) => {
    for (var n in t) a.o(t, n) && !a.o(e, n) && Object.defineProperty(e, n, {
      enumerable: !0,
      get: t[n]
    });
  }, a.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), a.r = e => {
    "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
      value: "Module"
    }), Object.defineProperty(e, "__esModule", {
      value: !0
    });
  };
  var i = {};
  return (() => {
    "use strict";

    var e = i;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.LigaturesAddon = void 0;
    const t = a(833);
    e.LigaturesAddon = class {
      constructor(e) {
        this._fallbackLigatures = ((null == e ? void 0 : e.fallbackLigatures) || ["<--", "<---", "<<-", "<-", "->", "->>", "--\x3e", "---\x3e", "<==", "<===", "<<=", "<=", "=>", "=>>", "==>", "===>", ">=", ">>=", "<->", "<--\x3e", "<---\x3e", "<----\x3e", "<=>", "<==>", "<===>", "<====>", "--------\x3e", "<~~", "<~", "~>", "~~>", "::", ":::", "==", "!=", "===", "!==", ":=", ":-", ":+", "<*", "<*>", "*>", "<|", "<|>", "|>", "+:", "-:", "=:", ":>", "++", "+++", "\x3c!--", "\x3c!---", "<***>"]).sort((e, t) => t.length - e.length);
      }
      activate(e) {
        this._terminal = e, this._characterJoinerId = (0, t.enableLigatures)(e, this._fallbackLigatures);
      }
      dispose() {
        var e;
        void 0 !== this._characterJoinerId && (null === (e = this._terminal) || void 0 === e || e.deregisterCharacterJoiner(this._characterJoinerId), this._characterJoinerId = void 0);
      }
    };
  })(), i;
})());

/***/ },

/***/ 5821
/*!*********************************************************!*\
  !*** ../app/node_modules/functions-have-names/index.js ***!
  \*********************************************************/
(module) {

"use strict";


var functionsHaveNames = function functionsHaveNames() {
  return typeof function f() {}.name === 'string';
};
var gOPD = Object.getOwnPropertyDescriptor;
if (gOPD) {
  try {
    gOPD([], 'length');
  } catch (e) {
    // IE 8 has a broken gOPD
    gOPD = null;
  }
}
functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
  if (!functionsHaveNames() || !gOPD) {
    return false;
  }
  var desc = gOPD(function () {}, 'name');
  return !!desc && !!desc.configurable;
};
var $bind = Function.prototype.bind;
functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {
  return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';
};
module.exports = functionsHaveNames;

/***/ },

/***/ 5832
/*!*******************************************************!*\
  !*** ../app/node_modules/es-define-property/index.js ***!
  \*******************************************************/
(module) {

"use strict";


/** @type {import('.')} */
var $defineProperty = Object.defineProperty || false;
if ($defineProperty) {
  try {
    $defineProperty({}, 'a', {
      value: 1
    });
  } catch (e) {
    // IE 8 has a broken defineProperty
    $defineProperty = false;
  }
}
module.exports = $defineProperty;

/***/ },

/***/ 5860
/*!*********************************************************!*\
  !*** ../app/node_modules/object-keys/implementation.js ***!
  \*********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var keysShim;
if (!Object.keys) {
  // modified from https://github.com/es-shims/es5-shim
  var has = Object.prototype.hasOwnProperty;
  var toStr = Object.prototype.toString;
  var isArgs = __webpack_require__(/*! ./isArguments */ 6564); // eslint-disable-line global-require
  var isEnumerable = Object.prototype.propertyIsEnumerable;
  var hasDontEnumBug = !isEnumerable.call({
    toString: null
  }, 'toString');
  var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
  var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'];
  var equalsConstructorPrototype = function (o) {
    var ctor = o.constructor;
    return ctor && ctor.prototype === o;
  };
  var excludedKeys = {
    $applicationCache: true,
    $console: true,
    $external: true,
    $frame: true,
    $frameElement: true,
    $frames: true,
    $innerHeight: true,
    $innerWidth: true,
    $onmozfullscreenchange: true,
    $onmozfullscreenerror: true,
    $outerHeight: true,
    $outerWidth: true,
    $pageXOffset: true,
    $pageYOffset: true,
    $parent: true,
    $scrollLeft: true,
    $scrollTop: true,
    $scrollX: true,
    $scrollY: true,
    $self: true,
    $webkitIndexedDB: true,
    $webkitStorageInfo: true,
    $window: true
  };
  var hasAutomationEqualityBug = function () {
    /* global window */
    if (typeof window === 'undefined') {
      return false;
    }
    for (var k in window) {
      try {
        if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
          try {
            equalsConstructorPrototype(window[k]);
          } catch (e) {
            return true;
          }
        }
      } catch (e) {
        return true;
      }
    }
    return false;
  }();
  var equalsConstructorPrototypeIfNotBuggy = function (o) {
    /* global window */
    if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
      return equalsConstructorPrototype(o);
    }
    try {
      return equalsConstructorPrototype(o);
    } catch (e) {
      return false;
    }
  };
  keysShim = function keys(object) {
    var isObject = object !== null && typeof object === 'object';
    var isFunction = toStr.call(object) === '[object Function]';
    var isArguments = isArgs(object);
    var isString = isObject && toStr.call(object) === '[object String]';
    var theKeys = [];
    if (!isObject && !isFunction && !isArguments) {
      throw new TypeError('Object.keys called on a non-object');
    }
    var skipProto = hasProtoEnumBug && isFunction;
    if (isString && object.length > 0 && !has.call(object, 0)) {
      for (var i = 0; i < object.length; ++i) {
        theKeys.push(String(i));
      }
    }
    if (isArguments && object.length > 0) {
      for (var j = 0; j < object.length; ++j) {
        theKeys.push(String(j));
      }
    } else {
      for (var name in object) {
        if (!(skipProto && name === 'prototype') && has.call(object, name)) {
          theKeys.push(String(name));
        }
      }
    }
    if (hasDontEnumBug) {
      var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
      for (var k = 0; k < dontEnums.length; ++k) {
        if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
          theKeys.push(dontEnums[k]);
        }
      }
    }
    return theKeys;
  };
}
module.exports = keysShim;

/***/ },

/***/ 5955
/*!******************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/api.js ***!
  \******************************************************/
(module) {

"use strict";


/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
  var list = [];

  // return the list of modules as css string
  list.toString = function toString() {
    return this.map(function (item) {
      var content = "";
      var needLayer = typeof item[5] !== "undefined";
      if (item[4]) {
        content += "@supports (".concat(item[4], ") {");
      }
      if (item[2]) {
        content += "@media ".concat(item[2], " {");
      }
      if (needLayer) {
        content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
      }
      content += cssWithMappingToString(item);
      if (needLayer) {
        content += "}";
      }
      if (item[2]) {
        content += "}";
      }
      if (item[4]) {
        content += "}";
      }
      return content;
    }).join("");
  };

  // import a list of modules into the list
  list.i = function i(modules, media, dedupe, supports, layer) {
    if (typeof modules === "string") {
      modules = [[null, modules, undefined]];
    }
    var alreadyImportedModules = {};
    if (dedupe) {
      for (var k = 0; k < this.length; k++) {
        var id = this[k][0];
        if (id != null) {
          alreadyImportedModules[id] = true;
        }
      }
    }
    for (var _k = 0; _k < modules.length; _k++) {
      var item = [].concat(modules[_k]);
      if (dedupe && alreadyImportedModules[item[0]]) {
        continue;
      }
      if (typeof layer !== "undefined") {
        if (typeof item[5] === "undefined") {
          item[5] = layer;
        } else {
          item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
          item[5] = layer;
        }
      }
      if (media) {
        if (!item[2]) {
          item[2] = media;
        } else {
          item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
          item[2] = media;
        }
      }
      if (supports) {
        if (!item[4]) {
          item[4] = "".concat(supports);
        } else {
          item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
          item[4] = supports;
        }
      }
      list.push(item);
    }
  };
  return list;
};

/***/ },

/***/ 6045
/*!********************************************!*\
  !*** ../node_modules/shell-quote/index.js ***!
  \********************************************/
(__unused_webpack_module, exports) {

"use strict";


exports.quote = function (xs) {
  return xs.map(function (s) {
    if (s && typeof s === 'object') {
      return s.op.replace(/(.)/g, '\\$1');
    } else if (/["\s]/.test(s) && !/'/.test(s)) {
      return "'" + s.replace(/(['\\])/g, '\\$1') + "'";
    } else if (/["'\s]/.test(s)) {
      return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
    }
    return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
  }).join(' ');
};

// '<(' is process substitution operator and
// can be parsed the same as control operator
var CONTROL = '(?:' + ['\\|\\|', '\\&\\&', ';;', '\\|\\&', '\\<\\(', '>>', '>\\&', '[&;()|<>]'].join('|') + ')';
var META = '|&;()<> \\t';
var BAREWORD = '(\\\\[\'"' + META + ']|[^\\s\'"' + META + '])+';
var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\'';
var TOKEN = '';
for (var i = 0; i < 4; i++) {
  TOKEN += (Math.pow(16, 8) * Math.random()).toString(16);
}
function parse(s, env, opts) {
  var chunker = new RegExp(['(' + CONTROL + ')',
  // control chars
  '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')*'].join('|'), 'g');
  var match = s.match(chunker).filter(Boolean);
  if (!match) {
    return [];
  }
  if (!env) {
    env = {};
  }
  if (!opts) {
    opts = {};
  }
  var commented = false;
  function getVar(_, pre, key) {
    var r = typeof env === 'function' ? env(key) : env[key];
    if (r === undefined && key != '') {
      r = '';
    } else if (r === undefined) {
      r = '$';
    }
    if (typeof r === 'object') {
      return pre + TOKEN + JSON.stringify(r) + TOKEN;
    }
    return pre + r;
  }
  return match.map(function (s, j) {
    if (commented) {
      return void undefined;
    }
    if (RegExp('^' + CONTROL + '$').test(s)) {
      return {
        op: s
      };
    }

    // Hand-written scanner/parser for Bash quoting rules:
    //
    // 1. inside single quotes, all characters are printed literally.
    // 2. inside double quotes, all characters are printed literally
    //    except variables prefixed by '$' and backslashes followed by
    //    either a double quote or another backslash.
    // 3. outside of any quotes, backslashes are treated as escape
    //    characters and not printed (unless they are themselves escaped)
    // 4. quote context can switch mid-token if there is no whitespace
    //     between the two quote contexts (e.g. all'one'"token" parses as
    //     "allonetoken")
    var SQ = "'";
    var DQ = '"';
    var DS = '$';
    var BS = opts.escape || '\\';
    var quote = false;
    var esc = false;
    var out = '';
    var isGlob = false;
    var i;
    function parseEnvVar() {
      i += 1;
      var varend;
      var varname;
      // debugger
      if (s.charAt(i) === '{') {
        i += 1;
        if (s.charAt(i) === '}') {
          throw new Error('Bad substitution: ' + s.substr(i - 2, 3));
        }
        varend = s.indexOf('}', i);
        if (varend < 0) {
          throw new Error('Bad substitution: ' + s.substr(i));
        }
        varname = s.substr(i, varend - i);
        i = varend;
      } else if (/[*@#?$!_-]/.test(s.charAt(i))) {
        varname = s.charAt(i);
        i += 1;
      } else {
        varend = s.substr(i).match(/[^\w\d_]/);
        if (!varend) {
          varname = s.substr(i);
          i = s.length;
        } else {
          varname = s.substr(i, varend.index);
          i += varend.index - 1;
        }
      }
      return getVar(null, '', varname);
    }
    for (i = 0; i < s.length; i++) {
      var c = s.charAt(i);
      isGlob = isGlob || !quote && (c === '*' || c === '?');
      if (esc) {
        out += c;
        esc = false;
      } else if (quote) {
        if (c === quote) {
          quote = false;
        } else if (quote == SQ) {
          out += c;
        } else {
          // Double quote
          if (c === BS) {
            i += 1;
            c = s.charAt(i);
            if (c === DQ || c === BS || c === DS) {
              out += c;
            } else {
              out += BS + c;
            }
          } else if (c === DS) {
            out += parseEnvVar();
          } else {
            out += c;
          }
        }
      } else if (c === DQ || c === SQ) {
        quote = c;
      } else if (RegExp('^' + CONTROL + '$').test(c)) {
        return {
          op: s
        };
      } else if (/^#$/.test(c)) {
        commented = true;
        if (out.length) {
          return [out, {
            comment: s.slice(i + 1) + match.slice(j + 1).join(' ')
          }];
        }
        return [{
          comment: s.slice(i + 1) + match.slice(j + 1).join(' ')
        }];
      } else if (c === BS) {
        esc = true;
      } else if (c === DS) {
        out += parseEnvVar();
      } else {
        out += c;
      }
    }
    if (isGlob) {
      return {
        op: 'glob',
        pattern: out
      };
    }
    return out;
  }).reduce(function (prev, arg) {
    // finalize parsed aruments
    if (arg === undefined) {
      return prev;
    }
    return prev.concat(arg);
  }, []);
}
exports.parse = function (s, env, opts) {
  var mapped = parse(s, env, opts);
  if (typeof env !== 'function') {
    return mapped;
  }
  return mapped.reduce(function (acc, s) {
    if (typeof s === 'object') {
      return acc.concat(s);
    }
    var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g'));
    if (xs.length === 1) {
      return acc.concat(xs[0]);
    }
    return acc.concat(xs.filter(Boolean).map(function (x) {
      if (RegExp('^' + TOKEN).test(x)) {
        return JSON.parse(x.split(TOKEN)[1]);
      }
      return x;
    }));
  }, []);
};

/***/ },

/***/ 6056
/*!***********************************************************!*\
  !*** ../app/node_modules/object.assign/implementation.js ***!
  \***********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


// modified from https://github.com/es-shims/es6-shim
var objectKeys = __webpack_require__(/*! object-keys */ 2560);
var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 9944)();
var callBound = __webpack_require__(/*! call-bound */ 4731);
var $Object = __webpack_require__(/*! es-object-atoms */ 2897);
var $push = callBound('Array.prototype.push');
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var originalGetSymbols = hasSymbols ? $Object.getOwnPropertySymbols : null;

// eslint-disable-next-line no-unused-vars
module.exports = function assign(target, source1) {
  if (target == null) {
    throw new TypeError('target must be an object');
  }
  var to = $Object(target); // step 1
  if (arguments.length === 1) {
    return to; // step 2
  }
  for (var s = 1; s < arguments.length; ++s) {
    var from = $Object(arguments[s]); // step 3.a.i

    // step 3.a.ii:
    var keys = objectKeys(from);
    var getSymbols = hasSymbols && ($Object.getOwnPropertySymbols || originalGetSymbols);
    if (getSymbols) {
      var syms = getSymbols(from);
      for (var j = 0; j < syms.length; ++j) {
        var key = syms[j];
        if ($propIsEnumerable(from, key)) {
          $push(keys, key);
        }
      }
    }

    // step 3.a.iii:
    for (var i = 0; i < keys.length; ++i) {
      var nextKey = keys[i];
      if ($propIsEnumerable(from, nextKey)) {
        // step 3.a.iii.2
        var propValue = from[nextKey]; // step 3.a.iii.2.a
        to[nextKey] = propValue; // step 3.a.iii.2.b
      }
    }
  }
  return to; // step 4
};

/***/ },

/***/ 6086
/*!******************************************************!*\
  !*** ../app/node_modules/which-typed-array/index.js ***!
  \******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var forEach = __webpack_require__(/*! for-each */ 9413);
var availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ 988);
var callBind = __webpack_require__(/*! call-bind */ 3990);
var callBound = __webpack_require__(/*! call-bound */ 4731);
var gOPD = __webpack_require__(/*! gopd */ 1284);
var getProto = __webpack_require__(/*! get-proto */ 3077);
var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();
var g = typeof globalThis === 'undefined' ? global : globalThis;
var typedArrays = availableTypedArrays();
var $slice = callBound('String.prototype.slice');

/** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
  for (var i = 0; i < array.length; i += 1) {
    if (array[i] === value) {
      return i;
    }
  }
  return -1;
};

/** @typedef {import('./types').Getter} Getter */
/** @type {import('./types').Cache} */
var cache = {
  __proto__: null
};
if (hasToStringTag && gOPD && getProto) {
  forEach(typedArrays, function (typedArray) {
    var arr = new g[typedArray]();
    if (Symbol.toStringTag in arr && getProto) {
      var proto = getProto(arr);
      // @ts-expect-error TS won't narrow inside a closure
      var descriptor = gOPD(proto, Symbol.toStringTag);
      if (!descriptor && proto) {
        var superProto = getProto(proto);
        // @ts-expect-error TS won't narrow inside a closure
        descriptor = gOPD(superProto, Symbol.toStringTag);
      }
      // @ts-expect-error TODO: fix
      cache['$' + typedArray] = callBind(descriptor.get);
    }
  });
} else {
  forEach(typedArrays, function (typedArray) {
    var arr = new g[typedArray]();
    var fn = arr.slice || arr.set;
    if (fn) {
      cache[(/** @type {`$${import('.').TypedArrayName}`} */'$' + typedArray)] = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */
      // @ts-expect-error TODO FIXME
      callBind(fn);
    }
  });
}

/** @type {(value: object) => false | import('.').TypedArrayName} */
var tryTypedArrays = function tryAllTypedArrays(value) {
  /** @type {ReturnType<typeof tryAllTypedArrays>} */var found = false;
  forEach(/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */cache, /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
  function (getter, typedArray) {
    if (!found) {
      try {
        // @ts-expect-error a throw is fine here
        if ('$' + getter(value) === typedArray) {
          found = /** @type {import('.').TypedArrayName} */$slice(typedArray, 1);
        }
      } catch (e) {/**/}
    }
  });
  return found;
};

/** @type {(value: object) => false | import('.').TypedArrayName} */
var trySlices = function tryAllSlices(value) {
  /** @type {ReturnType<typeof tryAllSlices>} */var found = false;
  forEach(/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */cache, /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */function (getter, name) {
    if (!found) {
      try {
        // @ts-expect-error a throw is fine here
        getter(value);
        found = /** @type {import('.').TypedArrayName} */$slice(name, 1);
      } catch (e) {/**/}
    }
  });
  return found;
};

/** @type {import('.')} */
module.exports = function whichTypedArray(value) {
  if (!value || typeof value !== 'object') {
    return false;
  }
  if (!hasToStringTag) {
    /** @type {string} */
    var tag = $slice($toString(value), 8, -1);
    if ($indexOf(typedArrays, tag) > -1) {
      return tag;
    }
    if (tag !== 'Object') {
      return false;
    }
    // node < 0.6 hits here on real Typed Arrays
    return trySlices(value);
  }
  if (!gOPD) {
    return null;
  } // unknown engine
  return tryTypedArrays(value);
};

/***/ },

/***/ 6107
/*!****************************************************!*\
  !*** ../app/node_modules/math-intrinsics/round.js ***!
  \****************************************************/
(module) {

"use strict";


/** @type {import('./round')} */
module.exports = Math.round;

/***/ },

/***/ 6129
/*!******************************************************************!*\
  !*** ../app/node_modules/call-bind-apply-helpers/actualApply.js ***!
  \******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 438);
var $apply = __webpack_require__(/*! ./functionApply */ 6803);
var $call = __webpack_require__(/*! ./functionCall */ 711);
var $reflectApply = __webpack_require__(/*! ./reflectApply */ 9648);

/** @type {import('./actualApply')} */
module.exports = $reflectApply || bind.call($call, $apply);

/***/ },

/***/ 6177
/*!**********************************!*\
  !*** ./src/icons/arrow-down.svg ***!
  \**********************************/
(module) {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"arrow-down\" class=\"svg-inline--fa fa-arrow-down\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path fill=\"currentColor\" d=\"M378.8 309.8l-176 165.9C199.7 478.6 195.9 480 192 480s-7.719-1.426-10.77-4.31l-176-165.9C-1.297 303.6-1.781 293.1 4.156 286.3c5.953-6.838 16.09-7.259 22.61-1.134L176 425.9V48.59c0-9.171 7.156-16.59 15.1-16.59S208 39.42 208 48.59v377.3l149.2-140.7c6.516-6.125 16.66-5.704 22.61 1.134C385.8 293.1 385.3 303.6 378.8 309.8z\"></path></svg>"

/***/ },

/***/ 6227
/*!*************************************************!*\
  !*** ../app/node_modules/side-channel/index.js ***!
  \*************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var inspect = __webpack_require__(/*! object-inspect */ 3808);
var getSideChannelList = __webpack_require__(/*! side-channel-list */ 6654);
var getSideChannelMap = __webpack_require__(/*! side-channel-map */ 3688);
var getSideChannelWeakMap = __webpack_require__(/*! side-channel-weakmap */ 7528);
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;

/** @type {import('.')} */
module.exports = function getSideChannel() {
  /** @typedef {ReturnType<typeof getSideChannel>} Channel */

  /** @type {Channel | undefined} */var $channelData;

  /** @type {Channel} */
  var channel = {
    assert: function (key) {
      if (!channel.has(key)) {
        throw new $TypeError('Side channel does not contain ' + inspect(key));
      }
    },
    'delete': function (key) {
      return !!$channelData && $channelData['delete'](key);
    },
    get: function (key) {
      return $channelData && $channelData.get(key);
    },
    has: function (key) {
      return !!$channelData && $channelData.has(key);
    },
    set: function (key, value) {
      if (!$channelData) {
        $channelData = makeChannel();
      }
      $channelData.set(key, value);
    }
  };
  // @ts-expect-error TODO: figure out why this is erroring
  return channel;
};

/***/ },

/***/ 6248
/*!**********************************************!*\
  !*** ./node_modules/zmodem.js/src/encode.js ***!
  \**********************************************/
(module) {

"use strict";


var Zmodem = module.exports;
const HEX_DIGITS = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102];
const HEX_OCTET_VALUE = {};
for (var hd = 0; hd < HEX_DIGITS.length; hd++) {
  HEX_OCTET_VALUE[HEX_DIGITS[hd]] = hd;
}

/**
 * General, non-ZMODEM-specific encoding logic.
 *
 * @exports ENCODELIB
 */
Zmodem.ENCODELIB = {
  /**
   * Return an array with the given number as 2 big-endian bytes.
   *
   * @param {number} number - The number to encode.
   *
   * @returns {number[]} The octet values.
   */
  pack_u16_be: function pack_u16_be(number) {
    if (number > 0xffff) throw "Number cannot exceed 16 bits: " + number;
    return [number >> 8, number & 0xff];
  },
  /**
   * Return an array with the given number as 4 little-endian bytes.
   *
   * @param {number} number - The number to encode.
   *
   * @returns {number[]} The octet values.
   */
  pack_u32_le: function pack_u32_le(number) {
    //Can’t bit-shift because that runs into JS’s bit-shift problem.
    //(See _updcrc32() for an example.)
    var high_bytes = number / 65536; //fraction is ok

    //a little-endian 4-byte sequence
    return [number & 0xff, (number & 65535) >> 8, high_bytes & 0xff, high_bytes >> 8];
  },
  /**
   * The inverse of pack_u16_be() - i.e., take in 2 octet values
   * and parse them as an unsigned, 2-byte big-endian number.
   *
   * @param {number[]} octets - The octet values (2 of them).
   *
   * @returns {number} The decoded number.
   */
  unpack_u16_be: function unpack_u16_be(bytes_arr) {
    return (bytes_arr[0] << 8) + bytes_arr[1];
  },
  /**
   * The inverse of pack_u32_le() - i.e., take in a 4-byte sequence
   * and parse it as an unsigned, 4-byte little-endian number.
   *
   * @param {number[]} octets - The octet values (4 of them).
   *
   * @returns {number} The decoded number.
   */
  unpack_u32_le: function unpack_u32_le(octets) {
    //<sigh> … (254 << 24 is -33554432, according to JavaScript)
    return octets[0] + (octets[1] << 8) + (octets[2] << 16) + octets[3] * 16777216;
  },
  /**
   * Encode a series of octet values to be the octet values that
   * correspond to the ASCII hex characters for each octet. The
   * returned array is suitable for use as binary data.
   *
   * For example:
   *
   *      Original    Hex     Returned
   *      254         fe      102, 101
   *       12         0c      48, 99
   *      129         81      56, 49
   *
   * @param {number[]} octets - The original octet values.
   *
   * @returns {number[]} The octet values that correspond to an ASCII
   *  representation of the given octets.
   */
  octets_to_hex: function octets_to_hex(octets) {
    var hex = [];
    for (var o = 0; o < octets.length; o++) {
      hex.push(HEX_DIGITS[octets[o] >> 4], HEX_DIGITS[octets[o] & 0x0f]);
    }
    return hex;
  },
  /**
   * The inverse of octets_to_hex(): takes an array
   * of hex octet pairs and returns their octet values.
   *
   * @param {number[]} hex_octets - The hex octet values.
   *
   * @returns {number[]} The parsed octet values.
   */
  parse_hex_octets: function parse_hex_octets(hex_octets) {
    var octets = new Array(hex_octets.length / 2);
    for (var i = 0; i < octets.length; i++) {
      octets[i] = (HEX_OCTET_VALUE[hex_octets[2 * i]] << 4) + HEX_OCTET_VALUE[hex_octets[1 + 2 * i]];
    }
    return octets;
  }
};

/***/ },

/***/ 6342
/*!*******************************************!*\
  !*** ./node_modules/cli-spinner/index.js ***!
  \*******************************************/
(__unused_webpack_module, exports, __webpack_require__) {

var readline = __webpack_require__(/*! readline */ 4902);
var defaultSpinnerString = 0;
var defaultSpinnerDelay = 60;
function defaultOnTick(msg) {
  this.clearLine(this.stream);
  this.stream.write(msg);
}
;
var Spinner = function (options) {
  if (!(this instanceof Spinner)) return new Spinner(options);
  if (typeof options === "string") {
    options = {
      text: options
    };
  } else if (!options) {
    options = {};
  }
  this.text = options.text || '';
  this.setSpinnerString(defaultSpinnerString);
  this.setSpinnerDelay(defaultSpinnerDelay);
  this.onTick = options.onTick || defaultOnTick;
  this.stream = options.stream || process.stdout;
};
Spinner.spinners = __webpack_require__(/*! ./spinners.json */ 4744);
Spinner.setDefaultSpinnerString = function (value) {
  defaultSpinnerString = value;
  return this;
};
Spinner.setDefaultSpinnerDelay = function (value) {
  defaultSpinnerDelay = value;
  return this;
};
Spinner.prototype.start = function () {
  if (this.stream === process.stdout && this.stream.isTTY !== true) {
    return this;
  }
  var current = 0;
  var self = this;
  var iteration = function () {
    var msg = self.text.indexOf('%s') > -1 ? self.text.replace('%s', self.chars[current]) : self.chars[current] + ' ' + self.text;
    self.onTick(msg);
    current = ++current % self.chars.length;
  };
  iteration();
  this.id = setInterval(iteration, this.delay);
  return this;
};
Spinner.prototype.isSpinning = function () {
  return this.id !== undefined;
};
Spinner.prototype.setSpinnerDelay = function (n) {
  this.delay = n;
  return this;
};
Spinner.prototype.setSpinnerString = function (str) {
  const map = mapToSpinner(str, this.spinners);
  this.chars = Array.isArray(map) ? map : map.split('');
  return this;
};
Spinner.prototype.setSpinnerTitle = function (str) {
  this.text = str;
  return this;
};
Spinner.prototype.stop = function (clear) {
  if (this.isSpinning === false) {
    return this;
  }
  clearInterval(this.id);
  this.id = undefined;
  if (clear) {
    this.clearLine(this.stream);
  }
  return this;
};
Spinner.prototype.clearLine = function (stream) {
  readline.clearLine(stream, 0);
  readline.cursorTo(stream, 0);
  return this;
};

// Helpers

function isInt(value) {
  return typeof value === 'number' && value % 1 === 0;
}
function mapToSpinner(value, spinners) {
  // Not an integer, return as strng
  if (!isInt(value)) {
    return value + '';
  }
  var length = Spinner.spinners.length;

  // Check if index is within bounds
  value = value >= length ? 0 : value;
  // If negative, count from the end
  value = value < 0 ? length + value : value;
  return Spinner.spinners[value];
}
exports.y = Spinner;

/***/ },

/***/ 6347
/*!**********************************!*\
  !*** ./src/icons/whole-word.svg ***!
  \**********************************/
(module) {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"input-text\" class=\"svg-inline--fa fa-input-text\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M576 64H63.1C28.65 64 0 92.65 0 128v256c0 35.35 28.65 64 63.1 64H576C611.3 448 640 419.3 640 384V128C640 92.65 611.3 64 576 64zM608 384c0 17.64-14.35 32-31.1 32H63.1C46.35 416 32 401.6 32 384V128c0-17.64 14.35-32 31.1-32H576C593.6 96 608 110.4 608 128V384zM405.6 248.5C412.2 239.3 416 228.1 416 216C416 185.1 390.9 160 360 160H304C295.2 160 288 167.2 288 176v160C288 344.8 295.2 352 304 352h72c30.88 0 56-25.12 56-56C432 275.1 421.4 258.4 405.6 248.5zM320 192h40C373.2 192 384 202.8 384 216S373.2 240 360 240H320V192zM376 320H320V272h56c13.22 0 24 10.77 24 24C400 309.2 389.2 320 376 320zM190.8 170.1c-4.812-12.16-24.88-12.16-29.69 0l-64 160c-3.281 8.188 .6875 17.5 8.906 20.78c8.219 3.312 17.5-.7187 20.78-8.906l15.33-38.31C142.8 303.7 143.4 304 144 304h64c.6484 0 1.201-.2949 1.83-.3691l15.33 38.31C227.7 348.2 233.7 352 240 352c1.969 0 4-.375 5.938-1.156c8.219-3.281 12.19-12.59 8.906-20.78L190.8 170.1zM154.8 272L176 219.1L197.2 272H154.8z\"></path></svg>"

/***/ },

/***/ 6392
/*!**************************************!*\
  !*** ../app/node_modules/uuid/v1.js ***!
  \**************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var rng = __webpack_require__(/*! ./lib/rng */ 1488);
var bytesToUuid = __webpack_require__(/*! ./lib/bytesToUuid */ 8516);

// **`v1()` - Generate time-based UUID**
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html

var _nodeId;
var _clockseq;

// Previous uuid creation time
var _lastMSecs = 0;
var _lastNSecs = 0;

// See https://github.com/uuidjs/uuid for API details
function v1(options, buf, offset) {
  var i = buf && offset || 0;
  var b = buf || [];
  options = options || {};
  var node = options.node || _nodeId;
  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;

  // node and clockseq need to be initialized to random values if they're not
  // specified.  We do this lazily to minimize issues related to insufficient
  // system entropy.  See #189
  if (node == null || clockseq == null) {
    var seedBytes = rng();
    if (node == null) {
      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
      node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
    }
    if (clockseq == null) {
      // Per 4.2.2, randomize (14 bit) clockseq
      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
    }
  }

  // UUID timestamps are 100 nano-second units since the Gregorian epoch,
  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so
  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();

  // Per 4.2.1.2, use count of uuid's generated during the current clock
  // cycle to simulate higher resolution clock
  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;

  // Time since last uuid creation (in msecs)
  var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000;

  // Per 4.2.1.2, Bump clockseq on clock regression
  if (dt < 0 && options.clockseq === undefined) {
    clockseq = clockseq + 1 & 0x3fff;
  }

  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
  // time interval
  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
    nsecs = 0;
  }

  // Per 4.2.1.2 Throw error if too many uuids are requested
  if (nsecs >= 10000) {
    throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
  }
  _lastMSecs = msecs;
  _lastNSecs = nsecs;
  _clockseq = clockseq;

  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
  msecs += 12219292800000;

  // `time_low`
  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
  b[i++] = tl >>> 24 & 0xff;
  b[i++] = tl >>> 16 & 0xff;
  b[i++] = tl >>> 8 & 0xff;
  b[i++] = tl & 0xff;

  // `time_mid`
  var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
  b[i++] = tmh >>> 8 & 0xff;
  b[i++] = tmh & 0xff;

  // `time_high_and_version`
  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
  b[i++] = tmh >>> 16 & 0xff;

  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
  b[i++] = clockseq >>> 8 | 0x80;

  // `clock_seq_low`
  b[i++] = clockseq & 0xff;

  // `node`
  for (var n = 0; n < 6; ++n) {
    b[i + n] = node[n];
  }
  return buf ? buf : bytesToUuid(b);
}
module.exports = v1;

/***/ },

/***/ 6523
/*!*****************************!*\
  !*** external "ngx-toastr" ***!
  \*****************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__6523__;

/***/ },

/***/ 6543
/*!***********************************************!*\
  !*** ../app/node_modules/es-errors/syntax.js ***!
  \***********************************************/
(module) {

"use strict";


/** @type {import('./syntax')} */
module.exports = SyntaxError;

/***/ },

/***/ 6557
/*!**************************************************************!*\
  !*** ../app/node_modules/get-proto/Object.getPrototypeOf.js ***!
  \**************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var $Object = __webpack_require__(/*! es-object-atoms */ 2897);

/** @type {import('./Object.getPrototypeOf')} */
module.exports = $Object.getPrototypeOf || null;

/***/ },

/***/ 6563
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/zdle.js ***!
  \********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zmlib */ 3568));

//encode() variables - declare them here so we don’t
//create them in the function.
var encode_cur, encode_todo;
const ZDLE = Zmodem.ZMLIB.ZDLE;

/**
 * Class that handles ZDLE encoding and decoding.
 * Encoding is subject to a given configuration--specifically, whether
 * we want to escape all control characters. Decoding is static; however
 * a given string is encoded we can always decode it.
 */
Zmodem.ZDLE = class ZmodemZDLE {
  /**
   * Create a ZDLE encoder.
   *
   * @param {object} [config] - The initial configuration.
   * @param {object} config.escape_ctrl_chars - Whether the ZDLE encoder
   *  should escape control characters.
   */
  constructor(config) {
    this._config = {};
    if (config) {
      this.set_escape_ctrl_chars(!!config.escape_ctrl_chars);
    }
  }

  /**
   * Enable or disable control-character escaping.
   * You should probably enable this for sender sessions.
   *
   * @param {boolean} value - Whether to enable (true) or disable (false).
   */
  set_escape_ctrl_chars(value) {
    if (typeof value !== "boolean") throw "need boolean!";
    if (value !== this._config.escape_ctrl_chars) {
      this._config.escape_ctrl_chars = value;
      this._setup_zdle_table();
    }
  }

  /**
   * Whether or not control-character escaping is enabled.
   *
   * @return {boolean} Whether the escaping is on (true) or off (false).
   */
  escapes_ctrl_chars() {
    return !!this._config.escape_ctrl_chars;
  }

  //I don’t know of any Zmodem implementations that use ZESC8
  //(“escape_8th_bit”)??

  /*
  ZMODEM software escapes ZDLE, 020, 0220, 021, 0221, 023, and 0223.  If
  preceded by 0100 or 0300 (@), 015 and 0215 are also escaped to protect the
  Telenet command escape CR-@-CR.
  */

  /**
   * Encode an array of octet values and return it.
   * This will mutate the given array.
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The passed-in array, transformed. This is the
   *  same object that is passed in.
   */
  encode(octets) {
    //NB: Performance matters here!

    if (!this._zdle_table) throw "No ZDLE encode table configured!";
    var zdle_table = this._zdle_table;
    var last_code = this._lastcode;
    var arrbuf = new ArrayBuffer(2 * octets.length);
    var arrbuf_uint8 = new Uint8Array(arrbuf);
    var escctl_yn = this._config.escape_ctrl_chars;
    var arrbuf_i = 0;
    for (encode_cur = 0; encode_cur < octets.length; encode_cur++) {
      encode_todo = zdle_table[octets[encode_cur]];
      if (!encode_todo) {
        console.trace();
        console.error("bad encode() call:", JSON.stringify(octets));
        this._lastcode = last_code;
        throw "Invalid octet: " + octets[encode_cur];
      }
      last_code = octets[encode_cur];
      if (encode_todo === 1) {
        //Do nothing; we append last_code below.
      }

      //0x40 = '@'; i.e., only escape if the last
      //octet was '@'.
      else if (escctl_yn || encode_todo === 2 || (last_code & 0x7f) === 0x40) {
        arrbuf_uint8[arrbuf_i] = ZDLE;
        arrbuf_i++;
        last_code ^= 0x40; //0100
      }
      arrbuf_uint8[arrbuf_i] = last_code;
      arrbuf_i++;
    }
    this._lastcode = last_code;
    octets.splice(0);
    octets.push.apply(octets, new Uint8Array(arrbuf, 0, arrbuf_i));
    return octets;
  }

  /**
   * Decode an array of octet values and return it.
   * This will mutate the given array.
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The passed-in array.
   *  This is the same object that is passed in.
   */
  static decode(octets) {
    for (var o = octets.length - 1; o >= 0; o--) {
      if (octets[o] === ZDLE) {
        octets.splice(o, 2, octets[o + 1] - 64);
      }
    }
    return octets;
  }

  /**
   * Remove, ZDLE-decode, and return bytes from the passed-in array.
   * If the requested number of ZDLE-encoded bytes isn’t available,
   * then the passed-in array is unmodified (and the return is undefined).
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @param {number} offset - The number of (undecoded) bytes to skip
   *      at the beginning of the “octets” array.
   *
   * @param {number} count - The number of bytes (octet values) to return.
   *
   * @returns {number[]|undefined} An array with the requested number of
   *      decoded octet values, or undefined if that number of decoded
   *      octets isn’t available (given the passed-in offset).
   */
  static splice(octets, offset, count) {
    var so_far = 0;
    if (!offset) offset = 0;
    for (var i = offset; i < octets.length && so_far < count; i++) {
      so_far++;
      if (octets[i] === ZDLE) i++;
    }
    if (so_far === count) {
      //Don’t accept trailing ZDLE. This check works
      //because of the i++ logic above.
      if (octets.length === i - 1) return;
      octets.splice(0, offset);
      return ZmodemZDLE.decode(octets.splice(0, i - offset));
    }
    return;
  }
  _setup_zdle_table() {
    var zsendline_tab = new Array(256);
    for (var i = 0; i < zsendline_tab.length; i++) {
      //1 = never escape
      //2 = always escape
      //3 = escape only if the previous byte was '@'

      //Never escape characters from 0x20 (32) to 0x7f (127).
      //This is the range of printable characters, plus DEL.
      //I guess ZMODEM doesn’t consider DEL to be a control character?
      if (i & 0x60) {
        zsendline_tab[i] = 1;
      } else {
        switch (i) {
          case ZDLE: //NB: no (ZDLE | 0x80)
          case Zmodem.ZMLIB.XOFF:
          case Zmodem.ZMLIB.XON:
          case Zmodem.ZMLIB.XOFF | 0x80:
          case Zmodem.ZMLIB.XON | 0x80:
            zsendline_tab[i] = 2;
            break;
          case 0x10: // 020
          case 0x90:
            // 0220
            zsendline_tab[i] = this._config.turbo_escape ? 1 : 2;
            break;
          case 0x0d: // 015
          case 0x8d:
            // 0215
            zsendline_tab[i] = this._config.escape_ctrl_chars ? 2 : !this._config.turbo_escape ? 3 : 1;
            break;
          default:
            zsendline_tab[i] = this._config.escape_ctrl_chars ? 2 : 1;
        }
      }
    }
    this._zdle_table = zsendline_tab;
  }
};

/***/ },

/***/ 6564
/*!******************************************************!*\
  !*** ../app/node_modules/object-keys/isArguments.js ***!
  \******************************************************/
(module) {

"use strict";


var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
  var str = toStr.call(value);
  var isArgs = str === '[object Arguments]';
  if (!isArgs) {
    isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]';
  }
  return isArgs;
};

/***/ },

/***/ 6565
/*!****************************************************!*\
  !*** ../app/node_modules/has-tostringtag/shams.js ***!
  \****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 9944);

/** @type {import('.')} */
module.exports = function hasToStringTagShams() {
  return hasSymbols() && !!Symbol.toStringTag;
};

/***/ },

/***/ 6627
/*!*********************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/terminalToolbar.component.pug?ngResource ***!
  \*********************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"content\" cdkDropList cdkAutoDropGroup=\"app-tabs\"\u003E\u003Ci class=\"fas fa-grip-vertical drag-handle\" *ngIf=\"shouldShowDragHandle\" cdkDrag [cdkDragData]=\"tab\" (cdkDragStarted)=\"onTabDragStart()\" (cdkDragEnded)=\"onTabDragEnd()\"\u003E\u003C\u002Fi\u003E\n  \u003Cng-content\u003E\u003C\u002Fng-content\u003E\n  \u003Cbutton class=\"btn btn-sm btn-link\" *ngIf=\"tab.enableToolbar\" (click)=\"tab.togglePinToolbar()\" (mouseenter)=\"tab.showToolbar()\" (mouseleave)=\"tab.hideToolbar()\"\u003E\u003Ci class=\"fas fa-thumbtack\"\u003E\u003C\u002Fi\u003E\u003Cspan *ngIf=\"tab.pinToolbar\" translate\u003EUnpin\u003C\u002Fspan\u003E\u003Cspan *ngIf=\"!tab.pinToolbar\" translate\u003EPin\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 6654
/*!******************************************************!*\
  !*** ../app/node_modules/side-channel-list/index.js ***!
  \******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var inspect = __webpack_require__(/*! object-inspect */ 3808);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);

/*
* This function traverses the list returning the node corresponding to the given key.
*
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
* By doing so, all the recently used nodes can be accessed relatively quickly.
*/
/** @type {import('./list.d.ts').listGetNode} */
// eslint-disable-next-line consistent-return
var listGetNode = function (list, key, isDelete) {
  /** @type {typeof list | NonNullable<(typeof list)['next']>} */
  var prev = list;
  /** @type {(typeof list)['next']} */
  var curr;
  // eslint-disable-next-line eqeqeq
  for (; (curr = prev.next) != null; prev = curr) {
    if (curr.key === key) {
      prev.next = curr.next;
      if (!isDelete) {
        // eslint-disable-next-line no-extra-parens
        curr.next = /** @type {NonNullable<typeof list.next>} */list.next;
        list.next = curr; // eslint-disable-line no-param-reassign
      }
      return curr;
    }
  }
};

/** @type {import('./list.d.ts').listGet} */
var listGet = function (objects, key) {
  if (!objects) {
    return void undefined;
  }
  var node = listGetNode(objects, key);
  return node && node.value;
};
/** @type {import('./list.d.ts').listSet} */
var listSet = function (objects, key, value) {
  var node = listGetNode(objects, key);
  if (node) {
    node.value = value;
  } else {
    // Prepend the new node to the beginning of the list
    objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */{
      // eslint-disable-line no-param-reassign, no-extra-parens
      key: key,
      next: objects.next,
      value: value
    };
  }
};
/** @type {import('./list.d.ts').listHas} */
var listHas = function (objects, key) {
  if (!objects) {
    return false;
  }
  return !!listGetNode(objects, key);
};
/** @type {import('./list.d.ts').listDelete} */
// eslint-disable-next-line consistent-return
var listDelete = function (objects, key) {
  if (objects) {
    return listGetNode(objects, key, true);
  }
};

/** @type {import('.')} */
module.exports = function getSideChannelList() {
  /** @typedef {ReturnType<typeof getSideChannelList>} Channel */
  /** @typedef {Parameters<Channel['get']>[0]} K */
  /** @typedef {Parameters<Channel['set']>[1]} V */

  /** @type {import('./list.d.ts').RootNode<V, K> | undefined} */var $o;

  /** @type {Channel} */
  var channel = {
    assert: function (key) {
      if (!channel.has(key)) {
        throw new $TypeError('Side channel does not contain ' + inspect(key));
      }
    },
    'delete': function (key) {
      var root = $o && $o.next;
      var deletedNode = listDelete($o, key);
      if (deletedNode && root && root === deletedNode) {
        $o = void undefined;
      }
      return !!deletedNode;
    },
    get: function (key) {
      return listGet($o, key);
    },
    has: function (key) {
      return listHas($o, key);
    },
    set: function (key, value) {
      if (!$o) {
        // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
        $o = {
          next: void undefined
        };
      }
      // eslint-disable-next-line no-extra-parens
      listSet(/** @type {NonNullable<typeof $o>} */$o, key, value);
    }
  };
  // @ts-expect-error TODO: figure out why this is erroring
  return channel;
};

/***/ },

/***/ 6757
/*!*****************************************!*\
  !*** ../app/node_modules/uuid/index.js ***!
  \*****************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var v1 = __webpack_require__(/*! ./v1 */ 6392);
var v4 = __webpack_require__(/*! ./v4 */ 2443);
var uuid = v4;
uuid.v1 = v1;
uuid.v4 = v4;
module.exports = uuid;

/***/ },

/***/ 6775
/*!****************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!./node_modules/@xterm/xterm/css/xterm.css ***!
  \****************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, "/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n *   Fabrice Bellard's javascript vt100 for jslinux:\n *   http://bellard.org/jslinux/\n *   Copyright (c) 2011 Fabrice Bellard\n *   The original design remains. The terminal itself\n *   has been extended to include xterm CSI codes, among\n *   other features.\n */\n\n/**\n *  Default styles for xterm.js\n */\n\n.xterm {\n    cursor: text;\n    position: relative;\n    user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n    outline: none;\n}\n\n.xterm .xterm-helpers {\n    position: absolute;\n    top: 0;\n    /**\n     * The z-index of the helpers must be higher than the canvases in order for\n     * IMEs to appear on top.\n     */\n    z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n    padding: 0;\n    border: 0;\n    margin: 0;\n    /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n    position: absolute;\n    opacity: 0;\n    left: -9999em;\n    top: 0;\n    width: 0;\n    height: 0;\n    z-index: -5;\n    /** Prevent wrapping so the IME appears against the textarea at the correct position */\n    white-space: nowrap;\n    overflow: hidden;\n    resize: none;\n}\n\n.xterm .composition-view {\n    /* TODO: Composition position got messed up somewhere */\n    background: #000;\n    color: #FFF;\n    display: none;\n    position: absolute;\n    white-space: nowrap;\n    z-index: 1;\n}\n\n.xterm .composition-view.active {\n    display: block;\n}\n\n.xterm .xterm-viewport {\n    /* On OS X this is required in order for the scroll bar to appear fully opaque */\n    background-color: #000;\n    overflow-y: scroll;\n    cursor: default;\n    position: absolute;\n    right: 0;\n    left: 0;\n    top: 0;\n    bottom: 0;\n}\n\n.xterm .xterm-screen {\n    position: relative;\n}\n\n.xterm .xterm-screen canvas {\n    position: absolute;\n    left: 0;\n    top: 0;\n}\n\n.xterm .xterm-scroll-area {\n    visibility: hidden;\n}\n\n.xterm-char-measure-element {\n    display: inline-block;\n    visibility: hidden;\n    position: absolute;\n    top: 0;\n    left: -9999em;\n    line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n    cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n    cursor: pointer;\n}\n\n.xterm.column-select.focus {\n    /* Column selection mode */\n    cursor: crosshair;\n}\n\n.xterm .xterm-accessibility:not(.debug),\n.xterm .xterm-message {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    z-index: 10;\n    color: transparent;\n    pointer-events: none;\n}\n\n.xterm .xterm-accessibility-tree:not(.debug) *::selection {\n  color: transparent;\n}\n\n.xterm .xterm-accessibility-tree {\n  user-select: text;\n  white-space: pre;\n}\n\n.xterm .live-region {\n    position: absolute;\n    left: -9999px;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n}\n\n.xterm-dim {\n    /* Dim should not apply to background, so the opacity of the foreground color is applied\n     * explicitly in the generated class and reset to 1 here */\n    opacity: 1 !important;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-overline {\n    text-decoration: overline;\n}\n\n.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }\n.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }\n.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }\n.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }\n.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }\n\n.xterm-strikethrough {\n    text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {\n\tz-index: 7;\n}\n\n.xterm-decoration-overview-ruler {\n    z-index: 8;\n    position: absolute;\n    top: 0;\n    right: 0;\n    pointer-events: none;\n}\n\n.xterm-decoration-top {\n    z-index: 2;\n    position: relative;\n}\n", "",{"version":3,"sources":["webpack://./node_modules/@xterm/xterm/css/xterm.css"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;;AAEF;;EAEE;;AAEF;IACI,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;IACrB,yBAAyB;AAC7B;;AAEA;;IAEI,aAAa;AACjB;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN;;;MAGE;IACF,UAAU;AACd;;AAEA;IACI,UAAU;IACV,SAAS;IACT,SAAS;IACT,uFAAuF;IACvF,kBAAkB;IAClB,UAAU;IACV,aAAa;IACb,MAAM;IACN,QAAQ;IACR,SAAS;IACT,WAAW;IACX,sFAAsF;IACtF,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;AAChB;;AAEA;IACI,uDAAuD;IACvD,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,UAAU;AACd;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,gFAAgF;IAChF,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;AACb;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,MAAM;AACV;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,MAAM;IACN,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,oFAAoF;IACpF,eAAe;AACnB;;AAEA;;IAEI,eAAe;AACnB;;AAEA;IACI,0BAA0B;IAC1B,iBAAiB;AACrB;;AAEA;;IAEI,kBAAkB;IAClB,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;IACR,WAAW;IACX,kBAAkB;IAClB,oBAAoB;AACxB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;AAClB;;AAEA;IACI,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,WAAW;IACX,gBAAgB;AACpB;;AAEA;IACI;8DAC0D;IAC1D,qBAAqB;AACzB;;AAEA,qBAAqB,0BAA0B,EAAE;AACjD,qBAAqB,iCAAiC,EAAE;AACxD,qBAAqB,+BAA+B,EAAE;AACtD,qBAAqB,iCAAiC,EAAE;AACxD,qBAAqB,iCAAiC,EAAE;;AAExD;IACI,yBAAyB;AAC7B;;AAEA,oCAAoC,mCAAmC,EAAE;AACzE,oCAAoC,0CAA0C,EAAE;AAChF,oCAAoC,wCAAwC,EAAE;AAC9E,oCAAoC,0CAA0C,EAAE;AAChF,oCAAoC,0CAA0C,EAAE;;AAEhF;IACI,6BAA6B;AACjC;;AAEA;CACC,UAAU;CACV,kBAAkB;AACnB;;AAEA;CACC,UAAU;AACX;;AAEA;IACI,UAAU;IACV,kBAAkB;IAClB,MAAM;IACN,QAAQ;IACR,oBAAoB;AACxB;;AAEA;IACI,UAAU;IACV,kBAAkB;AACtB","sourcesContent":["/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n *   Fabrice Bellard's javascript vt100 for jslinux:\n *   http://bellard.org/jslinux/\n *   Copyright (c) 2011 Fabrice Bellard\n *   The original design remains. The terminal itself\n *   has been extended to include xterm CSI codes, among\n *   other features.\n */\n\n/**\n *  Default styles for xterm.js\n */\n\n.xterm {\n    cursor: text;\n    position: relative;\n    user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n    outline: none;\n}\n\n.xterm .xterm-helpers {\n    position: absolute;\n    top: 0;\n    /**\n     * The z-index of the helpers must be higher than the canvases in order for\n     * IMEs to appear on top.\n     */\n    z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n    padding: 0;\n    border: 0;\n    margin: 0;\n    /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n    position: absolute;\n    opacity: 0;\n    left: -9999em;\n    top: 0;\n    width: 0;\n    height: 0;\n    z-index: -5;\n    /** Prevent wrapping so the IME appears against the textarea at the correct position */\n    white-space: nowrap;\n    overflow: hidden;\n    resize: none;\n}\n\n.xterm .composition-view {\n    /* TODO: Composition position got messed up somewhere */\n    background: #000;\n    color: #FFF;\n    display: none;\n    position: absolute;\n    white-space: nowrap;\n    z-index: 1;\n}\n\n.xterm .composition-view.active {\n    display: block;\n}\n\n.xterm .xterm-viewport {\n    /* On OS X this is required in order for the scroll bar to appear fully opaque */\n    background-color: #000;\n    overflow-y: scroll;\n    cursor: default;\n    position: absolute;\n    right: 0;\n    left: 0;\n    top: 0;\n    bottom: 0;\n}\n\n.xterm .xterm-screen {\n    position: relative;\n}\n\n.xterm .xterm-screen canvas {\n    position: absolute;\n    left: 0;\n    top: 0;\n}\n\n.xterm .xterm-scroll-area {\n    visibility: hidden;\n}\n\n.xterm-char-measure-element {\n    display: inline-block;\n    visibility: hidden;\n    position: absolute;\n    top: 0;\n    left: -9999em;\n    line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n    cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n    cursor: pointer;\n}\n\n.xterm.column-select.focus {\n    /* Column selection mode */\n    cursor: crosshair;\n}\n\n.xterm .xterm-accessibility:not(.debug),\n.xterm .xterm-message {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    z-index: 10;\n    color: transparent;\n    pointer-events: none;\n}\n\n.xterm .xterm-accessibility-tree:not(.debug) *::selection {\n  color: transparent;\n}\n\n.xterm .xterm-accessibility-tree {\n  user-select: text;\n  white-space: pre;\n}\n\n.xterm .live-region {\n    position: absolute;\n    left: -9999px;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n}\n\n.xterm-dim {\n    /* Dim should not apply to background, so the opacity of the foreground color is applied\n     * explicitly in the generated class and reset to 1 here */\n    opacity: 1 !important;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-overline {\n    text-decoration: overline;\n}\n\n.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }\n.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }\n.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }\n.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }\n.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }\n\n.xterm-strikethrough {\n    text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {\n\tz-index: 7;\n}\n\n.xterm-decoration-overview-ruler {\n    z-index: 8;\n    position: absolute;\n    top: 0;\n    right: 0;\n    pointer-events: none;\n}\n\n.xterm-decoration-top {\n    z-index: 2;\n    position: relative;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 6803
/*!********************************************************************!*\
  !*** ../app/node_modules/call-bind-apply-helpers/functionApply.js ***!
  \********************************************************************/
(module) {

"use strict";


/** @type {import('./functionApply')} */
module.exports = Function.prototype.apply;

/***/ },

/***/ 6852
/*!**************************************************!*\
  !*** ../app/node_modules/get-intrinsic/index.js ***!
  \**************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var undefined;
var $Object = __webpack_require__(/*! es-object-atoms */ 2897);
var $Error = __webpack_require__(/*! es-errors */ 8458);
var $EvalError = __webpack_require__(/*! es-errors/eval */ 1578);
var $RangeError = __webpack_require__(/*! es-errors/range */ 4031);
var $ReferenceError = __webpack_require__(/*! es-errors/ref */ 2323);
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ 6543);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var $URIError = __webpack_require__(/*! es-errors/uri */ 9448);
var abs = __webpack_require__(/*! math-intrinsics/abs */ 9683);
var floor = __webpack_require__(/*! math-intrinsics/floor */ 3413);
var max = __webpack_require__(/*! math-intrinsics/max */ 9197);
var min = __webpack_require__(/*! math-intrinsics/min */ 743);
var pow = __webpack_require__(/*! math-intrinsics/pow */ 3629);
var round = __webpack_require__(/*! math-intrinsics/round */ 6107);
var sign = __webpack_require__(/*! math-intrinsics/sign */ 5534);
var $Function = Function;

// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
  try {
    return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  } catch (e) {}
};
var $gOPD = __webpack_require__(/*! gopd */ 1284);
var $defineProperty = __webpack_require__(/*! es-define-property */ 5832);
var throwTypeError = function () {
  throw new $TypeError();
};
var ThrowTypeError = $gOPD ? function () {
  try {
    // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
    arguments.callee; // IE 8 does not throw here
    return throwTypeError;
  } catch (calleeThrows) {
    try {
      // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
      return $gOPD(arguments, 'callee').get;
    } catch (gOPDthrows) {
      return throwTypeError;
    }
  }
}() : throwTypeError;
var hasSymbols = __webpack_require__(/*! has-symbols */ 8354)();
var getProto = __webpack_require__(/*! get-proto */ 3077);
var $ObjectGPO = __webpack_require__(/*! get-proto/Object.getPrototypeOf */ 6557);
var $ReflectGPO = __webpack_require__(/*! get-proto/Reflect.getPrototypeOf */ 2007);
var $apply = __webpack_require__(/*! call-bind-apply-helpers/functionApply */ 6803);
var $call = __webpack_require__(/*! call-bind-apply-helpers/functionCall */ 711);
var needsEval = {};
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
var INTRINSICS = {
  __proto__: null,
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  '%Array%': Array,
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
  '%AsyncFromSyncIteratorPrototype%': undefined,
  '%AsyncFunction%': needsEval,
  '%AsyncGenerator%': needsEval,
  '%AsyncGeneratorFunction%': needsEval,
  '%AsyncIteratorPrototype%': needsEval,
  '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
  '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
  '%Boolean%': Boolean,
  '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  '%Date%': Date,
  '%decodeURI%': decodeURI,
  '%decodeURIComponent%': decodeURIComponent,
  '%encodeURI%': encodeURI,
  '%encodeURIComponent%': encodeURIComponent,
  '%Error%': $Error,
  '%eval%': eval,
  // eslint-disable-line no-eval
  '%EvalError%': $EvalError,
  '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  '%Function%': $Function,
  '%GeneratorFunction%': needsEval,
  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  '%isFinite%': isFinite,
  '%isNaN%': isNaN,
  '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
  '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  '%Map%': typeof Map === 'undefined' ? undefined : Map,
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
  '%Math%': Math,
  '%Number%': Number,
  '%Object%': $Object,
  '%Object.getOwnPropertyDescriptor%': $gOPD,
  '%parseFloat%': parseFloat,
  '%parseInt%': parseInt,
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  '%RangeError%': $RangeError,
  '%ReferenceError%': $ReferenceError,
  '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  '%RegExp%': RegExp,
  '%Set%': typeof Set === 'undefined' ? undefined : Set,
  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  '%String%': String,
  '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
  '%Symbol%': hasSymbols ? Symbol : undefined,
  '%SyntaxError%': $SyntaxError,
  '%ThrowTypeError%': ThrowTypeError,
  '%TypedArray%': TypedArray,
  '%TypeError%': $TypeError,
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  '%URIError%': $URIError,
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
  '%Function.prototype.call%': $call,
  '%Function.prototype.apply%': $apply,
  '%Object.defineProperty%': $defineProperty,
  '%Object.getPrototypeOf%': $ObjectGPO,
  '%Math.abs%': abs,
  '%Math.floor%': floor,
  '%Math.max%': max,
  '%Math.min%': min,
  '%Math.pow%': pow,
  '%Math.round%': round,
  '%Math.sign%': sign,
  '%Reflect.getPrototypeOf%': $ReflectGPO
};
if (getProto) {
  try {
    null.error; // eslint-disable-line no-unused-expressions
  } catch (e) {
    // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
    var errorProto = getProto(getProto(e));
    INTRINSICS['%Error.prototype%'] = errorProto;
  }
}
var doEval = function doEval(name) {
  var value;
  if (name === '%AsyncFunction%') {
    value = getEvalledConstructor('async function () {}');
  } else if (name === '%GeneratorFunction%') {
    value = getEvalledConstructor('function* () {}');
  } else if (name === '%AsyncGeneratorFunction%') {
    value = getEvalledConstructor('async function* () {}');
  } else if (name === '%AsyncGenerator%') {
    var fn = doEval('%AsyncGeneratorFunction%');
    if (fn) {
      value = fn.prototype;
    }
  } else if (name === '%AsyncIteratorPrototype%') {
    var gen = doEval('%AsyncGenerator%');
    if (gen && getProto) {
      value = getProto(gen.prototype);
    }
  }
  INTRINSICS[name] = value;
  return value;
};
var LEGACY_ALIASES = {
  __proto__: null,
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  '%ArrayPrototype%': ['Array', 'prototype'],
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  '%BooleanPrototype%': ['Boolean', 'prototype'],
  '%DataViewPrototype%': ['DataView', 'prototype'],
  '%DatePrototype%': ['Date', 'prototype'],
  '%ErrorPrototype%': ['Error', 'prototype'],
  '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  '%FunctionPrototype%': ['Function', 'prototype'],
  '%Generator%': ['GeneratorFunction', 'prototype'],
  '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  '%JSONParse%': ['JSON', 'parse'],
  '%JSONStringify%': ['JSON', 'stringify'],
  '%MapPrototype%': ['Map', 'prototype'],
  '%NumberPrototype%': ['Number', 'prototype'],
  '%ObjectPrototype%': ['Object', 'prototype'],
  '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  '%PromisePrototype%': ['Promise', 'prototype'],
  '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  '%Promise_all%': ['Promise', 'all'],
  '%Promise_reject%': ['Promise', 'reject'],
  '%Promise_resolve%': ['Promise', 'resolve'],
  '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  '%RegExpPrototype%': ['RegExp', 'prototype'],
  '%SetPrototype%': ['Set', 'prototype'],
  '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  '%StringPrototype%': ['String', 'prototype'],
  '%SymbolPrototype%': ['Symbol', 'prototype'],
  '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  '%URIErrorPrototype%': ['URIError', 'prototype'],
  '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  '%WeakSetPrototype%': ['WeakSet', 'prototype']
};
var bind = __webpack_require__(/*! function-bind */ 438);
var hasOwn = __webpack_require__(/*! hasown */ 1766);
var $concat = bind.call($call, Array.prototype.concat);
var $spliceApply = bind.call($apply, Array.prototype.splice);
var $replace = bind.call($call, String.prototype.replace);
var $strSlice = bind.call($call, String.prototype.slice);
var $exec = bind.call($call, RegExp.prototype.exec);

/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
  var first = $strSlice(string, 0, 1);
  var last = $strSlice(string, -1);
  if (first === '%' && last !== '%') {
    throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  } else if (last === '%' && first !== '%') {
    throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  }
  var result = [];
  $replace(string, rePropName, function (match, number, quote, subString) {
    result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  });
  return result;
};
/* end adaptation */

var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  var intrinsicName = name;
  var alias;
  if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
    alias = LEGACY_ALIASES[intrinsicName];
    intrinsicName = '%' + alias[0] + '%';
  }
  if (hasOwn(INTRINSICS, intrinsicName)) {
    var value = INTRINSICS[intrinsicName];
    if (value === needsEval) {
      value = doEval(intrinsicName);
    }
    if (typeof value === 'undefined' && !allowMissing) {
      throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
    }
    return {
      alias: alias,
      name: intrinsicName,
      value: value
    };
  }
  throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};
module.exports = function GetIntrinsic(name, allowMissing) {
  if (typeof name !== 'string' || name.length === 0) {
    throw new $TypeError('intrinsic name must be a non-empty string');
  }
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
    throw new $TypeError('"allowMissing" argument must be a boolean');
  }
  if ($exec(/^%?[^%]*%?$/, name) === null) {
    throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
  }
  var parts = stringToPath(name);
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  var intrinsicRealName = intrinsic.name;
  var value = intrinsic.value;
  var skipFurtherCaching = false;
  var alias = intrinsic.alias;
  if (alias) {
    intrinsicBaseName = alias[0];
    $spliceApply(parts, $concat([0, 1], alias));
  }
  for (var i = 1, isOwn = true; i < parts.length; i += 1) {
    var part = parts[i];
    var first = $strSlice(part, 0, 1);
    var last = $strSlice(part, -1);
    if ((first === '"' || first === "'" || first === '`' || last === '"' || last === "'" || last === '`') && first !== last) {
      throw new $SyntaxError('property names with quotes must have matching quotes');
    }
    if (part === 'constructor' || !isOwn) {
      skipFurtherCaching = true;
    }
    intrinsicBaseName += '.' + part;
    intrinsicRealName = '%' + intrinsicBaseName + '%';
    if (hasOwn(INTRINSICS, intrinsicRealName)) {
      value = INTRINSICS[intrinsicRealName];
    } else if (value != null) {
      if (!(part in value)) {
        if (!allowMissing) {
          throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
        }
        return void undefined;
      }
      if ($gOPD && i + 1 >= parts.length) {
        var desc = $gOPD(value, part);
        isOwn = !!desc;

        // By convention, when a data property is converted to an accessor
        // property to emulate a data property that does not suffer from
        // the override mistake, that accessor's getter is marked with
        // an `originalValue` property. Here, when we detect this, we
        // uphold the illusion by pretending to see that original data
        // property, i.e., returning the value rather than the getter
        // itself.
        if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
          value = desc.get;
        } else {
          value = value[part];
        }
      } else {
        isOwn = hasOwn(value, part);
        value = value[part];
      }
      if (isOwn && !skipFurtherCaching) {
        INTRINSICS[intrinsicRealName] = value;
      }
    }
  }
  return value;
};

/***/ },

/***/ 6919
/*!**************************************************************!*\
  !*** ../app/node_modules/regexp.prototype.flags/polyfill.js ***!
  \**************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 3606);
var supportsDescriptors = (__webpack_require__(/*! define-properties */ 2445).supportsDescriptors);
var $gOPD = Object.getOwnPropertyDescriptor;
module.exports = function getPolyfill() {
  if (supportsDescriptors && /a/mig.flags === 'gim') {
    var descriptor = $gOPD(RegExp.prototype, 'flags');
    if (descriptor && typeof descriptor.get === 'function' && 'dotAll' in RegExp.prototype && 'hasIndices' in RegExp.prototype) {
      /* eslint getter-return: 0 */
      var calls = '';
      var o = {};
      Object.defineProperty(o, 'hasIndices', {
        get: function () {
          calls += 'd';
        }
      });
      Object.defineProperty(o, 'sticky', {
        get: function () {
          calls += 'y';
        }
      });
      descriptor.get.call(o);
      if (calls === 'dy') {
        return descriptor.get;
      }
    }
  }
  return implementation;
};

/***/ },

/***/ 6925
/*!*************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemeSelector.component.pug?ngResource ***!
  \*************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"head\"\u003E\n  \u003Cdiv class=\"bg-dark p-3 mb-4\" *ngIf=\"model != undefined\"\u003E\n    \u003Cdiv class=\"d-flex align-items-center\"\u003E\u003Cspan\u003E{{model.name}}\u003C\u002Fspan\u003E\n      \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\u003Ca class=\"btn-link\" (click)=\"selectScheme(undefined); $event.preventDefault()\" href=\"#\" translate\u003EClear\u003C\u002Fa\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ccolor-scheme-preview [scheme]=\"model\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"input-group mb-3\"\u003E\n    \u003Cdiv class=\"input-group-text\"\u003E\u003Ci class=\"fas fa-fw fa-search\"\u003E\u003C\u002Fi\u003E\u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"search\" [placeholder]=\"&quot;Search color schemes&quot;|translate\" [(ngModel)]=\"filter\"\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"body\"\u003E\n  \u003Cdiv class=\"list-group list-group-light mb-3\"\u003E\n    \u003Cng-container *ngFor=\"let scheme of allColorSchemes\"\u003E\n      \u003Cdiv class=\"list-group-item list-group-item-action\" [hidden]=\"filter &amp;&amp; !scheme.name.toLowerCase().includes(filter.toLowerCase())\" (click)=\"selectScheme(scheme)\"\u003E\n        \u003Cdiv class=\"d-flex w-100 align-items-center\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"model?.name === scheme.name\"\u003E\u003C\u002Fi\u003E\n          \u003Cdiv class=\"ms-2\"\u003E\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"me-auto\"\u003E{{scheme.name}}\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ccolor-scheme-preview [scheme]=\"scheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-container\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 6980
/*!******************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/streamProcessingSettings.component.pug?ngResource ***!
  \******************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EInput mode\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"d-flex\" ngbDropdown\u003E\n    \u003Cbutton class=\"btn btn-secondary btn-tab-bar\" ngbDropdownToggle\u003E{{getInputModeName(options.inputMode)}}\u003C\u002Fbutton\u003E\n    \u003Cdiv ngbDropdownMenu\u003E\u003Ca class=\"d-flex flex-column\" *ngFor=\"let mode of inputModes\" (click)=\"setInputMode(mode.key)\" ngbDropdownItem\u003E\n        \u003Cdiv\u003E{{mode.name|translate}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"text-muted\"\u003E{{mode.description|translate}}\u003C\u002Fdiv\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EInput newlines\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cselect class=\"form-control\" [(ngModel)]=\"options.inputNewlines\"\u003E\n    \u003Coption [ngValue]=\"mode.key\" *ngFor=\"let mode of newlineModes\"\u003E{{mode.name|translate}}\u003C\u002Foption\u003E\n  \u003C\u002Fselect\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EOutput mode\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"d-flex\" ngbDropdown\u003E\n    \u003Cbutton class=\"btn btn-secondary btn-tab-bar\" ngbDropdownToggle\u003E{{getOutputModeName(options.outputMode)}}\u003C\u002Fbutton\u003E\n    \u003Cdiv ngbDropdownMenu\u003E\u003Ca class=\"d-flex flex-column\" *ngFor=\"let mode of outputModes\" (click)=\"setOutputMode(mode.key)\" ngbDropdownItem\u003E\n        \u003Cdiv\u003E{{mode.name|translate}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"text-muted\"\u003E{{mode.description|translate}}\u003C\u002Fdiv\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EOutput newlines\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cselect class=\"form-control\" [(ngModel)]=\"options.outputNewlines\"\u003E\n    \u003Coption [ngValue]=\"mode.key\" *ngFor=\"let mode of newlineModes\"\u003E{{mode.name|translate}}\u003C\u002Foption\u003E\n  \u003C\u002Fselect\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 6982
/*!*************************!*\
  !*** external "crypto" ***!
  \*************************/
(module) {

"use strict";
module.exports = require("crypto");

/***/ },

/***/ 7061
/*!*************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/terminalToolbar.component.scss?ngResource ***!
  \*************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{padding:5px 15px 5px 15px;display:flex;z-index:3;overflow:hidden}:host ::ng-deep .btn{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.content{flex-grow:1;display:flex;align-items:center}.drag-handle{margin:0 10px 0 0;cursor:move;opacity:.3}", "",{"version":3,"sources":["webpack://./src/components/terminalToolbar.component.scss"],"names":[],"mappings":"AAAA,MACI,yBAAA,CACA,YAAA,CACA,SAAA,CACA,eAAA,CAEA,qBACI,kBAAA,CACA,sBAAA,CACA,eAAA,CAIR,SACI,WAAA,CACA,YAAA,CACA,kBAAA,CAGJ,aACI,iBAAA,CACA,WAAA,CACA,UAAA","sourcesContent":[":host {\n    padding: 5px 15px 5px 15px;\n    display: flex;\n    z-index: 3;\n    overflow: hidden;\n\n    ::ng-deep .btn {\n        white-space: nowrap;\n        text-overflow: ellipsis;\n        overflow: hidden;\n    }\n}\n\n.content {\n    flex-grow: 1;\n    display: flex;\n    align-items: center;\n}\n\n.drag-handle {\n    margin: 0 10px 0 0;\n    cursor: move;\n    opacity: .3;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 7129
/*!*************************************************************!*\
  !*** ./src/components/searchPanel.component.pug?ngResource ***!
  \*************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/searchPanel.component.pug?ngResource */ 9250);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 7182
/*!*********************************!*\
  !*** external "@angular/forms" ***!
  \*********************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7182__;

/***/ },

/***/ 7417
/*!***************************************************!*\
  !*** ./node_modules/zmodem.js/src/zvalidation.js ***!
  \***************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zerror */ 3478));
const LOOKS_LIKE_ZMODEM_HEADER = /\*\x18[AC]|\*\*\x18B/;
function _validate_number(key, value) {
  if (value < 0) {
    throw new Zmodem.Error("validation", "“" + key + "” (" + value + ") must be nonnegative.");
  }
  if (value !== Math.floor(value)) {
    throw new Zmodem.Error("validation", "“" + key + "” (" + value + ") must be an integer.");
  }
}

/** Validation logic for zmodem.js
 *
 * @exports Validation
 */
Zmodem.Validation = {
  /**
   * Validates and normalizes a set of parameters for an offer to send.
   * NOTE: This returns “mtime” as epoch seconds, not a Date. This is
   * inconsistent with the get_details() method in Session, but it’s
   * more useful for sending over the wire.
   *
   * @param {FileDetails} params - The file details. Some fairly trivial
   * variances from the specification are allowed.
   *
   * @return {FileDetails} The parameters that should be sent. `mtime`
   * will be a Date rather than a number.
   */
  offer_parameters: function offer_parameters(params) {
    if (!params.name) {
      throw new Zmodem.Error("validation", "Need “name”!");
    }
    if (typeof params.name !== "string") {
      throw new Zmodem.Error("validation", "“name” (" + params.name + ") must be a string!");
    }

    //So that we can override values as is useful
    //without affecting the passed-in object.
    params = Object.assign({}, params);
    if (LOOKS_LIKE_ZMODEM_HEADER.test(params.name)) {
      console.warn("The filename " + JSON.stringify(name) + " contains characters that look like a ZMODEM header. This could corrupt the ZMODEM session; consider renaming it so that the filename doesn’t contain control characters.");
    }
    if (params.serial !== null && params.serial !== undefined) {
      throw new Zmodem.Error("validation", "“serial” is meaningless.");
    }
    params.serial = null;
    ["size", "mode", "files_remaining", "bytes_remaining"].forEach(function (k) {
      var ok;
      switch (typeof params[k]) {
        case "object":
          ok = params[k] === null;
          break;
        case "undefined":
          params[k] = null;
          ok = true;
          break;
        case "number":
          _validate_number(k, params[k]);
          ok = true;
          break;
      }
      if (!ok) {
        throw new Zmodem.Error("validation", "“" + k + "” (" + params[k] + ") must be null, undefined, or a number.");
      }
    });
    if (typeof params.mode === "number") {
      params.mode |= 0x8000;
    }
    if (params.files_remaining === 0) {
      throw new Zmodem.Error("validation", "“files_remaining”, if given, must be positive.");
    }
    var mtime_ok;
    switch (typeof params.mtime) {
      case "object":
        mtime_ok = true;
        if (params.mtime instanceof Date) {
          var date_obj = params.mtime;
          params.mtime = Math.floor(date_obj.getTime() / 1000);
          if (params.mtime < 0) {
            throw new Zmodem.Error("validation", "“mtime” (" + date_obj + ") must not be earlier than 1970.");
          }
        } else if (params.mtime !== null) {
          mtime_ok = false;
        }
        break;
      case "undefined":
        params.mtime = null;
        mtime_ok = true;
        break;
      case "number":
        _validate_number("mtime", params.mtime);
        mtime_ok = true;
        break;
    }
    if (!mtime_ok) {
      throw new Zmodem.Error("validation", "“mtime” (" + params.mtime + ") must be null, undefined, a Date, or a number.");
    }
    return params;
  }
};

/***/ },

/***/ 7528
/*!*********************************************************!*\
  !*** ../app/node_modules/side-channel-weakmap/index.js ***!
  \*********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var callBound = __webpack_require__(/*! call-bound */ 4731);
var inspect = __webpack_require__(/*! object-inspect */ 3808);
var getSideChannelMap = __webpack_require__(/*! side-channel-map */ 3688);
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);
var $WeakMap = GetIntrinsic('%WeakMap%', true);

/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
var $weakMapGet = callBound('WeakMap.prototype.get', true);
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
var $weakMapSet = callBound('WeakMap.prototype.set', true);
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
var $weakMapHas = callBound('WeakMap.prototype.has', true);
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
var $weakMapDelete = callBound('WeakMap.prototype.delete', true);

/** @type {import('.')} */
module.exports = $WeakMap ? /** @type {Exclude<import('.'), false>} */function getSideChannelWeakMap() {
  /** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
  /** @typedef {Parameters<Channel['get']>[0]} K */
  /** @typedef {Parameters<Channel['set']>[1]} V */

  /** @type {WeakMap<K & object, V> | undefined} */var $wm;
  /** @type {Channel | undefined} */
  var $m;

  /** @type {Channel} */
  var channel = {
    assert: function (key) {
      if (!channel.has(key)) {
        throw new $TypeError('Side channel does not contain ' + inspect(key));
      }
    },
    'delete': function (key) {
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if ($wm) {
          return $weakMapDelete($wm, key);
        }
      } else if (getSideChannelMap) {
        if ($m) {
          return $m['delete'](key);
        }
      }
      return false;
    },
    get: function (key) {
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if ($wm) {
          return $weakMapGet($wm, key);
        }
      }
      return $m && $m.get(key);
    },
    has: function (key) {
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if ($wm) {
          return $weakMapHas($wm, key);
        }
      }
      return !!$m && $m.has(key);
    },
    set: function (key, value) {
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if (!$wm) {
          $wm = new $WeakMap();
        }
        $weakMapSet($wm, key, value);
      } else if (getSideChannelMap) {
        if (!$m) {
          $m = getSideChannelMap();
        }
        // eslint-disable-next-line no-extra-parens
        /** @type {NonNullable<typeof $m>} */
        $m.set(key, value);
      }
    }
  };

  // @ts-expect-error TODO: figure out why this is erroring
  return channel;
} : getSideChannelMap;

/***/ },

/***/ 7554
/*!*****************************************************!*\
  !*** ../app/node_modules/which-collection/index.js ***!
  \*****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var isMap = __webpack_require__(/*! is-map */ 4749);
var isSet = __webpack_require__(/*! is-set */ 2595);
var isWeakMap = __webpack_require__(/*! is-weakmap */ 681);
var isWeakSet = __webpack_require__(/*! is-weakset */ 3607);

/** @type {import('.')} */
module.exports = function whichCollection(/** @type {unknown} */value) {
  if (value && typeof value === 'object') {
    if (isMap(value)) {
      return 'Map';
    }
    if (isSet(value)) {
      return 'Set';
    }
    if (isWeakMap(value)) {
      return 'WeakMap';
    }
    if (isWeakSet(value)) {
      return 'WeakSet';
    }
  }
  return false;
};

/***/ },

/***/ 7562
/*!******************************************!*\
  !*** ../node_modules/slugify/slugify.js ***!
  \******************************************/
(module) {

;
(function (name, root, factory) {
  if (true) {
    module.exports = factory();
    module.exports["default"] = factory();
  }
  /* istanbul ignore next */else // removed by dead control flow
{}
})('slugify', this, function () {
  var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","ǈ":"LJ","ǉ":"lj","ǋ":"NJ","ǌ":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\\"","”":"\\\"","„":"\\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}');
  var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
  function replace(string, options) {
    if (typeof string !== 'string') {
      throw new Error('slugify: string argument expected');
    }
    options = typeof options === 'string' ? {
      replacement: options
    } : options || {};
    var locale = locales[options.locale] || {};
    var replacement = options.replacement === undefined ? '-' : options.replacement;
    var trim = options.trim === undefined ? true : options.trim;
    var slug = string.normalize().split('')
    // replace characters based on charMap
    .reduce(function (result, ch) {
      var appendChar = locale[ch];
      if (appendChar === undefined) appendChar = charMap[ch];
      if (appendChar === undefined) appendChar = ch;
      if (appendChar === replacement) appendChar = ' ';
      return result + appendChar
      // remove not allowed characters
      .replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, '');
    }, '');
    if (options.strict) {
      slug = slug.replace(/[^A-Za-z0-9\s]/g, '');
    }
    if (trim) {
      slug = slug.trim();
    }

    // Replace spaces with replacement character, treating multiple consecutive
    // spaces as a single space.
    slug = slug.replace(/\s+/g, replacement);
    if (options.lower) {
      slug = slug.toLowerCase();
    }
    return slug;
  }
  replace.extend = function (customMap) {
    Object.assign(charMap, customMap);
  };
  return replace;
});

/***/ },

/***/ 7567
/*!************************************************!*\
  !*** ../app/node_modules/has-bigints/index.js ***!
  \************************************************/
(module) {

"use strict";


var $BigInt = typeof BigInt !== 'undefined' && BigInt;

/** @type {import('.')} */
module.exports = function hasNativeBigInts() {
  return typeof $BigInt === 'function' && typeof BigInt === 'function' && typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
  && typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
};

/***/ },

/***/ 7603
/*!*********************************************!*\
  !*** ./node_modules/ansi-colors/symbols.js ***!
  \*********************************************/
(module) {

"use strict";


const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
const common = {
  ballotDisabled: '☒',
  ballotOff: '☐',
  ballotOn: '☑',
  bullet: '•',
  bulletWhite: '◦',
  fullBlock: '█',
  heart: '❤',
  identicalTo: '≡',
  line: '─',
  mark: '※',
  middot: '·',
  minus: '－',
  multiplication: '×',
  obelus: '÷',
  pencilDownRight: '✎',
  pencilRight: '✏',
  pencilUpRight: '✐',
  percent: '%',
  pilcrow2: '❡',
  pilcrow: '¶',
  plusMinus: '±',
  question: '?',
  section: '§',
  starsOff: '☆',
  starsOn: '★',
  upDownArrow: '↕'
};
const windows = Object.assign({}, common, {
  check: '√',
  cross: '×',
  ellipsisLarge: '...',
  ellipsis: '...',
  info: 'i',
  questionSmall: '?',
  pointer: '>',
  pointerSmall: '»',
  radioOff: '( )',
  radioOn: '(*)',
  warning: '‼'
});
const other = Object.assign({}, common, {
  ballotCross: '✘',
  check: '✔',
  cross: '✖',
  ellipsisLarge: '⋯',
  ellipsis: '…',
  info: 'ℹ',
  questionFull: '？',
  questionSmall: '﹖',
  pointer: isLinux ? '▸' : '❯',
  pointerSmall: isLinux ? '‣' : '›',
  radioOff: '◯',
  radioOn: '◉',
  warning: '⚠'
});
module.exports = isWindows && !isHyper ? windows : other;
Reflect.defineProperty(module.exports, 'common', {
  enumerable: false,
  value: common
});
Reflect.defineProperty(module.exports, 'windows', {
  enumerable: false,
  value: windows
});
Reflect.defineProperty(module.exports, 'other', {
  enumerable: false,
  value: other
});

/***/ },

/***/ 7650
/*!*****************************!*\
  !*** external "tabby-core" ***!
  \*****************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7650__;

/***/ },

/***/ 7748
/*!*************************!*\
  !*** external "stream" ***!
  \*************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7748__;

/***/ },

/***/ 7840
/*!*********************************************!*\
  !*** ./node_modules/hexer/hex_transform.js ***!
  \*********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var extend = __webpack_require__(/*! xtend */ 1837);
var util = __webpack_require__(/*! util */ 9023);
var Transform = (__webpack_require__(/*! stream */ 7748).Transform);
var render = __webpack_require__(/*! ./render */ 3656);
function HexTransform(options) {
  if (!(this instanceof HexTransform)) {
    return new HexTransform(options);
  }
  // istanbul ignore next
  if (!options) options = {};
  if (options.colored) options = extend(render.coloredOptions, options);
  Transform.call(this, options);
  var self = this;
  self.options = options;
  self.prefix = self.options.prefix || '';
  self.cols = self.options.cols || 16;
  self.group = self.options.group || 2;
  self.gutter = self.options.gutter || 0;
  // istanbul ignore if
  self.annotateLine = options.annotateLine || null;
  self.decorateHexen = self.options.decorateHexen || noopDecorate;
  self.decorateHuman = self.options.decorateHuman || noopDecorate;
  self.renderHexen = self.options.renderHexen || render.byte2hex;
  self.renderHuman = self.options.renderHuman || render.byte2char;
  // istanbul ignore next
  self.groupSeparator = self.options.groupSeparator === undefined ? ' ' : self.options.groupSeparator;
  self.headSep = self.options.headSep === undefined ? ': ' : self.options.headSep;
  // istanbul ignore next
  self.divide = self.options.divide === undefined ? '  ' : self.options.divide;
  // istanbul ignore next
  self.emptyHexen = self.options.emptyHexen === undefined ? '  ' : self.options.emptyHexen;
  self.emptyHuman = self.options.emptyHuman || '';
  self.nullHuman = self.options.nullHuman || '';
  self.offsetWidth = self.options.offsetWidth || 8;
  self.gutter = Math.max(self.offsetWidth, self.gutter);
  self.line = '';
  self.hexen = '';
  self.human = '';
  self.reset();
}
util.inherits(HexTransform, Transform);
HexTransform.prototype.reset = function reset() {
  var self = this;
  self._finishLine();
  self.screenOffset = 0;
  self.totalOffset = 0;
};
HexTransform.prototype._transform = function transform(chunk, encoding, done) {
  var self = this;
  for (var offset = 0; offset < chunk.length; offset++) {
    if (self.screenOffset % self.cols === 0) {
      self._finishLine();
      self._startLine();
    }
    self._addByte(chunk[offset]);
  }
  done(null);
};
HexTransform.prototype._flush = function flush(done) {
  var self = this;
  if (self.totalOffset === 0 && self.nullHuman) {
    self._startLine();
    self.human += self.nullHuman;
  }
  self._finishLine();
  done(null);
};
HexTransform.prototype._startLine = function startLine() {
  var self = this;
  var head = render.pad('0', self.totalOffset.toString(16), self.offsetWidth);
  self.line = self.prefix + render.pad(' ', head, self.gutter) + self.headSep;
};
HexTransform.prototype._finishLine = function finishLine() {
  var self = this;
  if (self.line.length) {
    var rem = self.screenOffset % self.cols;
    if (rem !== 0 || self.totalOffset === 0 && self.nullHuman) {
      rem = self.cols - rem;
      for (var i = 0; i < rem; i++) {
        self._addEmpty();
      }
    }
    self.line += self.hexen + self.divide + self.human;
    // istanbul ignore if
    if (self.annotateLine) {
      self.line += self.annotateLine(self.totalOffset - self.cols, self.totalOffset);
    }
    self.line += '\n';
    self.push(self.line);
    self.line = '';
    self.hexen = '';
    self.human = '';
  }
};
HexTransform.prototype._addEmpty = function addEmpty() {
  var self = this;
  self._addPart(self.emptyHexen, self.emptyHuman);
};
HexTransform.prototype._addByte = function addByte(b) {
  var self = this;
  var hexen = self.renderHexen(b);
  var human = self.renderHuman(b);
  self._addPart(hexen, human, b);
};
HexTransform.prototype._addPart = function addByte(hexen, human, b) {
  var self = this;
  hexen = self.decorateHexen(self.totalOffset, self.screenOffset, hexen, b);
  human = self.decorateHuman(self.totalOffset, self.screenOffset, human, b);
  var isStartOfRow = self.screenOffset % self.cols === 0;
  var isStartOfGroup = self.screenOffset % self.group === 0;
  if (!isStartOfRow && isStartOfGroup) {
    self.hexen += self.groupSeparator;
  }
  self.hexen += hexen;
  self.human += human;
  self.totalOffset++;
  self.screenOffset++;
};
function noopDecorate(offset, screenOffset, s) {
  return s;
}
module.exports = HexTransform;

/***/ },

/***/ 7866
/*!****************************************!*\
  !*** ../node_modules/kind-of/index.js ***!
  \****************************************/
(module) {

var toString = Object.prototype.toString;
module.exports = function kindOf(val) {
  if (val === void 0) return 'undefined';
  if (val === null) return 'null';
  var type = typeof val;
  if (type === 'boolean') return 'boolean';
  if (type === 'string') return 'string';
  if (type === 'number') return 'number';
  if (type === 'symbol') return 'symbol';
  if (type === 'function') {
    return isGeneratorFn(val) ? 'generatorfunction' : 'function';
  }
  if (isArray(val)) return 'array';
  if (isBuffer(val)) return 'buffer';
  if (isArguments(val)) return 'arguments';
  if (isDate(val)) return 'date';
  if (isError(val)) return 'error';
  if (isRegexp(val)) return 'regexp';
  switch (ctorName(val)) {
    case 'Symbol':
      return 'symbol';
    case 'Promise':
      return 'promise';

    // Set, Map, WeakSet, WeakMap
    case 'WeakMap':
      return 'weakmap';
    case 'WeakSet':
      return 'weakset';
    case 'Map':
      return 'map';
    case 'Set':
      return 'set';

    // 8-bit typed arrays
    case 'Int8Array':
      return 'int8array';
    case 'Uint8Array':
      return 'uint8array';
    case 'Uint8ClampedArray':
      return 'uint8clampedarray';

    // 16-bit typed arrays
    case 'Int16Array':
      return 'int16array';
    case 'Uint16Array':
      return 'uint16array';

    // 32-bit typed arrays
    case 'Int32Array':
      return 'int32array';
    case 'Uint32Array':
      return 'uint32array';
    case 'Float32Array':
      return 'float32array';
    case 'Float64Array':
      return 'float64array';
  }
  if (isGeneratorObj(val)) {
    return 'generator';
  }

  // Non-plain objects
  type = toString.call(val);
  switch (type) {
    case '[object Object]':
      return 'object';
    // iterators
    case '[object Map Iterator]':
      return 'mapiterator';
    case '[object Set Iterator]':
      return 'setiterator';
    case '[object String Iterator]':
      return 'stringiterator';
    case '[object Array Iterator]':
      return 'arrayiterator';
  }

  // other
  return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
};
function ctorName(val) {
  return typeof val.constructor === 'function' ? val.constructor.name : null;
}
function isArray(val) {
  if (Array.isArray) return Array.isArray(val);
  return val instanceof Array;
}
function isError(val) {
  return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
}
function isDate(val) {
  if (val instanceof Date) return true;
  return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
}
function isRegexp(val) {
  if (val instanceof RegExp) return true;
  return typeof val.flags === 'string' && typeof val.ignoreCase === 'boolean' && typeof val.multiline === 'boolean' && typeof val.global === 'boolean';
}
function isGeneratorFn(name, val) {
  return ctorName(name) === 'GeneratorFunction';
}
function isGeneratorObj(val) {
  return typeof val.throw === 'function' && typeof val.return === 'function' && typeof val.next === 'function';
}
function isArguments(val) {
  try {
    if (typeof val.length === 'number' && typeof val.callee === 'function') {
      return true;
    }
  } catch (err) {
    if (err.message.indexOf('callee') !== -1) {
      return true;
    }
  }
  return false;
}

/**
 * If you need to support Safari 5-7 (8-10 yr-old browser),
 * take a look at https://github.com/feross/is-buffer
 */

function isBuffer(val) {
  if (val.constructor && typeof val.constructor.isBuffer === 'function') {
    return val.constructor.isBuffer(val);
  }
  return false;
}

/***/ },

/***/ 8093
/*!*********************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/searchPanel.component.scss?ngResource ***!
  \*********************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{position:fixed;width:600px;max-width:80vw;right:40px;height:36px;z-index:5;border-radius:0 0 5px 5px;background:rgba(0,0,0,.95);border:1px solid rgba(0,0,0,.5);border-top:0;display:flex}:host button{padding:0 6px;margin:4px 2px;flex-shrink:0}.result-counter{font-size:.7rem;opacity:.5}:host ::ng-deep svg{height:16px}", "",{"version":3,"sources":["webpack://./src/components/searchPanel.component.scss"],"names":[],"mappings":"AAAA,MACI,cAAA,CACA,WAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CACA,yBAAA,CACA,0BAAA,CACA,+BAAA,CACA,YAAA,CACA,YAAA,CAEA,aACI,aAAA,CACA,cAAA,CACA,aAAA,CAIR,gBACI,eAAA,CACA,UAAA,CAGJ,oBACI,WAAA","sourcesContent":[":host {\n    position: fixed;\n    width: 600px;\n    max-width: 80vw;\n    right: 40px;\n    height: 36px;\n    z-index: 5;\n    border-radius: 0 0 5px 5px;\n    background: rgba(0, 0, 0, .95);\n    border: 1px solid rgba(0, 0, 0, .5);\n    border-top: 0;\n    display: flex;\n\n    button {\n        padding: 0 6px;\n        margin: 4px 2px;\n        flex-shrink: 0;\n    }\n}\n\n.result-counter {\n    font-size: 0.7rem;\n    opacity: .5;\n}\n\n:host ::ng-deep svg {\n    height: 16px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 8111
/*!*********************************************************************!*\
  !*** ./src/components/terminalSettingsTab.component.pug?ngResource ***!
  \*********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/terminalSettingsTab.component.pug?ngResource */ 9408);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 8201
/*!********************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemeSettingsForMode.component.pug?ngResource ***!
  \********************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"head\"\u003E\n  \u003Cdiv class=\"d-flex align-items-center\" *ngIf=\"!editing\"\u003E\u003Cstrong class=\"me-2\" translate\u003ECurrent color scheme\u003C\u002Fstrong\u003E\u003Cspan\u003E{{getCurrentSchemeName()}}\u003C\u002Fspan\u003E\n    \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-toolbar\"\u003E\n      \u003Cbutton class=\"btn btn-secondary\" (click)=\"editScheme()\"\u003E\u003Ci class=\"fas fa-pen\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EEdit\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n      \u003Cdiv class=\"me-1\"\u003E\u003C\u002Fdiv\u003E\n      \u003Cbutton class=\"btn btn-danger\" (click)=\"deleteScheme(config.store.terminal[this.configKey])\" *ngIf=\"currentCustomScheme\"\u003E\u003Ci class=\"fas fa-trash\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EDelete\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"editing\"\u003E\n    \u003Cdiv class=\"mb-3\"\u003E\n      \u003Clabel translate\u003EName\u003C\u002Flabel\u003E\n      \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"config.store.terminal[this.configKey].name\"\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"mb-3\"\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal[this.configKey].foreground\" (modelChange)=\"config.save()\" title=\"FG\" hint=\"Foreground\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal[this.configKey].background\" (modelChange)=\"config.save()\" title=\"BG\" hint=\"Background\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal[this.configKey].cursor\" (modelChange)=\"config.save()\" title=\"CU\" hint=\"Cursor color\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal[this.configKey].cursorAccent\" (modelChange)=\"config.save()\" title=\"CA\" hint=\"Block cursor foreground\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal[this.configKey].selection\" (modelChange)=\"config.save()\" title=\"SB\" hint=\"Selection background\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal[this.configKey].selectionForeground\" (modelChange)=\"config.save()\" title=\"SF\" hint=\"Selection foreground\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker *ngFor=\"let _ of config.store.terminal[this.configKey].colors; let idx = index; trackBy: colorsTrackBy\" [(model)]=\"config.store.terminal[this.configKey].colors[idx]\" (modelChange)=\"config.save()\" [title]=\"idx.toString()\" hint=\"ANSI color {{idx}}\"\u003E\u003C\u002Fcolor-picker\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ccolor-scheme-preview [scheme]=\"config.store.terminal[this.configKey]\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n  \u003Cdiv class=\"btn-toolbar d-flex mt-2\" *ngIf=\"editing\"\u003E\n    \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-primary\" (click)=\"saveScheme()\"\u003E\u003Ci class=\"fas fa-check\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ESave\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n    \u003Cdiv class=\"me-1\"\u003E\u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-secondary\" (click)=\"cancelEditing()\"\u003E\u003Ci class=\"fas fa-times\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ECancel\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Chr class=\"mt-3 mb-4\"\u003E\n  \u003Cdiv class=\"input-group mb-3\"\u003E\n    \u003Cdiv class=\"input-group-text\"\u003E\u003Ci class=\"fas fa-fw fa-search\"\u003E\u003C\u002Fi\u003E\u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"search\" [placeholder]=\"&quot;Search color schemes&quot;|translate\" [(ngModel)]=\"filter\"\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"body\"\u003E\n  \u003Cdiv class=\"list-group list-group-light mb-3\"\u003E\n    \u003Cng-container *ngFor=\"let scheme of allColorSchemes\"\u003E\n      \u003Cdiv class=\"list-group-item list-group-item-action\" [hidden]=\"filter &amp;&amp; !scheme.name.toLowerCase().includes(filter.toLowerCase())\" (click)=\"selectScheme(scheme)\" [class.active]=\"(currentCustomScheme || currentStockScheme) === scheme\"\u003E\n        \u003Cdiv class=\"d-flex w-100 align-items-center\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"(currentCustomScheme || currentStockScheme) === scheme\"\u003E\u003C\u002Fi\u003E\n          \u003Cdiv class=\"ms-2\"\u003E\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"me-auto\"\u003E\u003Cspan\u003E{{scheme.name}}\u003C\u002Fspan\u003E\n            \u003Cdiv class=\"badge text-bg-info ms-2\" *ngIf=\"customColorSchemes.includes(scheme)\" translate\u003ECustom\u003C\u002Fdiv\u003E\n          \u003C\u002Fdiv\u003E\n          \u003Cdiv\u003E\n            \u003Cdiv class=\"d-flex\"\u003E\n              \u003Cdiv class=\"swatch\" *ngFor=\"let index of colorIndexes.slice(0, 8)\" [style.background-color]=\"scheme.colors[index]\"\u003E\u003C\u002Fdiv\u003E\n            \u003C\u002Fdiv\u003E\n            \u003Cdiv class=\"d-flex\"\u003E\n              \u003Cdiv class=\"swatch\" *ngFor=\"let index of colorIndexes.slice(8, 16)\" [style.background-color]=\"scheme.colors[index]\"\u003E\u003C\u002Fdiv\u003E\n            \u003C\u002Fdiv\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ccolor-scheme-preview [scheme]=\"scheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-container\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 8303
/*!*********************************************!*\
  !*** ../node_modules/is-arguments/index.js ***!
  \*********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 6565)();
var callBound = __webpack_require__(/*! call-bind/callBound */ 9414);
var $toString = callBound('Object.prototype.toString');
var isStandardArguments = function isArguments(value) {
  if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
    return false;
  }
  return $toString(value) === '[object Arguments]';
};
var isLegacyArguments = function isArguments(value) {
  if (isStandardArguments(value)) {
    return true;
  }
  return value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && $toString(value) !== '[object Array]' && $toString(value.callee) === '[object Function]';
};
var supportsStandardArguments = function () {
  return isStandardArguments(arguments);
}();
isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests

module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;

/***/ },

/***/ 8323
/*!******************************************************!*\
  !*** ../app/node_modules/set-function-name/index.js ***!
  \******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var define = __webpack_require__(/*! define-data-property */ 4466);
var hasDescriptors = __webpack_require__(/*! has-property-descriptors */ 947)();
var functionsHaveConfigurableNames = (__webpack_require__(/*! functions-have-names */ 5821).functionsHaveConfigurableNames)();
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);

/** @type {import('.')} */
module.exports = function setFunctionName(fn, name) {
  if (typeof fn !== 'function') {
    throw new $TypeError('`fn` is not a function');
  }
  var loose = arguments.length > 2 && !!arguments[2];
  if (!loose || functionsHaveConfigurableNames) {
    if (hasDescriptors) {
      define(/** @type {Parameters<define>[0]} */fn, 'name', name, true, true);
    } else {
      define(/** @type {Parameters<define>[0]} */fn, 'name', name);
    }
  }
  return fn;
};

/***/ },

/***/ 8349
/*!*****************************************************!*\
  !*** ../app/node_modules/object.assign/polyfill.js ***!
  \*****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 6056);
var lacksProperEnumerationOrder = function () {
  if (!Object.assign) {
    return false;
  }
  /*
   * v8, specifically in node 4.x, has a bug with incorrect property enumeration order
   * note: this does not detect the bug unless there's 20 characters
   */
  var str = 'abcdefghijklmnopqrst';
  var letters = str.split('');
  var map = {};
  for (var i = 0; i < letters.length; ++i) {
    map[letters[i]] = letters[i];
  }
  var obj = Object.assign({}, map);
  var actual = '';
  for (var k in obj) {
    actual += k;
  }
  return str !== actual;
};
var assignHasPendingExceptions = function () {
  if (!Object.assign || !Object.preventExtensions) {
    return false;
  }
  /*
   * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
   * which is 72% slower than our shim, and Firefox 40's native implementation.
   */
  var thrower = Object.preventExtensions({
    1: 2
  });
  try {
    Object.assign(thrower, 'xy');
  } catch (e) {
    return thrower[1] === 'y';
  }
  return false;
};
module.exports = function getPolyfill() {
  if (!Object.assign) {
    return implementation;
  }
  if (lacksProperEnumerationOrder()) {
    return implementation;
  }
  if (assignHasPendingExceptions()) {
    return implementation;
  }
  return Object.assign;
};

/***/ },

/***/ 8354
/*!************************************************!*\
  !*** ../app/node_modules/has-symbols/index.js ***!
  \************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var origSymbol = typeof Symbol !== 'undefined' && Symbol;
var hasSymbolSham = __webpack_require__(/*! ./shams */ 9944);

/** @type {import('.')} */
module.exports = function hasNativeSymbols() {
  if (typeof origSymbol !== 'function') {
    return false;
  }
  if (typeof Symbol !== 'function') {
    return false;
  }
  if (typeof origSymbol('foo') !== 'symbol') {
    return false;
  }
  if (typeof Symbol('bar') !== 'symbol') {
    return false;
  }
  return hasSymbolSham();
};

/***/ },

/***/ 8375
/*!*******************************************************!*\
  !*** ./src/components/baseTerminalTab.component.scss ***!
  \*******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./baseTerminalTab.component.scss */ 1290);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 8458
/*!**********************************************!*\
  !*** ../app/node_modules/es-errors/index.js ***!
  \**********************************************/
(module) {

"use strict";


/** @type {import('.')} */
module.exports = Error;

/***/ },

/***/ 8480
/*!****************************************************!*\
  !*** ../app/node_modules/safe-regex-test/index.js ***!
  \****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);
var isRegex = __webpack_require__(/*! is-regex */ 1476);
var $exec = callBound('RegExp.prototype.exec');
var $TypeError = __webpack_require__(/*! es-errors/type */ 9176);

/** @type {import('.')} */
module.exports = function regexTester(regex) {
  if (!isRegex(regex)) {
    throw new $TypeError('`regex` must be a RegExp');
  }
  return function test(s) {
    return $exec(regex, s) !== null;
  };
};

/***/ },

/***/ 8516
/*!***************************************************!*\
  !*** ../app/node_modules/uuid/lib/bytesToUuid.js ***!
  \***************************************************/
(module) {

/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
  byteToHex[i] = (i + 0x100).toString(16).substr(1);
}
function bytesToUuid(buf, offset) {
  var i = offset || 0;
  var bth = byteToHex;
  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
  return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
}
module.exports = bytesToUuid;

/***/ },

/***/ 8570
/*!**********************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/baseTerminalTab.component.pug ***!
  \**********************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"terminal-toolbar-spacer\"\u003E\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"content\" #content [style.opacity]=\"frontendIsReady ? 1 : 0\"\u003E\u003C\u002Fdiv\u003E\n\u003Csearch-panel *ngIf=\"showSearchPanel &amp;&amp; hasFocus &amp;&amp; frontend\" @toolbarSlide [@.disabled]=\"!config.store.accessibility.animations\" [frontend]=\"frontend\" (close)=\"showSearchPanel = false; frontend.cancelSearch()\"\u003E\u003C\u002Fsearch-panel\u003E\n\u003Cbutton class=\"btn btn-sm btn-link toolbar-pin-button\" *ngIf=\"enableToolbar &amp;&amp; !pinToolbar\" (click)=\"togglePinToolbar()\" (mouseenter)=\"showToolbar()\" (mouseleave)=\"hideToolbar()\"\u003E\u003Ci class=\"fas fa-wrench\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 8700
/*!**************************************************************!*\
  !*** ./src/components/colorPicker.component.scss?ngResource ***!
  \**************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./colorPicker.component.scss?ngResource */ 799);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 8810
/*!****************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemeSettingsTab.component.pug?ngResource ***!
  \****************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Ch3 class=\"mb-3\" translate\u003EColor schemes\u003C\u002Fh3\u003E\n\u003Cdiv class=\"form-line mb-4\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003ESwitch color scheme\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"btn-group\" role=\"group\"\u003E\n    \u003Cinput class=\"btn-check\" type=\"radio\" name=\"colorSchemeMode\" [(ngModel)]=\"config.store.appearance.colorSchemeMode\" (ngModelChange)=\"config.save()\" id=\"colorSchemeModeAuto\" [value]=\"&quot;auto&quot;\"\u003E\n    \u003Clabel class=\"btn btn-secondary\" for=\"colorSchemeModeAuto\"\u003E\u003Cspan translate\u003EFrom system\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n    \u003Cinput class=\"btn-check\" type=\"radio\" name=\"colorSchemeMode\" [(ngModel)]=\"config.store.appearance.colorSchemeMode\" (ngModelChange)=\"config.save()\" id=\"colorSchemeModeDark\" [value]=\"&quot;dark&quot;\"\u003E\n    \u003Clabel class=\"btn btn-secondary\" for=\"colorSchemeModeDark\"\u003E\u003Cspan translate\u003EAlways dark\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n    \u003Cinput class=\"btn-check\" type=\"radio\" name=\"colorSchemeMode\" [(ngModel)]=\"config.store.appearance.colorSchemeMode\" (ngModelChange)=\"config.save()\" id=\"colorSchemeModeLight\" [value]=\"&quot;light&quot;\"\u003E\n    \u003Clabel class=\"btn btn-secondary\" for=\"colorSchemeModeLight\"\u003E\u003Cspan translate\u003EAlways light\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line mb-4\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EGenerate 256-color palette\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"description\" translate\u003EGenerate extended 256-color palette from your base 16 colors\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ctoggle [(ngModel)]=\"config.store.terminal.paletteGenerate\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line mb-4\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EHarmonious palette\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"description\" translate\u003EWhether to invert generated light theme colors. This helps give the 256-color palette more semantic meaning.\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ctoggle [(ngModel)]=\"config.store.terminal.paletteHarmonious\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n\u003C\u002Fdiv\u003E\n\u003Cul class=\"nav-tabs\" ngbNav #nav=\"ngbNav\" [activeId]=\"defaultTab\"\u003E\n  \u003Cli ngbNavItem=\"dark\"\u003E\u003Ca ngbNavLink translate\u003EDark mode\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Ccolor-scheme-settings-for-mode configKey=\"colorScheme\"\u003E\u003C\u002Fcolor-scheme-settings-for-mode\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem=\"light\"\u003E\u003Ca ngbNavLink translate\u003ELight mode\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Ccolor-scheme-settings-for-mode configKey=\"lightColorScheme\"\u003E\u003C\u002Fcolor-scheme-settings-for-mode\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n\u003C\u002Ful\u003E\n\u003Cdiv [ngbNavOutlet]=\"nav\"\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 8862
/*!***********************************************************!*\
  !*** ../app/node_modules/function-bind/implementation.js ***!
  \***********************************************************/
(module) {

"use strict";


/* eslint no-invalid-this: 1 */
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var toStr = Object.prototype.toString;
var max = Math.max;
var funcType = '[object Function]';
var concatty = function concatty(a, b) {
  var arr = [];
  for (var i = 0; i < a.length; i += 1) {
    arr[i] = a[i];
  }
  for (var j = 0; j < b.length; j += 1) {
    arr[j + a.length] = b[j];
  }
  return arr;
};
var slicy = function slicy(arrLike, offset) {
  var arr = [];
  for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
    arr[j] = arrLike[i];
  }
  return arr;
};
var joiny = function (arr, joiner) {
  var str = '';
  for (var i = 0; i < arr.length; i += 1) {
    str += arr[i];
    if (i + 1 < arr.length) {
      str += joiner;
    }
  }
  return str;
};
module.exports = function bind(that) {
  var target = this;
  if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
    throw new TypeError(ERROR_MESSAGE + target);
  }
  var args = slicy(arguments, 1);
  var bound;
  var binder = function () {
    if (this instanceof bound) {
      var result = target.apply(this, concatty(args, arguments));
      if (Object(result) === result) {
        return result;
      }
      return this;
    }
    return target.apply(that, concatty(args, arguments));
  };
  var boundLength = max(0, target.length - args.length);
  var boundArgs = [];
  for (var i = 0; i < boundLength; i++) {
    boundArgs[i] = '$' + i;
  }
  bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
  if (target.prototype) {
    var Empty = function Empty() {};
    Empty.prototype = target.prototype;
    bound.prototype = new Empty();
    Empty.prototype = null;
  }
  return bound;
};

/***/ },

/***/ 8869
/*!*********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/insertBySelector.js ***!
  \*********************************************************************/
(module) {

"use strict";


var memo = {};

/* istanbul ignore next  */
function getTarget(target) {
  if (typeof memo[target] === "undefined") {
    var styleTarget = document.querySelector(target);

    // Special case to return head of iframe instead of iframe itself
    if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
      try {
        // This will throw an exception if access to iframe is blocked
        // due to cross-origin restrictions
        styleTarget = styleTarget.contentDocument.head;
      } catch (e) {
        // istanbul ignore next
        styleTarget = null;
      }
    }
    memo[target] = styleTarget;
  }
  return memo[target];
}

/* istanbul ignore next  */
function insertBySelector(insert, style) {
  var target = getTarget(insert);
  if (!target) {
    throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  }
  target.appendChild(style);
}
module.exports = insertBySelector;

/***/ },

/***/ 8915
/*!**********************************************!*\
  !*** ./node_modules/buffer-replace/index.js ***!
  \**********************************************/
(module) {

"use strict";


const replace = (buf, a, b) => {
  if (!Buffer.isBuffer(buf)) buf = Buffer(buf);
  const idx = buf.indexOf(a);
  if (idx === -1) return buf;
  if (!Buffer.isBuffer(b)) b = Buffer(b);
  const before = buf.slice(0, idx);
  const after = replace(buf.slice(idx + a.length), a, b);
  return Buffer.concat([before, b, after], idx + b.length + after.length);
};
module.exports = replace;

/***/ },

/***/ 9004
/*!**********************************************************!*\
  !*** ../app/node_modules/object-inspect/util.inspect.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

module.exports = __webpack_require__(/*! util */ 9023).inspect;

/***/ },

/***/ 9023
/*!***********************!*\
  !*** external "util" ***!
  \***********************/
(module) {

"use strict";
module.exports = require("util");

/***/ },

/***/ 9041
/*!***************************************************************!*\
  !*** ../app/node_modules/possible-typed-array-names/index.js ***!
  \***************************************************************/
(module) {

"use strict";


/** @type {import('.')} */
module.exports = ['Float16Array', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'BigInt64Array', 'BigUint64Array'];

/***/ },

/***/ 9129
/*!********************************************************************!*\
  !*** ./node_modules/@xterm/addon-serialize/lib/addon-serialize.js ***!
  \********************************************************************/
(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(this, () => (() => {
  "use strict";

  var e = {
      930: (e, t, s) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ColorContrastCache = void 0;
        const r = s(485);
        t.ColorContrastCache = class {
          constructor() {
            this._color = new r.TwoKeyMap(), this._css = new r.TwoKeyMap();
          }
          setCss(e, t, s) {
            this._css.set(e, t, s);
          }
          getCss(e, t) {
            return this._css.get(e, t);
          }
          setColor(e, t, s) {
            this._color.set(e, t, s);
          }
          getColor(e, t) {
            return this._color.get(e, t);
          }
          clear() {
            this._color.clear(), this._css.clear();
          }
        };
      },
      997: function (e, t, s) {
        var r = this && this.__decorate || function (e, t, s, r) {
            var o,
              i = arguments.length,
              n = i < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, s) : r;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(e, t, s, r);else for (var a = e.length - 1; a >= 0; a--) (o = e[a]) && (n = (i < 3 ? o(n) : i > 3 ? o(t, s, n) : o(t, s)) || n);
            return i > 3 && n && Object.defineProperty(t, s, n), n;
          },
          o = this && this.__param || function (e, t) {
            return function (s, r) {
              t(s, r, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ThemeService = t.DEFAULT_ANSI_COLORS = void 0;
        const i = s(930),
          n = s(160),
          a = s(345),
          l = s(859),
          c = s(97),
          h = n.css.toColor("#ffffff"),
          u = n.css.toColor("#000000"),
          _ = n.css.toColor("#ffffff"),
          d = n.css.toColor("#000000"),
          C = {
            css: "rgba(255, 255, 255, 0.3)",
            rgba: 4294967117
          };
        t.DEFAULT_ANSI_COLORS = Object.freeze((() => {
          const e = [n.css.toColor("#2e3436"), n.css.toColor("#cc0000"), n.css.toColor("#4e9a06"), n.css.toColor("#c4a000"), n.css.toColor("#3465a4"), n.css.toColor("#75507b"), n.css.toColor("#06989a"), n.css.toColor("#d3d7cf"), n.css.toColor("#555753"), n.css.toColor("#ef2929"), n.css.toColor("#8ae234"), n.css.toColor("#fce94f"), n.css.toColor("#729fcf"), n.css.toColor("#ad7fa8"), n.css.toColor("#34e2e2"), n.css.toColor("#eeeeec")],
            t = [0, 95, 135, 175, 215, 255];
          for (let s = 0; s < 216; s++) {
            const r = t[s / 36 % 6 | 0],
              o = t[s / 6 % 6 | 0],
              i = t[s % 6];
            e.push({
              css: n.channels.toCss(r, o, i),
              rgba: n.channels.toRgba(r, o, i)
            });
          }
          for (let t = 0; t < 24; t++) {
            const s = 8 + 10 * t;
            e.push({
              css: n.channels.toCss(s, s, s),
              rgba: n.channels.toRgba(s, s, s)
            });
          }
          return e;
        })());
        let f = t.ThemeService = class extends l.Disposable {
          get colors() {
            return this._colors;
          }
          constructor(e) {
            super(), this._optionsService = e, this._contrastCache = new i.ColorContrastCache(), this._halfContrastCache = new i.ColorContrastCache(), this._onChangeColors = this.register(new a.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._colors = {
              foreground: h,
              background: u,
              cursor: _,
              cursorAccent: d,
              selectionForeground: void 0,
              selectionBackgroundTransparent: C,
              selectionBackgroundOpaque: n.color.blend(u, C),
              selectionInactiveBackgroundTransparent: C,
              selectionInactiveBackgroundOpaque: n.color.blend(u, C),
              ansi: t.DEFAULT_ANSI_COLORS.slice(),
              contrastCache: this._contrastCache,
              halfContrastCache: this._halfContrastCache
            }, 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)));
          }
          _setTheme(e = {}) {
            const s = this._colors;
            if (s.foreground = g(e.foreground, h), s.background = g(e.background, u), s.cursor = g(e.cursor, _), s.cursorAccent = g(e.cursorAccent, d), s.selectionBackgroundTransparent = g(e.selectionBackground, C), s.selectionBackgroundOpaque = n.color.blend(s.background, s.selectionBackgroundTransparent), s.selectionInactiveBackgroundTransparent = g(e.selectionInactiveBackground, s.selectionBackgroundTransparent), s.selectionInactiveBackgroundOpaque = n.color.blend(s.background, s.selectionInactiveBackgroundTransparent), s.selectionForeground = e.selectionForeground ? g(e.selectionForeground, n.NULL_COLOR) : void 0, s.selectionForeground === n.NULL_COLOR && (s.selectionForeground = void 0), n.color.isOpaque(s.selectionBackgroundTransparent)) {
              const e = .3;
              s.selectionBackgroundTransparent = n.color.opacity(s.selectionBackgroundTransparent, e);
            }
            if (n.color.isOpaque(s.selectionInactiveBackgroundTransparent)) {
              const e = .3;
              s.selectionInactiveBackgroundTransparent = n.color.opacity(s.selectionInactiveBackgroundTransparent, e);
            }
            if (s.ansi = t.DEFAULT_ANSI_COLORS.slice(), s.ansi[0] = g(e.black, t.DEFAULT_ANSI_COLORS[0]), s.ansi[1] = g(e.red, t.DEFAULT_ANSI_COLORS[1]), s.ansi[2] = g(e.green, t.DEFAULT_ANSI_COLORS[2]), s.ansi[3] = g(e.yellow, t.DEFAULT_ANSI_COLORS[3]), s.ansi[4] = g(e.blue, t.DEFAULT_ANSI_COLORS[4]), s.ansi[5] = g(e.magenta, t.DEFAULT_ANSI_COLORS[5]), s.ansi[6] = g(e.cyan, t.DEFAULT_ANSI_COLORS[6]), s.ansi[7] = g(e.white, t.DEFAULT_ANSI_COLORS[7]), s.ansi[8] = g(e.brightBlack, t.DEFAULT_ANSI_COLORS[8]), s.ansi[9] = g(e.brightRed, t.DEFAULT_ANSI_COLORS[9]), s.ansi[10] = g(e.brightGreen, t.DEFAULT_ANSI_COLORS[10]), s.ansi[11] = g(e.brightYellow, t.DEFAULT_ANSI_COLORS[11]), s.ansi[12] = g(e.brightBlue, t.DEFAULT_ANSI_COLORS[12]), s.ansi[13] = g(e.brightMagenta, t.DEFAULT_ANSI_COLORS[13]), s.ansi[14] = g(e.brightCyan, t.DEFAULT_ANSI_COLORS[14]), s.ansi[15] = g(e.brightWhite, t.DEFAULT_ANSI_COLORS[15]), e.extendedAnsi) {
              const r = Math.min(s.ansi.length - 16, e.extendedAnsi.length);
              for (let o = 0; o < r; o++) s.ansi[o + 16] = g(e.extendedAnsi[o], t.DEFAULT_ANSI_COLORS[o + 16]);
            }
            this._contrastCache.clear(), this._halfContrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors);
          }
          restoreColor(e) {
            this._restoreColor(e), this._onChangeColors.fire(this.colors);
          }
          _restoreColor(e) {
            if (void 0 !== e) switch (e) {
              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[e] = this._restoreColors.ansi[e];
            } else for (let e = 0; e < this._restoreColors.ansi.length; ++e) this._colors.ansi[e] = this._restoreColors.ansi[e];
          }
          modifyColors(e) {
            e(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 g(e, t) {
          if (void 0 !== e) try {
            return n.css.toColor(e);
          } catch {}
          return t;
        }
        t.ThemeService = f = r([o(0, c.IOptionsService)], f);
      },
      160: (e, t, s) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
        const r = s(399);
        let o = 0,
          i = 0,
          n = 0,
          a = 0;
        var l, c, h, u, _;
        function d(e) {
          const t = e.toString(16);
          return t.length < 2 ? "0" + t : t;
        }
        function C(e, t) {
          return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
        }
        t.NULL_COLOR = {
          css: "#00000000",
          rgba: 0
        }, function (e) {
          e.toCss = function (e, t, s, r) {
            return void 0 !== r ? `#${d(e)}${d(t)}${d(s)}${d(r)}` : `#${d(e)}${d(t)}${d(s)}`;
          }, e.toRgba = function (e, t, s, r = 255) {
            return (e << 24 | t << 16 | s << 8 | r) >>> 0;
          }, e.toColor = function (t, s, r, o) {
            return {
              css: e.toCss(t, s, r, o),
              rgba: e.toRgba(t, s, r, o)
            };
          };
        }(l || (t.channels = l = {})), function (e) {
          function t(e, t) {
            return a = Math.round(255 * t), [o, i, n] = _.toChannels(e.rgba), {
              css: l.toCss(o, i, n, a),
              rgba: l.toRgba(o, i, n, a)
            };
          }
          e.blend = function (e, t) {
            if (a = (255 & t.rgba) / 255, 1 === a) return {
              css: t.css,
              rgba: t.rgba
            };
            const s = t.rgba >> 24 & 255,
              r = t.rgba >> 16 & 255,
              c = t.rgba >> 8 & 255,
              h = e.rgba >> 24 & 255,
              u = e.rgba >> 16 & 255,
              _ = e.rgba >> 8 & 255;
            return o = h + Math.round((s - h) * a), i = u + Math.round((r - u) * a), n = _ + Math.round((c - _) * a), {
              css: l.toCss(o, i, n),
              rgba: l.toRgba(o, i, n)
            };
          }, e.isOpaque = function (e) {
            return 255 == (255 & e.rgba);
          }, e.ensureContrastRatio = function (e, t, s) {
            const r = _.ensureContrastRatio(e.rgba, t.rgba, s);
            if (r) return l.toColor(r >> 24 & 255, r >> 16 & 255, r >> 8 & 255);
          }, e.opaque = function (e) {
            const t = (255 | e.rgba) >>> 0;
            return [o, i, n] = _.toChannels(t), {
              css: l.toCss(o, i, n),
              rgba: t
            };
          }, e.opacity = t, e.multiplyOpacity = function (e, s) {
            return a = 255 & e.rgba, t(e, a * s / 255);
          }, e.toColorRGB = function (e) {
            return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
          };
        }(c || (t.color = c = {})), function (e) {
          let t, s;
          if (!r.isNode) {
            const e = document.createElement("canvas");
            e.width = 1, e.height = 1;
            const r = e.getContext("2d", {
              willReadFrequently: !0
            });
            r && (t = r, t.globalCompositeOperation = "copy", s = t.createLinearGradient(0, 0, 1, 1));
          }
          e.toColor = function (e) {
            if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
              case 4:
                return o = parseInt(e.slice(1, 2).repeat(2), 16), i = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), l.toColor(o, i, n);
              case 5:
                return o = parseInt(e.slice(1, 2).repeat(2), 16), i = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), l.toColor(o, i, n, a);
              case 7:
                return {
                  css: e,
                  rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                };
              case 9:
                return {
                  css: e,
                  rgba: parseInt(e.slice(1), 16) >>> 0
                };
            }
            const r = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
            if (r) return o = parseInt(r[1]), i = parseInt(r[2]), n = parseInt(r[3]), a = Math.round(255 * (void 0 === r[5] ? 1 : parseFloat(r[5]))), l.toColor(o, i, n, a);
            if (!t || !s) throw new Error("css.toColor: Unsupported css format");
            if (t.fillStyle = s, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
            if (t.fillRect(0, 0, 1, 1), [o, i, n, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
            return {
              rgba: l.toRgba(o, i, n, a),
              css: e
            };
          };
        }(h || (t.css = h = {})), function (e) {
          function t(e, t, s) {
            const r = e / 255,
              o = t / 255,
              i = s / 255;
            return .2126 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .7152 * (o <= .03928 ? o / 12.92 : Math.pow((o + .055) / 1.055, 2.4)) + .0722 * (i <= .03928 ? i / 12.92 : Math.pow((i + .055) / 1.055, 2.4));
          }
          e.relativeLuminance = function (e) {
            return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
          }, e.relativeLuminance2 = t;
        }(u || (t.rgb = u = {})), function (e) {
          function t(e, t, s) {
            const r = e >> 24 & 255,
              o = e >> 16 & 255,
              i = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              l = t >> 8 & 255,
              c = C(u.relativeLuminance2(n, a, l), u.relativeLuminance2(r, o, i));
            for (; c < s && (n > 0 || a > 0 || l > 0);) n -= Math.max(0, Math.ceil(.1 * n)), a -= Math.max(0, Math.ceil(.1 * a)), l -= Math.max(0, Math.ceil(.1 * l)), c = C(u.relativeLuminance2(n, a, l), u.relativeLuminance2(r, o, i));
            return (n << 24 | a << 16 | l << 8 | 255) >>> 0;
          }
          function s(e, t, s) {
            const r = e >> 24 & 255,
              o = e >> 16 & 255,
              i = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              l = t >> 8 & 255,
              c = C(u.relativeLuminance2(n, a, l), u.relativeLuminance2(r, o, i));
            for (; c < s && (n < 255 || a < 255 || l < 255);) n = Math.min(255, n + Math.ceil(.1 * (255 - n))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), l = Math.min(255, l + Math.ceil(.1 * (255 - l))), c = C(u.relativeLuminance2(n, a, l), u.relativeLuminance2(r, o, i));
            return (n << 24 | a << 16 | l << 8 | 255) >>> 0;
          }
          e.blend = function (e, t) {
            if (a = (255 & t) / 255, 1 === a) return t;
            const s = t >> 24 & 255,
              r = t >> 16 & 255,
              c = t >> 8 & 255,
              h = e >> 24 & 255,
              u = e >> 16 & 255,
              _ = e >> 8 & 255;
            return o = h + Math.round((s - h) * a), i = u + Math.round((r - u) * a), n = _ + Math.round((c - _) * a), l.toRgba(o, i, n);
          }, e.ensureContrastRatio = function (e, r, o) {
            const i = u.relativeLuminance(e >> 8),
              n = u.relativeLuminance(r >> 8);
            if (C(i, n) < o) {
              if (n < i) {
                const n = t(e, r, o),
                  a = C(i, u.relativeLuminance(n >> 8));
                if (a < o) {
                  const t = s(e, r, o);
                  return a > C(i, u.relativeLuminance(t >> 8)) ? n : t;
                }
                return n;
              }
              const a = s(e, r, o),
                l = C(i, u.relativeLuminance(a >> 8));
              if (l < o) {
                const s = t(e, r, o);
                return l > C(i, u.relativeLuminance(s >> 8)) ? a : s;
              }
              return a;
            }
          }, e.reduceLuminance = t, e.increaseLuminance = s, e.toChannels = function (e) {
            return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          };
        }(_ || (t.rgba = _ = {})), t.toPaddedHex = d, t.contrastRatio = C;
      },
      345: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.runAndSubscribe = t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const s = [];
            for (let e = 0; e < this._listeners.length; e++) s.push(this._listeners[e]);
            for (let r = 0; r < s.length; r++) s[r].call(void 0, e, t);
          }
          dispose() {
            this.clearListeners(), this._disposed = !0;
          }
          clearListeners() {
            this._listeners && (this._listeners.length = 0);
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        }, t.runAndSubscribe = function (e, t) {
          return t(void 0), e(e => t(e));
        };
      },
      859: (e, t) => {
        function s(e) {
          for (const t of e) t.dispose();
          e.length = 0;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.MutableDisposable = t.Disposable = void 0, t.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const e of this._disposables) e.dispose();
            this._disposables.length = 0;
          }
          register(e) {
            return this._disposables.push(e), e;
          }
          unregister(e) {
            const t = this._disposables.indexOf(e);
            -1 !== t && this._disposables.splice(t, 1);
          }
        }, t.MutableDisposable = class {
          constructor() {
            this._isDisposed = !1;
          }
          get value() {
            return this._isDisposed ? void 0 : this._value;
          }
          set value(e) {
            this._isDisposed || e === this._value || (this._value?.dispose(), this._value = e);
          }
          clear() {
            this.value = void 0;
          }
          dispose() {
            this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
          }
        }, t.toDisposable = function (e) {
          return {
            dispose: e
          };
        }, t.disposeArray = s, t.getDisposeArrayDisposable = function (e) {
          return {
            dispose: () => s(e)
          };
        };
      },
      485: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.FourKeyMap = t.TwoKeyMap = void 0;
        class s {
          constructor() {
            this._data = {};
          }
          set(e, t, s) {
            this._data[e] || (this._data[e] = {}), this._data[e][t] = s;
          }
          get(e, t) {
            return this._data[e] ? this._data[e][t] : void 0;
          }
          clear() {
            this._data = {};
          }
        }
        t.TwoKeyMap = s, t.FourKeyMap = class {
          constructor() {
            this._data = new s();
          }
          set(e, t, r, o, i) {
            this._data.get(e, t) || this._data.set(e, t, new s()), this._data.get(e, t).set(r, o, i);
          }
          get(e, t, s, r) {
            return this._data.get(e, t)?.get(s, r);
          }
          clear() {
            this._data.clear();
          }
        };
      },
      399: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" != typeof process;
        const s = t.isNode ? "node" : navigator.userAgent,
          r = t.isNode ? "node" : navigator.platform;
        t.isFirefox = s.includes("Firefox"), t.isLegacyEdge = s.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(s), t.getSafariVersion = function () {
          if (!t.isSafari) return 0;
          const e = s.match(/Version\/(\d+)/);
          return null === e || e.length < 2 ? 0 : parseInt(e[1]);
        }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(r), t.isIpad = "iPad" === r, t.isIphone = "iPhone" === r, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(r), t.isLinux = r.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(s);
      },
      726: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0;
        const s = "di$target",
          r = "di$dependencies";
        t.serviceRegistry = new Map(), t.getServiceDependencies = function (e) {
          return e[r] || [];
        }, t.createDecorator = function (e) {
          if (t.serviceRegistry.has(e)) return t.serviceRegistry.get(e);
          const o = function (e, t, i) {
            if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
            !function (e, t, o) {
              t[s] === t ? t[r].push({
                id: e,
                index: o
              }) : (t[r] = [{
                id: e,
                index: o
              }], t[s] = t);
            }(o, e, i);
          };
          return o.toString = () => e, t.serviceRegistry.set(e, o), o;
        };
      },
      97: (e, t, s) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.IDecorationService = t.IUnicodeService = t.IOscLinkService = t.IOptionsService = t.ILogService = t.LogLevelEnum = t.IInstantiationService = t.ICharsetService = t.ICoreService = t.ICoreMouseService = t.IBufferService = void 0;
        const r = s(726);
        var o;
        t.IBufferService = (0, r.createDecorator)("BufferService"), t.ICoreMouseService = (0, r.createDecorator)("CoreMouseService"), t.ICoreService = (0, r.createDecorator)("CoreService"), t.ICharsetService = (0, r.createDecorator)("CharsetService"), t.IInstantiationService = (0, r.createDecorator)("InstantiationService"), function (e) {
          e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.OFF = 5] = "OFF";
        }(o || (t.LogLevelEnum = o = {})), t.ILogService = (0, r.createDecorator)("LogService"), t.IOptionsService = (0, r.createDecorator)("OptionsService"), t.IOscLinkService = (0, r.createDecorator)("OscLinkService"), t.IUnicodeService = (0, r.createDecorator)("UnicodeService"), t.IDecorationService = (0, r.createDecorator)("DecorationService");
      }
    },
    t = {};
  function s(r) {
    var o = t[r];
    if (void 0 !== o) return o.exports;
    var i = t[r] = {
      exports: {}
    };
    return e[r].call(i.exports, i, i.exports, s), i.exports;
  }
  var r = {};
  return (() => {
    var e = r;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.HTMLSerializeHandler = e.SerializeAddon = void 0;
    const t = s(997);
    function o(e, t, s) {
      return Math.max(t, Math.min(e, s));
    }
    class i {
      constructor(e) {
        this._buffer = e;
      }
      serialize(e, t) {
        const s = this._buffer.getNullCell(),
          r = this._buffer.getNullCell();
        let o = s;
        const i = e.start.y,
          n = e.end.y,
          a = e.start.x,
          l = e.end.x;
        this._beforeSerialize(n - i, i, n);
        for (let t = i; t <= n; t++) {
          const i = this._buffer.getLine(t);
          if (i) {
            const n = t === e.start.y ? a : 0,
              c = t === e.end.y ? l : i.length;
            for (let e = n; e < c; e++) {
              const n = i.getCell(e, o === s ? r : s);
              n ? (this._nextCell(n, o, t, e), o = n) : console.warn(`Can't get cell at row=${t}, col=${e}`);
            }
          }
          this._rowEnd(t, t === n);
        }
        return this._afterSerialize(), this._serializeString(t);
      }
      _nextCell(e, t, s, r) {}
      _rowEnd(e, t) {}
      _beforeSerialize(e, t, s) {}
      _afterSerialize() {}
      _serializeString(e) {
        return "";
      }
    }
    function n(e, t) {
      return e.getFgColorMode() === t.getFgColorMode() && e.getFgColor() === t.getFgColor();
    }
    function a(e, t) {
      return e.getBgColorMode() === t.getBgColorMode() && e.getBgColor() === t.getBgColor();
    }
    function l(e, t) {
      return e.isInverse() === t.isInverse() && e.isBold() === t.isBold() && e.isUnderline() === t.isUnderline() && e.isOverline() === t.isOverline() && e.isBlink() === t.isBlink() && e.isInvisible() === t.isInvisible() && e.isItalic() === t.isItalic() && e.isDim() === t.isDim() && e.isStrikethrough() === t.isStrikethrough();
    }
    class c extends i {
      constructor(e, t) {
        super(e), this._terminal = t, this._rowIndex = 0, this._allRows = new Array(), this._allRowSeparators = new Array(), this._currentRow = "", this._nullCellCount = 0, this._cursorStyle = this._buffer.getNullCell(), this._cursorStyleRow = 0, this._cursorStyleCol = 0, this._backgroundCell = this._buffer.getNullCell(), this._firstRow = 0, this._lastCursorRow = 0, this._lastCursorCol = 0, this._lastContentCursorRow = 0, this._lastContentCursorCol = 0, this._thisRowLastChar = this._buffer.getNullCell(), this._thisRowLastSecondChar = this._buffer.getNullCell(), this._nextRowFirstChar = this._buffer.getNullCell();
      }
      _beforeSerialize(e, t, s) {
        this._allRows = new Array(e), this._lastContentCursorRow = t, this._lastCursorRow = t, this._firstRow = t;
      }
      _rowEnd(e, t) {
        this._nullCellCount > 0 && !a(this._cursorStyle, this._backgroundCell) && (this._currentRow += `[${this._nullCellCount}X`);
        let s = "";
        if (!t) {
          e - this._firstRow >= this._terminal.rows && this._buffer.getLine(this._cursorStyleRow)?.getCell(this._cursorStyleCol, this._backgroundCell);
          const t = this._buffer.getLine(e),
            r = this._buffer.getLine(e + 1);
          if (r.isWrapped) {
            s = "";
            const o = t.getCell(t.length - 1, this._thisRowLastChar),
              i = t.getCell(t.length - 2, this._thisRowLastSecondChar),
              n = r.getCell(0, this._nextRowFirstChar),
              l = n.getWidth() > 1;
            let c = !1;
            (n.getChars() && l ? this._nullCellCount <= 1 : this._nullCellCount <= 0) && ((o.getChars() || 0 === o.getWidth()) && a(o, n) && (c = !0), l && (i.getChars() || 0 === i.getWidth()) && a(o, n) && a(i, n) && (c = !0)), c || (s = "-".repeat(this._nullCellCount + 1), s += "[1D[1X", this._nullCellCount > 0 && (s += "[A", s += `[${t.length - this._nullCellCount}C`, s += `[${this._nullCellCount}X`, s += `[${t.length - this._nullCellCount}D`, s += "[B"), this._lastContentCursorRow = e + 1, this._lastContentCursorCol = 0, this._lastCursorRow = e + 1, this._lastCursorCol = 0);
          } else s = "\r\n", this._lastCursorRow = e + 1, this._lastCursorCol = 0;
        }
        this._allRows[this._rowIndex] = this._currentRow, this._allRowSeparators[this._rowIndex++] = s, this._currentRow = "", this._nullCellCount = 0;
      }
      _diffStyle(e, t) {
        const s = [],
          r = !n(e, t),
          o = !a(e, t),
          i = !l(e, t);
        if (r || o || i) if (e.isAttributeDefault()) t.isAttributeDefault() || s.push(0);else {
          if (r) {
            const t = e.getFgColor();
            e.isFgRGB() ? s.push(38, 2, t >>> 16 & 255, t >>> 8 & 255, 255 & t) : e.isFgPalette() ? t >= 16 ? s.push(38, 5, t) : s.push(8 & t ? 90 + (7 & t) : 30 + (7 & t)) : s.push(39);
          }
          if (o) {
            const t = e.getBgColor();
            e.isBgRGB() ? s.push(48, 2, t >>> 16 & 255, t >>> 8 & 255, 255 & t) : e.isBgPalette() ? t >= 16 ? s.push(48, 5, t) : s.push(8 & t ? 100 + (7 & t) : 40 + (7 & t)) : s.push(49);
          }
          i && (e.isInverse() !== t.isInverse() && s.push(e.isInverse() ? 7 : 27), e.isBold() !== t.isBold() && s.push(e.isBold() ? 1 : 22), e.isUnderline() !== t.isUnderline() && s.push(e.isUnderline() ? 4 : 24), e.isOverline() !== t.isOverline() && s.push(e.isOverline() ? 53 : 55), e.isBlink() !== t.isBlink() && s.push(e.isBlink() ? 5 : 25), e.isInvisible() !== t.isInvisible() && s.push(e.isInvisible() ? 8 : 28), e.isItalic() !== t.isItalic() && s.push(e.isItalic() ? 3 : 23), e.isDim() !== t.isDim() && s.push(e.isDim() ? 2 : 22), e.isStrikethrough() !== t.isStrikethrough() && s.push(e.isStrikethrough() ? 9 : 29));
        }
        return s;
      }
      _nextCell(e, t, s, r) {
        if (0 === e.getWidth()) return;
        const o = "" === e.getChars(),
          i = this._diffStyle(e, this._cursorStyle);
        if (o ? !a(this._cursorStyle, e) : i.length > 0) {
          this._nullCellCount > 0 && (a(this._cursorStyle, this._backgroundCell) || (this._currentRow += `[${this._nullCellCount}X`), this._currentRow += `[${this._nullCellCount}C`, this._nullCellCount = 0), this._lastContentCursorRow = this._lastCursorRow = s, this._lastContentCursorCol = this._lastCursorCol = r, this._currentRow += `[${i.join(";")}m`;
          const e = this._buffer.getLine(s);
          void 0 !== e && (e.getCell(r, this._cursorStyle), this._cursorStyleRow = s, this._cursorStyleCol = r);
        }
        o ? this._nullCellCount += e.getWidth() : (this._nullCellCount > 0 && (a(this._cursorStyle, this._backgroundCell) || (this._currentRow += `[${this._nullCellCount}X`), this._currentRow += `[${this._nullCellCount}C`, this._nullCellCount = 0), this._currentRow += e.getChars(), this._lastContentCursorRow = this._lastCursorRow = s, this._lastContentCursorCol = this._lastCursorCol = r + e.getWidth());
      }
      _serializeString(e) {
        let t = this._allRows.length;
        this._buffer.length - this._firstRow <= this._terminal.rows && (t = this._lastContentCursorRow + 1 - this._firstRow, this._lastCursorCol = this._lastContentCursorCol, this._lastCursorRow = this._lastContentCursorRow);
        let s = "";
        for (let e = 0; e < t; e++) s += this._allRows[e], e + 1 < t && (s += this._allRowSeparators[e]);
        if (!e) {
          const e = this._buffer.baseY + this._buffer.cursorY,
            t = this._buffer.cursorX,
            o = e => {
              e > 0 ? s += `[${e}C` : e < 0 && (s += `[${-e}D`);
            };
          (e !== this._lastCursorRow || t !== this._lastCursorCol) && ((r = e - this._lastCursorRow) > 0 ? s += `[${r}B` : r < 0 && (s += `[${-r}A`), o(t - this._lastCursorCol));
        }
        var r;
        const o = this._terminal._core._inputHandler._curAttrData,
          i = this._diffStyle(o, this._cursorStyle);
        return i.length > 0 && (s += `[${i.join(";")}m`), s;
      }
    }
    e.SerializeAddon = class {
      activate(e) {
        this._terminal = e;
      }
      _serializeBufferByScrollback(e, t, s) {
        const r = t.length,
          i = void 0 === s ? r : o(s + e.rows, 0, r);
        return this._serializeBufferByRange(e, t, {
          start: r - i,
          end: r - 1
        }, !1);
      }
      _serializeBufferByRange(e, t, s, r) {
        return new c(t, e).serialize({
          start: {
            x: 0,
            y: "number" == typeof s.start ? s.start : s.start.line
          },
          end: {
            x: e.cols,
            y: "number" == typeof s.end ? s.end : s.end.line
          }
        }, r);
      }
      _serializeBufferAsHTML(e, t) {
        const s = e.buffer.active,
          r = new h(s, e, t);
        if (!t.onlySelection) {
          const i = s.length,
            n = t.scrollback,
            a = void 0 === n ? i : o(n + e.rows, 0, i);
          return r.serialize({
            start: {
              x: 0,
              y: i - a
            },
            end: {
              x: e.cols,
              y: i - 1
            }
          });
        }
        const i = this._terminal?.getSelectionPosition();
        return void 0 !== i ? r.serialize({
          start: {
            x: i.start.x,
            y: i.start.y
          },
          end: {
            x: i.end.x,
            y: i.end.y
          }
        }) : "";
      }
      _serializeModes(e) {
        let t = "";
        const s = e.modes;
        if (s.applicationCursorKeysMode && (t += "[?1h"), s.applicationKeypadMode && (t += "[?66h"), s.bracketedPasteMode && (t += "[?2004h"), s.insertMode && (t += "[4h"), s.originMode && (t += "[?6h"), s.reverseWraparoundMode && (t += "[?45h"), s.sendFocusMode && (t += "[?1004h"), !1 === s.wraparoundMode && (t += "[?7l"), "none" !== s.mouseTrackingMode) switch (s.mouseTrackingMode) {
          case "x10":
            t += "[?9h";
            break;
          case "vt200":
            t += "[?1000h";
            break;
          case "drag":
            t += "[?1002h";
            break;
          case "any":
            t += "[?1003h";
        }
        return t;
      }
      serialize(e) {
        if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
        let t = e?.range ? this._serializeBufferByRange(this._terminal, this._terminal.buffer.normal, e.range, !0) : this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.normal, e?.scrollback);
        return e?.excludeAltBuffer || "alternate" !== this._terminal.buffer.active.type || (t += `[?1049h[H${this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.alternate, void 0)}`), e?.excludeModes || (t += this._serializeModes(this._terminal)), t;
      }
      serializeAsHTML(e) {
        if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
        return this._serializeBufferAsHTML(this._terminal, e || {});
      }
      dispose() {}
    };
    class h extends i {
      constructor(e, s, r) {
        super(e), this._terminal = s, this._options = r, this._currentRow = "", this._htmlContent = "", s._core._themeService ? this._ansiColors = s._core._themeService.colors.ansi : this._ansiColors = t.DEFAULT_ANSI_COLORS;
      }
      _padStart(e, t, s) {
        return t >>= 0, s = s ?? " ", e.length > t ? e : ((t -= e.length) > s.length && (s += s.repeat(t / s.length)), s.slice(0, t) + e);
      }
      _beforeSerialize(e, t, s) {
        this._htmlContent += "<html><body>\x3c!--StartFragment--\x3e<pre>";
        let r = "#000000",
          o = "#ffffff";
        this._options.includeGlobalBackground && (r = this._terminal.options.theme?.foreground ?? "#ffffff", o = this._terminal.options.theme?.background ?? "#000000");
        const i = [];
        i.push("color: " + r + ";"), i.push("background-color: " + o + ";"), i.push("font-family: " + this._terminal.options.fontFamily + ";"), i.push("font-size: " + this._terminal.options.fontSize + "px;"), this._htmlContent += "<div style='" + i.join(" ") + "'>";
      }
      _afterSerialize() {
        this._htmlContent += "</div>", this._htmlContent += "</pre>\x3c!--EndFragment--\x3e</body></html>";
      }
      _rowEnd(e, t) {
        this._htmlContent += "<div><span>" + this._currentRow + "</span></div>", this._currentRow = "";
      }
      _getHexColor(e, t) {
        const s = t ? e.getFgColor() : e.getBgColor();
        return (t ? e.isFgRGB() : e.isBgRGB()) ? "#" + [s >> 16 & 255, s >> 8 & 255, 255 & s].map(e => this._padStart(e.toString(16), 2, "0")).join("") : (t ? e.isFgPalette() : e.isBgPalette()) ? this._ansiColors[s].css : void 0;
      }
      _diffStyle(e, t) {
        const s = [],
          r = !n(e, t),
          o = !a(e, t),
          i = !l(e, t);
        if (r || o || i) {
          const t = this._getHexColor(e, !0);
          t && s.push("color: " + t + ";");
          const r = this._getHexColor(e, !1);
          return r && s.push("background-color: " + r + ";"), e.isInverse() && s.push("color: #000000; background-color: #BFBFBF;"), e.isBold() && s.push("font-weight: bold;"), e.isUnderline() && e.isOverline() ? s.push("text-decoration: overline underline;") : e.isUnderline() ? s.push("text-decoration: underline;") : e.isOverline() && s.push("text-decoration: overline;"), e.isBlink() && s.push("text-decoration: blink;"), e.isInvisible() && s.push("visibility: hidden;"), e.isItalic() && s.push("font-style: italic;"), e.isDim() && s.push("opacity: 0.5;"), e.isStrikethrough() && s.push("text-decoration: line-through;"), s;
        }
      }
      _nextCell(e, t, s, r) {
        if (0 === e.getWidth()) return;
        const o = "" === e.getChars(),
          i = this._diffStyle(e, t);
        i && (this._currentRow += 0 === i.length ? "</span><span>" : "</span><span style='" + i.join(" ") + "'>"), this._currentRow += o ? " " : e.getChars();
      }
      _serializeString() {
        return this._htmlContent;
      }
    }
    e.HTMLSerializeHandler = h;
  })(), r;
})());

/***/ },

/***/ 9176
/*!*********************************************!*\
  !*** ../app/node_modules/es-errors/type.js ***!
  \*********************************************/
(module) {

"use strict";


/** @type {import('./type')} */
module.exports = TypeError;

/***/ },

/***/ 9197
/*!**************************************************!*\
  !*** ../app/node_modules/math-intrinsics/max.js ***!
  \**************************************************/
(module) {

"use strict";


/** @type {import('./max')} */
module.exports = Math.max;

/***/ },

/***/ 9250
/*!*****************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/searchPanel.component.pug?ngResource ***!
  \*****************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"input-group\"\u003E\n  \u003Cinput class=\"search-input form-control\" type=\"text\" [(ngModel)]=\"query\" (ngModelChange)=\"onQueryChange()\" [class.text-danger]=\"state.resultCount == 0\" (click)=\"$event.stopPropagation()\" (keyup.enter)=\"findPrevious()\" (keyup.up)=\"findPrevious()\" (keyup.down)=\"findNext()\" (keyup.esc)=\"close.emit()\" [placeholder]=\"&quot;Search&quot;|translate\"\u003E\n  \u003Cdiv class=\"input-group-text result-counter\" *ngIf=\"state.resultCount &gt; 0\"\u003E{{(state.resultIndex ?? 0) + 1}} \u002F {{state.resultCount}}\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cng-container *ngIf=\"state.resultCount &gt; 0\"\u003E\n  \u003Cbutton class=\"btn btn-link\" (click)=\"findPrevious()\" [ngbTooltip]=\"&quot;Search up&quot;|translate\" placement=\"bottom\" [fastHtmlBind]=\"icons.arrowUp\"\u003E\u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-link\" (click)=\"findNext()\" [ngbTooltip]=\"&quot;Search down&quot;|translate\" placement=\"bottom\" [fastHtmlBind]=\"icons.arrowDown\"\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fng-container\u003E\n\u003Cdiv class=\"me-2\"\u003E\u003C\u002Fdiv\u003E\n\u003Cbutton class=\"btn\" (click)=\"options.caseSensitive = !options.caseSensitive; saveSearchOptions()\" [class.btn-link]=\"!options.caseSensitive\" [class.btn-info]=\"options.caseSensitive\" [ngbTooltip]=\"&quot;Case sensitivity&quot;|translate\" placement=\"bottom\" [fastHtmlBind]=\"icons.case\"\u003E\u003C\u002Fbutton\u003E\n\u003Cbutton class=\"btn\" (click)=\"options.regex = !options.regex; saveSearchOptions()\" [class.btn-link]=\"!options.regex\" [class.btn-info]=\"options.regex\" [ngbTooltip]=\"&quot;Regular expression&quot;|translate\" placement=\"bottom\" [fastHtmlBind]=\"icons.regexp\"\u003E\u003C\u002Fbutton\u003E\n\u003Cbutton class=\"btn\" (click)=\"options.wholeWord = !options.wholeWord; saveSearchOptions()\" [class.btn-link]=\"!options.wholeWord\" [class.btn-info]=\"options.wholeWord\" [ngbTooltip]=\"&quot;Whole word&quot;|translate\" placement=\"bottom\" [fastHtmlBind]=\"icons.wholeWord\"\u003E\u003C\u002Fbutton\u003E\n\u003Cdiv class=\"me-2\"\u003E\u003C\u002Fdiv\u003E\n\u003Cbutton class=\"btn btn-link\" (click)=\"close.emit()\" [fastHtmlBind]=\"icons.close\"\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 9258
/*!***************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/appearanceSettingsTab.component.pug?ngResource ***!
  \***************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Ch3 class=\"mb-3\" translate\u003EAppearance\u003C\u002Fh3\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EFont\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"input-group w-75\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" [ngbTypeahead]=\"fontAutocomplete\" [(ngModel)]=\"config.store.terminal.font\" (ngModelChange)=\"config.save()\"\u003E\n    \u003Cinput class=\"form-control font-size-input\" type=\"number\" max=\"48\" [(ngModel)]=\"config.store.terminal.fontSize\" (ngModelChange)=\"fixFontSize(); config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"row\"\u003E\n  \u003Cdiv class=\"col-12 col-md-6\"\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003EEnable font ligatures\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Ctoggle [(ngModel)]=\"config.store.terminal.ligatures\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003ENormal font weight\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cinput class=\"form-control\" type=\"number\" min=\"100\" max=\"900\" step=\"100\" [(ngModel)]=\"config.store.terminal.fontWeight\" (ngModelChange)=\"config.save()\"\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003EBold font weight\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cinput class=\"form-control\" type=\"number\" min=\"100\" max=\"900\" step=\"100\" [(ngModel)]=\"config.store.terminal.fontWeightBold\" (ngModelChange)=\"config.save()\"\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"col-12 col-md-6\"\u003E\n    \u003Ccolor-scheme-preview [scheme]=\"config.store.terminal.colorScheme\" [fontPreview]=\"true\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"content-box\"\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"!themes.findCurrentTheme().followsColorScheme\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ETerminal background\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-group\" role=\"group\"\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"background\" [(ngModel)]=\"config.store.terminal.background\" (ngModelChange)=\"config.save()\" id=\"backgroundTheme\" [value]=\"&quot;theme&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"backgroundTheme\"\u003E\u003Cspan translate\u003EFrom theme\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"background\" [(ngModel)]=\"config.store.terminal.background\" (ngModelChange)=\"config.save()\" id=\"backgroundColorScheme\" [value]=\"&quot;colorScheme&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"backgroundColorScheme\"\u003E\u003Cspan translate\u003EFrom color scheme\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECursor shape\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-group\" role=\"group\"\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"cursor\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" id=\"cursorBlock\" [value]=\"&quot;block&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"cursorBlock\"\u003E█\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"cursor\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" id=\"cursorBeam\" [value]=\"&quot;beam&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"cursorBeam\"\u003E|\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"cursor\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" id=\"cursorUnderline\" [value]=\"&quot;underline&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"cursorUnderline\"\u003E▁\u003C\u002Flabel\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EBlink cursor\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.cursorBlink\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EMinimum contrast ratio\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"number\" min=\"1\" max=\"21\" step=\"0.5\" [(ngModel)]=\"config.store.terminal.minimumContrastRatio\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EFallback font\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EA second font family used to display characters missing in the main font\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" [ngbTypeahead]=\"fontAutocomplete\" [(ngModel)]=\"config.store.terminal.fallbackFont\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ELine padding\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EAdditional space between lines\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"config.store.terminal.linePadding\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECustom CSS\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ctextarea class=\"form-control mb-5\" [(ngModel)]=\"config.store.appearance.css\" (ngModelChange)=\"saveConfiguration()\"\u003E\u003C\u002Ftextarea\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 9373
/*!************************************************************!*\
  !*** ./node_modules/@xterm/addon-image/lib/addon-image.js ***!
  \************************************************************/
(module) {

/*! For license information please see addon-image.js.LICENSE.txt */
!function (A, e) {
   true ? module.exports = e() : 0;
}(self, () => (() => {
  "use strict";

  var A = {
      615: (A, e) => {
        function t(A) {
          if ("undefined" != typeof Buffer) return Buffer.from(A, "base64");
          const e = atob(A),
            t = new Uint8Array(e.length);
          for (let A = 0; A < t.length; ++A) t[A] = e.charCodeAt(A);
          return t;
        }
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.InWasm = void 0, e.InWasm = function (A) {
          if (A.d) {
            const {
              t: e,
              s: i,
              d: s
            } = A;
            let r, g;
            const a = WebAssembly;
            return 2 === e ? i ? () => r || (r = t(s)) : () => Promise.resolve(r || (r = t(s))) : 1 === e ? i ? () => g || (g = new a.Module(r || (r = t(s)))) : () => g ? Promise.resolve(g) : a.compile(r || (r = t(s))).then(A => g = A) : i ? A => new a.Instance(g || (g = new a.Module(r || (r = t(s)))), A) : A => g ? a.instantiate(g, A) : a.instantiate(r || (r = t(s)), A).then(A => (g = A.module) && A.instance);
          }
          if ("undefined" == typeof _wasmCtx) throw new Error('must run "inwasm"');
          _wasmCtx.add(A);
        };
      },
      477: (A, e) => {
        function t(A) {
          return 255 & A;
        }
        function i(A) {
          return A >>> 8 & 255;
        }
        function s(A) {
          return A >>> 16 & 255;
        }
        function r(A, e, t, i = 255) {
          return ((255 & i) << 24 | (255 & t) << 16 | (255 & e) << 8 | 255 & A) >>> 0;
        }
        function g(A, e, t) {
          return Math.max(A, Math.min(t, e));
        }
        function a(A, e, t) {
          return t < 0 && (t += 1), t > 1 && (t -= 1), 6 * t < 1 ? e + 6 * (A - e) * t : 2 * t < 1 ? A : 3 * t < 2 ? e + (A - e) * (4 - 6 * t) : e;
        }
        function o(A, e, t) {
          return (4278190080 | Math.round(t / 100 * 255) << 16 | Math.round(e / 100 * 255) << 8 | Math.round(A / 100 * 255)) >>> 0;
        }
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.DEFAULT_FOREGROUND = e.DEFAULT_BACKGROUND = e.PALETTE_ANSI_256 = e.PALETTE_VT340_GREY = e.PALETTE_VT340_COLOR = e.normalizeHLS = e.normalizeRGB = e.nearestColorIndex = e.fromRGBA8888 = e.toRGBA8888 = e.alpha = e.blue = e.green = e.red = e.BIG_ENDIAN = void 0, e.BIG_ENDIAN = 255 === new Uint8Array(new Uint32Array([4278190080]).buffer)[0], e.BIG_ENDIAN && console.warn("BE platform detected. This version of node-sixel works only on LE properly."), e.red = t, e.green = i, e.blue = s, e.alpha = function (A) {
          return A >>> 24 & 255;
        }, e.toRGBA8888 = r, e.fromRGBA8888 = function (A) {
          return [255 & A, A >> 8 & 255, A >> 16 & 255, A >>> 24];
        }, e.nearestColorIndex = function (A, e) {
          const r = t(A),
            g = i(A),
            a = s(A);
          let o = Number.MAX_SAFE_INTEGER,
            h = -1;
          for (let A = 0; A < e.length; ++A) {
            const t = r - e[A][0],
              i = g - e[A][1],
              s = a - e[A][2],
              n = t * t + i * i + s * s;
            if (!n) return A;
            n < o && (o = n, h = A);
          }
          return h;
        }, e.normalizeRGB = o, e.normalizeHLS = function (A, e, t) {
          return function (A, e, t) {
            if (!t) {
              const A = Math.round(255 * e);
              return r(A, A, A);
            }
            const i = e < .5 ? e * (1 + t) : e + t - e * t,
              s = 2 * e - i;
            return r(g(0, 255, Math.round(255 * a(i, s, A + 1 / 3))), g(0, 255, Math.round(255 * a(i, s, A))), g(0, 255, Math.round(255 * a(i, s, A - 1 / 3))));
          }((A + 240) / 360, e / 100, t / 100);
        }, e.PALETTE_VT340_COLOR = new Uint32Array([o(0, 0, 0), o(20, 20, 80), o(80, 13, 13), o(20, 80, 20), o(80, 20, 80), o(20, 80, 80), o(80, 80, 20), o(53, 53, 53), o(26, 26, 26), o(33, 33, 60), o(60, 26, 26), o(33, 60, 33), o(60, 33, 60), o(33, 60, 60), o(60, 60, 33), o(80, 80, 80)]), e.PALETTE_VT340_GREY = new Uint32Array([o(0, 0, 0), o(13, 13, 13), o(26, 26, 26), o(40, 40, 40), o(6, 6, 6), o(20, 20, 20), o(33, 33, 33), o(46, 46, 46), o(0, 0, 0), o(13, 13, 13), o(26, 26, 26), o(40, 40, 40), o(6, 6, 6), o(20, 20, 20), o(33, 33, 33), o(46, 46, 46)]), e.PALETTE_ANSI_256 = (() => {
          const A = [r(0, 0, 0), r(205, 0, 0), r(0, 205, 0), r(205, 205, 0), r(0, 0, 238), r(205, 0, 205), r(0, 250, 205), r(229, 229, 229), r(127, 127, 127), r(255, 0, 0), r(0, 255, 0), r(255, 255, 0), r(92, 92, 255), r(255, 0, 255), r(0, 255, 255), r(255, 255, 255)],
            e = [0, 95, 135, 175, 215, 255];
          for (let t = 0; t < 6; ++t) for (let i = 0; i < 6; ++i) for (let s = 0; s < 6; ++s) A.push(r(e[t], e[i], e[s]));
          for (let e = 8; e <= 238; e += 10) A.push(r(e, e, e));
          return new Uint32Array(A);
        })(), e.DEFAULT_BACKGROUND = r(0, 0, 0, 255), e.DEFAULT_FOREGROUND = r(255, 255, 255, 255);
      },
      710: (A, e, t) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.decodeAsync = e.decode = e.Decoder = e.DecoderAsync = void 0;
        const i = t(477),
          s = t(343),
          r = function (A) {
            if ("undefined" != typeof Buffer) return Buffer.from(A, "base64");
            const e = atob(A),
              t = new Uint8Array(e.length);
            for (let A = 0; A < t.length; ++A) t[A] = e.charCodeAt(A);
            return t;
          }(s.LIMITS.BYTES);
        let g;
        const a = new Uint32Array();
        class o {
          constructor() {
            this.bandHandler = A => 1, this.modeHandler = A => 1;
          }
          handle_band(A) {
            return this.bandHandler(A);
          }
          mode_parsed(A) {
            return this.modeHandler(A);
          }
        }
        const h = {
          memoryLimit: 134217728,
          sixelColor: i.DEFAULT_FOREGROUND,
          fillColor: i.DEFAULT_BACKGROUND,
          palette: i.PALETTE_VT340_COLOR,
          paletteLimit: s.LIMITS.PALETTE_SIZE,
          truncate: !0
        };
        function n(A) {
          const e = new o(),
            t = {
              env: {
                handle_band: e.handle_band.bind(e),
                mode_parsed: e.mode_parsed.bind(e)
              }
            };
          return WebAssembly.instantiate(g || r, t).then(t => (g = g || t.module, new I(A, t.instance || t, e)));
        }
        e.DecoderAsync = n;
        class I {
          constructor(A, e, t) {
            if (this._PIXEL_OFFSET = s.LIMITS.MAX_WIDTH + 4, this._canvas = a, this._bandWidths = [], this._maxWidth = 0, this._minWidth = s.LIMITS.MAX_WIDTH, this._lastOffset = 0, this._currentHeight = 0, this._opts = Object.assign({}, h, A), this._opts.paletteLimit > s.LIMITS.PALETTE_SIZE) throw new Error(`DecoderOptions.paletteLimit must not exceed ${s.LIMITS.PALETTE_SIZE}`);
            if (e) t.bandHandler = this._handle_band.bind(this), t.modeHandler = this._initCanvas.bind(this);else {
              const A = g || (g = new WebAssembly.Module(r));
              e = new WebAssembly.Instance(A, {
                env: {
                  handle_band: this._handle_band.bind(this),
                  mode_parsed: this._initCanvas.bind(this)
                }
              });
            }
            this._instance = e, this._wasm = this._instance.exports, this._chunk = new Uint8Array(this._wasm.memory.buffer, this._wasm.get_chunk_address(), s.LIMITS.CHUNK_SIZE), this._states = new Uint32Array(this._wasm.memory.buffer, this._wasm.get_state_address(), 12), this._palette = new Uint32Array(this._wasm.memory.buffer, this._wasm.get_palette_address(), s.LIMITS.PALETTE_SIZE), this._palette.set(this._opts.palette), this._pSrc = new Uint32Array(this._wasm.memory.buffer, this._wasm.get_p0_address()), this._wasm.init(i.DEFAULT_FOREGROUND, 0, this._opts.paletteLimit, 0);
          }
          get _fillColor() {
            return this._states[0];
          }
          get _truncate() {
            return this._states[8];
          }
          get _rasterWidth() {
            return this._states[6];
          }
          get _rasterHeight() {
            return this._states[7];
          }
          get _width() {
            return this._states[2] ? this._states[2] - 4 : 0;
          }
          get _height() {
            return this._states[3];
          }
          get _level() {
            return this._states[9];
          }
          get _mode() {
            return this._states[10];
          }
          get _paletteLimit() {
            return this._states[11];
          }
          _initCanvas(A) {
            if (2 === A) {
              const A = this.width * this.height;
              if (A > this._canvas.length) {
                if (this._opts.memoryLimit && 4 * A > this._opts.memoryLimit) throw this.release(), new Error("image exceeds memory limit");
                this._canvas = new Uint32Array(A);
              }
              this._maxWidth = this._width;
            } else if (1 === A) if (2 === this._level) {
              const A = Math.min(this._rasterWidth, s.LIMITS.MAX_WIDTH) * this._rasterHeight;
              if (A > this._canvas.length) {
                if (this._opts.memoryLimit && 4 * A > this._opts.memoryLimit) throw this.release(), new Error("image exceeds memory limit");
                this._canvas = new Uint32Array(A);
              }
            } else this._canvas.length < 65536 && (this._canvas = new Uint32Array(65536));
            return 0;
          }
          _realloc(A, e) {
            const t = A + e;
            if (t > this._canvas.length) {
              if (this._opts.memoryLimit && 4 * t > this._opts.memoryLimit) throw this.release(), new Error("image exceeds memory limit");
              const A = new Uint32Array(65536 * Math.ceil(t / 65536));
              A.set(this._canvas), this._canvas = A;
            }
          }
          _handle_band(A) {
            const e = this._PIXEL_OFFSET;
            let t = this._lastOffset;
            if (2 === this._mode) {
              let i = this.height - this._currentHeight,
                s = 0;
              for (; s < 6 && i > 0;) this._canvas.set(this._pSrc.subarray(e * s, e * s + A), t + A * s), s++, i--;
              this._lastOffset += A * s, this._currentHeight += s;
            } else if (1 === this._mode) {
              this._realloc(t, 6 * A), this._maxWidth = Math.max(this._maxWidth, A), this._minWidth = Math.min(this._minWidth, A);
              for (let i = 0; i < 6; ++i) this._canvas.set(this._pSrc.subarray(e * i, e * i + A), t + A * i);
              this._bandWidths.push(A), this._lastOffset += 6 * A, this._currentHeight += 6;
            }
            return 0;
          }
          get width() {
            return 1 !== this._mode ? this._width : Math.max(this._maxWidth, this._wasm.current_width());
          }
          get height() {
            return 1 !== this._mode ? this._height : this._wasm.current_width() ? 6 * this._bandWidths.length + this._wasm.current_height() : 6 * this._bandWidths.length;
          }
          get palette() {
            return this._palette.subarray(0, this._paletteLimit);
          }
          get memoryUsage() {
            return this._canvas.byteLength + this._wasm.memory.buffer.byteLength + 8 * this._bandWidths.length;
          }
          get properties() {
            return {
              width: this.width,
              height: this.height,
              mode: this._mode,
              level: this._level,
              truncate: !!this._truncate,
              paletteLimit: this._paletteLimit,
              fillColor: this._fillColor,
              memUsage: this.memoryUsage,
              rasterAttributes: {
                numerator: this._states[4],
                denominator: this._states[5],
                width: this._rasterWidth,
                height: this._rasterHeight
              }
            };
          }
          init(A = this._opts.fillColor, e = this._opts.palette, t = this._opts.paletteLimit, i = this._opts.truncate) {
            this._wasm.init(this._opts.sixelColor, A, t, i ? 1 : 0), e && this._palette.set(e.subarray(0, s.LIMITS.PALETTE_SIZE)), this._bandWidths.length = 0, this._maxWidth = 0, this._minWidth = s.LIMITS.MAX_WIDTH, this._lastOffset = 0, this._currentHeight = 0;
          }
          decode(A, e = 0, t = A.length) {
            let i = e;
            for (; i < t;) {
              const e = Math.min(t - i, s.LIMITS.CHUNK_SIZE);
              this._chunk.set(A.subarray(i, i += e)), this._wasm.decode(0, e);
            }
          }
          decodeString(A, e = 0, t = A.length) {
            let i = e;
            for (; i < t;) {
              const e = Math.min(t - i, s.LIMITS.CHUNK_SIZE);
              for (let t = 0, s = i; t < e; ++t, ++s) this._chunk[t] = A.charCodeAt(s);
              i += e, this._wasm.decode(0, e);
            }
          }
          get data32() {
            if (0 === this._mode || !this.width || !this.height) return a;
            const A = this._wasm.current_width();
            if (2 === this._mode) {
              let e = this.height - this._currentHeight;
              if (e > 0) {
                const t = this._PIXEL_OFFSET;
                let i = this._lastOffset,
                  s = 0;
                for (; s < 6 && e > 0;) this._canvas.set(this._pSrc.subarray(t * s, t * s + A), i + A * s), s++, e--;
                e && this._canvas.fill(this._fillColor, i + A * s);
              }
              return this._canvas.subarray(0, this.width * this.height);
            }
            if (1 === this._mode) {
              if (this._minWidth === this._maxWidth) {
                let e = !1;
                if (A) if (A !== this._minWidth) e = !0;else {
                  const e = this._PIXEL_OFFSET;
                  let t = this._lastOffset;
                  this._realloc(t, 6 * A);
                  for (let i = 0; i < 6; ++i) this._canvas.set(this._pSrc.subarray(e * i, e * i + A), t + A * i);
                }
                if (!e) return this._canvas.subarray(0, this.width * this.height);
              }
              const e = new Uint32Array(this.width * this.height);
              e.fill(this._fillColor);
              let t = 0,
                i = 0;
              for (let A = 0; A < this._bandWidths.length; ++A) {
                const s = this._bandWidths[A];
                for (let A = 0; A < 6; ++A) e.set(this._canvas.subarray(i, i += s), t), t += this.width;
              }
              if (A) {
                const i = this._PIXEL_OFFSET,
                  s = this._wasm.current_height();
                for (let r = 0; r < s; ++r) e.set(this._pSrc.subarray(i * r, i * r + A), t + this.width * r);
              }
              return e;
            }
            return a;
          }
          get data8() {
            return new Uint8ClampedArray(this.data32.buffer, 0, this.width * this.height * 4);
          }
          release() {
            this._canvas = a, this._bandWidths.length = 0, this._maxWidth = 0, this._minWidth = s.LIMITS.MAX_WIDTH, this._wasm.init(i.DEFAULT_FOREGROUND, 0, this._opts.paletteLimit, 0);
          }
        }
        e.Decoder = I, e.decode = function (A, e) {
          const t = new I(e);
          return t.init(), "string" == typeof A ? t.decodeString(A) : t.decode(A), {
            width: t.width,
            height: t.height,
            data32: t.data32,
            data8: t.data8
          };
        }, e.decodeAsync = async function (A, e) {
          const t = await n(e);
          return t.init(), "string" == typeof A ? t.decodeString(A) : t.decode(A), {
            width: t.width,
            height: t.height,
            data32: t.data32,
            data8: t.data8
          };
        };
      },
      343: (A, e) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.LIMITS = void 0, e.LIMITS = {
          CHUNK_SIZE: 16384,
          PALETTE_SIZE: 4096,
          MAX_WIDTH: 16384,
          BYTES: " "
        };
      },
      280: (A, e, t) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        });
        const i = (0, t(615).InWasm)({
            s: 1,
            t: 0,
            d: "AGFzbQEAAAABBQFgAAF/Ag8BA2VudgZtZW1vcnkCAAEDAwIAAAcNAgNkZWMAAANlbmQAAQqxAwKuAQEFf0GIKCgCAEGgKGohAUGEKCgCACIAQYAoKAIAQQFrQXxxIgJIBEAgAkGgKGohAyAAQaAoaiEAA0AgAC0AA0ECdCgCgCAgAC0AAkECdCgCgBggAC0AAUECdCgCgBAgAC0AAEECdCgCgAhycnIiBEH///8HSwRAQQEPCyABIAQ2AgAgAUEDaiEBIABBBGoiACADSQ0ACwtBhCggAjYCAEGIKCABQaAoazYCAEEAC/4BAQZ/AkBBgCgoAgAiAUGEKCgCACIAa0EFTgRAQQEhAxAADQFBgCgoAgAhAUGEKCgCACEAC0EBIQMgASAAayIEQQJIDQAgAEGhKGotAABBAnQoAoAQIABBoChqLQAAQQJ0KAKACHIhAQJAIARBAkYEQEEBIQIMAQtBASECIAAtAKIoIgVBPUcEQEECIQIgBUECdCgCgBggAXIhAQsgBEEERw0AIAAtAKMoIgBBPUYNACACQQFqIQIgAEECdCgCgCAgAXIhAQsgAUH///8HSw0AQYgoKAIAQaAoaiABNgIAQYgoQYgoKAIAIAJqIgA2AgAgAEGQKCgCAEchAwsgAwsAdglwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQEFY2xhbmdWMTguMC4wIChodHRwczovL2dpdGh1Yi5jb20vbGx2bS9sbHZtLXByb2plY3QgZDFlNjg1ZGY0NWRjNTk0NGI0M2QyNTQ3ZDAxMzhjZDRhM2VlNGVmZSkALA90YXJnZXRfZmVhdHVyZXMCKw9tdXRhYmxlLWdsb2JhbHMrCHNpZ24tZXh0"
          }),
          s = new Uint8Array("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").map(A => A.charCodeAt(0))),
          r = new Uint32Array(1024);
        r.fill(4278190080);
        for (let A = 0; A < s.length; ++A) r[s[A]] = A << 2;
        for (let A = 0; A < s.length; ++A) r[256 + s[A]] = A >> 4 | (A << 4 & 255) << 8;
        for (let A = 0; A < s.length; ++A) r[512 + s[A]] = A >> 2 << 8 | (A << 6 & 255) << 16;
        for (let A = 0; A < s.length; ++A) r[768 + s[A]] = A << 16;
        const g = new Uint8Array(0);
        e.default = class {
          constructor(A) {
            this.keepSize = A;
          }
          get data8() {
            return this._inst ? this._d.subarray(0, this._m32[1282]) : g;
          }
          release() {
            this._inst && (this._mem.buffer.byteLength > this.keepSize ? this._inst = this._m32 = this._d = this._mem = null : (this._m32[1280] = 0, this._m32[1281] = 0, this._m32[1282] = 0));
          }
          init(A) {
            let e = this._m32;
            const t = 4 * (Math.ceil(A / 3) + 1288);
            this._inst ? this._mem.buffer.byteLength < t && (this._mem.grow(Math.ceil((t - this._mem.buffer.byteLength) / 65536)), e = new Uint32Array(this._mem.buffer, 0), this._d = new Uint8Array(this._mem.buffer, 5152)) : (this._mem = new WebAssembly.Memory({
              initial: Math.ceil(t / 65536)
            }), this._inst = i({
              env: {
                memory: this._mem
              }
            }), e = new Uint32Array(this._mem.buffer, 0), e.set(r, 256), this._d = new Uint8Array(this._mem.buffer, 5152)), e[1284] = A, e[1283] = 4 * Math.ceil(A / 3), e[1280] = 0, e[1281] = 0, e[1282] = 0, this._m32 = e;
          }
          put(A, e, t) {
            if (!this._inst) return 1;
            const i = this._m32;
            return t - e + i[1280] > i[1283] ? 1 : (this._d.set(A.subarray(e, t), i[1280]), i[1280] += t - e, i[1280] - i[1281] >= 131072 ? this._inst.exports.dec() : 0);
          }
          end() {
            return this._inst ? this._inst.exports.end() : 1;
          }
        };
      },
      125: (A, e, t) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.IIPHandler = void 0;
        const i = t(782),
          s = t(216),
          r = t(280),
          g = t(769),
          a = t(326),
          o = {
            name: "Unnamed file",
            size: 0,
            width: "auto",
            height: "auto",
            preserveAspectRatio: 1,
            inline: 0
          };
        e.IIPHandler = class {
          constructor(A, e, t, i) {
            this._opts = A, this._renderer = e, this._storage = t, this._coreTerminal = i, this._aborted = !1, this._hp = new g.HeaderParser(), this._header = o, this._dec = new r.default(4194304), this._metrics = a.UNSUPPORTED_TYPE;
          }
          reset() {}
          start() {
            this._aborted = !1, this._header = o, this._metrics = a.UNSUPPORTED_TYPE, this._hp.reset();
          }
          put(A, e, t) {
            if (!this._aborted) if (4 === this._hp.state) this._dec.put(A, e, t) && (this._dec.release(), this._aborted = !0);else {
              const i = this._hp.parse(A, e, t);
              if (-1 === i) return void (this._aborted = !0);
              if (i > 0) {
                if (this._header = Object.assign({}, o, this._hp.fields), !this._header.inline || !this._header.size || this._header.size > this._opts.iipSizeLimit) return void (this._aborted = !0);
                this._dec.init(this._header.size), this._dec.put(A, i, t) && (this._dec.release(), this._aborted = !0);
              }
            }
          }
          end(A) {
            if (this._aborted) return !0;
            let e = 0,
              t = 0,
              s = !0;
            if ((s = A) && (s = !this._dec.end()) && (this._metrics = (0, a.imageType)(this._dec.data8), (s = "unsupported" !== this._metrics.mime) && (e = this._metrics.width, t = this._metrics.height, (s = e && t && e * t < this._opts.pixelLimit) && ([e, t] = this._resize(e, t).map(Math.floor), s = e && t && e * t < this._opts.pixelLimit))), !s) return this._dec.release(), !0;
            const r = new Blob([this._dec.data8], {
              type: this._metrics.mime
            });
            if (this._dec.release(), !window.createImageBitmap) {
              const A = URL.createObjectURL(r),
                s = new Image();
              return new Promise(r => {
                s.addEventListener("load", () => {
                  var g;
                  URL.revokeObjectURL(A);
                  const a = i.ImageRenderer.createCanvas(window.document, e, t);
                  null === (g = a.getContext("2d")) || void 0 === g || g.drawImage(s, 0, 0, e, t), this._storage.addImage(a), r(!0);
                }), s.src = A, setTimeout(() => r(!0), 1e3);
              });
            }
            return createImageBitmap(r, {
              resizeWidth: e,
              resizeHeight: t
            }).then(A => (this._storage.addImage(A), !0));
          }
          _resize(A, e) {
            var t, i, r, g;
            const a = (null === (t = this._renderer.dimensions) || void 0 === t ? void 0 : t.css.cell.width) || s.CELL_SIZE_DEFAULT.width,
              o = (null === (i = this._renderer.dimensions) || void 0 === i ? void 0 : i.css.cell.height) || s.CELL_SIZE_DEFAULT.height,
              h = (null === (r = this._renderer.dimensions) || void 0 === r ? void 0 : r.css.canvas.width) || a * this._coreTerminal.cols,
              n = (null === (g = this._renderer.dimensions) || void 0 === g ? void 0 : g.css.canvas.height) || o * this._coreTerminal.rows,
              I = this._dim(this._header.width, h, a),
              C = this._dim(this._header.height, n, o);
            if (!I && !C) {
              const t = h / A,
                i = (n - o) / e,
                s = Math.min(t, i);
              return s < 1 ? [A * s, e * s] : [A, e];
            }
            return I ? !this._header.preserveAspectRatio && I && C ? [I, C] : [I, e * I / A] : [A * C / e, C];
          }
          _dim(A, e, t) {
            return "auto" === A ? 0 : A.endsWith("%") ? parseInt(A.slice(0, -1)) * e / 100 : A.endsWith("px") ? parseInt(A.slice(0, -2)) : parseInt(A) * t;
          }
        };
      },
      769: (A, e) => {
        function t(A) {
          let e = "";
          for (let t = 0; t < A.length; ++t) e += String.fromCharCode(A[t]);
          return e;
        }
        function i(A) {
          let e = 0;
          for (let t = 0; t < A.length; ++t) {
            if (A[t] < 48 || A[t] > 57) throw new Error("illegal char");
            e = 10 * e + A[t] - 48;
          }
          return e;
        }
        function s(A) {
          const e = t(A);
          if (!e.match(/^((auto)|(\d+?((px)|(%)){0,1}))$/)) throw new Error("illegal size");
          return e;
        }
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.HeaderParser = void 0;
        const r = {
            inline: i,
            size: i,
            name: function (A) {
              if ("undefined" != typeof Buffer) return Buffer.from(t(A), "base64").toString();
              const e = atob(t(A)),
                i = new Uint8Array(e.length);
              for (let A = 0; A < i.length; ++A) i[A] = e.charCodeAt(A);
              return new TextDecoder().decode(i);
            },
            width: s,
            height: s,
            preserveAspectRatio: i
          },
          g = [70, 105, 108, 101],
          a = 1024;
        e.HeaderParser = class {
          constructor() {
            this.state = 0, this._buffer = new Uint32Array(a), this._position = 0, this._key = "", this.fields = {};
          }
          reset() {
            this._buffer.fill(0), this.state = 0, this._position = 0, this.fields = {}, this._key = "";
          }
          parse(A, e, t) {
            let i = this.state,
              s = this._position;
            const r = this._buffer;
            if (1 === i || 4 === i) return -1;
            if (0 === i && s > 6) return -1;
            for (let o = e; o < t; ++o) {
              const e = A[o];
              switch (e) {
                case 59:
                  if (!this._storeValue(s)) return this._a();
                  i = 2, s = 0;
                  break;
                case 61:
                  if (0 === i) {
                    for (let A = 0; A < g.length; ++A) if (r[A] !== g[A]) return this._a();
                    i = 2, s = 0;
                  } else if (2 === i) {
                    if (!this._storeKey(s)) return this._a();
                    i = 3, s = 0;
                  } else if (3 === i) {
                    if (s >= a) return this._a();
                    r[s++] = e;
                  }
                  break;
                case 58:
                  return 3 !== i || this._storeValue(s) ? (this.state = 4, o + 1) : this._a();
                default:
                  if (s >= a) return this._a();
                  r[s++] = e;
              }
            }
            return this.state = i, this._position = s, -2;
          }
          _a() {
            return this.state = 1, -1;
          }
          _storeKey(A) {
            const e = t(this._buffer.subarray(0, A));
            return !!e && (this._key = e, this.fields[e] = null, !0);
          }
          _storeValue(A) {
            if (this._key) {
              try {
                const e = this._buffer.slice(0, A);
                this.fields[this._key] = r[this._key] ? r[this._key](e) : e;
              } catch (A) {
                return !1;
              }
              return !0;
            }
            return !1;
          }
        };
      },
      326: (A, e) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.imageType = e.UNSUPPORTED_TYPE = void 0, e.UNSUPPORTED_TYPE = {
          mime: "unsupported",
          width: 0,
          height: 0
        }, e.imageType = function (A) {
          if (A.length < 24) return e.UNSUPPORTED_TYPE;
          const t = new Uint32Array(A.buffer, A.byteOffset, 6);
          if (1196314761 === t[0] && 169478669 === t[1] && 1380206665 === t[3]) return {
            mime: "image/png",
            width: A[16] << 24 | A[17] << 16 | A[18] << 8 | A[19],
            height: A[20] << 24 | A[21] << 16 | A[22] << 8 | A[23]
          };
          if ((3774863615 === t[0] || 3791640831 === t[0]) && (74 === A[6] && 70 === A[7] && 73 === A[8] && 70 === A[9] || 69 === A[6] && 120 === A[7] && 105 === A[8] && 102 === A[9])) {
            const [e, t] = function (A) {
              const e = A.length;
              let t = 4,
                i = A[t] << 8 | A[t + 1];
              for (;;) {
                if (t += i, t >= e) return [0, 0];
                if (255 !== A[t]) return [0, 0];
                if (192 === A[t + 1] || 194 === A[t + 1]) return t + 8 < e ? [A[t + 7] << 8 | A[t + 8], A[t + 5] << 8 | A[t + 6]] : [0, 0];
                t += 2, i = A[t] << 8 | A[t + 1];
              }
            }(A);
            return {
              mime: "image/jpeg",
              width: e,
              height: t
            };
          }
          return 944130375 !== t[0] || 55 !== A[4] && 57 !== A[4] || 97 !== A[5] ? e.UNSUPPORTED_TYPE : {
            mime: "image/gif",
            width: A[7] << 8 | A[6],
            height: A[9] << 8 | A[8]
          };
        };
      },
      782: (A, e, t) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.ImageRenderer = void 0;
        const i = t(477),
          s = t(859);
        class r extends s.Disposable {
          static createCanvas(A, e, t) {
            const i = (A || document).createElement("canvas");
            return i.width = 0 | e, i.height = 0 | t, i;
          }
          static createImageData(A, e, t, i) {
            if ("function" != typeof ImageData) {
              const s = A.createImageData(e, t);
              return i && s.data.set(new Uint8ClampedArray(i, 0, e * t * 4)), s;
            }
            return i ? new ImageData(new Uint8ClampedArray(i, 0, e * t * 4), e, t) : new ImageData(e, t);
          }
          static createImageBitmap(A) {
            return "function" != typeof createImageBitmap ? Promise.resolve(void 0) : createImageBitmap(A);
          }
          constructor(A) {
            super(), this._terminal = A, this._optionsRefresh = this.register(new s.MutableDisposable()), this._oldOpen = this._terminal._core.open, this._terminal._core.open = A => {
              var e;
              null === (e = this._oldOpen) || void 0 === e || e.call(this._terminal._core, A), this._open();
            }, this._terminal._core.screenElement && this._open(), this._optionsRefresh.value = this._terminal._core.optionsService.onOptionChange(A => {
              var e;
              "fontSize" === A && (this.rescaleCanvas(), null === (e = this._renderService) || void 0 === e || e.refreshRows(0, this._terminal.rows));
            }), this.register((0, s.toDisposable)(() => {
              var A;
              this.removeLayerFromDom(), this._terminal._core && this._oldOpen && (this._terminal._core.open = this._oldOpen, this._oldOpen = void 0), this._renderService && this._oldSetRenderer && (this._renderService.setRenderer = this._oldSetRenderer, this._oldSetRenderer = void 0), this._renderService = void 0, this.canvas = void 0, this._ctx = void 0, null === (A = this._placeholderBitmap) || void 0 === A || A.close(), this._placeholderBitmap = void 0, this._placeholder = void 0;
            }));
          }
          showPlaceholder(A) {
            var e, t;
            A ? this._placeholder || -1 === this.cellSize.height || this._createPlaceHolder(Math.max(this.cellSize.height + 1, 24)) : (null === (e = this._placeholderBitmap) || void 0 === e || e.close(), this._placeholderBitmap = void 0, this._placeholder = void 0), null === (t = this._renderService) || void 0 === t || t.refreshRows(0, this._terminal.rows);
          }
          get dimensions() {
            var A;
            return null === (A = this._renderService) || void 0 === A ? void 0 : A.dimensions;
          }
          get cellSize() {
            var A, e;
            return {
              width: (null === (A = this.dimensions) || void 0 === A ? void 0 : A.css.cell.width) || -1,
              height: (null === (e = this.dimensions) || void 0 === e ? void 0 : e.css.cell.height) || -1
            };
          }
          clearLines(A, e) {
            var t, i, s, r;
            null === (t = this._ctx) || void 0 === t || t.clearRect(0, A * ((null === (i = this.dimensions) || void 0 === i ? void 0 : i.css.cell.height) || 0), (null === (s = this.dimensions) || void 0 === s ? void 0 : s.css.canvas.width) || 0, (++e - A) * ((null === (r = this.dimensions) || void 0 === r ? void 0 : r.css.cell.height) || 0));
          }
          clearAll() {
            var A, e, t;
            null === (A = this._ctx) || void 0 === A || A.clearRect(0, 0, (null === (e = this.canvas) || void 0 === e ? void 0 : e.width) || 0, (null === (t = this.canvas) || void 0 === t ? void 0 : t.height) || 0);
          }
          draw(A, e, t, i, s = 1) {
            if (!this._ctx) return;
            const {
              width: r,
              height: g
            } = this.cellSize;
            if (-1 === r || -1 === g) return;
            this._rescaleImage(A, r, g);
            const a = A.actual,
              o = Math.ceil(a.width / r),
              h = e % o * r,
              n = Math.floor(e / o) * g,
              I = t * r,
              C = i * g,
              l = s * r + h > a.width ? a.width - h : s * r,
              B = n + g > a.height ? a.height - n : g;
            this._ctx.drawImage(a, Math.floor(h), Math.floor(n), Math.ceil(l), Math.ceil(B), Math.floor(I), Math.floor(C), Math.ceil(l), Math.ceil(B));
          }
          extractTile(A, e) {
            const {
              width: t,
              height: i
            } = this.cellSize;
            if (-1 === t || -1 === i) return;
            this._rescaleImage(A, t, i);
            const s = A.actual,
              g = Math.ceil(s.width / t),
              a = e % g * t,
              o = Math.floor(e / g) * i,
              h = t + a > s.width ? s.width - a : t,
              n = o + i > s.height ? s.height - o : i,
              I = r.createCanvas(this.document, h, n),
              C = I.getContext("2d");
            return C ? (C.drawImage(s, Math.floor(a), Math.floor(o), Math.floor(h), Math.floor(n), 0, 0, Math.floor(h), Math.floor(n)), I) : void 0;
          }
          drawPlaceholder(A, e, t = 1) {
            if (this._ctx) {
              const {
                width: i,
                height: s
              } = this.cellSize;
              if (-1 === i || -1 === s) return;
              if (this._placeholder ? s >= this._placeholder.height && this._createPlaceHolder(s + 1) : this._createPlaceHolder(Math.max(s + 1, 24)), !this._placeholder) return;
              this._ctx.drawImage(this._placeholderBitmap || this._placeholder, A * i, e * s % 2 ? 0 : 1, i * t, s, A * i, e * s, i * t, s);
            }
          }
          rescaleCanvas() {
            this.canvas && (this.canvas.width === this.dimensions.css.canvas.width && this.canvas.height === this.dimensions.css.canvas.height || (this.canvas.width = this.dimensions.css.canvas.width || 0, this.canvas.height = this.dimensions.css.canvas.height || 0));
          }
          _rescaleImage(A, e, t) {
            if (e === A.actualCellSize.width && t === A.actualCellSize.height) return;
            const {
              width: i,
              height: s
            } = A.origCellSize;
            if (e === i && t === s) return A.actual = A.orig, A.actualCellSize.width = i, void (A.actualCellSize.height = s);
            const g = r.createCanvas(this.document, Math.ceil(A.orig.width * e / i), Math.ceil(A.orig.height * t / s)),
              a = g.getContext("2d");
            a && (a.drawImage(A.orig, 0, 0, g.width, g.height), A.actual = g, A.actualCellSize.width = e, A.actualCellSize.height = t);
          }
          _open() {
            this._renderService = this._terminal._core._renderService, this._oldSetRenderer = this._renderService.setRenderer.bind(this._renderService), this._renderService.setRenderer = A => {
              var e;
              this.removeLayerFromDom(), null === (e = this._oldSetRenderer) || void 0 === e || e.call(this._renderService, A);
            };
          }
          insertLayerToDom() {
            var A, e;
            this.document && this._terminal._core.screenElement ? this.canvas || (this.canvas = r.createCanvas(this.document, (null === (A = this.dimensions) || void 0 === A ? void 0 : A.css.canvas.width) || 0, (null === (e = this.dimensions) || void 0 === e ? void 0 : e.css.canvas.height) || 0), this.canvas.classList.add("xterm-image-layer"), this._terminal._core.screenElement.appendChild(this.canvas), this._ctx = this.canvas.getContext("2d", {
              alpha: !0,
              desynchronized: !0
            }), this.clearAll()) : console.warn("image addon: cannot insert output canvas to DOM, missing document or screenElement");
          }
          removeLayerFromDom() {
            this.canvas && (this._ctx = void 0, this.canvas.remove(), this.canvas = void 0);
          }
          _createPlaceHolder(A = 24) {
            var e;
            null === (e = this._placeholderBitmap) || void 0 === e || e.close(), this._placeholderBitmap = void 0;
            const t = 32,
              s = r.createCanvas(this.document, t, A),
              g = s.getContext("2d", {
                alpha: !1
              });
            if (!g) return;
            const a = r.createImageData(g, t, A),
              o = new Uint32Array(a.data.buffer),
              h = (0, i.toRGBA8888)(0, 0, 0),
              n = (0, i.toRGBA8888)(255, 255, 255);
            o.fill(h);
            for (let e = 0; e < A; ++e) {
              const A = e % 2,
                i = e * t;
              for (let e = 0; e < t; e += 2) o[i + e + A] = n;
            }
            g.putImageData(a, 0, 0);
            const I = screen.width + t - 1 & -32 || 4096;
            this._placeholder = r.createCanvas(this.document, I, A);
            const C = this._placeholder.getContext("2d", {
              alpha: !1
            });
            if (C) {
              for (let A = 0; A < I; A += t) C.drawImage(s, A, 0);
              r.createImageBitmap(this._placeholder).then(A => this._placeholderBitmap = A);
            } else this._placeholder = void 0;
          }
          get document() {
            var A;
            return null === (A = this._terminal._core._coreBrowserService) || void 0 === A ? void 0 : A.window.document;
          }
        }
        e.ImageRenderer = r;
      },
      216: (A, e, t) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.ImageStorage = e.CELL_SIZE_DEFAULT = void 0;
        const i = t(782);
        e.CELL_SIZE_DEFAULT = {
          width: 7,
          height: 14
        };
        class s {
          get ext() {
            return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
          }
          set ext(A) {
            this._ext = A;
          }
          get underlineStyle() {
            return this._urlId ? 5 : (469762048 & this._ext) >> 26;
          }
          set underlineStyle(A) {
            this._ext &= -469762049, this._ext |= A << 26 & 469762048;
          }
          get underlineColor() {
            return 67108863 & this._ext;
          }
          set underlineColor(A) {
            this._ext &= -67108864, this._ext |= 67108863 & A;
          }
          get underlineVariantOffset() {
            const A = (3758096384 & this._ext) >> 29;
            return A < 0 ? 4294967288 ^ A : A;
          }
          set underlineVariantOffset(A) {
            this._ext &= 536870911, this._ext |= A << 29 & 3758096384;
          }
          get urlId() {
            return this._urlId;
          }
          set urlId(A) {
            this._urlId = A;
          }
          constructor(A = 0, e = 0, t = -1, i = -1) {
            this.imageId = t, this.tileId = i, this._ext = 0, this._urlId = 0, this._ext = A, this._urlId = e;
          }
          clone() {
            return new s(this._ext, this._urlId, this.imageId, this.tileId);
          }
          isEmpty() {
            return 0 === this.underlineStyle && 0 === this._urlId && -1 === this.imageId;
          }
        }
        const r = new s();
        e.ImageStorage = class {
          constructor(A, e, t) {
            this._terminal = A, this._renderer = e, this._opts = t, this._images = new Map(), this._lastId = 0, this._lowestId = 0, this._fullyCleared = !1, this._needsFullClear = !1, this._pixelLimit = 25e5;
            try {
              this.setLimit(this._opts.storageLimit);
            } catch (A) {
              console.error(A.message), console.warn(`storageLimit is set to ${this.getLimit()} MB`);
            }
            this._viewportMetrics = {
              cols: this._terminal.cols,
              rows: this._terminal.rows
            };
          }
          dispose() {
            this.reset();
          }
          reset() {
            var A;
            for (const e of this._images.values()) null === (A = e.marker) || void 0 === A || A.dispose();
            this._images.clear(), this._renderer.clearAll();
          }
          getLimit() {
            return 4 * this._pixelLimit / 1e6;
          }
          setLimit(A) {
            if (A < .5 || A > 1e3) throw RangeError("invalid storageLimit, should be at least 0.5 MB and not exceed 1G");
            this._pixelLimit = A / 4 * 1e6 >>> 0, this._evictOldest(0);
          }
          getUsage() {
            return 4 * this._getStoredPixels() / 1e6;
          }
          _getStoredPixels() {
            let A = 0;
            for (const e of this._images.values()) e.orig && (A += e.orig.width * e.orig.height, e.actual && e.actual !== e.orig && (A += e.actual.width * e.actual.height));
            return A;
          }
          _delImg(A) {
            const e = this._images.get(A);
            this._images.delete(A), e && window.ImageBitmap && e.orig instanceof ImageBitmap && e.orig.close();
          }
          wipeAlternate() {
            var A;
            const e = [];
            for (const [t, i] of this._images.entries()) "alternate" === i.bufferType && (null === (A = i.marker) || void 0 === A || A.dispose(), e.push(t));
            for (const A of e) this._delImg(A);
            this._needsFullClear = !0, this._fullyCleared = !1;
          }
          advanceCursor(A) {
            if (this._opts.sixelScrolling) {
              let t = this._renderer.cellSize;
              -1 !== t.width && -1 !== t.height || (t = e.CELL_SIZE_DEFAULT);
              const i = Math.ceil(A / t.height);
              for (let A = 1; A < i; ++A) this._terminal._core._inputHandler.lineFeed();
            }
          }
          addImage(A) {
            var t;
            this._evictOldest(A.width * A.height);
            let i = this._renderer.cellSize;
            -1 !== i.width && -1 !== i.height || (i = e.CELL_SIZE_DEFAULT);
            const s = Math.ceil(A.width / i.width),
              r = Math.ceil(A.height / i.height),
              g = ++this._lastId,
              a = this._terminal._core.buffer,
              o = this._terminal.cols,
              h = this._terminal.rows,
              n = a.x,
              I = a.y;
            let C = n,
              l = 0;
            this._opts.sixelScrolling || (a.x = 0, a.y = 0, C = 0), this._terminal._core._inputHandler._dirtyRowTracker.markDirty(a.y);
            for (let A = 0; A < r; ++A) {
              const e = a.lines.get(a.y + a.ybase);
              for (let t = 0; t < s && !(C + t >= o); ++t) this._writeToCell(e, C + t, g, A * s + t), l++;
              if (this._opts.sixelScrolling) A < r - 1 && this._terminal._core._inputHandler.lineFeed();else if (++a.y >= h) break;
              a.x = C;
            }
            this._terminal._core._inputHandler._dirtyRowTracker.markDirty(a.y), this._opts.sixelScrolling ? a.x = C : (a.x = n, a.y = I);
            const B = [];
            for (const [A, e] of this._images.entries()) e.tileCount < 1 && (null === (t = e.marker) || void 0 === t || t.dispose(), B.push(A));
            for (const A of B) this._delImg(A);
            const Q = this._terminal.registerMarker(0);
            null == Q || Q.onDispose(() => {
              this._images.get(g) && this._delImg(g);
            }), "alternate" === this._terminal.buffer.active.type && this._evictOnAlternate();
            const d = {
              orig: A,
              origCellSize: i,
              actual: A,
              actualCellSize: Object.assign({}, i),
              marker: Q || void 0,
              tileCount: l,
              bufferType: this._terminal.buffer.active.type
            };
            this._images.set(g, d);
          }
          render(A) {
            if (!this._renderer.canvas && this._images.size && (this._renderer.insertLayerToDom(), !this._renderer.canvas)) return;
            if (this._renderer.rescaleCanvas(), !this._images.size) return this._fullyCleared || (this._renderer.clearAll(), this._fullyCleared = !0, this._needsFullClear = !1), void (this._renderer.canvas && this._renderer.removeLayerFromDom());
            this._needsFullClear && (this._renderer.clearAll(), this._fullyCleared = !0, this._needsFullClear = !1);
            const {
                start: e,
                end: t
              } = A,
              i = this._terminal._core.buffer,
              s = this._terminal._core.cols;
            this._renderer.clearLines(e, t);
            for (let A = e; A <= t; ++A) {
              const e = i.lines.get(A + i.ydisp);
              if (!e) return;
              for (let t = 0; t < s; ++t) if (268435456 & e.getBg(t)) {
                let i = e._extendedAttrs[t] || r;
                const g = i.imageId;
                if (void 0 === g || -1 === g) continue;
                const a = this._images.get(g);
                if (-1 !== i.tileId) {
                  const o = i.tileId,
                    h = t;
                  let n = 1;
                  for (; ++t < s && 268435456 & e.getBg(t) && (i = e._extendedAttrs[t] || r) && i.imageId === g && i.tileId === o + n;) n++;
                  t--, a ? a.actual && this._renderer.draw(a, o, h, A, n) : this._opts.showPlaceholder && this._renderer.drawPlaceholder(h, A, n), this._fullyCleared = !1;
                }
              }
            }
          }
          viewportResize(A) {
            var e;
            if (!this._images.size) return void (this._viewportMetrics = A);
            if (this._viewportMetrics.cols >= A.cols) return void (this._viewportMetrics = A);
            const t = this._terminal._core.buffer,
              i = t.lines.length,
              s = this._viewportMetrics.cols - 1;
            for (let g = 0; g < i; ++g) {
              const i = t.lines.get(g);
              if (268435456 & i.getBg(s)) {
                const t = i._extendedAttrs[s] || r,
                  g = t.imageId;
                if (void 0 === g || -1 === g) continue;
                const a = this._images.get(g);
                if (!a) continue;
                const o = Math.ceil(((null === (e = a.actual) || void 0 === e ? void 0 : e.width) || 0) / a.actualCellSize.width);
                if (t.tileId % o + 1 >= o) continue;
                let h = !1;
                for (let e = s + 1; e > A.cols; ++e) if (4194303 & i._data[3 * e + 0]) {
                  h = !0;
                  break;
                }
                if (h) continue;
                const n = Math.min(A.cols, o - t.tileId % o + s);
                let I = t.tileId;
                for (let A = s + 1; A < n; ++A) this._writeToCell(i, A, g, ++I), a.tileCount++;
              }
            }
            this._viewportMetrics = A;
          }
          getImageAtBufferCell(A, e) {
            var t, s;
            const g = this._terminal._core.buffer.lines.get(e);
            if (g && 268435456 & g.getBg(A)) {
              const e = g._extendedAttrs[A] || r;
              if (e.imageId && -1 !== e.imageId) {
                const A = null === (t = this._images.get(e.imageId)) || void 0 === t ? void 0 : t.orig;
                if (window.ImageBitmap && A instanceof ImageBitmap) {
                  const e = i.ImageRenderer.createCanvas(window.document, A.width, A.height);
                  return null === (s = e.getContext("2d")) || void 0 === s || s.drawImage(A, 0, 0, A.width, A.height), e;
                }
                return A;
              }
            }
          }
          extractTileAtBufferCell(A, e) {
            const t = this._terminal._core.buffer.lines.get(e);
            if (t && 268435456 & t.getBg(A)) {
              const e = t._extendedAttrs[A] || r;
              if (e.imageId && -1 !== e.imageId && -1 !== e.tileId) {
                const A = this._images.get(e.imageId);
                if (A) return this._renderer.extractTile(A, e.tileId);
              }
            }
          }
          _evictOldest(A) {
            var e;
            const t = this._getStoredPixels();
            let i = t;
            for (; this._pixelLimit < i + A && this._images.size;) {
              const A = this._images.get(++this._lowestId);
              A && A.orig && (i -= A.orig.width * A.orig.height, A.actual && A.orig !== A.actual && (i -= A.actual.width * A.actual.height), null === (e = A.marker) || void 0 === e || e.dispose(), this._delImg(this._lowestId));
            }
            return t - i;
          }
          _writeToCell(A, e, t, i) {
            if (268435456 & A._data[3 * e + 2]) {
              const r = A._extendedAttrs[e];
              if (r) {
                if (void 0 !== r.imageId) {
                  const A = this._images.get(r.imageId);
                  return A && A.tileCount--, r.imageId = t, void (r.tileId = i);
                }
                return void (A._extendedAttrs[e] = new s(r.ext, r.urlId, t, i));
              }
            }
            A._data[3 * e + 2] |= 268435456, A._extendedAttrs[e] = new s(0, 0, t, i);
          }
          _evictOnAlternate() {
            var A, e;
            for (const A of this._images.values()) "alternate" === A.bufferType && (A.tileCount = 0);
            const t = this._terminal._core.buffer;
            for (let e = 0; e < this._terminal.rows; ++e) {
              const i = t.lines.get(e);
              if (i) for (let e = 0; e < this._terminal.cols; ++e) if (268435456 & i._data[3 * e + 2]) {
                const t = null === (A = i._extendedAttrs[e]) || void 0 === A ? void 0 : A.imageId;
                if (t) {
                  const A = this._images.get(t);
                  A && A.tileCount++;
                }
              }
            }
            const i = [];
            for (const [A, t] of this._images.entries()) "alternate" !== t.bufferType || t.tileCount || (null === (e = t.marker) || void 0 === e || e.dispose(), i.push(A));
            for (const A of i) this._delImg(A);
          }
        };
      },
      973: (A, e, t) => {
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.SixelHandler = void 0;
        const i = t(477),
          s = t(782),
          r = t(710),
          g = i.PALETTE_ANSI_256;
        function a(A) {
          return i.BIG_ENDIAN ? A : (255 & A) << 24 | (A >>> 8 & 255) << 16 | (A >>> 16 & 255) << 8 | A >>> 24 & 255;
        }
        g.set(i.PALETTE_VT340_COLOR), e.SixelHandler = class {
          constructor(A, e, t) {
            this._opts = A, this._storage = e, this._coreTerminal = t, this._size = 0, this._aborted = !1, (0, r.DecoderAsync)({
              memoryLimit: 4 * this._opts.pixelLimit,
              palette: g,
              paletteLimit: this._opts.sixelPaletteLimit
            }).then(A => this._dec = A);
          }
          reset() {
            this._dec && (this._dec.release(), this._dec._palette.fill(0), this._dec.init(0, g, this._opts.sixelPaletteLimit));
          }
          hook(A) {
            var e;
            if (this._size = 0, this._aborted = !1, this._dec) {
              const t = 1 === A.params[1] ? 0 : function (A, e) {
                let t = 0;
                if (!e) return t;
                if (A.isInverse()) {
                  if (A.isFgDefault()) t = a(e.foreground.rgba);else if (A.isFgRGB()) {
                    const e = A.constructor.toColorRGB(A.getFgColor());
                    t = (0, i.toRGBA8888)(...e);
                  } else t = a(e.ansi[A.getFgColor()].rgba);
                } else if (A.isBgDefault()) t = a(e.background.rgba);else if (A.isBgRGB()) {
                  const e = A.constructor.toColorRGB(A.getBgColor());
                  t = (0, i.toRGBA8888)(...e);
                } else t = a(e.ansi[A.getBgColor()].rgba);
                return t;
              }(this._coreTerminal._core._inputHandler._curAttrData, null === (e = this._coreTerminal._core._themeService) || void 0 === e ? void 0 : e.colors);
              this._dec.init(t, null, this._opts.sixelPaletteLimit);
            }
          }
          put(A, e, t) {
            if (!this._aborted && this._dec) {
              if (this._size += t - e, this._size > this._opts.sixelSizeLimit) return console.warn("SIXEL: too much data, aborting"), this._aborted = !0, void this._dec.release();
              try {
                this._dec.decode(A, e, t);
              } catch (A) {
                console.warn(`SIXEL: error while decoding image - ${A}`), this._aborted = !0, this._dec.release();
              }
            }
          }
          unhook(A) {
            var e;
            if (this._aborted || !A || !this._dec) return !0;
            const t = this._dec.width,
              i = this._dec.height;
            if (!t || !i) return i && this._storage.advanceCursor(i), !0;
            const r = s.ImageRenderer.createCanvas(void 0, t, i);
            return null === (e = r.getContext("2d")) || void 0 === e || e.putImageData(new ImageData(this._dec.data8, t, i), 0, 0), this._dec.memoryUsage > 4194304 && this._dec.release(), this._storage.addImage(r), !0;
          }
        };
      },
      859: (A, e) => {
        function t(A) {
          for (const e of A) e.dispose();
          A.length = 0;
        }
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.getDisposeArrayDisposable = e.disposeArray = e.toDisposable = e.MutableDisposable = e.Disposable = void 0, e.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const A of this._disposables) A.dispose();
            this._disposables.length = 0;
          }
          register(A) {
            return this._disposables.push(A), A;
          }
          unregister(A) {
            const e = this._disposables.indexOf(A);
            -1 !== e && this._disposables.splice(e, 1);
          }
        }, e.MutableDisposable = class {
          constructor() {
            this._isDisposed = !1;
          }
          get value() {
            return this._isDisposed ? void 0 : this._value;
          }
          set value(A) {
            this._isDisposed || A === this._value || (this._value?.dispose(), this._value = A);
          }
          clear() {
            this.value = void 0;
          }
          dispose() {
            this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
          }
        }, e.toDisposable = function (A) {
          return {
            dispose: A
          };
        }, e.disposeArray = t, e.getDisposeArrayDisposable = function (A) {
          return {
            dispose: () => t(A)
          };
        };
      }
    },
    e = {};
  function t(i) {
    var s = e[i];
    if (void 0 !== s) return s.exports;
    var r = e[i] = {
      exports: {}
    };
    return A[i](r, r.exports, t), r.exports;
  }
  var i = {};
  return (() => {
    var A = i;
    Object.defineProperty(A, "__esModule", {
      value: !0
    }), A.ImageAddon = void 0;
    const e = t(125),
      s = t(782),
      r = t(216),
      g = t(973),
      a = {
        enableSizeReports: !0,
        pixelLimit: 16777216,
        sixelSupport: !0,
        sixelScrolling: !0,
        sixelPaletteLimit: 256,
        sixelSizeLimit: 25e6,
        storageLimit: 128,
        showPlaceholder: !0,
        iipSupport: !0,
        iipSizeLimit: 2e7
      };
    A.ImageAddon = class {
      constructor(A) {
        this._disposables = [], this._handlers = new Map(), this._opts = Object.assign({}, a, A), this._defaultOpts = Object.assign({}, a, A);
      }
      dispose() {
        for (const A of this._disposables) A.dispose();
        this._disposables.length = 0, this._handlers.clear();
      }
      _disposeLater(...A) {
        for (const e of A) this._disposables.push(e);
      }
      activate(A) {
        if (this._terminal = A, this._renderer = new s.ImageRenderer(A), this._storage = new r.ImageStorage(A, this._renderer, this._opts), this._opts.enableSizeReports) {
          const e = A.options.windowOptions || {};
          e.getWinSizePixels = !0, e.getCellSizePixels = !0, e.getWinSizeChars = !0, A.options.windowOptions = e;
        }
        if (this._disposeLater(this._renderer, this._storage, A.parser.registerCsiHandler({
          prefix: "?",
          final: "h"
        }, A => this._decset(A)), A.parser.registerCsiHandler({
          prefix: "?",
          final: "l"
        }, A => this._decrst(A)), A.parser.registerCsiHandler({
          final: "c"
        }, A => this._da1(A)), A.parser.registerCsiHandler({
          prefix: "?",
          final: "S"
        }, A => this._xtermGraphicsAttributes(A)), A.onRender(A => {
          var e;
          return null === (e = this._storage) || void 0 === e ? void 0 : e.render(A);
        }), A.parser.registerCsiHandler({
          intermediates: "!",
          final: "p"
        }, () => this.reset()), A.parser.registerEscHandler({
          final: "c"
        }, () => this.reset()), A._core._inputHandler.onRequestReset(() => this.reset()), A.buffer.onBufferChange(() => {
          var A;
          return null === (A = this._storage) || void 0 === A ? void 0 : A.wipeAlternate();
        }), A.onResize(A => {
          var e;
          return null === (e = this._storage) || void 0 === e ? void 0 : e.viewportResize(A);
        })), this._opts.sixelSupport) {
          const e = new g.SixelHandler(this._opts, this._storage, A);
          this._handlers.set("sixel", e), this._disposeLater(A._core._inputHandler._parser.registerDcsHandler({
            final: "q"
          }, e));
        }
        if (this._opts.iipSupport) {
          const t = new e.IIPHandler(this._opts, this._renderer, this._storage, A);
          this._handlers.set("iip", t), this._disposeLater(A._core._inputHandler._parser.registerOscHandler(1337, t));
        }
      }
      reset() {
        var A;
        this._opts.sixelScrolling = this._defaultOpts.sixelScrolling, this._opts.sixelPaletteLimit = this._defaultOpts.sixelPaletteLimit, null === (A = this._storage) || void 0 === A || A.reset();
        for (const A of this._handlers.values()) A.reset();
        return !1;
      }
      get storageLimit() {
        var A;
        return (null === (A = this._storage) || void 0 === A ? void 0 : A.getLimit()) || -1;
      }
      set storageLimit(A) {
        var e;
        null === (e = this._storage) || void 0 === e || e.setLimit(A), this._opts.storageLimit = A;
      }
      get storageUsage() {
        return this._storage ? this._storage.getUsage() : -1;
      }
      get showPlaceholder() {
        return this._opts.showPlaceholder;
      }
      set showPlaceholder(A) {
        var e;
        this._opts.showPlaceholder = A, null === (e = this._renderer) || void 0 === e || e.showPlaceholder(A);
      }
      getImageAtBufferCell(A, e) {
        var t;
        return null === (t = this._storage) || void 0 === t ? void 0 : t.getImageAtBufferCell(A, e);
      }
      extractTileAtBufferCell(A, e) {
        var t;
        return null === (t = this._storage) || void 0 === t ? void 0 : t.extractTileAtBufferCell(A, e);
      }
      _report(A) {
        var e;
        null === (e = this._terminal) || void 0 === e || e._core.coreService.triggerDataEvent(A);
      }
      _decset(A) {
        for (let e = 0; e < A.length; ++e) 80 === A[e] && (this._opts.sixelScrolling = !1);
        return !1;
      }
      _decrst(A) {
        for (let e = 0; e < A.length; ++e) 80 === A[e] && (this._opts.sixelScrolling = !0);
        return !1;
      }
      _da1(A) {
        return !!A[0] || !!this._opts.sixelSupport && (this._report("[?62;4;9;22c"), !0);
      }
      _xtermGraphicsAttributes(A) {
        var e, t, i, s, g, a;
        if (A.length < 2) return !0;
        if (1 === A[0]) switch (A[1]) {
          case 1:
            return this._report(`[?${A[0]};0;${this._opts.sixelPaletteLimit}S`), !0;
          case 2:
            this._opts.sixelPaletteLimit = this._defaultOpts.sixelPaletteLimit, this._report(`[?${A[0]};0;${this._opts.sixelPaletteLimit}S`);
            for (const A of this._handlers.values()) A.reset();
            return !0;
          case 3:
            return A.length > 2 && !(A[2] instanceof Array) && A[2] <= 4096 ? (this._opts.sixelPaletteLimit = A[2], this._report(`[?${A[0]};0;${this._opts.sixelPaletteLimit}S`)) : this._report(`[?${A[0]};2S`), !0;
          case 4:
            return this._report(`[?${A[0]};0;4096S`), !0;
          default:
            return this._report(`[?${A[0]};2S`), !0;
        }
        if (2 === A[0]) switch (A[1]) {
          case 1:
            let o = null === (t = null === (e = this._renderer) || void 0 === e ? void 0 : e.dimensions) || void 0 === t ? void 0 : t.css.canvas.width,
              h = null === (s = null === (i = this._renderer) || void 0 === i ? void 0 : i.dimensions) || void 0 === s ? void 0 : s.css.canvas.height;
            if (!o || !h) {
              const A = r.CELL_SIZE_DEFAULT;
              o = ((null === (g = this._terminal) || void 0 === g ? void 0 : g.cols) || 80) * A.width, h = ((null === (a = this._terminal) || void 0 === a ? void 0 : a.rows) || 24) * A.height;
            }
            if (o * h < this._opts.pixelLimit) this._report(`[?${A[0]};0;${o.toFixed(0)};${h.toFixed(0)}S`);else {
              const e = Math.floor(Math.sqrt(this._opts.pixelLimit));
              this._report(`[?${A[0]};0;${e};${e}S`);
            }
            return !0;
          case 4:
            const n = Math.floor(Math.sqrt(this._opts.pixelLimit));
            return this._report(`[?${A[0]};0;${n};${n}S`), !0;
          default:
            return this._report(`[?${A[0]};2S`), !0;
        }
        return this._report(`[?${A[0]};1S`), !0;
      }
    };
  })(), i;
})());

/***/ },

/***/ 9408
/*!*************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/terminalSettingsTab.component.pug?ngResource ***!
  \*************************************************************************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 1836);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv\u003E\n  \u003Ch3 class=\"mb-3\" translate\u003ERendering\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform !== Platform.Web\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EFrontend\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ESwitches terminal frontend implementation (experimental)\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.terminal.frontend\" (ngModelChange)=\"config.save()\"\u003E\n      \u003Coption value=\"xterm-webgl\"\u003Exterm (WebGL)\u003C\u002Foption\u003E\n      \u003Coption value=\"xterm\"\u003Exterm (canvas)\u003C\u002Foption\u003E\n    \u003C\u002Fselect\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EScrollback\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ENumber of lines kept in the buffer\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"config.store.terminal.scrollbackLines\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EDraw bold text in bright colors\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.drawBoldTextInBrightColors\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ESixel graphics support (experimental)\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EDisplay images via Sixel escape sequences\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.sixel\" (ngModelChange)=\"config.save(); config.requestRestart()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EKeyboard\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate=\"Use {altKeyName} as the Meta key\" [translateParams]=\"{altKeyName: altKeyName}\"\u003E\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ELets the shell handle Meta key instead of OS\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.altIsMeta\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EScroll on input\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EScrolls the terminal to the bottom on user input\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.scrollOnInput\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EMouse\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ERight click\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" *ngIf=\"config.store.terminal.rightClick == &quot;paste&quot;\" translate\u003ELong-click for context menu\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.terminal.rightClick\" (ngModelChange)=\"config.save()\"\u003E\n      \u003Coption ngValue=\"off\" translate\u003EOff\u003C\u002Foption\u003E\n      \u003Coption ngValue=\"menu\" translate\u003EContext menu\u003C\u002Foption\u003E\n      \u003Coption ngValue=\"paste\" translate\u003EPaste\u003C\u002Foption\u003E\n      \u003Coption ngValue=\"clipboard\" translate\u003EPaste if no selection, else copy\u003C\u002Foption\u003E\n    \u003C\u002Fselect\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EPaste on middle-click\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.pasteOnMiddleClick\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EWord separators\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EDouble-click selection will stop at these characters\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\" ()[]{}'&quot;\" [(ngModel)]=\"config.store.terminal.wordSeparator\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"config.store.clickableLinks\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ERequire a key to click links\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EWhen enabled, links are only clickable while holding this key\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.clickableLinks.modifier\" (ngModelChange)=\"config.save()\"\u003E\n      \u003Coption [ngValue]=\"null\" translate\u003ENo modifier\u003C\u002Foption\u003E\n      \u003Coption value=\"ctrlKey\" *ngIf=\"hostApp.platform !== Platform.macOS\"\u003ECtrl\u003C\u002Foption\u003E\n      \u003Coption value=\"altKey\"\u003E{{altKeyName}}\u003C\u002Foption\u003E\n      \u003Coption value=\"shiftKey\"\u003EShift\u003C\u002Foption\u003E\n      \u003Coption value=\"metaKey\"\u003E{{metaKeyName}}\u003C\u002Foption\u003E\n    \u003C\u002Fselect\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EClipboard\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECopy on select\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.copyOnSelect\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECopy with formatting\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.copyAsHTML\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EBracketed paste (requires shell support)\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EPrevents accidental execution of pasted commands\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.bracketedPaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EWarn on multi-line paste\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EShow a confirmation box when pasting multiple lines\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.warnOnMultilinePaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EReplace line breaks with spaces\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EFlatten pasted text into a single line for terminals that do not support multiline paste\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.replaceNewlinesWithSpacesOnPaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ETrim whitespace and newlines\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ERemove whitespace and newlines around the copied text\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.trimWhitespaceOnPaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003ESound\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ETerminal bell\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-group\"\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"bell\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" id=\"bellOff\" [value]=\"&quot;off&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"bellOff\"\u003E\u003Cspan translate\u003EOff\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"bell\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" id=\"bellVisual\" [value]=\"&quot;visual&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"bellVisual\"\u003E\u003Cspan translate\u003EVisual\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"bell\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" id=\"bellAudible\" [value]=\"&quot;audible&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"bellAudible\"\u003E\u003Cspan translate\u003EAudible\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"alert alert-info d-flex align-items-center\" *ngIf=\"config.store.terminal.bell != &quot;audible&quot; &amp;&amp; (config.store.terminal.profile || &quot;&quot;).startsWith(&quot;wsl&quot;)\"\u003E\n    \u003Cdiv class=\"me-auto\" translate\u003EWSL terminal bell can only be muted via Volume Mixer\u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-secondary\" (click)=\"openWSLVolumeMixer()\" translate\u003EShow Mixer\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EStartup\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform !== Platform.Web\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EAuto-open a terminal on app start\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.autoOpen\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ERestore terminal tabs on app start\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.recoverTabs\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\" *ngIf=\"hostApp.platform === Platform.Windows\"\u003E\n  \u003Ch3 translate\u003EWindows\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ESet Tabby as %COMSPEC%\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EAllows opening .bat files in tabs, but breaks some shells\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.setComSpec\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ },

/***/ 9413
/*!*********************************************!*\
  !*** ../app/node_modules/for-each/index.js ***!
  \*********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var isCallable = __webpack_require__(/*! is-callable */ 5141);
var toStr = Object.prototype.toString;
var hasOwnProperty = Object.prototype.hasOwnProperty;

/** @type {<This, A extends readonly unknown[]>(arr: A, iterator: (this: This | void, value: A[number], index: number, arr: A) => void, receiver: This | undefined) => void} */
var forEachArray = function forEachArray(array, iterator, receiver) {
  for (var i = 0, len = array.length; i < len; i++) {
    if (hasOwnProperty.call(array, i)) {
      if (receiver == null) {
        iterator(array[i], i, array);
      } else {
        iterator.call(receiver, array[i], i, array);
      }
    }
  }
};

/** @type {<This, S extends string>(string: S, iterator: (this: This | void, value: S[number], index: number, string: S) => void, receiver: This | undefined) => void} */
var forEachString = function forEachString(string, iterator, receiver) {
  for (var i = 0, len = string.length; i < len; i++) {
    // no such thing as a sparse string.
    if (receiver == null) {
      iterator(string.charAt(i), i, string);
    } else {
      iterator.call(receiver, string.charAt(i), i, string);
    }
  }
};

/** @type {<This, O>(obj: O, iterator: (this: This | void, value: O[keyof O], index: keyof O, obj: O) => void, receiver: This | undefined) => void} */
var forEachObject = function forEachObject(object, iterator, receiver) {
  for (var k in object) {
    if (hasOwnProperty.call(object, k)) {
      if (receiver == null) {
        iterator(object[k], k, object);
      } else {
        iterator.call(receiver, object[k], k, object);
      }
    }
  }
};

/** @type {(x: unknown) => x is readonly unknown[]} */
function isArray(x) {
  return toStr.call(x) === '[object Array]';
}

/** @type {import('.')._internal} */
module.exports = function forEach(list, iterator, thisArg) {
  if (!isCallable(iterator)) {
    throw new TypeError('iterator must be a function');
  }
  var receiver;
  if (arguments.length >= 3) {
    receiver = thisArg;
  }
  if (isArray(list)) {
    forEachArray(list, iterator, receiver);
  } else if (typeof list === 'string') {
    forEachString(list, iterator, receiver);
  } else {
    forEachObject(list, iterator, receiver);
  }
};

/***/ },

/***/ 9414
/*!**************************************************!*\
  !*** ../app/node_modules/call-bind/callBound.js ***!
  \**************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 6852);
var callBind = __webpack_require__(/*! ./ */ 3990);
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
module.exports = function callBoundIntrinsic(name, allowMissing) {
  var intrinsic = GetIntrinsic(name, !!allowMissing);
  if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
    return callBind(intrinsic);
  }
  return intrinsic;
};

/***/ },

/***/ 9448
/*!********************************************!*\
  !*** ../app/node_modules/es-errors/uri.js ***!
  \********************************************/
(module) {

"use strict";


/** @type {import('./uri')} */
module.exports = URIError;

/***/ },

/***/ 9470
/*!***********************************************************!*\
  !*** ../app/node_modules/regexp.prototype.flags/index.js ***!
  \***********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var define = __webpack_require__(/*! define-properties */ 2445);
var callBind = __webpack_require__(/*! call-bind */ 3990);
var implementation = __webpack_require__(/*! ./implementation */ 3606);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 6919);
var shim = __webpack_require__(/*! ./shim */ 1625);
var flagsBound = callBind(getPolyfill());
define(flagsBound, {
  getPolyfill: getPolyfill,
  implementation: implementation,
  shim: shim
});
module.exports = flagsBound;

/***/ },

/***/ 9527
/*!********************************************************************!*\
  !*** ./src/components/colorSchemePreview.component.pug?ngResource ***!
  \********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/colorSchemePreview.component.pug?ngResource */ 474);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 9546
/*!****************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorSchemePreview.component.scss?ngResource ***!
  \****************************************************************************************************************************************************/
(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 1333);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5955);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{display:block}.preview{margin-top:10px;margin-left:10px;padding:5px 10px;border-radius:4px;overflow:hidden}.preview span{white-space:pre}", "",{"version":3,"sources":["webpack://./src/components/colorSchemePreview.component.scss"],"names":[],"mappings":"AAAA,MACI,aAAA,CAGJ,SACI,eAAA,CACA,gBAAA,CACA,gBAAA,CACA,iBAAA,CACA,eAAA,CAEA,cACI,eAAA","sourcesContent":[":host {\n    display: block;\n}\n\n.preview {\n    margin-top: 10px;\n    margin-left: 10px;\n    padding: 5px 10px;\n    border-radius: 4px;\n    overflow: hidden;\n\n    span {\n        white-space: pre;\n    }\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ },

/***/ 9547
/*!********************************************!*\
  !*** ../app/node_modules/isarray/index.js ***!
  \********************************************/
(module) {

var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};

/***/ },

/***/ 9648
/*!*******************************************************************!*\
  !*** ../app/node_modules/call-bind-apply-helpers/reflectApply.js ***!
  \*******************************************************************/
(module) {

"use strict";


/** @type {import('./reflectApply')} */
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;

/***/ },

/***/ 9683
/*!**************************************************!*\
  !*** ../app/node_modules/math-intrinsics/abs.js ***!
  \**************************************************/
(module) {

"use strict";


/** @type {import('./abs')} */
module.exports = Math.abs;

/***/ },

/***/ 9691
/*!*****************************!*\
  !*** ./src/icons/close.svg ***!
  \*****************************/
(module) {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"xmark\" class=\"svg-inline--fa fa-xmark\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path fill=\"currentColor\" d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\"></path></svg>"

/***/ },

/***/ 9702
/*!*****************************************************************************!*\
  !*** ./src/components/colorSchemeSettingsForMode.component.scss?ngResource ***!
  \*****************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./colorSchemeSettingsForMode.component.scss?ngResource */ 3139);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ },

/***/ 9738
/*!******************************!*\
  !*** ./src/icons/regexp.svg ***!
  \******************************/
(module) {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"asterisk\" class=\"svg-inline--fa fa-asterisk\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path fill=\"currentColor\" d=\"M413.8 368.1C410.8 373.2 405.5 376 399.1 376c-2.766 0-5.562-.7187-8.125-2.219L240 284V464c0 8.844-7.156 16-15.1 16S208 472.8 208 464V284l-151.9 89.73C53.58 375.3 50.79 376 48.02 376c-5.469 0-10.8-2.812-13.8-7.859c-4.484-7.609-1.969-17.42 5.641-21.92L192.5 256L39.86 165.8c-7.609-4.5-10.12-14.31-5.641-21.92c4.531-7.578 14.31-10.06 21.92-5.641L208 227.1V48C208 39.16 215.2 32 224 32S240 39.16 240 48v179.1l151.9-89.73c7.641-4.422 17.42-1.938 21.92 5.641c4.484 7.609 1.969 17.42-5.641 21.92L255.5 256l152.7 90.22C415.7 350.7 418.3 360.5 413.8 368.1z\"></path></svg>"

/***/ },

/***/ 9765
/*!*********************************************!*\
  !*** external "@ng-bootstrap/ng-bootstrap" ***!
  \*********************************************/
(module) {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__9765__;

/***/ },

/***/ 9868
/*!*****************************************************************!*\
  !*** ./src/components/terminalToolbar.component.pug?ngResource ***!
  \*****************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[4].use[1]!./src/components/terminalToolbar.component.pug?ngResource */ 6627);
module.exports = (req['default'] || req).apply(req, [])

/***/ },

/***/ 9875
/*!***********************************************!*\
  !*** ../app/node_modules/dunder-proto/get.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBind = __webpack_require__(/*! call-bind-apply-helpers */ 5603);
var gOPD = __webpack_require__(/*! gopd */ 1284);
var hasProtoAccessor;
try {
  // eslint-disable-next-line no-extra-parens, no-proto
  hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */[].__proto__ === Array.prototype;
} catch (e) {
  if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
    throw e;
  }
}

// eslint-disable-next-line no-extra-parens
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */'__proto__');
var $Object = Object;
var $getPrototypeOf = $Object.getPrototypeOf;

/** @type {import('./get')} */
module.exports = desc && typeof desc.get === 'function' ? callBind([desc.get]) : typeof $getPrototypeOf === 'function' ? /** @type {import('./get')} */function getDunder(value) {
  // eslint-disable-next-line eqeqeq
  return $getPrototypeOf(value == null ? value : $Object(value));
} : false;

/***/ },

/***/ 9885
/*!**********************************************!*\
  !*** ../app/node_modules/is-symbol/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


var callBound = __webpack_require__(/*! call-bound */ 4731);
var $toString = callBound('Object.prototype.toString');
var hasSymbols = __webpack_require__(/*! has-symbols */ 8354)();
var safeRegexTest = __webpack_require__(/*! safe-regex-test */ 8480);
if (hasSymbols) {
  var $symToStr = callBound('Symbol.prototype.toString');
  var isSymString = safeRegexTest(/^Symbol\(.*\)$/);

  /** @type {(value: object) => value is Symbol} */
  var isSymbolObject = function isRealSymbolObject(value) {
    if (typeof value.valueOf() !== 'symbol') {
      return false;
    }
    return isSymString($symToStr(value));
  };

  /** @type {import('.')} */
  module.exports = function isSymbol(value) {
    if (typeof value === 'symbol') {
      return true;
    }
    if (!value || typeof value !== 'object' || $toString(value) !== '[object Symbol]') {
      return false;
    }
    try {
      return isSymbolObject(value);
    } catch (e) {
      return false;
    }
  };
} else {
  /** @type {import('.')} */
  module.exports = function isSymbol(value) {
    // this environment does not support Symbols.
    return  false && 0;
  };
}

/***/ },

/***/ 9944
/*!************************************************!*\
  !*** ../app/node_modules/has-symbols/shams.js ***!
  \************************************************/
(module) {

"use strict";


/** @type {import('./shams')} */
/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {
    return false;
  }
  if (typeof Symbol.iterator === 'symbol') {
    return true;
  }

  /** @type {{ [k in symbol]?: unknown }} */
  var obj = {};
  var sym = Symbol('test');
  var symObj = Object(sym);
  if (typeof sym === 'string') {
    return false;
  }
  if (Object.prototype.toString.call(sym) !== '[object Symbol]') {
    return false;
  }
  if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {
    return false;
  }

  // temp disabled per https://github.com/ljharb/object.assign/issues/17
  // if (sym instanceof Symbol) { return false; }
  // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  // if (!(symObj instanceof Symbol)) { return false; }

  // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }

  var symVal = 42;
  obj[sym] = symVal;
  for (var _ in obj) {
    return false;
  } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {
    return false;
  }
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {
    return false;
  }
  var syms = Object.getOwnPropertySymbols(obj);
  if (syms.length !== 1 || syms[0] !== sym) {
    return false;
  }
  if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
    return false;
  }
  if (typeof Object.getOwnPropertyDescriptor === 'function') {
    // eslint-disable-next-line no-extra-parens
    var descriptor = /** @type {PropertyDescriptor} */Object.getOwnPropertyDescriptor(obj, sym);
    if (descriptor.value !== symVal || descriptor.enumerable !== true) {
      return false;
    }
  }
  return true;
};

/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Check if module exists (development only)
/******/ 		if (__webpack_modules__[moduleId] === undefined) {
/******/ 			var e = new Error("Cannot find module '" + moduleId + "'");
/******/ 			e.code = 'MODULE_NOT_FOUND';
/******/ 			throw e;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/nonce */
/******/ 	(() => {
/******/ 		__webpack_require__.nc = undefined;
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/require chunk loading */
/******/ 	(() => {
/******/ 		__webpack_require__.b = require("node:url").pathToFileURL(__filename);
/******/ 		
/******/ 		// object to store loaded chunks
/******/ 		// "1" means "loaded", otherwise not loaded yet
/******/ 		var installedChunks = {
/******/ 			792: 1
/******/ 		};
/******/ 		
/******/ 		// no on chunks loaded
/******/ 		
/******/ 		// no chunk install function needed
/******/ 		
/******/ 		// no chunk loading
/******/ 		
/******/ 		// no external install chunk
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(() => {
"use strict";
/*!***********************************!*\
  !*** ./src/index.ts + 43 modules ***!
  \***********************************/
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  BaseSession: () => (/* reexport */ BaseSession),
  BaseTerminalTabComponent: () => (/* reexport */ BaseTerminalTabComponent),
  ConnectableTerminalTabComponent: () => (/* reexport */ ConnectableTerminalTabComponent),
  Frontend: () => (/* reexport */ Frontend),
  InputProcessor: () => (/* reexport */ InputProcessor),
  LoginScriptProcessor: () => (/* reexport */ LoginScriptProcessor),
  LoginScriptsSettingsComponent: () => (/* reexport */ LoginScriptsSettingsComponent),
  MultifocusService: () => (/* reexport */ MultifocusService),
  OSCProcessor: () => (/* reexport */ OSCProcessor),
  SessionMiddleware: () => (/* reexport */ SessionMiddleware),
  SessionMiddlewareStack: () => (/* reexport */ SessionMiddlewareStack),
  StreamProcessingSettingsComponent: () => (/* reexport */ StreamProcessingSettingsComponent),
  TerminalColorSchemeProvider: () => (/* reexport */ TerminalColorSchemeProvider),
  TerminalContextMenuItemProvider: () => (/* reexport */ TerminalContextMenuItemProvider),
  TerminalDecorator: () => (/* reexport */ TerminalDecorator),
  TerminalStreamProcessor: () => (/* reexport */ TerminalStreamProcessor),
  UTF8SplitterMiddleware: () => (/* reexport */ UTF8SplitterMiddleware),
  XTermFrontend: () => (/* reexport */ XTermFrontend),
  XTermWebGLFrontend: () => (/* reexport */ XTermWebGLFrontend),
  "default": () => (/* binding */ src)
});

;// ./node_modules/tslib/tslib.es6.js
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function (d, b) {
  extendStatics = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (d, b) {
    d.__proto__ = b;
  } || function (d, b) {
    for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
  };
  return extendStatics(d, b);
};
function __extends(d, b) {
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function () {
  __assign = Object.assign || function __assign(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
function __rest(s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
}
function __decorate(decorators, target, key, desc) {
  var c = arguments.length,
    r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
    d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
  return function (target, key) {
    decorator(target, key, paramIndex);
  };
}
function __metadata(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = {
      label: 0,
      sent: function () {
        if (t[0] & 1) throw t[1];
        return t[1];
      },
      trys: [],
      ops: []
    },
    f,
    y,
    t,
    g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
    return this;
  }), g;
  function verb(n) {
    return function (v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (_) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
}
var __createBinding = Object.create ? function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  Object.defineProperty(o, k2, {
    enumerable: true,
    get: function () {
      return m[k];
    }
  });
} : function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  o[k2] = m[k];
};
function __exportStar(m, o) {
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator,
    m = s && o[s],
    i = 0;
  if (m) return m.call(o);
  if (o && typeof o.length === "number") return {
    next: function () {
      if (o && i >= o.length) o = void 0;
      return {
        value: o && o[i++],
        done: !o
      };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m) return o;
  var i = m.call(o),
    r,
    ar = [],
    e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  } catch (error) {
    e = {
      error: error
    };
  } finally {
    try {
      if (r && !r.done && (m = i["return"])) m.call(i);
    } finally {
      if (e) throw e.error;
    }
  }
  return ar;
}

/** @deprecated */
function __spread() {
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
  return ar;
}

/** @deprecated */
function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
  return r;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []),
    i,
    q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i;
  function verb(n) {
    if (g[n]) i[n] = function (v) {
      return new Promise(function (a, b) {
        q.push([n, v, a, b]) > 1 || resume(n, v);
      });
    };
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncDelegator(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function (e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function () {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function (v) {
      return (p = !p) ? {
        value: __await(o[n](v)),
        done: n === "return"
      } : f ? f(v) : v;
    } : f;
  }
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
    i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", {
      value: raw
    });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
;
var __setModuleDefault = Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
};
function __importStar(mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  __setModuleDefault(result, mod);
  return result;
}
function __importDefault(mod) {
  return mod && mod.__esModule ? mod : {
    default: mod
  };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
// EXTERNAL MODULE: external "@angular/core"
var core_ = __webpack_require__(860);
// EXTERNAL MODULE: external "@angular/common"
var common_ = __webpack_require__(4358);
// EXTERNAL MODULE: external "@angular/forms"
var forms_ = __webpack_require__(7182);
// EXTERNAL MODULE: external "@ng-bootstrap/ng-bootstrap"
var ng_bootstrap_ = __webpack_require__(9765);
// EXTERNAL MODULE: external "ngx-toastr"
var external_ngx_toastr_ = __webpack_require__(6523);
// EXTERNAL MODULE: external "@angular/animations"
var animations_ = __webpack_require__(1448);
;// ./node_modules/ngx-colors/fesm2015/ngx-colors.mjs






const _c0 = ["hueSlider"];
const _c1 = ["alphaSlider"];
function ColorPickerComponent_div_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r6 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 8);
    core_["ɵɵlistener"]("newValue", function ColorPickerComponent_div_2_Template_div_newValue_0_listener($event) {
      core_["ɵɵrestoreView"](_r6);
      const ctx_r5 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r5.onSliderChange("saturation-lightness", $event));
    });
    core_["ɵɵelementStart"](1, "div", 9);
    core_["ɵɵelement"](2, "div");
    core_["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r1 = core_["ɵɵnextContext"]();
    core_["ɵɵstyleProp"]("background-color", ctx_r1.hueSliderColor);
    core_["ɵɵproperty"]("rgX", 1)("rgY", 1);
    core_["ɵɵadvance"](1);
    core_["ɵɵstyleProp"]("top", ctx_r1.slider == null ? null : ctx_r1.slider.v, "px")("left", ctx_r1.slider == null ? null : ctx_r1.slider.s, "px");
  }
}
function ColorPickerComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelementStart"](0, "div", 10);
    core_["ɵɵelement"](1, "div", 11)(2, "div", 12);
    core_["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](2);
    core_["ɵɵstyleProp"]("background-color", ctx_r2.selectedColor);
  }
}
function ColorPickerComponent_div_6_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 13, 14);
    core_["ɵɵlistener"]("newValue", function ColorPickerComponent_div_6_Template_div_newValue_0_listener($event) {
      core_["ɵɵrestoreView"](_r9);
      const ctx_r8 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r8.onSliderChange("hue", $event));
    });
    core_["ɵɵelementStart"](2, "div", 15)(3, "div");
    core_["ɵɵelement"](4, "div");
    core_["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r3 = core_["ɵɵnextContext"]();
    core_["ɵɵproperty"]("rgX", 1);
    core_["ɵɵadvance"](2);
    core_["ɵɵstyleProp"]("left", ctx_r3.slider == null ? null : ctx_r3.slider.h, "px");
  }
}
function ColorPickerComponent_div_7_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 16, 17);
    core_["ɵɵlistener"]("newValue", function ColorPickerComponent_div_7_Template_div_newValue_0_listener($event) {
      core_["ɵɵrestoreView"](_r12);
      const ctx_r11 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r11.onSliderChange("alpha", $event));
    });
    core_["ɵɵelement"](2, "div", 18);
    core_["ɵɵelementStart"](3, "div", 15)(4, "div");
    core_["ɵɵelement"](5, "div");
    core_["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r4 = core_["ɵɵnextContext"]();
    core_["ɵɵproperty"]("rgX", 1);
    core_["ɵɵadvance"](2);
    core_["ɵɵproperty"]("ngStyle", ctx_r4.getBackgroundColor(ctx_r4.alphaSliderColor));
    core_["ɵɵadvance"](1);
    core_["ɵɵstyleProp"]("left", ctx_r4.slider == null ? null : ctx_r4.slider.a, "px");
  }
}
const _c2 = ["dialog"];
function PanelComponent_ng_container_2_ng_container_2_div_3_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelement"](0, "div", 11);
  }
}
function PanelComponent_ng_container_2_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 8)(2, "div", 9);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_2_ng_container_2_Template_div_click_2_listener() {
      const restoredCtx = core_["ɵɵrestoreView"](_r12);
      const color_r8 = restoredCtx.$implicit;
      const ctx_r11 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r11.onColorClick(color_r8));
    });
    core_["ɵɵtemplate"](3, PanelComponent_ng_container_2_ng_container_2_div_3_Template, 1, 0, "div", 10);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const color_r8 = ctx.$implicit;
    const i_r9 = ctx.index;
    const ctx_r5 = core_["ɵɵnextContext"](2);
    core_["ɵɵadvance"](2);
    core_["ɵɵclassProp"]("colornull", !color_r8);
    core_["ɵɵproperty"]("ngStyle", ctx_r5.getBackgroundColor(color_r8));
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", i_r9 == ctx_r5.indexSeleccionado);
  }
}
function PanelComponent_ng_container_2_div_3_div_1_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelement"](0, "div", 17);
  }
  if (rf & 2) {
    const ctx_r13 = core_["ɵɵnextContext"](3);
    core_["ɵɵproperty"]("ngStyle", ctx_r13.getBackgroundColor(ctx_r13.color));
  }
}
function PanelComponent_ng_container_2_div_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 12);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_2_div_3_Template_div_click_0_listener() {
      core_["ɵɵrestoreView"](_r15);
      const ctx_r14 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r14.addColor());
    });
    core_["ɵɵtemplate"](1, PanelComponent_ng_container_2_div_3_div_1_Template, 1, 1, "div", 13);
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵelementStart"](2, "svg", 14);
    core_["ɵɵelement"](3, "path", 15)(4, "path", 16);
    core_["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r6 = core_["ɵɵnextContext"](2);
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", !ctx_r6.indexSeleccionado);
  }
}
function PanelComponent_ng_container_2_color_picker_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r17 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "color-picker", 18);
    core_["ɵɵlistener"]("colorChange", function PanelComponent_ng_container_2_color_picker_4_Template_color_picker_colorChange_0_listener($event) {
      core_["ɵɵrestoreView"](_r17);
      const ctx_r16 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r16.onChangeColorPicker($event));
    })("onAlphaChange", function PanelComponent_ng_container_2_color_picker_4_Template_color_picker_onAlphaChange_0_listener($event) {
      core_["ɵɵrestoreView"](_r17);
      const ctx_r18 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r18.onAlphaChange($event));
    });
    core_["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r7 = core_["ɵɵnextContext"](2);
    core_["ɵɵproperty"]("controls", ctx_r7.colorPickerControls)("color", ctx_r7.hsva);
  }
}
function PanelComponent_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 4);
    core_["ɵɵtemplate"](2, PanelComponent_ng_container_2_ng_container_2_Template, 4, 4, "ng-container", 5);
    core_["ɵɵtemplate"](3, PanelComponent_ng_container_2_div_3_Template, 5, 1, "div", 6);
    core_["ɵɵtemplate"](4, PanelComponent_ng_container_2_color_picker_4_Template, 1, 2, "color-picker", 7);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("@colorsAnimation", ctx_r1.colorsAnimationEffect);
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngForOf", ctx_r1.palette);
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", !ctx_r1.hideColorPicker && ctx_r1.colorPickerControls != "only-alpha");
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", !ctx_r1.hideColorPicker && ctx_r1.colorPickerControls == "only-alpha");
  }
}
function PanelComponent_ng_container_3_ng_container_7_div_3_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelement"](0, "div", 11);
  }
}
const _c3 = function (a0) {
  return {
    background: a0
  };
};
function PanelComponent_ng_container_3_ng_container_7_Template(rf, ctx) {
  if (rf & 1) {
    const _r23 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵnamespaceHTML"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 8)(2, "div", 24);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_3_ng_container_7_Template_div_click_2_listener() {
      const restoredCtx = core_["ɵɵrestoreView"](_r23);
      const variant_r20 = restoredCtx.$implicit;
      const ctx_r22 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r22.changeColor(variant_r20));
    });
    core_["ɵɵtemplate"](3, PanelComponent_ng_container_3_ng_container_7_div_3_Template, 1, 0, "div", 10);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const variant_r20 = ctx.$implicit;
    const ctx_r19 = core_["ɵɵnextContext"](2);
    core_["ɵɵadvance"](2);
    core_["ɵɵclassProp"]("colornull", !variant_r20);
    core_["ɵɵproperty"]("ngStyle", core_["ɵɵpureFunction1"](4, _c3, variant_r20));
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", ctx_r19.isSelected(variant_r20));
  }
}
function PanelComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r25 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 4)(2, "div", 19)(3, "div", 20);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_3_Template_div_click_3_listener() {
      core_["ɵɵrestoreView"](_r25);
      const ctx_r24 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r24.onClickBack());
    });
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵelementStart"](4, "svg", 21);
    core_["ɵɵelement"](5, "path", 22)(6, "path", 23);
    core_["ɵɵelementEnd"]()()();
    core_["ɵɵtemplate"](7, PanelComponent_ng_container_3_ng_container_7_Template, 4, 6, "ng-container", 5);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("@colorsAnimation", ctx_r2.colorsAnimationEffect);
    core_["ɵɵadvance"](6);
    core_["ɵɵproperty"]("ngForOf", ctx_r2.variants);
  }
}
function PanelComponent_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r27 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 25)(2, "div", 26);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_4_Template_div_click_2_listener() {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r26 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r26.onClickBack());
    });
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵelementStart"](3, "svg", 21);
    core_["ɵɵelement"](4, "path", 22)(5, "path", 23);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵnamespaceHTML"]();
    core_["ɵɵelementStart"](6, "button", 27);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_4_Template_button_click_6_listener() {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r28 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r28.emitClose("cancel"));
    });
    core_["ɵɵtext"](7);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementStart"](8, "button", 27);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_4_Template_button_click_8_listener() {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r29 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r29.emitClose("accept"));
    });
    core_["ɵɵtext"](9);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementStart"](10, "div", 28)(11, "color-picker", 29);
    core_["ɵɵlistener"]("sliderChange", function PanelComponent_ng_container_4_Template_color_picker_sliderChange_11_listener($event) {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r30 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r30.onChangeColorPicker($event));
    });
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r3 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](7);
    core_["ɵɵtextInterpolate1"](" ", ctx_r3.cancelLabel, " ");
    core_["ɵɵadvance"](2);
    core_["ɵɵtextInterpolate1"](" ", ctx_r3.acceptLabel, " ");
    core_["ɵɵadvance"](2);
    core_["ɵɵproperty"]("controls", ctx_r3.colorPickerControls)("color", ctx_r3.hsva);
  }
}
function PanelComponent_div_5_Template(rf, ctx) {
  if (rf & 1) {
    const _r33 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 30)(1, "p", 31);
    core_["ɵɵlistener"]("click", function PanelComponent_div_5_Template_p_click_1_listener() {
      core_["ɵɵrestoreView"](_r33);
      const ctx_r32 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r32.nextFormat());
    });
    core_["ɵɵtext"](2);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementStart"](3, "div", 32)(4, "input", 33, 34);
    core_["ɵɵlistener"]("keyup", function PanelComponent_div_5_Template_input_keyup_4_listener() {
      core_["ɵɵrestoreView"](_r33);
      const _r31 = core_["ɵɵreference"](5);
      const ctx_r34 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r34.changeColorManual(_r31.value));
    })("keydown.enter", function PanelComponent_div_5_Template_input_keydown_enter_4_listener() {
      core_["ɵɵrestoreView"](_r33);
      const ctx_r35 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r35.emitClose("accept"));
    });
    core_["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r4 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](2);
    core_["ɵɵtextInterpolate"](ctx_r4.colorFormats[ctx_r4.format]);
    core_["ɵɵadvance"](2);
    core_["ɵɵstyleProp"]("font-size", ctx_r4.color && ctx_r4.color.length > 23 ? 9 : 10, "px")("letter-spacing", ctx_r4.color && ctx_r4.color.length > 16 ? 0 : 1.5, "px");
    core_["ɵɵproperty"]("value", ctx_r4.color);
  }
}
var ColorFormats;
(function (ColorFormats) {
  ColorFormats[ColorFormats["HEX"] = 0] = "HEX";
  ColorFormats[ColorFormats["RGBA"] = 1] = "RGBA";
  ColorFormats[ColorFormats["HSLA"] = 2] = "HSLA";
  ColorFormats[ColorFormats["CMYK"] = 3] = "CMYK";
})(ColorFormats || (ColorFormats = {}));
const defaultColors = [{
  color: "rojo",
  preview: "#E57373",
  variants: ["#FFEBEE", "#FFCDD2", "#EF9A9A", "#E57373", "#EF5350", "#F44336", "#E53935", "#D32F2F", "#C62828"]
}, {
  color: "rosa",
  preview: "#F06292",
  variants: ["#FCE4EC", "#F8BBD0", "#F48FB1", "#F06292", "#EC407A", "#E91E63", "#D81B60", "#C2185B", "#AD1457"]
}, {
  color: "purpura",
  preview: "#BA68C8",
  variants: ["#F3E5F5", "#E1BEE7", "#CE93D8", "#BA68C8", "#AB47BC", "#9C27B0", "#8E24AA", "#7B1FA2", "#6A1B9A"]
}, {
  color: "purpura oscuro",
  preview: "#9575CD",
  variants: ["#EDE7F6", "#D1C4E9", "#B39DDB", "#9575CD", "#7E57C2", "#673AB7", "#5E35B1", "#512DA8", "#4527A0"]
}, {
  color: "indigo",
  preview: "#7986CB",
  variants: ["#E8EAF6", "#C5CAE9", "#9FA8DA", "#7986CB", "#5C6BC0", "#3F51B5", "#3949AB", "#303F9F", "#283593"]
}, {
  color: "azul",
  preview: "#64B5F6",
  variants: ["#E3F2FD", "#BBDEFB", "#90CAF9", "#64B5F6", "#42A5F5", "#2196F3", "#1E88E5", "#1976D2", "#1565C0"]
}, {
  color: "celeste",
  preview: "#4FC3F7",
  variants: ["#E1F5FE", "#B3E5FC", "#81D4FA", "#4FC3F7", "#29B6F6", "#03A9F4", "#039BE5", "#0288D1", "#0277BD"]
}, {
  color: "cyan",
  preview: "#4DD0E1",
  variants: ["#E0F7FA", "#B2EBF2", "#80DEEA", "#4DD0E1", "#26C6DA", "#00BCD4", "#00ACC1", "#0097A7", "#00838F"]
}, {
  color: "color",
  preview: "#4DB6AC",
  variants: ["#E0F2F1", "#B2DFDB", "#80CBC4", "#4DB6AC", "#26A69A", "#009688", "#00897B", "#00796B", "#00695C"]
}, {
  color: "verde",
  preview: "#81C784",
  variants: ["#E8F5E9", "#C8E6C9", "#A5D6A7", "#81C784", "#66BB6A", "#4CAF50", "#43A047", "#388E3C", "#2E7D32"]
}, {
  color: "verde claro",
  preview: "#AED581",
  variants: ["#F1F8E9", "#DCEDC8", "#C5E1A5", "#AED581", "#9CCC65", "#8BC34A", "#7CB342", "#689F38", "#558B2F"]
}, {
  color: "lima",
  preview: "#DCE775",
  variants: ["#F9FBE7", "#F0F4C3", "#E6EE9C", "#DCE775", "#D4E157", "#CDDC39", "#C0CA33", "#AFB42B", "#9E9D24"]
}, {
  color: "amarillo",
  preview: "#FFF176",
  variants: ["#FFFDE7", "#FFF9C4", "#FFF59D", "#FFF176", "#FFEE58", "#FFEB3B", "#FDD835", "#FBC02D", "#F9A825"]
}, {
  color: "ambar",
  preview: "#FFD54F",
  variants: ["#FFF8E1", "#FFECB3", "#FFE082", "#FFD54F", "#FFCA28", "#FFC107", "#FFB300", "#FFA000", "#FF8F00"]
}, {
  color: "naranja",
  preview: "#FFB74D",
  variants: ["#FFF3E0", "#FFE0B2", "#FFCC80", "#FFB74D", "#FFA726", "#FF9800", "#FB8C00", "#F57C00", "#EF6C00"]
}, {
  color: "naranja oscuro",
  preview: "#FF8A65",
  variants: ["#FBE9E7", "#FFCCBC", "#FFAB91", "#FF8A65", "#FF7043", "#FF5722", "#F4511E", "#E64A19", "#D84315"]
}, {
  color: "marron",
  preview: "#A1887F",
  variants: ["#EFEBE9", "#D7CCC8", "#BCAAA4", "#A1887F", "#8D6E63", "#795548", "#6D4C41", "#5D4037", "#4E342E"]
}, {
  color: "escala de grises",
  preview: "#E0E0E0",
  variants: ["#FFFFFF", "#FAFAFA", "#F5F5F5", "#EEEEEE", "#E0E0E0", "#BDBDBD", "#9E9E9E", "#757575", "#616161", "#424242", "#000000"]
}, {
  color: "azul gris",
  preview: "#90A4AE",
  variants: ["#ECEFF1", "#CFD8DC", "#B0BEC5", "#90A4AE", "#78909C", "#607D8B", "#546E7A", "#455A64", "#37474F"]
}];
const formats = ['hex', 'rgba', 'hsla'];
class Rgba {
  constructor(r, g, b, a) {
    this.r = r;
    this.g = g;
    this.b = b;
    this.a = a;
  }
  denormalize() {
    this.r = Math.round(this.r * 255);
    this.g = Math.round(this.g * 255);
    this.b = Math.round(this.b * 255);
    return this;
  }
  toString() {
    this.denormalize();
    let output = 'rgb' + (this.a != 1 ? 'a(' : '(') + this.r + ', ' + this.g + ', ' + this.b + (this.a != 1 ? ', ' + this.a.toPrecision(2) + ')' : ')');
    return output;
  }
}
class Hsva {
  constructor(h, s, v, a) {
    this.h = h;
    this.s = s;
    this.v = v;
    this.a = a;
    this.onChange = new core_.EventEmitter(true);
  }
  onColorChange(value) {
    this.s = value.s / value.rgX;
    this.v = value.v / value.rgY;
  }
  onHueChange(value) {
    this.h = value.v / value.rgX;
    // this.sliderH = this.hsva.h;
  }
  onValueChange(value) {
    this.v = value.v / value.rgX;
  }
  onAlphaChange(value) {
    this.a = value.v / value.rgX;
  }
}
class Hsla {
  constructor(h, s, l, a) {
    this.h = h;
    this.s = s;
    this.l = l;
    this.a = a;
  }
  denormalize() {
    this.h = Math.round(this.h * 360);
    this.s = Math.round(this.s * 100);
    this.l = Math.round(this.l * 100);
    return this;
  }
  toString() {
    let output = 'hsl' + (this.a != 1 ? 'a(' : '(') + this.h + ', ' + this.s + '%, ' + this.l + '%' + (this.a != 1 ? ', ' + this.a.toPrecision(2) + ')' : ')');
    return output;
  }
}
class Cmyk {
  constructor(c, m, y, k, a = 1) {
    this.c = c;
    this.m = m;
    this.y = y;
    this.k = k;
    this.a = a;
  }
}
class NgxColor {
  constructor(params) {
    if (params) {
      this.preview = params.preview;
      this.variants = params.variants;
    }
  }
}
class ConverterService {
  // private active: ColorPickerComponent | null = null;
  constructor() {}
  // public setActive(active: ColorPickerComponent | null): void {
  //   this.active = active;
  // }
  toFormat(hsva, format) {
    var output = "";
    if (hsva) {
      switch (format) {
        case ColorFormats.HEX:
          var rgba = this.hsvaToRgba(hsva);
          rgba.denormalize();
          var output = this.rgbaToHex(rgba, true);
          break;
        case ColorFormats.HSLA:
          var hsla = this.hsva2hsla(hsva);
          hsla.denormalize();
          var output = hsla.toString();
          break;
        case ColorFormats.RGBA:
          var rgba = this.hsvaToRgba(hsva);
          var output = rgba.toString();
          break;
        case ColorFormats.CMYK:
          var rgba = this.hsvaToRgba(hsva);
          var cmyk = this.rgbaToCmyk(rgba);
          break;
      }
    }
    return output;
  }
  stringToFormat(color, format) {
    var hsva = this.stringToHsva(color, true);
    return this.toFormat(hsva, format);
  }
  hsva2hsla(hsva) {
    const h = hsva.h,
      s = hsva.s,
      v = hsva.v,
      a = hsva.a;
    if (v === 0) {
      return new Hsla(h, 0, 0, a);
    } else if (s === 0 && v === 1) {
      return new Hsla(h, 1, 1, a);
    } else {
      const l = v * (2 - s) / 2;
      return new Hsla(h, v * s / (1 - Math.abs(2 * l - 1)), l, a);
    }
  }
  hsla2hsva(hsla) {
    const h = Math.min(hsla.h, 1),
      s = Math.min(hsla.s, 1);
    const l = Math.min(hsla.l, 1),
      a = Math.min(hsla.a, 1);
    if (l === 0) {
      return new Hsva(h, 0, 0, a);
    } else {
      const v = l + s * (1 - Math.abs(2 * l - 1)) / 2;
      return new Hsva(h, 2 * (v - l) / v, v, a);
    }
  }
  hsvaToRgba(hsva) {
    let r, g, b;
    const h = hsva.h,
      s = hsva.s,
      v = hsva.v,
      a = hsva.a;
    const i = Math.floor(h * 6);
    const f = h * 6 - i;
    const p = v * (1 - s);
    const q = v * (1 - f * s);
    const t = v * (1 - (1 - f) * s);
    switch (i % 6) {
      case 0:
        r = v, g = t, b = p;
        break;
      case 1:
        r = q, g = v, b = p;
        break;
      case 2:
        r = p, g = v, b = t;
        break;
      case 3:
        r = p, g = q, b = v;
        break;
      case 4:
        r = t, g = p, b = v;
        break;
      case 5:
        r = v, g = p, b = q;
        break;
      default:
        r = 0, g = 0, b = 0;
    }
    return new Rgba(r, g, b, a);
  }
  cmykToRgb(cmyk) {
    const r = (1 - cmyk.c) * (1 - cmyk.k);
    const g = (1 - cmyk.m) * (1 - cmyk.k);
    const b = (1 - cmyk.y) * (1 - cmyk.k);
    return new Rgba(r, g, b, cmyk.a);
  }
  rgbaToCmyk(rgba) {
    const k = 1 - Math.max(rgba.r, rgba.g, rgba.b);
    if (k === 1) {
      return new Cmyk(0, 0, 0, 1, rgba.a);
    } else {
      const c = (1 - rgba.r - k) / (1 - k);
      const m = (1 - rgba.g - k) / (1 - k);
      const y = (1 - rgba.b - k) / (1 - k);
      return new Cmyk(c, m, y, k, rgba.a);
    }
  }
  rgbaToHsva(rgba) {
    let h, s;
    const r = Math.min(rgba.r, 1),
      g = Math.min(rgba.g, 1);
    const b = Math.min(rgba.b, 1),
      a = Math.min(rgba.a, 1);
    const max = Math.max(r, g, b),
      min = Math.min(r, g, b);
    const v = max,
      d = max - min;
    s = max === 0 ? 0 : d / max;
    if (max === min) {
      h = 0;
    } else {
      switch (max) {
        case r:
          h = (g - b) / d + (g < b ? 6 : 0);
          break;
        case g:
          h = (b - r) / d + 2;
          break;
        case b:
          h = (r - g) / d + 4;
          break;
        default:
          h = 0;
      }
      h /= 6;
    }
    return new Hsva(h, s, v, a);
  }
  rgbaToHex(rgba, allowHex8) {
    /* tslint:disable:no-bitwise */
    let hex = "#" + (1 << 24 | rgba.r << 16 | rgba.g << 8 | rgba.b).toString(16).substr(1);
    if (rgba.a != 1) {
      hex += (1 << 8 | Math.round(rgba.a * 255)).toString(16).substr(1);
    }
    /* tslint:enable:no-bitwise */
    return hex;
  }
  normalizeCMYK(cmyk) {
    return new Cmyk(cmyk.c / 100, cmyk.m / 100, cmyk.y / 100, cmyk.k / 100, cmyk.a);
  }
  denormalizeCMYK(cmyk) {
    return new Cmyk(Math.floor(cmyk.c * 100), Math.floor(cmyk.m * 100), Math.floor(cmyk.y * 100), Math.floor(cmyk.k * 100), cmyk.a);
  }
  denormalizeRGBA(rgba) {
    return new Rgba(Math.round(rgba.r * 255), Math.round(rgba.g * 255), Math.round(rgba.b * 255), rgba.a);
  }
  stringToHsva(colorString = "", allowHex8 = true) {
    let hsva = null;
    colorString = (colorString || "").toLowerCase();
    const stringParsers = [{
      re: /(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
      parse: function (execResult) {
        return new Rgba(parseInt(execResult[2], 10) / 255, parseInt(execResult[3], 10) / 255, parseInt(execResult[4], 10) / 255, isNaN(parseFloat(execResult[5])) ? 1 : parseFloat(execResult[5]));
      }
    }, {
      re: /(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
      parse: function (execResult) {
        return new Hsla(parseInt(execResult[2], 10) / 360, parseInt(execResult[3], 10) / 100, parseInt(execResult[4], 10) / 100, isNaN(parseFloat(execResult[5])) ? 1 : parseFloat(execResult[5]));
      }
    }];
    if (allowHex8) {
      stringParsers.push({
        re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,
        parse: function (execResult) {
          return new Rgba(parseInt(execResult[1], 16) / 255, parseInt(execResult[2], 16) / 255, parseInt(execResult[3], 16) / 255, parseInt(execResult[4] || "FF", 16) / 255);
        }
      });
    } else {
      stringParsers.push({
        re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,
        parse: function (execResult) {
          return new Rgba(parseInt(execResult[1], 16) / 255, parseInt(execResult[2], 16) / 255, parseInt(execResult[3], 16) / 255, 1);
        }
      });
    }
    stringParsers.push({
      re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,
      parse: function (execResult) {
        return new Rgba(parseInt(execResult[1] + execResult[1], 16) / 255, parseInt(execResult[2] + execResult[2], 16) / 255, parseInt(execResult[3] + execResult[3], 16) / 255, 1);
      }
    });
    for (const key in stringParsers) {
      if (stringParsers.hasOwnProperty(key)) {
        const parser = stringParsers[key];
        const match = parser.re.exec(colorString),
          color = match && parser.parse(match);
        if (color) {
          if (color instanceof Rgba) {
            hsva = this.rgbaToHsva(color);
          } else if (color instanceof Hsla) {
            hsva = this.hsla2hsva(color);
          }
          return hsva;
        }
      }
    }
    return hsva;
  }
  outputFormat(hsva) {
    return this.hsvaToRgba(hsva).toString();
  }
  getFormatByString(color) {
    if (color) {
      color = color.toLowerCase();
      let regexHex = /(#([\da-f]{3}(?:[\da-f]{3})?(?:[\da-f]{2})?))/;
      let regexRGBA = /(rgba\((\d{1,3},\s?){3}(1|0?\.\d+)\)|rgb\(\d{1,3}(,\s?\d{1,3}){2}\))/;
      let regexHSLA = /(hsla\((\d{1,3}%?,\s?){3}(1|0?\.\d+)\)|hsl\(\d{1,3}%?(,\s?\d{1,3}%?){2}\))/;
      if (regexHex.test(color)) {
        return "hex";
      } else if (regexRGBA.test(color)) {
        return "rgba";
      } else if (regexHSLA.test(color)) {
        return "hsla";
      }
    }
    return "hex";
  }
}
ConverterService.ɵfac = function ConverterService_Factory(t) {
  return new (t || ConverterService)();
};
ConverterService.ɵprov = /* @__PURE__ */core_["ɵɵdefineInjectable"]({
  token: ConverterService,
  factory: ConverterService.ɵfac
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](ConverterService, [{
    type: core_.Injectable
  }], function () {
    return [];
  }, null);
})();
class SliderPosition {
  constructor(h, s, v, a) {
    this.h = h;
    this.s = s;
    this.v = v;
    this.a = a;
  }
}
class SliderDimension {
  constructor(h, s, v, a) {
    this.h = h;
    this.s = s;
    this.v = v;
    this.a = a;
  }
}
class SliderDirective {
  mouseDown(event) {
    this.start(event);
  }
  touchStart(event) {
    this.start(event);
  }
  constructor(elRef) {
    this.elRef = elRef;
    this.dragEnd = new core_.EventEmitter();
    this.dragStart = new core_.EventEmitter();
    this.newValue = new core_.EventEmitter();
    this.listenerMove = event => this.move(event);
    this.listenerStop = () => this.stop();
  }
  move(event) {
    event.preventDefault();
    this.setCursor(event);
  }
  start(event) {
    this.setCursor(event);
    event.stopPropagation();
    document.addEventListener('mouseup', this.listenerStop);
    document.addEventListener('touchend', this.listenerStop);
    document.addEventListener('mousemove', this.listenerMove);
    document.addEventListener('touchmove', this.listenerMove);
    this.dragStart.emit();
  }
  stop() {
    document.removeEventListener('mouseup', this.listenerStop);
    document.removeEventListener('touchend', this.listenerStop);
    document.removeEventListener('mousemove', this.listenerMove);
    document.removeEventListener('touchmove', this.listenerMove);
    this.dragEnd.emit();
  }
  getX(event) {
    const position = this.elRef.nativeElement.getBoundingClientRect();
    const pageX = event.pageX !== undefined ? event.pageX : event.touches[0].pageX;
    return pageX - position.left - window.pageXOffset;
  }
  getY(event) {
    const position = this.elRef.nativeElement.getBoundingClientRect();
    const pageY = event.pageY !== undefined ? event.pageY : event.touches[0].pageY;
    return pageY - position.top - window.pageYOffset;
  }
  setCursor(event) {
    const width = this.elRef.nativeElement.offsetWidth;
    const height = this.elRef.nativeElement.offsetHeight;
    const x = Math.max(0, Math.min(this.getX(event), width));
    const y = Math.max(0, Math.min(this.getY(event), height));
    if (this.rgX !== undefined && this.rgY !== undefined) {
      this.newValue.emit({
        s: x / width,
        v: 1 - y / height,
        rgX: this.rgX,
        rgY: this.rgY
      });
    } else if (this.rgX === undefined && this.rgY !== undefined) {
      this.newValue.emit({
        v: y / height,
        rgY: this.rgY
      });
    } else if (this.rgX !== undefined && this.rgY === undefined) {
      this.newValue.emit({
        v: x / width,
        rgX: this.rgX
      });
    }
  }
}
SliderDirective.ɵfac = function SliderDirective_Factory(t) {
  return new (t || SliderDirective)(core_["ɵɵdirectiveInject"](core_.ElementRef));
};
SliderDirective.ɵdir = /* @__PURE__ */core_["ɵɵdefineDirective"]({
  type: SliderDirective,
  selectors: [["", "slider", ""]],
  hostBindings: function SliderDirective_HostBindings(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵlistener"]("mousedown", function SliderDirective_mousedown_HostBindingHandler($event) {
        return ctx.mouseDown($event);
      })("touchstart", function SliderDirective_touchstart_HostBindingHandler($event) {
        return ctx.touchStart($event);
      });
    }
  },
  inputs: {
    rgX: "rgX",
    rgY: "rgY",
    slider: "slider"
  },
  outputs: {
    dragEnd: "dragEnd",
    dragStart: "dragStart",
    newValue: "newValue"
  }
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](SliderDirective, [{
    type: core_.Directive,
    args: [{
      selector: '[slider]'
    }]
  }], function () {
    return [{
      type: core_.ElementRef
    }];
  }, {
    rgX: [{
      type: core_.Input
    }],
    rgY: [{
      type: core_.Input
    }],
    slider: [{
      type: core_.Input
    }],
    dragEnd: [{
      type: core_.Output
    }],
    dragStart: [{
      type: core_.Output
    }],
    newValue: [{
      type: core_.Output
    }],
    mouseDown: [{
      type: core_.HostListener,
      args: ['mousedown', ['$event']]
    }],
    touchStart: [{
      type: core_.HostListener,
      args: ['touchstart', ['$event']]
    }]
  });
})();
class ColorPickerComponent {
  constructor(service, cdr) {
    this.service = service;
    this.cdr = cdr;
    //IO color
    this.color = new Hsva(0, 1, 1, 1);
    this.controls = "default";
    this.sliderChange = new core_.EventEmitter(false);
    this.onAlphaChange = new core_.EventEmitter(false);
    //Event triggered when any slider change
    // @Output() colorSelectedChange:EventEmitter<Hsva> = new EventEmitter<Hsva>(false);
    this.hsva = new Hsva(0, 1, 1, 1);
    this.selectedColor = "#000000";
    this.fallbackColor = "#000000";
  }
  ngOnInit() {
    if (!this.color) {
      this.color = new Hsva(0, 1, 1, 1);
    }
    this.slider = new SliderPosition(0, 0, 0, 0);
    this.update();
  }
  ngOnDestroy() {}
  ngOnChanges(changes) {
    if (changes.color && this.color) {
      this.update();
    }
  }
  ngAfterViewInit() {
    var _a, _b;
    const hueWidth = ((_a = this.hueSlider) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 140;
    const alphaWidth = ((_b = this.alphaSlider) === null || _b === void 0 ? void 0 : _b.nativeElement.offsetWidth) || 140;
    this.sliderDimMax = new SliderDimension(hueWidth, 220, 130, alphaWidth);
    this.update();
  }
  onSliderChange(type, event) {
    switch (type) {
      case "saturation-lightness":
        this.hsva.onColorChange(event);
        break;
      case "hue":
        this.hsva.onHueChange(event);
        break;
      case "alpha":
        this.hsva.onAlphaChange(event);
        this.onAlphaChange.emit(event);
        break;
      case "value":
        this.hsva.onValueChange(event);
        break;
    }
    // this.sHue = this.hsva.h;
    this.update();
    this.setColor(this.outputColor);
  }
  setColor(color) {
    this.color = color;
    this.sliderChange.emit(this.color);
  }
  getBackgroundColor(color) {
    return {
      background: "linear-gradient(90deg, rgba(36,0,0,0) 0%, " + color + " 100%)"
    };
  }
  update() {
    this.hsva = this.color;
    if (this.sliderDimMax) {
      let rgba = this.service.hsvaToRgba(this.hsva).denormalize();
      let hue = this.service.hsvaToRgba(new Hsva(this.hsva.h, 1, 1, 1)).denormalize();
      this.hueSliderColor = "rgb(" + hue.r + "," + hue.g + "," + hue.b + ")";
      this.alphaSliderColor = "rgb(" + rgba.r + "," + rgba.g + "," + rgba.b + ")";
      this.outputColor = this.hsva;
      this.selectedColor = this.service.hsvaToRgba(this.hsva).toString();
      this.slider = new SliderPosition(
      // (this.sHue || this.hsva.h) * this.sliderDimMax.h - 8,
      this.hsva.h * this.sliderDimMax.h - 5, this.hsva.s * this.sliderDimMax.s - 8, (1 - this.hsva.v) * this.sliderDimMax.v - 8, this.hsva.a * this.sliderDimMax.a - 5);
      this.cdr.detectChanges();
    }
  }
}
ColorPickerComponent.ɵfac = function ColorPickerComponent_Factory(t) {
  return new (t || ColorPickerComponent)(core_["ɵɵdirectiveInject"](ConverterService), core_["ɵɵdirectiveInject"](core_.ChangeDetectorRef));
};
ColorPickerComponent.ɵcmp = /* @__PURE__ */core_["ɵɵdefineComponent"]({
  type: ColorPickerComponent,
  selectors: [["color-picker"]],
  viewQuery: function ColorPickerComponent_Query(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵviewQuery"](_c0, 5);
      core_["ɵɵviewQuery"](_c1, 5);
    }
    if (rf & 2) {
      let _t;
      core_["ɵɵqueryRefresh"](_t = core_["ɵɵloadQuery"]()) && (ctx.hueSlider = _t.first);
      core_["ɵɵqueryRefresh"](_t = core_["ɵɵloadQuery"]()) && (ctx.alphaSlider = _t.first);
    }
  },
  inputs: {
    color: "color",
    controls: "controls"
  },
  outputs: {
    sliderChange: "sliderChange",
    onAlphaChange: "onAlphaChange"
  },
  features: [core_["ɵɵNgOnChangesFeature"]],
  decls: 8,
  vars: 4,
  consts: [[1, "color-picker", 3, "click"], ["dialogPopup", ""], ["class", "saturation-lightness", 3, "slider", "rgX", "rgY", "background-color", "newValue", 4, "ngIf"], [1, "hue-alpha", "box"], ["class", "left", 4, "ngIf"], [1, "right"], ["class", "hue", 3, "slider", "rgX", "newValue", 4, "ngIf"], ["class", "alpha", 3, "slider", "rgX", "newValue", 4, "ngIf"], [1, "saturation-lightness", 3, "slider", "rgX", "rgY", "newValue"], [1, "cursor"], [1, "left"], [1, "selected-color-background"], [1, "selected-color"], [1, "hue", 3, "slider", "rgX", "newValue"], ["hueSlider", ""], [1, "sliderCursor"], [1, "alpha", 3, "slider", "rgX", "newValue"], ["alphaSlider", ""], [1, "alpha-gradient", 3, "ngStyle"]],
  template: function ColorPickerComponent_Template(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵelementStart"](0, "div", 0, 1);
      core_["ɵɵlistener"]("click", function ColorPickerComponent_Template_div_click_0_listener($event) {
        return $event.stopPropagation();
      });
      core_["ɵɵtemplate"](2, ColorPickerComponent_div_2_Template, 3, 8, "div", 2);
      core_["ɵɵelementStart"](3, "div", 3);
      core_["ɵɵtemplate"](4, ColorPickerComponent_div_4_Template, 3, 2, "div", 4);
      core_["ɵɵelementStart"](5, "div", 5);
      core_["ɵɵtemplate"](6, ColorPickerComponent_div_6_Template, 5, 3, "div", 6);
      core_["ɵɵtemplate"](7, ColorPickerComponent_div_7_Template, 6, 4, "div", 7);
      core_["ɵɵelementEnd"]()()();
    }
    if (rf & 2) {
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "only-alpha");
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "only-alpha");
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "only-alpha");
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "no-alpha");
    }
  },
  dependencies: [common_.NgIf, common_.NgStyle, SliderDirective],
  styles: [".color-picker{position:relative;z-index:1000;width:220px;height:auto;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:none}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .sliderCursor{width:10px;border-radius:5px;position:absolute;margin-top:-3px;border:1px solid black}.color-picker .sliderCursor>div{border:2px solid white;border-radius:5px}.color-picker .sliderCursor>div>div{border-radius:5px;border:1px solid black;height:24px}.color-picker .cursor{position:absolute;width:21px;border:3px solid black;border-radius:100%;margin:-2px 0 0 -2px}.color-picker .cursor>div{height:15px;border:3px solid white;border-radius:100%}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;display:flex;flex-direction:column;gap:10px;padding:12px 8px}.color-picker .hue-alpha{display:flex;align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:24px;border:none;border-radius:5px;position:relative;cursor:pointer;background-size:100% 100%;background:linear-gradient(to right,red 0%,#ff0 17%,lime 33%,cyan 50%,blue 66%,#f0f 83%,red 100%)}.color-picker .alpha{direction:ltr;position:relative;width:100%;height:24px;border:none;border-radius:5px;cursor:pointer;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .alpha-gradient{width:100%;height:100%;border-radius:5px;position:absolute}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;box-shadow:0 1px 1px 1px #00000026;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .saturation-lightness{direction:ltr;cursor:crosshair;width:100%;position:relative;height:130px;border:none;touch-action:manipulation;background-image:linear-gradient(to top,#000 0%,transparent 100%),linear-gradient(to right,#fff 0%,transparent 100%)}\n"],
  encapsulation: 2
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](ColorPickerComponent, [{
    type: core_.Component,
    args: [{
      selector: "color-picker",
      encapsulation: core_.ViewEncapsulation.None,
      template: "<div #dialogPopup class=\"color-picker\" (click)=\"$event.stopPropagation()\">\n  <div\n    class=\"saturation-lightness\"\n    *ngIf=\"this.controls != 'only-alpha'\"\n    [slider]\n    [rgX]=\"1\"\n    [rgY]=\"1\"\n    [style.background-color]=\"hueSliderColor\"\n    (newValue)=\"onSliderChange('saturation-lightness', $event)\"\n  >\n    <div class=\"cursor\" [style.top.px]=\"slider?.v\" [style.left.px]=\"slider?.s\">\n      <div></div>\n    </div>\n  </div>\n\n  <div class=\"hue-alpha box\">\n    <div class=\"left\" *ngIf=\"this.controls != 'only-alpha'\">\n      <div class=\"selected-color-background\"></div>\n      <div\n        class=\"selected-color\"\n        [style.background-color]=\"selectedColor\"\n      ></div>\n    </div>\n\n    <div class=\"right\">\n      <div\n        *ngIf=\"this.controls != 'only-alpha'\"\n        #hueSlider\n        class=\"hue\"\n        [slider]\n        [rgX]=\"1\"\n        (newValue)=\"onSliderChange('hue', $event)\"\n      >\n        <div class=\"sliderCursor\" [style.left.px]=\"slider?.h\">\n          <div><div></div></div>\n        </div>\n      </div>\n\n      <div\n        *ngIf=\"this.controls != 'no-alpha'\"\n        #alphaSlider\n        class=\"alpha\"\n        [slider]\n        [rgX]=\"1\"\n        (newValue)=\"onSliderChange('alpha', $event)\"\n      >\n        <div\n          class=\"alpha-gradient\"\n          [ngStyle]=\"getBackgroundColor(alphaSliderColor)\"\n        ></div>\n        <div class=\"sliderCursor\" [style.left.px]=\"slider?.a\">\n          <div><div></div></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
      styles: [".color-picker{position:relative;z-index:1000;width:220px;height:auto;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:none}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .sliderCursor{width:10px;border-radius:5px;position:absolute;margin-top:-3px;border:1px solid black}.color-picker .sliderCursor>div{border:2px solid white;border-radius:5px}.color-picker .sliderCursor>div>div{border-radius:5px;border:1px solid black;height:24px}.color-picker .cursor{position:absolute;width:21px;border:3px solid black;border-radius:100%;margin:-2px 0 0 -2px}.color-picker .cursor>div{height:15px;border:3px solid white;border-radius:100%}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;display:flex;flex-direction:column;gap:10px;padding:12px 8px}.color-picker .hue-alpha{display:flex;align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:24px;border:none;border-radius:5px;position:relative;cursor:pointer;background-size:100% 100%;background:linear-gradient(to right,red 0%,#ff0 17%,lime 33%,cyan 50%,blue 66%,#f0f 83%,red 100%)}.color-picker .alpha{direction:ltr;position:relative;width:100%;height:24px;border:none;border-radius:5px;cursor:pointer;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .alpha-gradient{width:100%;height:100%;border-radius:5px;position:absolute}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;box-shadow:0 1px 1px 1px #00000026;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .saturation-lightness{direction:ltr;cursor:crosshair;width:100%;position:relative;height:130px;border:none;touch-action:manipulation;background-image:linear-gradient(to top,#000 0%,transparent 100%),linear-gradient(to right,#fff 0%,transparent 100%)}\n"]
    }]
  }], function () {
    return [{
      type: ConverterService
    }, {
      type: core_.ChangeDetectorRef
    }];
  }, {
    color: [{
      type: core_.Input
    }],
    controls: [{
      type: core_.Input
    }],
    sliderChange: [{
      type: core_.Output
    }],
    onAlphaChange: [{
      type: core_.Output
    }],
    hueSlider: [{
      type: core_.ViewChild,
      args: ["hueSlider", {
        static: false
      }]
    }],
    alphaSlider: [{
      type: core_.ViewChild,
      args: ["alphaSlider", {
        static: false
      }]
    }]
  });
})();
class PanelComponent {
  click(event) {
    if (this.isOutside(event)) {
      this.emitClose("cancel");
    }
  }
  onScroll() {
    this.onScreenMovement();
  }
  onResize() {
    this.onScreenMovement();
  }
  constructor(service, cdr) {
    this.service = service;
    this.cdr = cdr;
    this.color = "#000000";
    this.previewColor = "#000000";
    this.hsva = new Hsva(0, 1, 1, 1);
    this.colorsAnimationEffect = "slide-in";
    this.palette = defaultColors;
    this.variants = [];
    this.colorFormats = formats;
    this.format = ColorFormats.HEX;
    this.canChangeFormat = true;
    this.menu = 1;
    this.hideColorPicker = false;
    this.hideTextInput = false;
    this.colorPickerControls = "default";
  }
  ngOnInit() {
    this.setPosition();
    this.hsva = this.service.stringToHsva(this.color);
    this.indexSeleccionado = this.findIndexSelectedColor(this.palette);
  }
  ngAfterViewInit() {
    this.setPositionY();
  }
  onScreenMovement() {
    this.setPosition();
    this.setPositionY();
    if (!this.panelRef.nativeElement.style.transition) {
      this.panelRef.nativeElement.style.transition = "transform 0.5s ease-out";
    }
  }
  findIndexSelectedColor(colors) {
    let resultIndex = undefined;
    if (this.color) {
      for (let i = 0; i < colors.length; i++) {
        const color = colors[i];
        if (typeof color == "string") {
          if (this.service.stringToFormat(this.color, ColorFormats.HEX) == this.service.stringToFormat(color, ColorFormats.HEX)) {
            resultIndex = i;
          }
        } else if (color === undefined) {
          this.color = undefined;
        } else {
          if (this.findIndexSelectedColor(color.variants) != undefined) {
            resultIndex = i;
          }
        }
      }
    }
    return resultIndex;
  }
  iniciate(triggerInstance, triggerElementRef, color, palette, animation, format, hideTextInput, hideColorPicker, acceptLabel, cancelLabel, colorPickerControls, position) {
    this.colorPickerControls = colorPickerControls;
    this.triggerInstance = triggerInstance;
    this.TriggerBBox = triggerElementRef;
    this.color = color;
    this.hideColorPicker = hideColorPicker;
    this.hideTextInput = hideTextInput;
    this.acceptLabel = acceptLabel;
    this.cancelLabel = cancelLabel;
    if (format) {
      if (formats.includes(format)) {
        this.format = formats.indexOf(format.toLowerCase());
        this.canChangeFormat = false;
        if (this.service.getFormatByString(this.color) != format.toLowerCase()) {
          this.setColor(this.service.stringToHsva(this.color));
        }
      } else {
        console.error("Format provided is invalid, using HEX");
        this.format = ColorFormats.HEX;
      }
    } else {
      this.format = formats.indexOf(this.service.getFormatByString(this.color));
    }
    this.previewColor = this.color;
    this.palette = palette !== null && palette !== void 0 ? palette : defaultColors;
    this.colorsAnimationEffect = animation;
    if (position == "top") {
      let TriggerBBox = this.TriggerBBox.nativeElement.getBoundingClientRect();
      this.positionString = "transform: translateY(calc( -100% - " + TriggerBBox.height + "px ))";
    }
  }
  setPosition() {
    if (this.TriggerBBox) {
      const panelWidth = 250;
      const viewportOffset = this.TriggerBBox.nativeElement.getBoundingClientRect();
      this.top = viewportOffset.top + viewportOffset.height;
      if (viewportOffset.left + panelWidth > window.innerWidth) {
        this.left = viewportOffset.right < panelWidth ? window.innerWidth / 2 - panelWidth / 2 : viewportOffset.right - panelWidth;
      } else {
        this.left = viewportOffset.left;
      }
    }
  }
  setPositionY() {
    const triggerBBox = this.TriggerBBox.nativeElement.getBoundingClientRect();
    const panelBBox = this.panelRef.nativeElement.getBoundingClientRect();
    const panelHeight = panelBBox.height;
    // Check for space below the trigger
    if (triggerBBox.bottom + panelHeight > window.innerHeight) {
      // there is no space, move panel over the trigger
      this.positionString = triggerBBox.top < panelBBox.height ? "transform: translateY(-" + triggerBBox.bottom + "px );" : "transform: translateY(calc( -100% - " + triggerBBox.height + "px ));";
    } else {
      this.positionString = "";
    }
    this.cdr.detectChanges();
  }
  hasVariant(color) {
    if (!this.previewColor) {
      return false;
    }
    return typeof color != "string" && color.variants.some(v => v.toUpperCase() == this.previewColor.toUpperCase());
  }
  isSelected(color) {
    if (!this.previewColor) {
      return false;
    }
    return typeof color == "string" && color.toUpperCase() == this.previewColor.toUpperCase();
  }
  getBackgroundColor(color) {
    if (typeof color == "string") {
      return {
        background: color
      };
    } else {
      return {
        background: color === null || color === void 0 ? void 0 : color.preview
      };
    }
  }
  onAlphaChange(event) {
    this.palette = this.ChangeAlphaOnPalette(event, this.palette);
  }
  ChangeAlphaOnPalette(alpha, colors) {
    var result = [];
    for (let i = 0; i < colors.length; i++) {
      const color = colors[i];
      if (typeof color == "string") {
        let newColor = this.service.stringToHsva(color);
        newColor.onAlphaChange(alpha);
        result.push(this.service.toFormat(newColor, this.format));
      } else {
        let newColor = new NgxColor();
        let newColorPreview = this.service.stringToHsva(color.preview);
        newColorPreview.onAlphaChange(alpha);
        newColor.preview = this.service.toFormat(newColorPreview, this.format);
        newColor.variants = this.ChangeAlphaOnPalette(alpha, color.variants);
        result.push(newColor);
      }
    }
    return result;
  }
  /**
   * Change color from default colors
   * @param string color
   */
  changeColor(color) {
    this.setColor(this.service.stringToHsva(color));
    // this.triggerInstance.onChange();
    this.emitClose("accept");
  }
  onChangeColorPicker(event) {
    this.temporalColor = event;
    this.color = this.service.toFormat(event, this.format);
    // this.setColor(event);
    this.triggerInstance.sliderChange(this.service.toFormat(event, this.format));
  }
  changeColorManual(color) {
    this.previewColor = color;
    this.color = color;
    this.hsva = this.service.stringToHsva(color);
    this.temporalColor = this.hsva;
    this.triggerInstance.setColor(this.color);
    // this.triggerInstance.onChange();
  }
  setColor(value) {
    this.hsva = value;
    this.color = this.service.toFormat(value, this.format);
    this.setPreviewColor(value);
    this.triggerInstance.setColor(this.color);
  }
  setPreviewColor(value) {
    this.previewColor = value ? this.service.hsvaToRgba(value).toString() : undefined;
  }
  onChange() {
    // this.triggerInstance.onChange();
  }
  onColorClick(color) {
    if (typeof color == "string" || color === undefined) {
      this.changeColor(color);
    } else {
      this.variants = color.variants;
      this.menu = 2;
    }
  }
  addColor() {
    this.menu = 3;
    this.backupColor = this.color;
    // this.color = "#FF0000";
    this.temporalColor = this.service.stringToHsva(this.color);
  }
  nextFormat() {
    if (this.canChangeFormat) {
      this.format = (this.format + 1) % this.colorFormats.length;
      this.setColor(this.hsva);
    }
  }
  emitClose(status) {
    if (this.menu == 3) {
      if (status == "cancel") {} else if (status == "accept") {
        this.setColor(this.temporalColor);
      }
    }
    this.triggerInstance.close();
  }
  onClickBack() {
    if (this.menu == 3) {
      this.color = this.backupColor;
      this.hsva = this.service.stringToHsva(this.color);
    }
    this.indexSeleccionado = this.findIndexSelectedColor(this.palette);
    this.menu = 1;
  }
  isOutside(event) {
    return event.target.classList.contains("ngx-colors-overlay");
  }
}
PanelComponent.ɵfac = function PanelComponent_Factory(t) {
  return new (t || PanelComponent)(core_["ɵɵdirectiveInject"](ConverterService), core_["ɵɵdirectiveInject"](core_.ChangeDetectorRef));
};
PanelComponent.ɵcmp = /* @__PURE__ */core_["ɵɵdefineComponent"]({
  type: PanelComponent,
  selectors: [["ngx-colors-panel"]],
  viewQuery: function PanelComponent_Query(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵviewQuery"](_c2, 5);
    }
    if (rf & 2) {
      let _t;
      core_["ɵɵqueryRefresh"](_t = core_["ɵɵloadQuery"]()) && (ctx.panelRef = _t.first);
    }
  },
  hostVars: 4,
  hostBindings: function PanelComponent_HostBindings(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵlistener"]("mousedown", function PanelComponent_mousedown_HostBindingHandler($event) {
        return ctx.click($event);
      }, false, core_["ɵɵresolveDocument"])("scroll", function PanelComponent_scroll_HostBindingHandler() {
        return ctx.onScroll();
      }, false, core_["ɵɵresolveDocument"])("resize", function PanelComponent_resize_HostBindingHandler() {
        return ctx.onResize();
      }, false, core_["ɵɵresolveWindow"]);
    }
    if (rf & 2) {
      core_["ɵɵstyleProp"]("top", ctx.top, "px")("left", ctx.left, "px");
    }
  },
  decls: 6,
  vars: 6,
  consts: [[1, "opened"], ["dialog", ""], [4, "ngIf"], ["class", "manual-input-wrapper", 4, "ngIf"], [1, "colors"], [4, "ngFor", "ngForOf"], ["style", "background: rgb(245 245 245); position: relative", "class", "circle button", 3, "click", 4, "ngIf"], [3, "controls", "color", "colorChange", "onAlphaChange", 4, "ngIf"], [1, "circle", "wrapper", "color"], [1, "circle", "color", "circle-border", 3, "ngStyle", "click"], ["class", "selected", 4, "ngIf"], [1, "selected"], [1, "circle", "button", 2, "background", "rgb(245 245 245)", "position", "relative", 3, "click"], ["style", "\n            position: absolute;\n            height: 7px;\n            width: 7px;\n            border: 1px solid rgba(0, 0, 0, 0.03);\n            border-radius: 100%;\n            top: 0;\n            right: 0;\n          ", 3, "ngStyle", 4, "ngIf"], ["xmlns", "http://www.w3.org/2000/svg", "height", "24px", "viewBox", "0 0 24 24", "width", "24px", "fill", "#222222"], ["d", "M24 24H0V0h24v24z", "fill", "none", "opacity", ".87"], ["d", "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"], [2, "position", "absolute", "height", "7px", "width", "7px", "border", "1px solid rgba(0, 0, 0, 0.03)", "border-radius", "100%", "top", "0", "right", "0", 3, "ngStyle"], [3, "controls", "color", "colorChange", "onAlphaChange"], [1, "circle", "wrapper"], [1, "add", 3, "click"], ["xmlns", "http://www.w3.org/2000/svg", "width", "24", "height", "24", "viewBox", "0 0 24 24"], ["d", "M0 0h24v24H0z", "fill", "none"], ["d", "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"], [1, "circle", "circle-border", 3, "ngStyle", "click"], [1, "nav-wrapper"], [1, "round-button", "button", 2, "float", "left", 3, "click"], [2, "float", "right", 3, "click"], [1, "color-picker-wrapper"], [3, "controls", "color", "sliderChange"], [1, "manual-input-wrapper"], [3, "click"], [1, "g-input"], ["placeholder", "#FFFFFF", "type", "text", 3, "value", "keyup", "keydown.enter"], ["paintInput", ""]],
  template: function PanelComponent_Template(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵelementStart"](0, "div", 0, 1);
      core_["ɵɵtemplate"](2, PanelComponent_ng_container_2_Template, 5, 4, "ng-container", 2);
      core_["ɵɵtemplate"](3, PanelComponent_ng_container_3_Template, 8, 2, "ng-container", 2);
      core_["ɵɵtemplate"](4, PanelComponent_ng_container_4_Template, 12, 4, "ng-container", 2);
      core_["ɵɵtemplate"](5, PanelComponent_div_5_Template, 6, 6, "div", 3);
      core_["ɵɵelementEnd"]();
    }
    if (rf & 2) {
      core_["ɵɵstyleMap"](ctx.positionString);
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.menu == 1);
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", ctx.menu == 2);
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", ctx.menu == 3);
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", !ctx.hideTextInput);
    }
  },
  dependencies: [common_.NgForOf, common_.NgIf, common_.NgStyle, ColorPickerComponent],
  styles: ["[_nghost-%COMP%]{position:fixed;z-index:2001}.hidden[_ngcontent-%COMP%]{display:none}.button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.top[_ngcontent-%COMP%]{transform:translateY(-100%)}.opened[_ngcontent-%COMP%]{box-sizing:border-box;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background:#fff;width:250px;border-radius:5px;position:absolute}.opened[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border:none;font-family:inherit;font-size:12px;background-color:unset;-webkit-user-select:none;user-select:none;padding:10px;letter-spacing:1px;color:#222;border-radius:3px;line-height:20px}.opened[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .opened[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:hover{background-color:#0000000d;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1);transition-property:opacity,background-color;transition-duration:.2s,.2s;transition-timing-function:cubic-bezier(.35,0,.25,1),cubic-bezier(.35,0,.25,1);transition-delay:0s,0s}.opened[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus{outline:none}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;margin:15px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]{height:34px;width:34px;box-sizing:border-box;border-radius:100%;cursor:pointer}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]   .add[_ngcontent-%COMP%]{font-size:20px;line-height:45px;text-align:center}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]   .selected[_ngcontent-%COMP%]{border:2px solid white;border-radius:100%;height:28px;width:28px;box-sizing:border-box;margin:2px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.colornull[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.wrapper[_ngcontent-%COMP%]{margin:0 5px 5px;flex:34px 0 0}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.button[_ngcontent-%COMP%]{margin:0 5px 5px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.wrapper.color[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle-border[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.03)}.opened[_ngcontent-%COMP%]   .color-picker-wrapper[_ngcontent-%COMP%]{margin:5px 15px}.opened[_ngcontent-%COMP%]   .nav-wrapper[_ngcontent-%COMP%]{overflow:hidden;margin:5px}.opened[_ngcontent-%COMP%]   .nav-wrapper[_ngcontent-%COMP%]   .round-button[_ngcontent-%COMP%]{padding:5px 0;width:40px;height:40px;box-sizing:border-box;border-radius:100%;text-align:center;line-height:45px}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]{display:flex;margin:15px;font-family:sans-serif}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;text-align:center;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;line-height:48px;width:145px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]   .g-input[_ngcontent-%COMP%]{border:1px solid #e8ebed;height:45px;border-radius:5px;width:100%}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]   .g-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{font-size:9px;border:none;width:100%;text-transform:uppercase;outline:none;text-align:center;letter-spacing:1px;color:#595b65;height:100%;border-radius:5px;margin:0;padding:0}"],
  data: {
    animation: [(0,animations_.trigger)("colorsAnimation", [(0,animations_.transition)("void => slide-in", [
    // Initially all colors are hidden
    (0,animations_.query)(":enter", (0,animations_.style)({
      opacity: 0
    }), {
      optional: true
    }),
    //slide-in animation
    (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)(".3s ease-in", (0,animations_.keyframes)([(0,animations_.style)({
      opacity: 0,
      transform: "translatex(-50%)",
      offset: 0
    }), (0,animations_.style)({
      opacity: 0.5,
      transform: "translatex(-10px) scale(1.1)",
      offset: 0.3
    }), (0,animations_.style)({
      opacity: 1,
      transform: "translatex(0)",
      offset: 1
    })]))]), {
      optional: true
    })]),
    //popup animation
    (0,animations_.transition)("void => popup", [(0,animations_.query)(":enter", (0,animations_.style)({
      opacity: 0,
      transform: "scale(0)"
    }), {
      optional: true
    }), (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)("500ms ease-out", (0,animations_.keyframes)([(0,animations_.style)({
      opacity: 0.5,
      transform: "scale(.5)",
      offset: 0.3
    }), (0,animations_.style)({
      opacity: 1,
      transform: "scale(1.1)",
      offset: 0.8
    }), (0,animations_.style)({
      opacity: 1,
      transform: "scale(1)",
      offset: 1
    })]))]), {
      optional: true
    })])])]
  }
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](PanelComponent, [{
    type: core_.Component,
    args: [{
      selector: "ngx-colors-panel",
      animations: [(0,animations_.trigger)("colorsAnimation", [(0,animations_.transition)("void => slide-in", [
      // Initially all colors are hidden
      (0,animations_.query)(":enter", (0,animations_.style)({
        opacity: 0
      }), {
        optional: true
      }),
      //slide-in animation
      (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)(".3s ease-in", (0,animations_.keyframes)([(0,animations_.style)({
        opacity: 0,
        transform: "translatex(-50%)",
        offset: 0
      }), (0,animations_.style)({
        opacity: 0.5,
        transform: "translatex(-10px) scale(1.1)",
        offset: 0.3
      }), (0,animations_.style)({
        opacity: 1,
        transform: "translatex(0)",
        offset: 1
      })]))]), {
        optional: true
      })]),
      //popup animation
      (0,animations_.transition)("void => popup", [(0,animations_.query)(":enter", (0,animations_.style)({
        opacity: 0,
        transform: "scale(0)"
      }), {
        optional: true
      }), (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)("500ms ease-out", (0,animations_.keyframes)([(0,animations_.style)({
        opacity: 0.5,
        transform: "scale(.5)",
        offset: 0.3
      }), (0,animations_.style)({
        opacity: 1,
        transform: "scale(1.1)",
        offset: 0.8
      }), (0,animations_.style)({
        opacity: 1,
        transform: "scale(1)",
        offset: 1
      })]))]), {
        optional: true
      })])])],
      template: "<div class=\"opened\" [style]=\"positionString\" #dialog>\n  <ng-container *ngIf=\"menu == 1\">\n    <div class=\"colors\" [@colorsAnimation]=\"colorsAnimationEffect\">\n      <ng-container *ngFor=\"let color of palette; let i = index\">\n        <div class=\"circle wrapper color\">\n          <div\n            (click)=\"onColorClick(color)\"\n            class=\"circle color circle-border\"\n            [class.colornull]=\"!color\"\n            [ngStyle]=\"getBackgroundColor(color)\"\n          >\n            <div *ngIf=\"i == this.indexSeleccionado\" class=\"selected\"></div>\n          </div>\n        </div>\n      </ng-container>\n      <div\n        style=\"background: rgb(245 245 245); position: relative\"\n        (click)=\"addColor()\"\n        *ngIf=\"!hideColorPicker && this.colorPickerControls != 'only-alpha'\"\n        class=\"circle button\"\n      >\n        <div\n          *ngIf=\"!this.indexSeleccionado\"\n          style=\"\n            position: absolute;\n            height: 7px;\n            width: 7px;\n            border: 1px solid rgba(0, 0, 0, 0.03);\n            border-radius: 100%;\n            top: 0;\n            right: 0;\n          \"\n          [ngStyle]=\"getBackgroundColor(color)\"\n        ></div>\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          height=\"24px\"\n          viewBox=\"0 0 24 24\"\n          width=\"24px\"\n          fill=\"#222222\"\n        >\n          <path d=\"M24 24H0V0h24v24z\" fill=\"none\" opacity=\".87\" />\n          <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z\" />\n        </svg>\n        <!-- <div class=\"add\">\n          <icons icon=\"add\"></icons>\n        </div> -->\n      </div>\n      <color-picker\n        *ngIf=\"!hideColorPicker && this.colorPickerControls == 'only-alpha'\"\n        [controls]=\"colorPickerControls\"\n        [color]=\"hsva\"\n        (colorChange)=\"onChangeColorPicker($event)\"\n        (onAlphaChange)=\"onAlphaChange($event)\"\n      ></color-picker>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"menu == 2\">\n    <div class=\"colors\" [@colorsAnimation]=\"colorsAnimationEffect\">\n      <div class=\"circle wrapper\">\n        <div (click)=\"onClickBack()\" class=\"add\">\n          <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            width=\"24\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n          >\n            <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n            <path\n              d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n            />\n          </svg>\n        </div>\n      </div>\n\n      <ng-container *ngFor=\"let variant of variants\">\n        <div class=\"circle wrapper color\">\n          <div\n            [class.colornull]=\"!variant\"\n            (click)=\"changeColor(variant)\"\n            class=\"circle circle-border\"\n            [ngStyle]=\"{ background: variant }\"\n          >\n            <div *ngIf=\"isSelected(variant)\" class=\"selected\"></div>\n          </div>\n        </div>\n      </ng-container>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"menu == 3\">\n    <div class=\"nav-wrapper\">\n      <div\n        (click)=\"onClickBack()\"\n        class=\"round-button button\"\n        style=\"float: left\"\n      >\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          width=\"24\"\n          height=\"24\"\n          viewBox=\"0 0 24 24\"\n        >\n          <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n          <path\n            d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n          />\n        </svg>\n      </div>\n      <button (click)=\"emitClose('cancel')\" style=\"float: right\">\n        {{ cancelLabel }}\n      </button>\n      <button (click)=\"emitClose('accept')\" style=\"float: right\">\n        {{ acceptLabel }}\n      </button>\n    </div>\n    <div class=\"color-picker-wrapper\">\n      <!-- <span [(colorPicker)]=\"color\"></span> -->\n      <color-picker\n        [controls]=\"colorPickerControls\"\n        [color]=\"hsva\"\n        (sliderChange)=\"onChangeColorPicker($event)\"\n      ></color-picker>\n    </div>\n  </ng-container>\n  <div class=\"manual-input-wrapper\" *ngIf=\"!hideTextInput\">\n    <p (click)=\"nextFormat()\">{{ colorFormats[format] }}</p>\n    <div class=\"g-input\">\n      <input\n        placeholder=\"#FFFFFF\"\n        type=\"text\"\n        [value]=\"color\"\n        [style.font-size.px]=\"color && color.length > 23 ? 9 : 10\"\n        [style.letter-spacing.px]=\"color && color.length > 16 ? 0 : 1.5\"\n        (keyup)=\"changeColorManual(paintInput.value)\"\n        (keydown.enter)=\"emitClose('accept')\"\n        #paintInput\n      />\n    </div>\n  </div>\n</div>\n",
      styles: [":host{position:fixed;z-index:2001}.hidden{display:none}.button{display:flex;align-items:center;justify-content:center}.top{transform:translateY(-100%)}.opened{box-sizing:border-box;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background:#fff;width:250px;border-radius:5px;position:absolute}.opened button{border:none;font-family:inherit;font-size:12px;background-color:unset;-webkit-user-select:none;user-select:none;padding:10px;letter-spacing:1px;color:#222;border-radius:3px;line-height:20px}.opened button:hover,.opened .button:hover{background-color:#0000000d;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1);transition-property:opacity,background-color;transition-duration:.2s,.2s;transition-timing-function:cubic-bezier(.35,0,.25,1),cubic-bezier(.35,0,.25,1);transition-delay:0s,0s}.opened button:focus{outline:none}.opened .colors{display:flex;flex-wrap:wrap;align-items:center;margin:15px}.opened .colors .circle{height:34px;width:34px;box-sizing:border-box;border-radius:100%;cursor:pointer}.opened .colors .circle .add{font-size:20px;line-height:45px;text-align:center}.opened .colors .circle .selected{border:2px solid white;border-radius:100%;height:28px;width:28px;box-sizing:border-box;margin:2px}.opened .colors .circle.colornull{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}.opened .colors .circle.wrapper{margin:0 5px 5px;flex:34px 0 0}.opened .colors .circle.button{margin:0 5px 5px}.opened .colors .circle.wrapper.color{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.opened .colors .circle-border{border:1px solid rgba(0,0,0,.03)}.opened .color-picker-wrapper{margin:5px 15px}.opened .nav-wrapper{overflow:hidden;margin:5px}.opened .nav-wrapper .round-button{padding:5px 0;width:40px;height:40px;box-sizing:border-box;border-radius:100%;text-align:center;line-height:45px}.opened .manual-input-wrapper{display:flex;margin:15px;font-family:sans-serif}.opened .manual-input-wrapper p{margin:0;text-align:center;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;line-height:48px;width:145px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.opened .manual-input-wrapper .g-input{border:1px solid #e8ebed;height:45px;border-radius:5px;width:100%}.opened .manual-input-wrapper .g-input input{font-size:9px;border:none;width:100%;text-transform:uppercase;outline:none;text-align:center;letter-spacing:1px;color:#595b65;height:100%;border-radius:5px;margin:0;padding:0}\n"]
    }]
  }], function () {
    return [{
      type: ConverterService
    }, {
      type: core_.ChangeDetectorRef
    }];
  }, {
    click: [{
      type: core_.HostListener,
      args: ["document:mousedown", ["$event"]]
    }],
    onScroll: [{
      type: core_.HostListener,
      args: ["document:scroll"]
    }],
    onResize: [{
      type: core_.HostListener,
      args: ["window:resize"]
    }],
    top: [{
      type: core_.HostBinding,
      args: ["style.top.px"]
    }],
    left: [{
      type: core_.HostBinding,
      args: ["style.left.px"]
    }],
    panelRef: [{
      type: core_.ViewChild,
      args: ["dialog"]
    }]
  });
})();
const OVERLAY_STYLES = {
  position: 'fixed',
  height: '100%',
  width: '100%',
  'z-index': 2000,
  top: 0,
  left: 0
};
class PanelFactoryService {
  constructor(resolver, applicationRef, injector) {
    this.resolver = resolver;
    this.applicationRef = applicationRef;
    this.injector = injector;
  }
  createPanel(attachTo, overlayClassName) {
    if (this.componentRef != undefined) {
      this.removePanel();
    }
    const factory = this.resolver.resolveComponentFactory(PanelComponent);
    this.componentRef = factory.create(this.injector);
    this.applicationRef.attachView(this.componentRef.hostView);
    const domElem = this.componentRef.hostView.rootNodes[0];
    this.overlay = document.createElement("div");
    this.overlay.id = "ngx-colors-overlay";
    this.overlay.classList.add("ngx-colors-overlay");
    this.overlay.classList.add(overlayClassName);
    Object.keys(OVERLAY_STYLES).forEach(attr => {
      this.overlay.style[attr] = OVERLAY_STYLES[attr];
    });
    if (attachTo) {
      document.getElementById(attachTo).appendChild(this.overlay);
    } else {
      document.body.appendChild(this.overlay);
    }
    this.overlay.appendChild(domElem);
    return this.componentRef;
  }
  removePanel() {
    this.applicationRef.detachView(this.componentRef.hostView);
    this.componentRef.destroy();
    this.overlay.remove();
  }
}
PanelFactoryService.ɵfac = function PanelFactoryService_Factory(t) {
  return new (t || PanelFactoryService)(core_["ɵɵinject"](core_.ComponentFactoryResolver), core_["ɵɵinject"](core_.ApplicationRef), core_["ɵɵinject"](core_.Injector));
};
PanelFactoryService.ɵprov = /* @__PURE__ */core_["ɵɵdefineInjectable"]({
  token: PanelFactoryService,
  factory: PanelFactoryService.ɵfac
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](PanelFactoryService, [{
    type: core_.Injectable
  }], function () {
    return [{
      type: core_.ComponentFactoryResolver
    }, {
      type: core_.ApplicationRef
    }, {
      type: core_.Injector
    }];
  }, null);
})();
class NgxColorsTriggerDirective {
  onClick() {
    this.open();
  }
  constructor(triggerRef, panelFactory) {
    this.triggerRef = triggerRef;
    this.panelFactory = panelFactory;
    //Main input/output of the color picker
    // @Input() color = '#000000';
    // @Output() colorChange:EventEmitter<string> = new EventEmitter<string>();
    this.color = "";
    //This defines the type of animation for the palatte.(slide-in | popup)
    this.colorsAnimation = "slide-in";
    this.position = "bottom";
    this.attachTo = undefined;
    this.overlayClassName = undefined;
    this.colorPickerControls = "default";
    this.acceptLabel = "ACCEPT";
    this.cancelLabel = "CANCEL";
    // This event is trigger every time the selected color change
    this.change = new core_.EventEmitter();
    // This event is trigger every time the user change the color using the panel
    this.input = new core_.EventEmitter();
    // This event is trigger every time the user change the color using the panel
    this.slider = new core_.EventEmitter();
    this.isDisabled = false;
    this.onTouchedCallback = () => {};
    this.onChangeCallback = () => {};
  }
  open() {
    if (!this.isDisabled) {
      this.panelRef = this.panelFactory.createPanel(this.attachTo, this.overlayClassName);
      this.panelRef.instance.iniciate(this, this.triggerRef, this.color, this.palette, this.colorsAnimation, this.format, this.hideTextInput, this.hideColorPicker, this.acceptLabel, this.cancelLabel, this.colorPickerControls, this.position);
    }
  }
  close() {
    this.panelFactory.removePanel();
    this.onTouchedCallback();
  }
  onChange() {
    this.onChangeCallback(this.color);
  }
  setDisabledState(isDisabled) {
    this.isDisabled = isDisabled;
    this.triggerRef.nativeElement.style.opacity = isDisabled ? 0.5 : 1;
  }
  setColor(color) {
    this.writeValue(color);
    this.input.emit(color);
  }
  sliderChange(color) {
    this.slider.emit(color);
  }
  get value() {
    return this.color;
  }
  set value(value) {
    this.setColor(value);
    this.onChangeCallback(value);
  }
  writeValue(value) {
    if (value !== this.color) {
      this.color = value;
      this.onChange();
      this.change.emit(value);
    }
  }
  registerOnChange(fn) {
    this.onChangeCallback = fn;
  }
  registerOnTouched(fn) {
    this.onTouchedCallback = fn;
  }
}
NgxColorsTriggerDirective.ɵfac = function NgxColorsTriggerDirective_Factory(t) {
  return new (t || NgxColorsTriggerDirective)(core_["ɵɵdirectiveInject"](core_.ElementRef), core_["ɵɵdirectiveInject"](PanelFactoryService));
};
NgxColorsTriggerDirective.ɵdir = /* @__PURE__ */core_["ɵɵdefineDirective"]({
  type: NgxColorsTriggerDirective,
  selectors: [["", "ngx-colors-trigger", ""]],
  hostBindings: function NgxColorsTriggerDirective_HostBindings(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵlistener"]("click", function NgxColorsTriggerDirective_click_HostBindingHandler() {
        return ctx.onClick();
      });
    }
  },
  inputs: {
    colorsAnimation: "colorsAnimation",
    palette: "palette",
    format: "format",
    position: "position",
    hideTextInput: "hideTextInput",
    hideColorPicker: "hideColorPicker",
    attachTo: "attachTo",
    overlayClassName: "overlayClassName",
    colorPickerControls: "colorPickerControls",
    acceptLabel: "acceptLabel",
    cancelLabel: "cancelLabel"
  },
  outputs: {
    change: "change",
    input: "input",
    slider: "slider"
  },
  features: [core_["ɵɵProvidersFeature"]([{
    provide: forms_.NG_VALUE_ACCESSOR,
    useExisting: (0,core_.forwardRef)(() => NgxColorsTriggerDirective),
    multi: true
  }])]
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxColorsTriggerDirective, [{
    type: core_.Directive,
    args: [{
      selector: "[ngx-colors-trigger]",
      providers: [{
        provide: forms_.NG_VALUE_ACCESSOR,
        useExisting: (0,core_.forwardRef)(() => NgxColorsTriggerDirective),
        multi: true
      }]
    }]
  }], function () {
    return [{
      type: core_.ElementRef
    }, {
      type: PanelFactoryService
    }];
  }, {
    colorsAnimation: [{
      type: core_.Input
    }],
    palette: [{
      type: core_.Input
    }],
    format: [{
      type: core_.Input
    }],
    position: [{
      type: core_.Input
    }],
    hideTextInput: [{
      type: core_.Input
    }],
    hideColorPicker: [{
      type: core_.Input
    }],
    attachTo: [{
      type: core_.Input
    }],
    overlayClassName: [{
      type: core_.Input
    }],
    colorPickerControls: [{
      type: core_.Input
    }],
    acceptLabel: [{
      type: core_.Input
    }],
    cancelLabel: [{
      type: core_.Input
    }],
    change: [{
      type: core_.Output
    }],
    input: [{
      type: core_.Output
    }],
    slider: [{
      type: core_.Output
    }],
    onClick: [{
      type: core_.HostListener,
      args: ["click"]
    }]
  });
})();
class NgxColorsComponent {
  constructor(cdRef, triggerDirective) {
    this.cdRef = cdRef;
    this.triggerDirective = triggerDirective;
    this.triggerDirectiveColorChangeSubscription = null;
    //IO color
    this.color = this.triggerDirective.color;
  }
  ngOnInit() {
    this.triggerDirectiveColorChangeSubscription = this.triggerDirective.change.subscribe(color => {
      this.color = color;
      this.cdRef.markForCheck();
    });
  }
  ngOnDestroy() {
    if (this.triggerDirectiveColorChangeSubscription) {
      this.triggerDirectiveColorChangeSubscription.unsubscribe();
    }
  }
}
NgxColorsComponent.ɵfac = function NgxColorsComponent_Factory(t) {
  return new (t || NgxColorsComponent)(core_["ɵɵdirectiveInject"](core_.ChangeDetectorRef), core_["ɵɵdirectiveInject"](NgxColorsTriggerDirective, 1));
};
NgxColorsComponent.ɵcmp = /* @__PURE__ */core_["ɵɵdefineComponent"]({
  type: NgxColorsComponent,
  selectors: [["ngx-colors"]],
  decls: 4,
  vars: 5,
  consts: [[1, "app-color-picker"], [1, "preview"], [1, "preview-background"], [1, "circle", 3, "ngStyle"]],
  template: function NgxColorsComponent_Template(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
      core_["ɵɵelement"](3, "div", 3);
      core_["ɵɵelementEnd"]()()();
    }
    if (rf & 2) {
      core_["ɵɵadvance"](3);
      core_["ɵɵclassProp"]("colornull", !ctx.color);
      core_["ɵɵproperty"]("ngStyle", core_["ɵɵpureFunction1"](3, _c3, ctx.color));
    }
  },
  dependencies: [common_.NgStyle],
  styles: ["[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]{line-height:1px;font-family:sans-serif}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]{margin:2px;display:inline-block;box-sizing:border-box;border-radius:100%;background:white;cursor:pointer;padding:3px;box-shadow:0 1px 1px #0003,0 1px 1px 1px #00000024,0 1px 1px 1px #0000001f}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .preview-background[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px;border-radius:100%}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]{height:20px;width:20px;box-sizing:border-box;border-radius:100%;cursor:pointer}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .circle.colornull[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .noselected[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}"]
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxColorsComponent, [{
    type: core_.Component,
    args: [{
      selector: 'ngx-colors',
      template: "<div class=\"app-color-picker\">\n  <div class=\"preview\">\n    <div class=\"preview-background\">\n      <div\n        class=\"circle\"\n        [class.colornull]=\"!color\"\n        [ngStyle]=\"{ background: color }\"\n      ></div>\n    </div>\n  </div>\n</div>\n",
      styles: [":host .app-color-picker{line-height:1px;font-family:sans-serif}:host .app-color-picker .preview{margin:2px;display:inline-block;box-sizing:border-box;border-radius:100%;background:white;cursor:pointer;padding:3px;box-shadow:0 1px 1px #0003,0 1px 1px 1px #00000024,0 1px 1px 1px #0000001f}:host .app-color-picker .preview .preview-background{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px;border-radius:100%}:host .app-color-picker .preview .circle{height:20px;width:20px;box-sizing:border-box;border-radius:100%;cursor:pointer}:host .app-color-picker .preview .circle.colornull{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}:host .app-color-picker .preview .noselected{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}\n"]
    }]
  }], function () {
    return [{
      type: core_.ChangeDetectorRef
    }, {
      type: NgxColorsTriggerDirective,
      decorators: [{
        type: core_.Host
      }]
    }];
  }, null);
})();
class NgxColorsModule {}
NgxColorsModule.ɵfac = function NgxColorsModule_Factory(t) {
  return new (t || NgxColorsModule)();
};
NgxColorsModule.ɵmod = /* @__PURE__ */core_["ɵɵdefineNgModule"]({
  type: NgxColorsModule,
  declarations: [NgxColorsComponent, ColorPickerComponent, SliderDirective, PanelComponent, NgxColorsTriggerDirective],
  imports: [common_.CommonModule],
  exports: [NgxColorsComponent, NgxColorsTriggerDirective]
});
NgxColorsModule.ɵinj = /* @__PURE__ */core_["ɵɵdefineInjector"]({
  providers: [ConverterService, PanelFactoryService],
  imports: [common_.CommonModule]
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxColorsModule, [{
    type: core_.NgModule,
    args: [{
      declarations: [NgxColorsComponent, ColorPickerComponent, SliderDirective, PanelComponent, NgxColorsTriggerDirective],
      imports: [common_.CommonModule],
      providers: [ConverterService, PanelFactoryService],
      exports: [NgxColorsComponent, NgxColorsTriggerDirective]
    }]
  }], null, null);
})();
function validColorValidator() {
  return control => {
    const value = control.value;
    if (!value) {
      return null;
    }
    const rgbTest = /^\s*rgba?\(\s*(1?\d{1,2}|2[0-4]\d|25[0-5])\s*,\s*(1?\d{1,2}|2[0-4]\d|25[0-5])\s*,\s*(1?\d{1,2}|2[0-4]\d|25[0-5])\s*(,\s*(0\.\d{1,2}|1))?\s*\)\s*$/i;
    const hslTest = /^\s*hsla?\(\s*([0-2]?\d{1,2}|3[0-5]\d|360)\s*,\s*(0|[1-9]{1,2}|100)\%\s*,\s*(0|[1-9]{1,2}|100)\%\s*(,\s*(0\.\d{1,2}|1))?\s*\)\s*$/i;
    const hexTest = /^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
    const colorValid = rgbTest.test(value) || hslTest.test(value) || hexTest.test(value);
    return !colorValid ? {
      invalidColor: true
    } : null;
  };
}

/*
 * Public API Surface of ngx-colors
 */

/**
 * Generated bundle index. Do not edit.
 */


// EXTERNAL MODULE: external "tabby-core"
var external_tabby_core_ = __webpack_require__(7650);
var external_tabby_core_default = /*#__PURE__*/__webpack_require__.n(external_tabby_core_);
// EXTERNAL MODULE: external "tabby-settings"
var external_tabby_settings_ = __webpack_require__(3700);
// EXTERNAL MODULE: ./src/components/appearanceSettingsTab.component.pug?ngResource
var appearanceSettingsTab_componentngResource = __webpack_require__(5717);
var appearanceSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(appearanceSettingsTab_componentngResource);
// EXTERNAL MODULE: ./src/components/appearanceSettingsTab.component.scss?ngResource
var components_appearanceSettingsTab_componentngResource = __webpack_require__(2069);
var components_appearanceSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_appearanceSettingsTab_componentngResource);
// EXTERNAL MODULE: external "rxjs"
var external_rxjs_ = __webpack_require__(3961);
;// ../node_modules/utils-decorators/dist/esm/debounce/debouncify.js
function debouncify(originalMethod, delayMs) {
  let handler;
  return function (...args) {
    clearTimeout(handler);
    handler = setTimeout(() => {
      originalMethod.apply(this, args);
    }, delayMs);
  };
}
;// ../node_modules/utils-decorators/dist/esm/debounce/debounce.js

function debounce(delayMs) {
  return (target, propertyName, descriptor) => {
    if (descriptor.value) {
      const methodsMap = new WeakMap();
      const originalMethod = descriptor.value;
      descriptor.value = function (...args) {
        if (!methodsMap.has(this)) {
          methodsMap.set(this, debouncify(originalMethod, delayMs).bind(this));
        }
        methodsMap.get(this)(...args);
      };
      return descriptor;
    }
    throw new Error('@debounce is applicable only on a methods.');
  };
}
;// ./src/components/appearanceSettingsTab.component.ts



/* eslint-disable @typescript-eslint/explicit-module-boundary-types */




/** @hidden */
let AppearanceSettingsTabComponent = class AppearanceSettingsTabComponent {
    constructor(config, themes, platform) {
        this.config = config;
        this.themes = themes;
        this.platform = platform;
        this.fonts = [];
        this.fontAutocomplete = (text$) => {
            return text$.pipe((0,external_rxjs_.debounceTime)(200), (0,external_rxjs_.distinctUntilChanged)(), (0,external_rxjs_.map)(query => this.fonts.filter(v => new RegExp(query, 'gi').test(v))), (0,external_rxjs_.map)(list => Array.from(new Set(list))));
        };
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.fonts = yield this.platform.listFonts();
        });
    }
    getPreviewFontFamily() {
        return (0,external_tabby_core_.getCSSFontFamily)(this.config.store);
    }
    saveConfiguration(requireRestart) {
        this.config.save();
        if (requireRestart) {
            this.config.requestRestart();
        }
    }
    fixFontSize() {
        this.config.store.terminal.fontSize = Math.min(50, Math.max(5, this.config.store.terminal.fontSize));
    }
};
AppearanceSettingsTabComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: external_tabby_core_.ThemesService },
    { type: external_tabby_core_.PlatformService }
];
__decorate([
    debounce(500),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Boolean]),
    __metadata("design:returntype", void 0)
], AppearanceSettingsTabComponent.prototype, "saveConfiguration", null);
AppearanceSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (appearanceSettingsTab_componentngResource_default()),
        styles: [(components_appearanceSettingsTab_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.ThemesService,
        external_tabby_core_.PlatformService])
], AppearanceSettingsTabComponent);


// EXTERNAL MODULE: ./src/components/colorSchemeSettingsTab.component.pug?ngResource
var colorSchemeSettingsTab_componentngResource = __webpack_require__(1991);
var colorSchemeSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemeSettingsTab_componentngResource);
;// ./src/components/colorSchemeSettingsTab.component.ts




/** @hidden */
let ColorSchemeSettingsTabComponent = class ColorSchemeSettingsTabComponent {
    constructor(platform, config) {
        this.config = config;
        this.defaultTab = 'dark';
        this.defaultTab = platform.getTheme();
    }
};
ColorSchemeSettingsTabComponent.ctorParameters = () => [
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.ConfigService }
];
ColorSchemeSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (colorSchemeSettingsTab_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService,
        external_tabby_core_.ConfigService])
], ColorSchemeSettingsTabComponent);


// EXTERNAL MODULE: ./src/components/terminalSettingsTab.component.pug?ngResource
var terminalSettingsTab_componentngResource = __webpack_require__(8111);
var terminalSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(terminalSettingsTab_componentngResource);
;// ./src/components/terminalSettingsTab.component.ts




/** @hidden */
let TerminalSettingsTabComponent = class TerminalSettingsTabComponent {
    constructor(config, hostApp, platform) {
        this.config = config;
        this.hostApp = hostApp;
        this.platform = platform;
        this.Platform = external_tabby_core_.Platform;
        this.altKeyName = external_tabby_core_.altKeyName;
        this.metaKeyName = external_tabby_core_.metaKeyName;
    }
    openWSLVolumeMixer() {
        this.platform.openPath('sndvol.exe');
        this.platform.exec('wsl.exe', ['tput', 'bel']);
    }
};
TerminalSettingsTabComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: external_tabby_core_.HostAppService },
    { type: external_tabby_core_.PlatformService }
];
TerminalSettingsTabComponent.propDecorators = {
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
TerminalSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (terminalSettingsTab_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.HostAppService,
        external_tabby_core_.PlatformService])
], TerminalSettingsTabComponent);


// EXTERNAL MODULE: ./src/components/colorPicker.component.pug?ngResource
var colorPicker_componentngResource = __webpack_require__(5250);
var colorPicker_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorPicker_componentngResource);
// EXTERNAL MODULE: ./src/components/colorPicker.component.scss?ngResource
var components_colorPicker_componentngResource = __webpack_require__(8700);
var components_colorPicker_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_colorPicker_componentngResource);
;// ./src/components/colorPicker.component.ts




/** @hidden */
let colorPicker_component_ColorPickerComponent = class ColorPickerComponent {
    constructor() {
        this.modelChange = new core_.EventEmitter();
    }
};
colorPicker_component_ColorPickerComponent.propDecorators = {
    model: [{ type: core_.Input }],
    title: [{ type: core_.Input }],
    hint: [{ type: core_.Input }],
    modelChange: [{ type: core_.Output }]
};
colorPicker_component_ColorPickerComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-picker',
        template: (colorPicker_componentngResource_default()),
        styles: [(components_colorPicker_componentngResource_default())]
    })
], colorPicker_component_ColorPickerComponent);


// EXTERNAL MODULE: ./src/components/colorSchemePreview.component.pug?ngResource
var colorSchemePreview_componentngResource = __webpack_require__(9527);
var colorSchemePreview_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemePreview_componentngResource);
// EXTERNAL MODULE: ./src/components/colorSchemePreview.component.scss?ngResource
var components_colorSchemePreview_componentngResource = __webpack_require__(2943);
var components_colorSchemePreview_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_colorSchemePreview_componentngResource);
;// ./src/components/colorSchemePreview.component.ts





/** @hidden */
let ColorSchemePreviewComponent = class ColorSchemePreviewComponent extends external_tabby_core_.BaseComponent {
    constructor(config, changeDetector) {
        super();
        this.config = config;
        this.fontPreview = false;
        this.subscribeUntilDestroyed(config.changed$, () => {
            changeDetector.markForCheck();
        });
    }
    getPreviewFontFamily() {
        return (0,external_tabby_core_.getCSSFontFamily)(this.config.store);
    }
};
ColorSchemePreviewComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: core_.ChangeDetectorRef }
];
ColorSchemePreviewComponent.propDecorators = {
    scheme: [{ type: core_.Input }],
    fontPreview: [{ type: core_.Input }]
};
ColorSchemePreviewComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-scheme-preview',
        template: (colorSchemePreview_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: [(components_colorSchemePreview_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        core_.ChangeDetectorRef])
], ColorSchemePreviewComponent);


// EXTERNAL MODULE: ./src/components/searchPanel.component.pug?ngResource
var searchPanel_componentngResource = __webpack_require__(7129);
var searchPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(searchPanel_componentngResource);
// EXTERNAL MODULE: ./src/components/searchPanel.component.scss?ngResource
var components_searchPanel_componentngResource = __webpack_require__(161);
var components_searchPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_searchPanel_componentngResource);
;// ./src/frontends/frontend.ts

/**
 * Extend to add support for a different VT frontend implementation
 */
class Frontend {
    get ready$() { return this.ready; }
    get title$() { return this.title; }
    get alternateScreenActive$() { return this.alternateScreenActive; }
    get mouseEvent$() { return this.mouseEvent; }
    get bell$() { return this.bell; }
    get contentUpdated$() { return this.contentUpdated; }
    get input$() { return this.input; }
    get resize$() { return this.resize; }
    get dragOver$() { return this.dragOver; }
    get drop$() { return this.drop; }
    get destroyed$() { return this.destroyed; }
    constructor(injector) {
        this.injector = injector;
        this.enableResizing = true;
        this.ready = new external_rxjs_.AsyncSubject();
        this.title = new external_rxjs_.ReplaySubject(1);
        this.alternateScreenActive = new external_rxjs_.BehaviorSubject(false);
        this.mouseEvent = new external_rxjs_.Subject();
        this.bell = new external_rxjs_.Subject();
        this.contentUpdated = new external_rxjs_.Subject();
        this.input = new external_rxjs_.Subject();
        this.resize = new external_rxjs_.ReplaySubject(1);
        this.dragOver = new external_rxjs_.Subject();
        this.drop = new external_rxjs_.Subject();
        this.destroyed = new external_rxjs_.Subject();
    }
    destroy() {
        this.destroyed.next();
        for (const o of [
            this.ready,
            this.title,
            this.alternateScreenActive,
            this.mouseEvent,
            this.bell,
            this.contentUpdated,
            this.input,
            this.resize,
            this.dragOver,
            this.drop,
            this.destroyed,
        ]) {
            o.complete();
        }
    }
    detach(host) { } // eslint-disable-line
}

;// ./src/components/searchPanel.component.ts







let SearchPanelComponent = class SearchPanelComponent {
    constructor(notifications, translate, config) {
        this.notifications = notifications;
        this.translate = translate;
        this.config = config;
        this.state = { resultCount: 0 };
        this.options = Object.assign({ incremental: true }, this.config.store.terminal.searchOptions);
        this.close = new core_.EventEmitter();
        this.queryChanged = new external_rxjs_.Subject();
        this.icons = {
            'case': __webpack_require__(/*! ../icons/case.svg */ 1045),
            regexp: __webpack_require__(/*! ../icons/regexp.svg */ 9738),
            wholeWord: __webpack_require__(/*! ../icons/whole-word.svg */ 6347),
            arrowUp: __webpack_require__(/*! ../icons/arrow-up.svg */ 830),
            arrowDown: __webpack_require__(/*! ../icons/arrow-down.svg */ 6177),
            close: __webpack_require__(/*! ../icons/close.svg */ 9691),
        };
        this.queryChanged.pipe((0,external_rxjs_.debounceTime)(250)).subscribe(() => {
            this.findPrevious(true);
        });
    }
    onQueryChange() {
        this.state = { resultCount: 0 };
        this.queryChanged.next(this.query);
    }
    findNext(incremental = false) {
        if (!this.query) {
            return;
        }
        this.state = this.frontend.findNext(this.query, Object.assign(Object.assign({}, this.options), { incremental: incremental || undefined }));
        if (!this.state.resultCount) {
            this.notifications.notice(this.translate.instant('Not found'));
        }
    }
    findPrevious(incremental = false) {
        if (!this.query) {
            return;
        }
        this.state = this.frontend.findPrevious(this.query, Object.assign(Object.assign({}, this.options), { incremental: incremental || undefined }));
        if (!this.state.resultCount) {
            this.notifications.notice(this.translate.instant('Not found'));
        }
    }
    saveSearchOptions() {
        this.config.store.terminal.searchOptions.regex = this.options.regex;
        this.config.store.terminal.searchOptions.caseSensitive = this.options.caseSensitive;
        this.config.store.terminal.searchOptions.wholeWord = this.options.wholeWord;
        this.config.save();
    }
    ngOnDestroy() {
        this.queryChanged.complete();
    }
};
SearchPanelComponent.ctorParameters = () => [
    { type: external_tabby_core_.NotificationsService },
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.ConfigService }
];
SearchPanelComponent.propDecorators = {
    query: [{ type: core_.Input }],
    frontend: [{ type: core_.Input }],
    close: [{ type: core_.Output }]
};
SearchPanelComponent = __decorate([
    (0,core_.Component)({
        selector: 'search-panel',
        template: (searchPanel_componentngResource_default()),
        styles: [(components_searchPanel_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService,
        external_tabby_core_.ConfigService])
], SearchPanelComponent);


// EXTERNAL MODULE: ./src/components/streamProcessingSettings.component.pug?ngResource
var streamProcessingSettings_componentngResource = __webpack_require__(4085);
var streamProcessingSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(streamProcessingSettings_componentngResource);
;// ../node_modules/@biesbjerg/ngx-translate-extract-marker/__ivy_ngcc__/esm2015/lib/ngx-translate-extract-marker.js
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 * @param {?} key
 * @return {?}
 */
function marker(key) {
  return key;
}
;// ./src/components/streamProcessingSettings.component.ts


/* eslint-disable @typescript-eslint/explicit-module-boundary-types */


/** @hidden */
let StreamProcessingSettingsComponent = class StreamProcessingSettingsComponent {
    constructor() {
        this.inputModes = [
            {
                key: null,
                name: marker('Normal'),
                description: marker('Input is sent as you type'),
            },
            {
                key: 'local-echo',
                name: marker('Local echo'),
                description: marker('Immediately echoes your input locally'),
            },
            {
                key: 'readline',
                name: marker('Line by line'),
                description: marker('Line editor, input is sent after you press Enter'),
            },
            {
                key: 'readline-hex',
                name: marker('Hexadecimal'),
                description: marker('Send bytes by typing in hex values'),
            },
        ];
        this.outputModes = [
            {
                key: null,
                name: marker('Normal'),
                description: marker('Output is shown as it is received'),
            },
            {
                key: 'hex',
                name: marker('Hexadecimal'),
                description: marker('Output is shown as a hexdump'),
            },
        ];
        this.newlineModes = [
            { key: null, name: marker('Keep') },
            { key: 'strip', name: marker('Strip') },
            { key: 'cr', name: marker('Force CR') },
            { key: 'lf', name: marker('Force LF') },
            { key: 'crlf', name: marker('Force CRLF') },
            { key: 'implicit_cr', name: marker('Implicit CR in every LF') },
            { key: 'implicit_lf', name: marker('Implicit LF in every CR') },
        ];
    }
    getInputModeName(key) {
        var _a;
        return (_a = this.inputModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
    getOutputModeName(key) {
        var _a;
        return (_a = this.outputModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
    setInputMode(mode) {
        this.options.inputMode = mode;
    }
    setOutputMode(mode) {
        this.options.outputMode = mode;
    }
};
StreamProcessingSettingsComponent.propDecorators = {
    options: [{ type: core_.Input }]
};
StreamProcessingSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'stream-processing-settings',
        template: (streamProcessingSettings_componentngResource_default()),
    })
], StreamProcessingSettingsComponent);


// EXTERNAL MODULE: ./src/components/loginScriptsSettings.component.pug?ngResource
var loginScriptsSettings_componentngResource = __webpack_require__(3805);
var loginScriptsSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(loginScriptsSettings_componentngResource);
;// ./src/components/loginScriptsSettings.component.ts


/* eslint-disable @typescript-eslint/explicit-module-boundary-types */


/** @hidden */
let LoginScriptsSettingsComponent = class LoginScriptsSettingsComponent {
    constructor(platform, translate) {
        this.platform = platform;
        this.translate = translate;
    }
    ngOnInit() {
        this.scripts = this.options.scripts;
    }
    deleteScript(script) {
        return __awaiter(this, void 0, void 0, function* () {
            if ((yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant('Delete this script?'),
                detail: script.expect,
                buttons: [
                    this.translate.instant('Delete'),
                    this.translate.instant('Keep'),
                ],
                defaultId: 0,
                cancelId: 1,
            })).response === 0) {
                this.scripts = this.scripts.filter(x => x !== script);
            }
        });
    }
    addScript() {
        this.scripts.push({ expect: '', send: '' });
    }
    save() {
        this.options.scripts = this.scripts;
    }
};
LoginScriptsSettingsComponent.ctorParameters = () => [
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.TranslateService }
];
LoginScriptsSettingsComponent.propDecorators = {
    options: [{ type: core_.Input }]
};
LoginScriptsSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'login-scripts-settings',
        template: (loginScriptsSettings_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService])
], LoginScriptsSettingsComponent);


// EXTERNAL MODULE: ./src/components/terminalToolbar.component.pug?ngResource
var terminalToolbar_componentngResource = __webpack_require__(9868);
var terminalToolbar_componentngResource_default = /*#__PURE__*/__webpack_require__.n(terminalToolbar_componentngResource);
// EXTERNAL MODULE: ./src/components/terminalToolbar.component.scss?ngResource
var components_terminalToolbar_componentngResource = __webpack_require__(3306);
var components_terminalToolbar_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_terminalToolbar_componentngResource);
// EXTERNAL MODULE: ./node_modules/cli-spinner/index.js
var cli_spinner = __webpack_require__(6342);
// EXTERNAL MODULE: ./node_modules/ansi-colors/index.js
var ansi_colors = __webpack_require__(582);
var ansi_colors_default = /*#__PURE__*/__webpack_require__.n(ansi_colors);
// EXTERNAL MODULE: ../node_modules/deep-equal/index.js
var deep_equal = __webpack_require__(5405);
var deep_equal_default = /*#__PURE__*/__webpack_require__.n(deep_equal);
// EXTERNAL MODULE: ./node_modules/@xterm/xterm/lib/xterm.js
var xterm = __webpack_require__(1769);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-fit/lib/addon-fit.js
var addon_fit = __webpack_require__(2825);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-ligatures/lib/addon-ligatures.js
var addon_ligatures = __webpack_require__(5745);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-search/lib/addon-search.js
var addon_search = __webpack_require__(4629);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-webgl/lib/addon-webgl.js
var addon_webgl = __webpack_require__(893);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-unicode11/lib/addon-unicode11.js
var addon_unicode11 = __webpack_require__(3545);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-serialize/lib/addon-serialize.js
var addon_serialize = __webpack_require__(9129);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-image/lib/addon-image.js
var addon_image = __webpack_require__(9373);
// EXTERNAL MODULE: ./node_modules/@xterm/addon-canvas/lib/addon-canvas.js
var addon_canvas = __webpack_require__(3421);
;// ./src/helpers.ts
function getActiveTerminalTheme(themes) {
    const appTheme = themes.findCurrentTheme();
    const appColorScheme = themes._getActiveColorScheme();
    return { appTheme, appColorScheme };
}
function getTerminalBackgroundColor(config, themes, scheme) {
    const { appTheme, appColorScheme } = getActiveTerminalTheme(themes);
    // Use non transparent background when:
    // - legacy theme and user choses colorScheme based BG
    // - or new theme but profile-specific scheme is used
    const shouldUseCSBackground = !appTheme.followsColorScheme && config.store.terminal.background === 'colorScheme'
        // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
        || appTheme.followsColorScheme && (scheme === null || scheme === void 0 ? void 0 : scheme.name) !== appColorScheme.name;
    return shouldUseCSBackground && scheme ? scheme.background : null;
}
function getXtermBackgroundColor(config, themes, scheme) {
    const configuredBackground = getTerminalBackgroundColor(config, themes, scheme);
    if (configuredBackground) {
        return configuredBackground;
    }
    const { appTheme, appColorScheme } = getActiveTerminalTheme(themes);
    return appTheme.followsColorScheme ? appColorScheme.background : appTheme.terminalBackground;
}

;// ./src/generatePalette.ts
function rgbToLab(rgb) {
    let r = rgb.r / 255.0;
    let g = rgb.g / 255.0;
    let b = rgb.b / 255.0;
    r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
    g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
    b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
    let x = (r * 0.4124564 + g * 0.3575761 + b * 0.1804375) / 0.95047;
    let y = r * 0.2126729 + g * 0.7151522 + b * 0.0721750;
    let z = (r * 0.0193339 + g * 0.1191920 + b * 0.9503041) / 1.08883;
    x = x > 0.008856 ? Math.cbrt(x) : 7.787 * x + 16.0 / 116.0;
    y = y > 0.008856 ? Math.cbrt(y) : 7.787 * y + 16.0 / 116.0;
    z = z > 0.008856 ? Math.cbrt(z) : 7.787 * z + 16.0 / 116.0;
    return { l: 116.0 * y - 16.0, a: 500.0 * (x - y), b: 200.0 * (y - z) };
}
function labToRgb(lab) {
    const y = (lab.l + 16.0) / 116.0;
    const x = lab.a / 500.0 + y;
    const z = y - lab.b / 200.0;
    const x3 = x * x * x;
    const y3 = y * y * y;
    const z3 = z * z * z;
    const xf = (x3 > 0.008856 ? x3 : (x - 16.0 / 116.0) / 7.787) * 0.95047;
    const yf = y3 > 0.008856 ? y3 : (y - 16.0 / 116.0) / 7.787;
    const zf = (z3 > 0.008856 ? z3 : (z - 16.0 / 116.0) / 7.787) * 1.08883;
    let r = xf * 3.2404542 - yf * 1.5371385 - zf * 0.4985314;
    let g = -xf * 0.9692660 + yf * 1.8760108 + zf * 0.0415560;
    let b = xf * 0.0556434 - yf * 0.2040259 + zf * 1.0572252;
    r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : 12.92 * r;
    g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : 12.92 * g;
    b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : 12.92 * b;
    return {
        r: Math.round(Math.min(Math.max(r, 0.0), 1.0) * 255.0),
        g: Math.round(Math.min(Math.max(g, 0.0), 1.0) * 255.0),
        b: Math.round(Math.min(Math.max(b, 0.0), 1.0) * 255.0),
    };
}
function lerpLab(t, a, b) {
    return {
        l: a.l + t * (b.l - a.l),
        a: a.a + t * (b.a - a.a),
        b: a.b + t * (b.b - a.b),
    };
}
function parseHexColor(hex) {
    hex = hex.replace('#', '');
    return {
        r: parseInt(hex.substring(0, 2), 16),
        g: parseInt(hex.substring(2, 4), 16),
        b: parseInt(hex.substring(4, 6), 16),
    };
}
function rgbToHex(rgb) {
    const r = rgb.r.toString(16).padStart(2, '0');
    const g = rgb.g.toString(16).padStart(2, '0');
    const b = rgb.b.toString(16).padStart(2, '0');
    return `#${r}${g}${b}`;
}
/**
 * Generate extended 256-color palette (indices 16-255) from base16 colors
 * using LAB color space interpolation. User-defined colors beyond index 15
 * in the scheme's colors array are preserved and not overwritten.
 *
 * @param colors - Array of hex color strings (at least 16; entries beyond 16 are user-defined extended colors)
 * @param bg - Background color as hex string
 * @param fg - Foreground color as hex string
 * @param harmonious - If true, disable light-theme inversion
 * @returns Array of 240 hex color strings for indices 16-255
 */
function generatePalette(colors, bg, fg, harmonious) {
    const base8Lab = [];
    for (let i = 0; i < 8; i++) {
        base8Lab.push(rgbToLab(parseHexColor(colors[i])));
    }
    const bgLab = rgbToLab(parseHexColor(bg));
    const fgLab = rgbToLab(parseHexColor(fg));
    const isLightTheme = fgLab.l < bgLab.l;
    const invert = isLightTheme && !harmonious;
    const corner0 = invert ? fgLab : bgLab;
    const corner7 = invert ? bgLab : fgLab;
    const palette = [];
    // Color cube (indices 16-231): 6x6x6
    let idx = 16;
    for (let ri = 0; ri < 6; ri++) {
        const tr = ri / 5.0;
        const c0 = lerpLab(tr, corner0, base8Lab[1]);
        const c1 = lerpLab(tr, base8Lab[2], base8Lab[3]);
        const c2 = lerpLab(tr, base8Lab[4], base8Lab[5]);
        const c3 = lerpLab(tr, base8Lab[6], corner7);
        for (let gi = 0; gi < 6; gi++) {
            const tg = gi / 5.0;
            const c4 = lerpLab(tg, c0, c1);
            const c5 = lerpLab(tg, c2, c3);
            for (let bi = 0; bi < 6; bi++) {
                if (colors[idx]) {
                    palette.push(colors[idx]);
                }
                else {
                    const c6 = lerpLab(bi / 5.0, c4, c5);
                    palette.push(rgbToHex(labToRgb(c6)));
                }
                idx++;
            }
        }
    }
    // Grayscale ramp (indices 232-255): 24 shades
    for (let i = 0; i < 24; i++) {
        if (colors[idx]) {
            palette.push(colors[idx]);
        }
        else {
            const t = (i + 1) / 25.0;
            palette.push(rgbToHex(labToRgb(lerpLab(t, corner0, corner7))));
        }
        idx++;
    }
    return palette;
}

// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
var injectStylesIntoStyleTag = __webpack_require__(5334);
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/styleDomAPI.js
var styleDomAPI = __webpack_require__(4623);
var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/insertBySelector.js
var insertBySelector = __webpack_require__(8869);
var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
var setAttributesWithoutAttributes = __webpack_require__(1734);
var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/insertStyleElement.js
var insertStyleElement = __webpack_require__(658);
var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/styleTagTransform.js
var styleTagTransform = __webpack_require__(5367);
var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
// EXTERNAL MODULE: ../node_modules/css-loader/dist/cjs.js!./src/frontends/xterm.css
var frontends_xterm = __webpack_require__(2187);
;// ./src/frontends/xterm.css

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (styleTagTransform_default());
options.setAttributes = (setAttributesWithoutAttributes_default());

      options.insert = insertBySelector_default().bind(null, "head");
    
options.domAPI = (styleDomAPI_default());
options.insertStyleElement = (insertStyleElement_default());

var update = injectStylesIntoStyleTag_default()(frontends_xterm/* default */.A, options);




       /* harmony default export */ const src_frontends_xterm = (frontends_xterm/* default */.A && frontends_xterm/* default */.A.locals ? frontends_xterm/* default */.A.locals : undefined);

;// ./src/frontends/xtermFrontend.ts

















const COLOR_NAMES = [
    'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white',
    'brightBlack', 'brightRed', 'brightGreen', 'brightYellow', 'brightBlue', 'brightMagenta', 'brightCyan', 'brightWhite',
];
class FlowControl {
    constructor(xterm) {
        this.xterm = xterm;
        this.blocked = false;
        this.blocked$ = new external_rxjs_.BehaviorSubject(false);
        this.pendingCallbacks = 0;
        this.lowWatermark = 5;
        this.highWatermark = 10;
        this.bytesWritten = 0;
        this.bytesThreshold = 1024 * 128;
    }
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.blocked) {
                yield (0,external_rxjs_.firstValueFrom)(this.blocked$.pipe((0,external_rxjs_.filter)(x => !x)));
            }
            this.bytesWritten += data.length;
            if (this.bytesWritten > this.bytesThreshold) {
                this.pendingCallbacks++;
                this.bytesWritten = 0;
                if (!this.blocked && this.pendingCallbacks > this.highWatermark) {
                    this.blocked = true;
                    this.blocked$.next(true);
                }
                this.xterm.write(data, () => {
                    this.pendingCallbacks--;
                    if (this.blocked && this.pendingCallbacks < this.lowWatermark) {
                        this.blocked = false;
                        this.blocked$.next(false);
                    }
                });
            }
            else {
                this.xterm.write(data);
            }
        });
    }
}
/** @hidden */
class XTermFrontend extends Frontend {
    constructor(injector) {
        super(injector);
        this.enableResizing = true;
        this.enableWebGL = false;
        this.configuredFontSize = 0;
        this.configuredLinePadding = 0;
        this.zoom = 0;
        this.configuredTheme = {};
        this.copyOnSelect = false;
        this.preventNextOnSelectionChangeEvent = false;
        this.search = new addon_search.SearchAddon();
        this.searchState = { resultCount: 0 };
        this.fitAddon = new addon_fit.FitAddon();
        this.serializeAddon = new addon_serialize.SerializeAddon();
        this.opened = false;
        this.pinnedToBottom = true;
        this.configService = injector.get(external_tabby_core_.ConfigService);
        this.hotkeysService = injector.get(external_tabby_core_.HotkeysService);
        this.platformService = injector.get(external_tabby_core_.PlatformService);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.themes = injector.get(external_tabby_core_.ThemesService);
        this.xterm = new xterm.Terminal({
            allowTransparency: true,
            allowProposedApi: true,
            overviewRulerWidth: 8,
            windowsPty: process.platform === 'win32' ? {
                backend: this.configService.store.terminal.useConPTY ? 'conpty' : 'winpty',
                buildNumber: (0,external_tabby_core_.getWindows10Build)(),
            } : undefined,
        });
        this.flowControl = new FlowControl(this.xterm);
        this.xtermCore = this.xterm['_core'];
        this.xterm.onBinary(data => {
            this.input.next(Buffer.from(data, 'binary'));
        });
        this.xterm.onData(data => {
            this.input.next(Buffer.from(data, 'utf-8'));
        });
        this.xterm.onResize(({ cols, rows }) => {
            this.resize.next({ rows, columns: cols });
        });
        this.xterm.onTitleChange(title => {
            this.title.next(title);
        });
        this.xterm.onSelectionChange(() => {
            if (this.getSelection()) {
                if (this.copyOnSelect && !this.preventNextOnSelectionChangeEvent) {
                    this.copySelection();
                }
                this.preventNextOnSelectionChangeEvent = false;
            }
        });
        this.xterm.onBell(() => {
            this.bell.next();
        });
        this.xterm.loadAddon(this.fitAddon);
        this.xterm.loadAddon(this.serializeAddon);
        this.xterm.loadAddon(new addon_unicode11.Unicode11Addon());
        this.xterm.unicode.activeVersion = '11';
        if (this.configService.store.terminal.sixel) {
            this.xterm.loadAddon(new addon_image.ImageAddon());
        }
        const keyboardEventHandler = (name, event) => {
            if (this.isAlternateScreenActive()) {
                let modifiers = 0;
                modifiers += event.ctrlKey ? 1 : 0;
                modifiers += event.altKey ? 1 : 0;
                modifiers += event.shiftKey ? 1 : 0;
                modifiers += event.metaKey ? 1 : 0;
                if (event.key.startsWith('Arrow') && modifiers === 1) {
                    return true;
                }
            }
            // Ctrl-/
            if (event.type === 'keydown' && event.key === '/' && event.ctrlKey) {
                this.input.next(Buffer.from('\u001f', 'binary'));
                return false;
            }
            // Ctrl-@
            if (event.type === 'keydown' && event.key === '@' && event.ctrlKey) {
                this.input.next(Buffer.from('\u0000', 'binary'));
                return false;
            }
            this.hotkeysService.pushKeyEvent(name, event);
            let ret = true;
            if (this.hotkeysService.matchActiveHotkey(true) !== null) {
                event.stopPropagation();
                event.preventDefault();
                ret = false;
            }
            return ret;
        };
        this.xterm.attachCustomKeyEventHandler((event) => {
            if (this.hostApp.platform !== external_tabby_core_.Platform.Web) {
                if (event.getModifierState('Meta') && event.key.toLowerCase() === 'v' ||
                    event.key === 'Insert' && event.shiftKey) {
                    event.preventDefault();
                    return false;
                }
            }
            if (event.getModifierState('Meta') && event.key.startsWith('Arrow')) {
                return false;
            }
            return keyboardEventHandler('keydown', event);
        });
        this.xtermCore._scrollToBottom = this.xtermCore.scrollToBottom.bind(this.xtermCore);
        this.xtermCore.scrollToBottom = () => null;
        // NOTE: xterm.onScroll only fires for content-driven scroll (new lines),
        // NOT for user wheel/keyboard scroll (xterm.js #3864, #3201). During
        // fast output, viewportY transiently equals baseY during xterm's
        // internal processing, so onScroll would falsely re-pin. We do NOT
        // use onScroll for pin state. Re-pinning happens only via:
        //   - wheel/keyboard event listeners (below)
        //   - explicit scrollToBottom() calls
        this.resizeHandler = () => {
            try {
                if (this.xterm.element && getComputedStyle(this.xterm.element).getPropertyValue('height') !== 'auto') {
                    const savedPinned = this.pinnedToBottom;
                    const savedViewportY = this.xterm.buffer.active.viewportY;
                    this.fitAddon.fit();
                    this.xtermCore.viewport._refresh();
                    if (savedPinned) {
                        this.xtermCore._scrollToBottom();
                    }
                    else {
                        // Restore the previous scroll position after fit
                        const maxScroll = this.xterm.buffer.active.baseY;
                        const targetY = Math.min(savedViewportY, maxScroll);
                        this.xterm.scrollToLine(targetY);
                    }
                }
            }
            catch (e) {
                // tends to throw when element wasn't shown yet
                console.warn('Could not resize xterm', e);
            }
        };
        const oldKeyUp = this.xtermCore._keyUp.bind(this.xtermCore);
        this.xtermCore._keyUp = (e) => {
            this.xtermCore.updateCursorStyle(e);
            if (keyboardEventHandler('keyup', e)) {
                oldKeyUp(e);
            }
        };
        this.xterm.buffer.onBufferChange(() => {
            const altBufferActive = this.xterm.buffer.active.type === 'alternate';
            this.alternateScreenActive.next(altBufferActive);
        });
    }
    isAtBottom() {
        const buffer = this.xterm.buffer.active;
        return buffer.viewportY >= buffer.baseY - 1;
    }
    updatePinnedState() {
        this.pinnedToBottom = this.isAtBottom();
    }
    attach(host, profile) {
        return __awaiter(this, void 0, void 0, function* () {
            this.element = host;
            this.xterm.open(host);
            this.opened = true;
            // Work around font loading bugs
            yield new Promise(resolve => setTimeout(resolve, this.hostApp.platform === external_tabby_core_.Platform.Web ? 1000 : 0));
            // Just configure the colors to avoid a flash
            this.configureColors(profile.terminalColorScheme);
            if (this.enableWebGL) {
                this.webGLAddon = new addon_webgl.WebglAddon();
                this.xterm.loadAddon(this.webGLAddon);
                this.platformService.displayMetricsChanged$.pipe((0,external_rxjs_.takeUntil)(this.destroyed$)).subscribe(() => {
                    var _a;
                    (_a = this.webGLAddon) === null || _a === void 0 ? void 0 : _a.clearTextureAtlas();
                });
            }
            else {
                this.canvasAddon = new addon_canvas.CanvasAddon();
                this.xterm.loadAddon(this.canvasAddon);
                this.platformService.displayMetricsChanged$.pipe((0,external_rxjs_.takeUntil)(this.destroyed$)).subscribe(() => {
                    var _a;
                    (_a = this.canvasAddon) === null || _a === void 0 ? void 0 : _a.clearTextureAtlas();
                });
            }
            // Allow an animation frame
            yield new Promise(r => setTimeout(r, 100));
            this.ready.next();
            this.ready.complete();
            this.xterm.loadAddon(this.search);
            this.search.onDidChangeResults(state => {
                this.searchState = state;
            });
            window.addEventListener('resize', this.resizeHandler);
            this.resizeHandler();
            // Allow an animation frame
            yield new Promise(r => setTimeout(r, 0));
            // User-initiated scroll detection: only wheel and keyboard events
            // should unpin. xterm.onScroll is content-driven only and must never
            // unpin (see constructor comment). Use capture phase — xterm.js
            // handles wheel/key events on its internal viewport element and may
            // stop propagation, so bubbling listeners on host would never fire.
            host.addEventListener('wheel', (event) => {
                // Immediately unpin on scroll-up so that writes arriving before
                // the next animation frame don't yank the viewport back down.
                if (event.deltaY < 0) {
                    this.pinnedToBottom = false;
                }
                requestAnimationFrame(() => this.updatePinnedState());
            }, { capture: true, passive: true });
            this.hotkeysService.hotkey$
                .pipe((0,external_rxjs_.takeUntil)(this.destroyed$), (0,external_rxjs_.filter)(hk => [
                'scroll-up',
                'scroll-down',
                'scroll-page-up',
                'scroll-page-down',
                'scroll-to-top',
                'scroll-to-bottom',
            ].includes(hk))).subscribe(hk => {
                if ([
                    'scroll-up',
                    'scroll-page-up',
                    'scroll-to-top',
                ].includes(hk)) {
                    this.pinnedToBottom = false;
                }
                requestAnimationFrame(() => this.updatePinnedState());
            });
            host.addEventListener('dragOver', (event) => this.dragOver.next(event));
            host.addEventListener('drop', event => this.drop.next(event));
            host.addEventListener('mousedown', event => this.mouseEvent.next(event));
            host.addEventListener('mouseup', event => this.mouseEvent.next(event));
            host.addEventListener('mousewheel', event => this.mouseEvent.next(event));
            host.addEventListener('contextmenu', event => {
                event.preventDefault();
                event.stopPropagation();
            });
            this.resizeObserver = new window['ResizeObserver'](() => setTimeout(() => this.resizeHandler()));
            this.resizeObserver.observe(host);
        });
    }
    detach(_host) {
        var _a;
        window.removeEventListener('resize', this.resizeHandler);
        (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
        delete this.resizeObserver;
    }
    destroy() {
        var _a, _b;
        super.destroy();
        (_a = this.webGLAddon) === null || _a === void 0 ? void 0 : _a.dispose();
        (_b = this.canvasAddon) === null || _b === void 0 ? void 0 : _b.dispose();
        this.xterm.dispose();
    }
    getSelection() {
        return this.xterm.getSelection();
    }
    copySelection() {
        const text = this.getSelection();
        if (!text.trim().length) {
            return;
        }
        if (text.length < 1024 * 32 && this.configService.store.terminal.copyAsHTML) {
            this.platformService.setClipboard({
                text: this.getSelection(),
                html: this.getSelectionAsHTML(),
            });
        }
        else {
            this.platformService.setClipboard({
                text: this.getSelection(),
            });
        }
    }
    selectAll() {
        this.xterm.selectAll();
    }
    clearSelection() {
        this.xterm.clearSelection();
    }
    focus() {
        setTimeout(() => this.xterm.focus());
    }
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            // Capture pinned state before the write — the async write yields
            // to the event loop, and RAF callbacks (e.g. from wheel events)
            // could change pinnedToBottom mid-write.
            const wasPinned = this.pinnedToBottom;
            const savedViewportY = this.xterm.buffer.active.viewportY;
            yield this.flowControl.write(data);
            if (wasPinned) {
                this.xtermCore._scrollToBottom();
            }
            else {
                // Restore scroll position — xterm internally disturbs viewportY
                // during fast output, and the patched-out scrollToBottom no-op
                // prevents xterm from correcting it.
                const maxScroll = this.xterm.buffer.active.baseY;
                const targetY = Math.min(savedViewportY, maxScroll);
                if (this.xterm.buffer.active.viewportY !== targetY) {
                    this.xterm.scrollToLine(targetY);
                }
            }
        });
    }
    clear() {
        this.xterm.clear();
    }
    visualBell() {
        if (this.element) {
            this.element.style.animation = 'none';
            setTimeout(() => {
                this.element.style.animation = 'terminalShakeFrames 0.3s ease';
            });
        }
    }
    scrollToTop() {
        this.pinnedToBottom = false;
        this.xterm.scrollToTop();
    }
    scrollPages(pages) {
        this.xterm.scrollPages(pages);
        this.updatePinnedState();
    }
    scrollLines(amount) {
        this.xterm.scrollLines(amount);
        this.updatePinnedState();
    }
    scrollToBottom() {
        this.pinnedToBottom = true;
        this.xtermCore._scrollToBottom();
    }
    configureColors(scheme) {
        var _a, _b;
        const appColorScheme = this.themes._getActiveColorScheme();
        scheme = scheme !== null && scheme !== void 0 ? scheme : appColorScheme;
        const theme = {
            foreground: scheme.foreground,
            selectionBackground: (_a = scheme.selection) !== null && _a !== void 0 ? _a : '#88888888',
            selectionForeground: (_b = scheme.selectionForeground) !== null && _b !== void 0 ? _b : undefined,
            background: getXtermBackgroundColor(this.configService, this.themes, scheme),
            cursor: scheme.cursor,
            cursorAccent: scheme.cursorAccent,
        };
        for (let i = 0; i < COLOR_NAMES.length; i++) {
            theme[COLOR_NAMES[i]] = scheme.colors[i];
        }
        if (this.configService.store.terminal.paletteGenerate) {
            theme.extendedAnsi = generatePalette(scheme.colors, scheme.background, scheme.foreground, this.configService.store.terminal.paletteHarmonious);
        }
        if (!deep_equal_default()(this.configuredTheme, theme)) {
            this.xterm.options.theme = theme;
            this.configuredTheme = theme;
        }
    }
    configure(profile) {
        const config = this.configService.store;
        setImmediate(() => {
            if (this.xterm.cols && this.xterm.rows && this.xtermCore.charMeasure) {
                if (this.xtermCore.charMeasure) {
                    this.xtermCore.charMeasure.measure(this.xtermCore.options);
                }
                if (this.xtermCore.renderer) {
                    this.xtermCore.renderer._updateDimensions();
                }
                this.resizeHandler();
            }
        });
        this.xtermCore.browser.isWindows = this.hostApp.platform === external_tabby_core_.Platform.Windows;
        this.xtermCore.browser.isLinux = this.hostApp.platform === external_tabby_core_.Platform.Linux;
        this.xtermCore.browser.isMac = this.hostApp.platform === external_tabby_core_.Platform.macOS;
        this.xterm.options.fontFamily = (0,external_tabby_core_.getCSSFontFamily)(config);
        this.xterm.options.cursorStyle = {
            beam: 'bar',
        }[config.terminal.cursor] || config.terminal.cursor;
        this.xterm.options.cursorBlink = config.terminal.cursorBlink;
        this.xterm.options.macOptionIsMeta = config.terminal.altIsMeta;
        this.xterm.options.scrollback = config.terminal.scrollbackLines;
        this.xterm.options.wordSeparator = config.terminal.wordSeparator;
        this.xterm.options.drawBoldTextInBrightColors = config.terminal.drawBoldTextInBrightColors;
        this.xterm.options.fontWeight = config.terminal.fontWeight;
        this.xterm.options.fontWeightBold = config.terminal.fontWeightBold;
        this.xterm.options.minimumContrastRatio = config.terminal.minimumContrastRatio;
        this.configuredFontSize = config.terminal.fontSize;
        this.configuredLinePadding = config.terminal.linePadding;
        this.setFontSize();
        this.copyOnSelect = config.terminal.copyOnSelect;
        this.configureColors(profile.terminalColorScheme);
        if (this.opened && config.terminal.ligatures && !this.ligaturesAddon && this.hostApp.platform !== external_tabby_core_.Platform.Web) {
            this.ligaturesAddon = new addon_ligatures.LigaturesAddon();
            this.xterm.loadAddon(this.ligaturesAddon);
        }
    }
    setZoom(zoom) {
        this.zoom = zoom;
        this.setFontSize();
        this.resizeHandler();
    }
    getSearchOptions(searchOptions) {
        return Object.assign(Object.assign({}, searchOptions), { decorations: {
                matchOverviewRuler: '#888888',
                activeMatchColorOverviewRuler: '#ffff00',
                matchBackground: '#888888',
                activeMatchBackground: '#ffff00',
            } });
    }
    wrapSearchResult(result) {
        if (!result) {
            return { resultCount: 0 };
        }
        return this.searchState;
    }
    findNext(term, searchOptions) {
        if (this.copyOnSelect) {
            this.preventNextOnSelectionChangeEvent = true;
        }
        return this.wrapSearchResult(this.search.findNext(term, this.getSearchOptions(searchOptions)));
    }
    findPrevious(term, searchOptions) {
        if (this.copyOnSelect) {
            this.preventNextOnSelectionChangeEvent = true;
        }
        return this.wrapSearchResult(this.search.findPrevious(term, this.getSearchOptions(searchOptions)));
    }
    cancelSearch() {
        this.search.clearDecorations();
        this.focus();
    }
    saveState() {
        return this.serializeAddon.serialize({
            excludeAltBuffer: true,
            excludeModes: true,
            scrollback: 1000,
        });
    }
    restoreState(state) {
        this.xterm.write(state);
    }
    supportsBracketedPaste() {
        return this.xterm.modes.bracketedPasteMode;
    }
    isAlternateScreenActive() {
        return this.xterm.buffer.active.type === 'alternate';
    }
    setFontSize() {
        const scale = Math.pow(1.1, this.zoom);
        this.xterm.options.fontSize = this.configuredFontSize * scale;
        // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
        this.xterm.options.lineHeight = Math.max(1, (this.configuredFontSize + this.configuredLinePadding * 2) / this.configuredFontSize);
        this.resizeHandler();
    }
    getSelectionAsHTML() {
        return this.serializeAddon.serializeAsHTML({ includeGlobalBackground: true, onlySelection: true });
    }
}
/** @hidden */
class XTermWebGLFrontend extends XTermFrontend {
    constructor() {
        super(...arguments);
        this.enableWebGL = true;
    }
}

;// ./src/api/decorator.ts
/**
 * Extend to automatically run actions on new terminals
 */
class TerminalDecorator {
    constructor() {
        this.smartSubscriptions = new Map();
    }
    /**
     * Called when a new terminal tab starts
     */
    attach(terminal) { } // eslint-disable-line
    /**
     * Called before a terminal tab is destroyed.
     * Make sure to call super()
     */
    detach(terminal) {
        var _a;
        for (const s of (_a = this.smartSubscriptions.get(terminal)) !== null && _a !== void 0 ? _a : []) {
            s.unsubscribe();
        }
        this.smartSubscriptions.delete(terminal);
    }
    /**
     * Automatically cancel @subscription once detached from @terminal
     */
    subscribeUntilDetached(terminal, subscription) {
        var _a;
        if (!subscription) {
            return;
        }
        if (!this.smartSubscriptions.has(terminal)) {
            this.smartSubscriptions.set(terminal, []);
        }
        (_a = this.smartSubscriptions.get(terminal)) === null || _a === void 0 ? void 0 : _a.push(subscription);
    }
}

;// ./src/services/multifocus.service.ts




let MultifocusService = class MultifocusService {
    constructor(app, hotkeys, translate) {
        this.app = app;
        this.inputSubscription = null;
        this.currentTab = null;
        this.warningElement = document.createElement('div');
        this.warningElement.className = 'broadcast-status-warning';
        this.warningElement.innerText = translate.instant('Broadcast mode. Click anywhere to cancel.');
        this.warningElement.style.display = 'none';
        document.body.appendChild(this.warningElement);
        hotkeys.hotkey$.subscribe(hotkey => {
            switch (hotkey) {
                case 'focus-all-tabs':
                    this.focusAllTabs();
                    break;
                case 'pane-focus-all':
                    this.focusAllPanes();
                    break;
            }
        });
    }
    start(currentTab, tabs) {
        var _a, _b;
        if (this.inputSubscription) {
            return;
        }
        if (currentTab.parent instanceof external_tabby_core_.SplitTabComponent) {
            const parent = currentTab.parent;
            parent._allFocusMode = true;
            parent.layout();
        }
        this.currentTab = currentTab;
        this.inputSubscription = (_b = (_a = currentTab.frontend) === null || _a === void 0 ? void 0 : _a.input$.subscribe(data => {
            for (const tab of tabs) {
                if (tab !== currentTab) {
                    tab.sendInput(data);
                }
            }
        })) !== null && _b !== void 0 ? _b : null;
    }
    cancel() {
        var _a;
        this.warningElement.style.display = 'none';
        document.querySelector('app-root')['style'].border = 'none';
        if (!this.inputSubscription) {
            return;
        }
        this.inputSubscription.unsubscribe();
        this.inputSubscription = null;
        if (((_a = this.currentTab) === null || _a === void 0 ? void 0 : _a.parent) instanceof external_tabby_core_.SplitTabComponent) {
            this.currentTab.parent._allFocusMode = false;
            this.currentTab.parent.layout();
        }
        this.currentTab = null;
    }
    focusAllTabs() {
        let currentTab = this.app.activeTab;
        if (currentTab && currentTab instanceof external_tabby_core_.SplitTabComponent) {
            currentTab = currentTab.getFocusedTab();
        }
        if (!currentTab || !(currentTab instanceof BaseTerminalTabComponent)) {
            return;
        }
        const tabs = this.app.tabs
            .map((t => {
            if (t instanceof BaseTerminalTabComponent) {
                return [t];
            }
            else if (t instanceof external_tabby_core_.SplitTabComponent) {
                return t.getAllTabs()
                    .filter(x => x instanceof BaseTerminalTabComponent);
            }
            else {
                return [];
            }
        }))
            .flat();
        this.start(currentTab, tabs);
        this.warningElement.style.display = 'block';
        document.querySelector('app-root')['style'].border = '5px solid red';
    }
    focusAllPanes() {
        const currentTab = this.app.activeTab;
        if (!currentTab || !(currentTab instanceof external_tabby_core_.SplitTabComponent)) {
            return;
        }
        const pane = currentTab.getFocusedTab();
        if (!pane || !(pane instanceof BaseTerminalTabComponent)) {
            return;
        }
        const tabs = currentTab.getAllTabs().filter(t => t instanceof BaseTerminalTabComponent);
        // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
        this.start(pane, tabs);
    }
};
MultifocusService.ctorParameters = () => [
    { type: external_tabby_core_.AppService },
    { type: external_tabby_core_.HotkeysService },
    { type: external_tabby_core_.TranslateService }
];
MultifocusService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.AppService,
        external_tabby_core_.HotkeysService,
        external_tabby_core_.TranslateService])
], MultifocusService);


;// ./src/api/baseTerminalTab.component.ts
var BaseTerminalTabComponent_1;












const INACTIVE_TAB_UNLOAD_DELAY = 1000 * 30;
const OSC_FOCUS_IN = Buffer.from('\x1b[I');
const OSC_FOCUS_OUT = Buffer.from('\x1b[O');
/**
 * A class to base your custom terminal tabs on
 */
let BaseTerminalTabComponent = BaseTerminalTabComponent_1 = class BaseTerminalTabComponent extends external_tabby_core_.BaseTabComponent {
    get input$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.input$;
    }
    get output$() { return this.output; }
    get binaryOutput$() { return this.binaryOutput; }
    get resize$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.resize$;
    }
    get alternateScreenActive$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.alternateScreenActive$;
    }
    get frontendReady$() { return this.frontendReady; }
    get sessionChanged$() { return this.sessionChanged; }
    constructor(injector) {
        super(injector);
        this.injector = injector;
        this.session = null;
        this.savedStateIsLive = false;
        this.zoom = 0;
        this.showSearchPanel = false;
        this.backgroundColor = null;
        this.enableToolbar = false;
        this.pinToolbar = false;
        this.revealToolbar = false;
        /** @hidden */
        this.frontendIsReady = false;
        this.frontendReady = new external_rxjs_.Subject();
        /**
         * Enables normal passthrough from session output to terminal input
         */
        this.enablePassthrough = true;
        /**
         * Disables display of dynamic window/tab title provided by the shell
         */
        this.disableDynamicTitle = false;
        this.alternateScreenActive = false;
        this.decorators = [];
        this.output = new external_rxjs_.Subject();
        this.binaryOutput = new external_rxjs_.Subject();
        this.sessionChanged = new external_rxjs_.Subject();
        this.recentInputs = '';
        this.termContainerSubscriptions = new external_tabby_core_.SubscriptionContainer();
        this.sessionHandlers = new external_tabby_core_.SubscriptionContainer();
        this.spinner = new cli_spinner/* Spinner */.y({
            stream: {
                write: x => {
                    try {
                        if (!this.frontend) {
                            return;
                        }
                        this.writeRaw(x);
                    }
                    catch (_a) {
                        this.spinner.stop();
                    }
                },
            },
        });
        this.spinnerActive = false;
        this.spinnerPaused = false;
        this.toolbarRevealTimeout = new external_tabby_core_.ResettableTimeout(() => {
            this.revealToolbar = false;
        }, 1000);
        this.frontendWriteLock = Promise.resolve();
        this.rightMouseDownTime = 0;
        this.config = injector.get(external_tabby_core_.ConfigService);
        this.element = injector.get(core_.ElementRef);
        this.zone = injector.get(core_.NgZone);
        this.app = injector.get(external_tabby_core_.AppService);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.hotkeys = injector.get(external_tabby_core_.HotkeysService);
        this.platform = injector.get(external_tabby_core_.PlatformService);
        this.notifications = injector.get(external_tabby_core_.NotificationsService);
        this.log = injector.get(external_tabby_core_.LogService);
        this.decorators = injector.get(TerminalDecorator, null, core_.InjectFlags.Optional);
        this.contextMenuProviders = injector.get(external_tabby_core_.TabContextMenuItemProvider, null, core_.InjectFlags.Optional);
        this.hostWindow = injector.get(external_tabby_core_.HostWindowService);
        this.translate = injector.get(external_tabby_core_.TranslateService);
        this.multifocus = injector.get(MultifocusService);
        this.themes = injector.get(external_tabby_core_.ThemesService);
        this.logger = this.log.create('baseTerminalTab');
        this.setTitle(this.translate.instant('Terminal'));
        this.subscribeUntilDestroyed(this.hotkeys.unfilteredHotkey$, (hotkey) => __awaiter(this, void 0, void 0, function* () {
            if (!this.hasFocus) {
                return;
            }
            if (hotkey === 'search') {
                this.showSearchPanel = true;
                setImmediate(() => {
                    var _a, _b;
                    const input = this.element.nativeElement.querySelector('.search-input');
                    const selectedText = ((_b = (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.getSelection()) !== null && _b !== void 0 ? _b : '').trim();
                    if (input && selectedText.length) {
                        input.value = selectedText;
                    }
                    input === null || input === void 0 ? void 0 : input.focus();
                    input === null || input === void 0 ? void 0 : input.select();
                });
            }
        }));
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, (hotkey) => __awaiter(this, void 0, void 0, function* () {
            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
            if (!this.hasFocus) {
                return;
            }
            switch (hotkey) {
                case 'ctrl-c':
                    if ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.getSelection()) {
                        this.frontend.copySelection();
                        this.frontend.clearSelection();
                        this.notifications.notice(this.translate.instant('Copied'));
                    }
                    else {
                        this.forEachFocusedTerminalPane(tab => tab.sendInput('\x03'));
                    }
                    break;
                case 'copy':
                    (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.copySelection();
                    (_c = this.frontend) === null || _c === void 0 ? void 0 : _c.clearSelection();
                    this.notifications.notice(this.translate.instant('Copied'));
                    break;
                case 'paste':
                    this.forEachFocusedTerminalPane(tab => tab.paste());
                    break;
                case 'select-all':
                    (_d = this.frontend) === null || _d === void 0 ? void 0 : _d.selectAll();
                    break;
                case 'clear':
                    this.forEachFocusedTerminalPane(tab => { var _a; return (_a = tab.frontend) === null || _a === void 0 ? void 0 : _a.clear(); });
                    break;
                case 'zoom-in':
                    this.forEachFocusedTerminalPane(tab => tab.zoomIn());
                    break;
                case 'zoom-out':
                    this.forEachFocusedTerminalPane(tab => tab.zoomOut());
                    break;
                case 'reset-zoom':
                    this.forEachFocusedTerminalPane(tab => tab.resetZoom());
                    break;
                case 'previous-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1b[1;5D',
                            [external_tabby_core_.Platform.macOS]: '\x1bb',
                            [external_tabby_core_.Platform.Linux]: '\x1bb',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'next-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1b[1;5C',
                            [external_tabby_core_.Platform.macOS]: '\x1bf',
                            [external_tabby_core_.Platform.Linux]: '\x1bf',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'delete-line':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput('\x1bw');
                    });
                    break;
                case 'delete-previous-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput('\u0017');
                    });
                    break;
                case 'delete-next-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1bd\x1b[3;5~',
                            [external_tabby_core_.Platform.macOS]: '\x1bd',
                            [external_tabby_core_.Platform.Linux]: '\x1bd',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'copy-current-path':
                    this.copyCurrentPath();
                    break;
                case 'scroll-to-top':
                    (_e = this.frontend) === null || _e === void 0 ? void 0 : _e.scrollToTop();
                    break;
                case 'scroll-page-up':
                    (_f = this.frontend) === null || _f === void 0 ? void 0 : _f.scrollPages(-1);
                    break;
                case 'scroll-up':
                    (_g = this.frontend) === null || _g === void 0 ? void 0 : _g.scrollLines(-1);
                    break;
                case 'scroll-down':
                    (_h = this.frontend) === null || _h === void 0 ? void 0 : _h.scrollLines(1);
                    break;
                case 'scroll-page-down':
                    (_j = this.frontend) === null || _j === void 0 ? void 0 : _j.scrollPages(1);
                    break;
                case 'scroll-to-bottom':
                    (_k = this.frontend) === null || _k === void 0 ? void 0 : _k.scrollToBottom();
                    break;
            }
        }));
        this.bellPlayer = document.createElement('audio');
        this.bellPlayer.src = __webpack_require__(/*! ../bell.ogg */ 5743);
        this.bellPlayer.load();
        this.contextMenuProviders.sort((a, b) => a.weight - b.weight);
    }
    /** @hidden */
    ngOnInit() {
        var _a, _b;
        this.pinToolbar = this.enableToolbar && ((_a = window.localStorage.pinTerminalToolbar) !== null && _a !== void 0 ? _a : 'true') === 'true';
        this.focused$.subscribe(() => {
            var _a;
            this.configure();
            (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.focus();
        });
        this.subscribeUntilDestroyed(this.platform.themeChanged$, () => {
            this.configure();
        });
        // Check if the the WebGL renderer is compatible with xterm.js:
        // - https://github.com/Eugeny/tabby/issues/8884
        // - https://github.com/microsoft/vscode/issues/190195
        // - https://github.com/xtermjs/xterm.js/issues/4665
        // - https://bugs.chromium.org/p/chromium/issues/detail?id=1476475
        //
        // Inspired by https://github.com/microsoft/vscode/pull/191795
        let enable8884Workarround = false;
        const checkCanvas = document.createElement('canvas');
        const checkGl = checkCanvas.getContext('webgl2');
        const debugInfo = checkGl === null || checkGl === void 0 ? void 0 : checkGl.getExtension('WEBGL_debug_renderer_info');
        if (checkGl && debugInfo) {
            const renderer = checkGl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
            if (renderer.startsWith('ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero)')) {
                enable8884Workarround = true;
            }
        }
        const cls = enable8884Workarround ? XTermFrontend : (_b = {
            xterm: XTermFrontend,
            'xterm-webgl': XTermWebGLFrontend,
        }[this.config.store.terminal.frontend]) !== null && _b !== void 0 ? _b : XTermFrontend;
        this.frontend = new cls(this.injector);
        this.frontendReady$.pipe((0,external_rxjs_.first)()).subscribe(() => {
            this.onFrontendReady();
        });
        this.frontend.resize$.pipe((0,external_rxjs_.first)()).subscribe(({ columns, rows }) => __awaiter(this, void 0, void 0, function* () {
            var _c;
            this.size = { columns, rows };
            this.frontendReady.next();
            this.frontendReady.complete();
            this.config.enabledServices(this.decorators).forEach(decorator => {
                try {
                    decorator.attach(this);
                }
                catch (e) {
                    this.logger.warn('Decorator attach() throws', e);
                }
            });
            setTimeout(() => {
                var _a;
                (_a = this.session) === null || _a === void 0 ? void 0 : _a.resize(columns, rows);
            }, 1000);
            (_c = this.session) === null || _c === void 0 ? void 0 : _c.releaseInitialDataBuffer();
            this.sessionChanged$.subscribe(() => {
                var _a;
                (_a = this.session) === null || _a === void 0 ? void 0 : _a.releaseInitialDataBuffer();
            });
        }));
        this.alternateScreenActive$.subscribe(x => {
            this.alternateScreenActive = x;
        });
        setImmediate(() => __awaiter(this, void 0, void 0, function* () {
            var _d, _e;
            if (this.hasFocus) {
                yield ((_d = this.frontend) === null || _d === void 0 ? void 0 : _d.attach(this.content.nativeElement, this.profile));
                (_e = this.frontend) === null || _e === void 0 ? void 0 : _e.configure(this.profile);
            }
            else {
                this.focused$.pipe((0,external_rxjs_.first)()).subscribe(() => __awaiter(this, void 0, void 0, function* () {
                    var _f, _g;
                    yield ((_f = this.frontend) === null || _f === void 0 ? void 0 : _f.attach(this.content.nativeElement, this.profile));
                    (_g = this.frontend) === null || _g === void 0 ? void 0 : _g.configure(this.profile);
                }));
            }
        }));
        this.attachTermContainerHandlers();
        this.configure();
        setTimeout(() => {
            this.binaryOutput$.subscribe(() => {
                this.displayActivity();
            });
        }, 1000);
        this.frontend.bell$.subscribe(() => {
            var _a;
            if (this.config.store.terminal.bell === 'visual') {
                (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.visualBell();
            }
            if (this.config.store.terminal.bell === 'audible') {
                this.bellPlayer.play();
            }
        });
        this.frontend.focus();
        this.blurred$.subscribe(() => {
            this.multifocus.cancel();
        });
        this.visibility$
            .pipe((0,external_rxjs_.debounce)(visibility => (0,external_rxjs_.interval)(visibility ? 0 : INACTIVE_TAB_UNLOAD_DELAY)))
            .subscribe(visibility => {
            var _a, _b, _c;
            if (this.frontend instanceof XTermFrontend) {
                if (visibility) {
                    // this.frontend.resizeHandler()
                    const term = this.frontend.xterm;
                    (_a = term._core._renderService) === null || _a === void 0 ? void 0 : _a.clear();
                    (_b = term._core._renderService) === null || _b === void 0 ? void 0 : _b.handleResize(term.cols, term.rows);
                }
                else {
                    (_c = this.frontend.xterm.element) === null || _c === void 0 ? void 0 : _c.querySelectorAll('canvas').forEach(c => {
                        c.height = c.width = 0;
                        c.style.height = c.style.width = '0px';
                    });
                }
            }
        });
    }
    onFrontendReady() {
        this.frontendIsReady = true;
        if (this.savedState) {
            this.frontend.restoreState(this.savedState);
            if (!this.savedStateIsLive) {
                this.frontend.write('\r\n\r\n');
                this.frontend.write(ansi_colors_default().bgWhite.black(' * ') + ansi_colors_default().bgBlackBright.white(' History restored '));
                this.frontend.write('\r\n\r\n');
            }
        }
        this.input$.subscribe(data => {
            this.recentInputs += data;
            this.recentInputs = this.recentInputs.substring(this.recentInputs.length - 32);
        });
    }
    buildContextMenu() {
        return __awaiter(this, void 0, void 0, function* () {
            let items = [];
            for (const section of yield Promise.all(this.contextMenuProviders.map(x => x.getItems(this)))) {
                items = items.concat(section);
                items.push({ type: 'separator' });
            }
            items.splice(items.length - 1, 1);
            return items;
        });
    }
    /**
     * Feeds input into the active session
     */
    sendInput(data) {
        var _a, _b;
        if (!(data instanceof Buffer)) {
            data = Buffer.from(data, 'utf-8');
        }
        (_a = this.session) === null || _a === void 0 ? void 0 : _a.feedFromTerminal(data);
        if (this.config.store.terminal.scrollOnInput && !data.equals(OSC_FOCUS_IN) && !data.equals(OSC_FOCUS_OUT)) {
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.scrollToBottom();
        }
    }
    /**
     * Feeds input into the terminal frontend
     */
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            this.frontendWriteLock = this.frontendWriteLock.then(() => this.withSpinnerPaused(() => this.writeRaw(data)));
            yield this.frontendWriteLock;
        });
    }
    writeRaw(data) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.frontend) {
                throw new Error('Frontend not ready');
            }
            if (this.config.store.terminal.detectProgress) {
                const percentageMatch = /(^|[^\d])(\d+(\.\d+)?)%([^\d]|$)/.exec(data);
                if (!this.alternateScreenActive && percentageMatch) {
                    const percentage = percentageMatch[3] ? parseFloat(percentageMatch[2]) : parseInt(percentageMatch[2]);
                    if (percentage > 0 && percentage <= 100) {
                        this.setProgress(percentage);
                    }
                }
                else {
                    this.setProgress(null);
                }
            }
            yield this.frontend.write(data);
        });
    }
    paste() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (this.hostApp.platform === external_tabby_core_.Platform.Windows) {
                data = data.replaceAll('\r\n', '\r');
            }
            else {
                data = data.replaceAll('\n', '\r');
            }
            if (this.config.store.terminal.replaceNewlinesWithSpacesOnPaste) {
                data = data.replace(/[\r\n]+/g, ' ');
            }
            if (this.config.store.terminal.trimWhitespaceOnPaste && data.indexOf('\n') === data.length - 1) {
                // Ends with a newline and has no other line breaks
                data = data.substring(0, data.length - 1);
            }
            if (!this.alternateScreenActive) {
                if ((data.includes('\r') || data.includes('\n')) && this.config.store.terminal.warnOnMultilinePaste) {
                    const buttons = [
                        this.translate.instant('Paste'),
                        this.translate.instant('Cancel'),
                    ];
                    const result = (yield this.platform.showMessageBox({
                        type: 'warning',
                        detail: data.slice(0, 1000),
                        message: this.translate.instant('Paste multiple lines?'),
                        buttons,
                        defaultId: 0,
                        cancelId: 1,
                    })).response;
                    if (result === 1) {
                        return;
                    }
                }
                else {
                    if (this.config.store.terminal.trimWhitespaceOnPaste) {
                        data = data.trimEnd();
                        if (!data.includes('\r')) {
                            data = data.trimStart();
                        }
                    }
                }
            }
            if (this.config.store.terminal.bracketedPaste && ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.supportsBracketedPaste())) {
                data = `\x1b[200~${data}\x1b[201~`;
            }
            this.sendInput(data);
        });
    }
    /**
     * Applies the user settings to the terminal
     */
    configure() {
        var _a;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.configure(this.profile);
        this.backgroundColor = getTerminalBackgroundColor(this.config, this.themes, this.profile.terminalColorScheme);
    }
    zoomIn() {
        var _a;
        this.zoom++;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    zoomOut() {
        var _a;
        this.zoom--;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    resetZoom() {
        var _a;
        this.zoom = 0;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    copyCurrentPath() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let cwd = null;
            if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.supportsWorkingDirectory()) {
                cwd = yield this.session.getWorkingDirectory();
            }
            if (cwd) {
                this.platform.setClipboard({ text: cwd });
                this.notifications.notice(this.translate.instant('Copied'));
            }
            else {
                this.notifications.error(this.translate.instant('Shell does not support current path detection'));
            }
        });
    }
    /** @hidden */
    ngOnDestroy() {
        super.ngOnDestroy();
        this.stopSpinner();
    }
    destroy() {
        const _super = Object.create(null, {
            destroy: { get: () => super.destroy }
        });
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function* () {
            (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.detach(this.content.nativeElement);
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.destroy();
            this.frontend = undefined;
            this.content.nativeElement.remove();
            this.detachTermContainerHandlers();
            this.config.enabledServices(this.decorators).forEach(decorator => {
                try {
                    decorator.detach(this);
                }
                catch (e) {
                    this.logger.warn('Decorator attach() throws', e);
                }
            });
            this.output.complete();
            this.binaryOutput.complete();
            this.frontendReady.complete();
            _super.destroy.call(this);
            if ((_c = this.session) === null || _c === void 0 ? void 0 : _c.open) {
                yield this.session.destroy();
            }
        });
    }
    detachTermContainerHandlers() {
        this.termContainerSubscriptions.cancelAll();
    }
    handleRightMouseDown(event) {
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            event.stopPropagation();
            this.rightMouseDownTime = Date.now();
            if (this.config.store.terminal.rightClick === 'menu') {
                this.platform.popupContextMenu(yield this.buildContextMenu(), event);
            }
        });
    }
    handleRightMouseUp(event) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            event.stopPropagation();
            if (this.config.store.terminal.rightClick === 'paste'
                || this.config.store.terminal.rightClick === 'clipboard') {
                const duration = Date.now() - this.rightMouseDownTime;
                if (duration < 250) {
                    if (this.config.store.terminal.rightClick === 'paste') {
                        this.paste();
                    }
                    else if (this.config.store.terminal.rightClick === 'clipboard') {
                        if ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.getSelection()) {
                            this.frontend.copySelection();
                            this.frontend.clearSelection();
                        }
                        else {
                            this.paste();
                        }
                    }
                }
                else {
                    this.platform.popupContextMenu(yield this.buildContextMenu(), event);
                }
            }
        });
    }
    attachTermContainerHandlers() {
        this.detachTermContainerHandlers();
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        const maybeConfigure = () => {
            if (this.hasFocus) {
                setTimeout(() => this.configure(), 250);
            }
        };
        this.termContainerSubscriptions.subscribe(this.frontend.title$, title => this.zone.run(() => {
            if (!this.disableDynamicTitle) {
                this.setTitle(title);
            }
        }));
        this.termContainerSubscriptions.subscribe(this.focused$, () => this.frontend && (this.frontend.enableResizing = true));
        this.termContainerSubscriptions.subscribe(this.blurred$, () => this.frontend && (this.frontend.enableResizing = false));
        this.termContainerSubscriptions.subscribe(this.frontend.mouseEvent$, event => {
            if (event.type === 'mousedown') {
                if (event.which === 1) {
                    this.multifocus.cancel();
                }
                if (event.which === 2) {
                    if (this.config.store.terminal.pasteOnMiddleClick) {
                        this.paste();
                    }
                    event.preventDefault();
                    event.stopPropagation();
                    return;
                }
                if (event.which === 3 || event.which === 1 && event.ctrlKey) {
                    this.handleRightMouseDown(event);
                    return;
                }
            }
            if (event.type === 'mouseup') {
                if (event.which === 3 || event.which === 1 && event.ctrlKey) {
                    this.handleRightMouseUp(event);
                    return;
                }
            }
            if (event.type === 'mousewheel') {
                let wheelDeltaY = 0;
                if ('wheelDeltaY' in event) {
                    wheelDeltaY = event['wheelDeltaY'];
                }
                else {
                    wheelDeltaY = event.deltaY;
                }
                if (event.altKey) {
                    event.preventDefault();
                    const delta = Math.round(wheelDeltaY / 50);
                    this.sendInput((delta > 0 ? '\u001bOA' : '\u001bOB').repeat(Math.abs(delta)));
                }
            }
        });
        this.termContainerSubscriptions.subscribe(this.frontend.input$, data => {
            this.sendInput(data);
        });
        this.termContainerSubscriptions.subscribe(this.frontend.resize$.pipe((0,external_rxjs_.auditTime)(100)), ({ columns, rows }) => {
            this.logger.debug(`Resizing to ${columns}x${rows}`);
            this.size = { columns, rows };
            this.zone.run(() => {
                var _a;
                if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.open) {
                    this.session.resize(columns, rows);
                }
            });
        });
        this.termContainerSubscriptions.subscribe(this.platform.displayMetricsChanged$, maybeConfigure);
        this.termContainerSubscriptions.subscribe(this.hostWindow.windowMoved$, maybeConfigure);
    }
    setSession(session, destroyOnSessionClose = false) {
        if (session) {
            if (this.session) {
                this.setSession(null);
            }
            this.detachSessionHandlers();
            this.session = session;
            this.attachSessionHandlers(destroyOnSessionClose);
        }
        else {
            this.detachSessionHandlers();
            this.session = null;
        }
        this.sessionChanged.next(session);
    }
    showToolbar() {
        this.revealToolbar = true;
        this.toolbarRevealTimeout.clear();
    }
    hideToolbar() {
        this.toolbarRevealTimeout.set();
    }
    togglePinToolbar() {
        this.pinToolbar = !this.pinToolbar;
        window.localStorage.pinTerminalToolbar = this.pinToolbar;
    }
    get hasTitleInset() {
        return this.hostApp.platform === external_tabby_core_.Platform.macOS && this.config.store.appearance.tabsLocation !== 'top' && this.config.store.appearance.frame === 'thin';
    }
    attachSessionHandler(observable, handler) {
        this.sessionHandlers.subscribe(observable, handler);
    }
    attachSessionHandlers(destroyOnSessionClose = false) {
        if (!this.session) {
            throw new Error('Session not set');
        }
        // this.session.output$.bufferTime(10).subscribe((datas) => {
        this.attachSessionHandler(this.session.output$, data => {
            if (this.enablePassthrough) {
                this.output.next(data);
                this.write(data);
            }
        });
        this.attachSessionHandler(this.session.binaryOutput$, data => {
            if (this.enablePassthrough) {
                this.binaryOutput.next(data);
            }
        });
        this.attachSessionHandler(this.session.closed$, () => {
            this.onSessionClosed(destroyOnSessionClose);
        });
        this.attachSessionHandler(this.session.destroyed$, () => {
            this.onSessionDestroyed();
        });
        this.attachSessionHandler(this.session.oscProcessor.copyRequested$, content => {
            this.platform.setClipboard({ text: content });
            this.notifications.notice(this.translate.instant('Copied'));
        });
    }
    /**
     * Method called when session is closed.
     */
    onSessionClosed(destroyOnSessionClose = false) {
        if (destroyOnSessionClose || this.shouldTabBeDestroyedOnSessionClose()) {
            this.destroy();
        }
    }
    /**
     * Return true if tab should be destroyed on session closed.
     */
    shouldTabBeDestroyedOnSessionClose() {
        const behavior = this.profile.behaviorOnSessionEnd;
        return behavior === 'close' || behavior === 'auto' && this.isSessionExplicitlyTerminated();
    }
    /**
     * Method called when session is destroyed. Set the session to null
     */
    onSessionDestroyed() {
        this.setSession(null);
    }
    detachSessionHandlers() {
        this.sessionHandlers.cancelAll();
    }
    startSpinner(text) {
        if (this.spinnerActive || this.spinnerPaused) {
            return;
        }
        if (text) {
            this.spinner.text = text;
        }
        this.spinner.setSpinnerString(6);
        this.spinnerActive = true;
        this.zone.runOutsideAngular(() => {
            this.spinner.start();
        });
    }
    stopSpinner() {
        if (!this.spinnerActive) {
            return;
        }
        this.spinner.stop(true);
        this.spinnerActive = false;
    }
    withSpinnerPaused(work) {
        return __awaiter(this, void 0, void 0, function* () {
            this.spinnerPaused = true;
            if (this.spinnerActive) {
                this.spinner.stop(true);
            }
            try {
                yield work();
            }
            finally {
                this.spinnerPaused = false;
                if (this.spinnerActive) {
                    this.zone.runOutsideAngular(() => {
                        this.spinner.start();
                    });
                }
            }
        });
    }
    forEachFocusedTerminalPane(cb) {
        if (this.parent && this.parent instanceof external_tabby_core_.SplitTabComponent && this.parent._allFocusMode) {
            for (const tab of this.parent.getAllTabs()) {
                if (tab instanceof BaseTerminalTabComponent_1) {
                    cb(tab);
                }
            }
        }
        else {
            cb(this);
        }
    }
    /**
     * Return true if the user explicitly exit the session
     */
    isSessionExplicitlyTerminated() {
        return false;
    }
};
BaseTerminalTabComponent.template = __webpack_require__(/*! ../components/baseTerminalTab.component.pug */ 2643);
BaseTerminalTabComponent.styles = [__webpack_require__(/*! ../components/baseTerminalTab.component.scss */ 8375)];
BaseTerminalTabComponent.animations = [
    (0,animations_.trigger)('toolbarSlide', [
        (0,animations_.transition)(':enter', [
            (0,animations_.style)({
                transform: 'translateY(-25%)',
                opacity: '0',
            }),
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(0%)',
                opacity: '1',
            })),
        ]),
        (0,animations_.transition)(':leave', [
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(-25%)',
                opacity: '0',
            })),
        ]),
    ]),
    (0,animations_.trigger)('panelSlide', [
        (0,animations_.transition)(':enter', [
            (0,animations_.style)({
                transform: 'translateY(25%)',
                opacity: '0',
            }),
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(0%)',
                opacity: '1',
            })),
        ]),
        (0,animations_.transition)(':leave', [
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(25%)',
                opacity: '0',
            })),
        ]),
    ]),
];
BaseTerminalTabComponent.ctorParameters = () => [
    { type: core_.Injector }
];
BaseTerminalTabComponent.propDecorators = {
    zoom: [{ type: core_.Input }],
    showSearchPanel: [{ type: core_.Input }],
    content: [{ type: core_.ViewChild, args: ['content',] }],
    backgroundColor: [{ type: core_.HostBinding, args: ['style.background-color',] }],
    enableToolbar: [{ type: core_.HostBinding, args: ['class.toolbar-enabled',] }],
    pinToolbar: [{ type: core_.HostBinding, args: ['class.toolbar-pinned',] }],
    revealToolbar: [{ type: core_.HostBinding, args: ['class.toolbar-revealed',] }],
    searchPanel: [{ type: core_.ViewChild, args: [SearchPanelComponent, { 'static': false },] }],
    hasTitleInset: [{ type: core_.HostBinding, args: ['class.with-title-inset',] }]
};
BaseTerminalTabComponent = BaseTerminalTabComponent_1 = __decorate([
    (0,core_.Component)({ template: '' }),
    __metadata("design:paramtypes", [core_.Injector])
], BaseTerminalTabComponent);


;// ./src/components/terminalToolbar.component.ts



/* eslint-disable @typescript-eslint/explicit-module-boundary-types */



/** @hidden */
let TerminalToolbarComponent = class TerminalToolbarComponent {
    // eslint-disable-next-line @typescript-eslint/no-useless-constructor
    constructor(app) {
        this.app = app;
    }
    onTabDragStart() {
        this.app.emitTabDragStarted(this.tab);
    }
    onTabDragEnd() {
        setTimeout(() => {
            this.app.emitTabDragEnded();
            this.app.emitTabsChanged();
        });
    }
    get shouldShowDragHandle() {
        return this.tab.topmostParent instanceof external_tabby_core_.SplitTabComponent && this.tab.topmostParent.getAllTabs().length > 1;
    }
    onMouseEnter() {
        this.tab.showToolbar();
    }
    onMouseLeave() {
        this.tab.hideToolbar();
    }
};
TerminalToolbarComponent.ctorParameters = () => [
    { type: external_tabby_core_.AppService }
];
TerminalToolbarComponent.propDecorators = {
    tab: [{ type: core_.Input }],
    onMouseEnter: [{ type: core_.HostListener, args: ['mouseenter',] }],
    onMouseLeave: [{ type: core_.HostListener, args: ['mouseleave',] }]
};
TerminalToolbarComponent = __decorate([
    (0,core_.Component)({
        selector: 'terminal-toolbar',
        template: (terminalToolbar_componentngResource_default()),
        styles: [(components_terminalToolbar_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.AppService])
], TerminalToolbarComponent);


// EXTERNAL MODULE: ./src/components/colorSchemeSelector.component.pug?ngResource
var colorSchemeSelector_componentngResource = __webpack_require__(882);
var colorSchemeSelector_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemeSelector_componentngResource);
;// ./src/api/colorSchemeProvider.ts
/**
 * Extend to add more terminal color schemes
 */
class TerminalColorSchemeProvider {
}

;// ./src/components/colorSchemeSelector.component.ts


/* eslint-disable @typescript-eslint/explicit-module-boundary-types */




marker('Search color schemes');
/** @hidden */
let ColorSchemeSelectorComponent = class ColorSchemeSelectorComponent {
    constructor(colorSchemeProviders, changeDetector, config) {
        this.colorSchemeProviders = colorSchemeProviders;
        this.changeDetector = changeDetector;
        this.config = config;
        this.allColorSchemes = [];
        this.filter = '';
        this.modelChange = new core_.EventEmitter();
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            const stockColorSchemes = (yield Promise.all(this.config.enabledServices(this.colorSchemeProviders).map(x => x.getSchemes()))).reduce((a, b) => a.concat(b));
            stockColorSchemes.sort((a, b) => a.name.localeCompare(b.name));
            const customColorSchemes = this.config.store.terminal.customColorSchemes;
            this.allColorSchemes = customColorSchemes.concat(stockColorSchemes);
            this.changeDetector.markForCheck();
        });
    }
    selectScheme(scheme) {
        this.model = scheme;
        this.modelChange.emit(scheme);
        this.changeDetector.markForCheck();
    }
};
ColorSchemeSelectorComponent.ctorParameters = () => [
    { type: Array, decorators: [{ type: core_.Inject, args: [TerminalColorSchemeProvider,] }] },
    { type: core_.ChangeDetectorRef },
    { type: external_tabby_core_.ConfigService }
];
ColorSchemeSelectorComponent.propDecorators = {
    model: [{ type: core_.Input }],
    modelChange: [{ type: core_.Output }],
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
ColorSchemeSelectorComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-scheme-selector',
        template: (colorSchemeSelector_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: ["\n        :host {\n            display: block;\n            max-height: 100vh;\n            overflow-y: auto;\n        }\n    "]
    }),
    __metadata("design:paramtypes", [Array, core_.ChangeDetectorRef,
        external_tabby_core_.ConfigService])
], ColorSchemeSelectorComponent);


// EXTERNAL MODULE: ./src/components/inputProcessingSettings.component.pug?ngResource
var inputProcessingSettings_componentngResource = __webpack_require__(2657);
var inputProcessingSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(inputProcessingSettings_componentngResource);
;// ./src/components/inputProcessingSettings.component.ts


/* eslint-disable @typescript-eslint/explicit-module-boundary-types */


/** @hidden */
let InputProcessingSettingsComponent = class InputProcessingSettingsComponent {
    constructor() {
        this.backspaceModes = [
            {
                key: 'backspace',
                name: marker('Pass-through'),
            },
            {
                key: 'ctrl-h',
                name: 'Ctrl-H',
            },
            {
                key: 'ctrl-?',
                name: 'Ctrl-?',
            },
            {
                key: 'delete',
                name: 'Delete (CSI 3~)',
            },
        ];
    }
    getBackspaceModeName(key) {
        var _a;
        return (_a = this.backspaceModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
    setBackspaceMode(mode) {
        this.options.backspace = mode;
    }
};
InputProcessingSettingsComponent.propDecorators = {
    options: [{ type: core_.Input }]
};
InputProcessingSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'input-processing-settings',
        template: (inputProcessingSettings_componentngResource_default()),
    })
], InputProcessingSettingsComponent);


// EXTERNAL MODULE: ./src/components/colorSchemeSettingsForMode.component.pug?ngResource
var colorSchemeSettingsForMode_componentngResource = __webpack_require__(204);
var colorSchemeSettingsForMode_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemeSettingsForMode_componentngResource);
// EXTERNAL MODULE: ./src/components/colorSchemeSettingsForMode.component.scss?ngResource
var components_colorSchemeSettingsForMode_componentngResource = __webpack_require__(9702);
var components_colorSchemeSettingsForMode_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_colorSchemeSettingsForMode_componentngResource);
;// ./src/components/colorSchemeSettingsForMode.component.ts



/* eslint-disable @typescript-eslint/explicit-module-boundary-types */





marker('Search color schemes');
/** @hidden */
let ColorSchemeSettingsForModeComponent = class ColorSchemeSettingsForModeComponent {
    constructor(colorSchemeProviders, changeDetector, platform, translate, config) {
        this.colorSchemeProviders = colorSchemeProviders;
        this.changeDetector = changeDetector;
        this.platform = platform;
        this.translate = translate;
        this.config = config;
        this.stockColorSchemes = [];
        this.customColorSchemes = [];
        this.allColorSchemes = [];
        this.filter = '';
        this.editing = false;
        this.colorIndexes = [...new Array(16).keys()];
        this.currentStockScheme = null;
        this.currentCustomScheme = null;
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.stockColorSchemes = (yield Promise.all(this.config.enabledServices(this.colorSchemeProviders).map(x => x.getSchemes()))).reduce((a, b) => a.concat(b));
            this.stockColorSchemes.sort((a, b) => a.name.localeCompare(b.name));
            this.customColorSchemes = this.config.store.terminal.customColorSchemes;
            this.changeDetector.markForCheck();
            this.update();
        });
    }
    ngOnChanges() {
        this.update();
    }
    selectScheme(scheme) {
        this.config.store.terminal[this.configKey] = Object.assign({}, scheme);
        this.config.save();
        this.cancelEditing();
        this.update();
    }
    update() {
        this.currentCustomScheme = this.findMatchingScheme(this.config.store.terminal[this.configKey], this.customColorSchemes);
        this.currentStockScheme = this.findMatchingScheme(this.config.store.terminal[this.configKey], this.stockColorSchemes);
        this.allColorSchemes = this.customColorSchemes.concat(this.stockColorSchemes);
        this.changeDetector.markForCheck();
    }
    editScheme() {
        this.editing = true;
    }
    saveScheme() {
        this.customColorSchemes = this.customColorSchemes.filter(x => x.name !== this.config.store.terminal[this.configKey].name);
        this.customColorSchemes.push(this.config.store.terminal[this.configKey]);
        this.config.store.terminal.customColorSchemes = this.customColorSchemes;
        this.config.save();
        this.cancelEditing();
        this.update();
    }
    cancelEditing() {
        this.editing = false;
    }
    deleteScheme(scheme) {
        return __awaiter(this, void 0, void 0, function* () {
            if ((yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant('Delete "{name}"?', scheme),
                buttons: [
                    this.translate.instant('Delete'),
                    this.translate.instant('Keep'),
                ],
                defaultId: 1,
                cancelId: 1,
            })).response === 0) {
                this.customColorSchemes = this.customColorSchemes.filter(x => x.name !== scheme.name);
                this.config.store.terminal.customColorSchemes = this.customColorSchemes;
                this.config.save();
                this.update();
            }
        });
    }
    getCurrentSchemeName() {
        var _a, _b, _c;
        return (_c = (_b = ((_a = this.currentCustomScheme) !== null && _a !== void 0 ? _a : this.currentStockScheme)) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'Custom';
    }
    findMatchingScheme(scheme, schemes) {
        var _a;
        return (_a = schemes.find(x => deep_equal_default()(x, scheme))) !== null && _a !== void 0 ? _a : null;
    }
    colorsTrackBy(index) {
        return index;
    }
};
ColorSchemeSettingsForModeComponent.ctorParameters = () => [
    { type: Array, decorators: [{ type: core_.Inject, args: [TerminalColorSchemeProvider,] }] },
    { type: core_.ChangeDetectorRef },
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.ConfigService }
];
ColorSchemeSettingsForModeComponent.propDecorators = {
    configKey: [{ type: core_.Input }],
    stockColorSchemes: [{ type: core_.Input }],
    customColorSchemes: [{ type: core_.Input }],
    allColorSchemes: [{ type: core_.Input }],
    filter: [{ type: core_.Input }],
    editing: [{ type: core_.Input }],
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
ColorSchemeSettingsForModeComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-scheme-settings-for-mode',
        template: (colorSchemeSettingsForMode_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: [(components_colorSchemeSettingsForMode_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [Array, core_.ChangeDetectorRef,
        external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService,
        external_tabby_core_.ConfigService])
], ColorSchemeSettingsForModeComponent);


;// ./src/api/contextMenuProvider.ts
/**
 * Extend to add more terminal context menu items
 * @deprecated
 */
class TerminalContextMenuItemProvider {
}

;// ./src/settings.ts







/** @hidden */
let AppearanceSettingsTabProvider = class AppearanceSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal-appearance';
        this.icon = 'swatchbook';
        this.title = this.translate.instant('Appearance');
        this.prioritized = true;
    }
    getComponentType() {
        return AppearanceSettingsTabComponent;
    }
};
AppearanceSettingsTabProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
AppearanceSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], AppearanceSettingsTabProvider);

/** @hidden */
let ColorSchemeSettingsTabProvider = class ColorSchemeSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal-color-scheme';
        this.icon = 'palette';
        this.title = this.translate.instant('Color scheme');
    }
    getComponentType() {
        return ColorSchemeSettingsTabComponent;
    }
};
ColorSchemeSettingsTabProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
ColorSchemeSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], ColorSchemeSettingsTabProvider);

/** @hidden */
let TerminalSettingsTabProvider = class TerminalSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal';
        this.icon = 'terminal';
        this.title = this.translate.instant('Terminal');
        this.prioritized = true;
    }
    getComponentType() {
        return TerminalSettingsTabComponent;
    }
};
TerminalSettingsTabProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
TerminalSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TerminalSettingsTabProvider);


;// ./src/features/debug.ts




/** @hidden */
let DebugDecorator = class DebugDecorator extends TerminalDecorator {
    constructor(platform) {
        super();
        this.platform = platform;
    }
    attach(terminal) {
        var _a;
        let sessionOutputBuffer = '';
        const bufferLength = 8192;
        const handler = data => {
            sessionOutputBuffer += data;
            if (sessionOutputBuffer.length > bufferLength) {
                sessionOutputBuffer = sessionOutputBuffer.substring(sessionOutputBuffer.length - bufferLength);
            }
        };
        this.subscribeUntilDetached(terminal, terminal.sessionChanged$.subscribe(session => {
            this.subscribeUntilDetached(terminal, session === null || session === void 0 ? void 0 : session.output$.subscribe(handler));
        }));
        this.subscribeUntilDetached(terminal, (_a = terminal.session) === null || _a === void 0 ? void 0 : _a.output$.subscribe(handler));
        terminal.addEventListenerUntilDestroyed(terminal.content.nativeElement, 'keyup', (e) => {
            // Ctrl-Shift-Alt-1
            if (e.which === 49 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doSaveState(terminal);
            }
            // Ctrl-Shift-Alt-2
            if (e.which === 50 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doLoadState(terminal);
            }
            // Ctrl-Shift-Alt-3
            if (e.which === 51 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doCopyState(terminal);
            }
            // Ctrl-Shift-Alt-4
            if (e.which === 52 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doPasteState(terminal);
            }
            // Ctrl-Shift-Alt-5
            if (e.which === 53 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doSaveOutput(sessionOutputBuffer);
            }
            // Ctrl-Shift-Alt-6
            if (e.which === 54 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doLoadOutput(terminal);
            }
            // Ctrl-Shift-Alt-7
            if (e.which === 55 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doCopyOutput(sessionOutputBuffer);
            }
            // Ctrl-Shift-Alt-8
            if (e.which === 56 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doPasteOutput(terminal);
            }
        });
    }
    loadFile() {
        return __awaiter(this, void 0, void 0, function* () {
            const transfer = yield this.platform.startUpload();
            if (!transfer.length) {
                return null;
            }
            const data = yield transfer[0].readAll();
            transfer[0].close();
            return data.toString();
        });
    }
    saveFile(content, name) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = Buffer.from(content);
            const transfer = yield this.platform.startDownload(name, 0o644, data.length);
            if (transfer) {
                transfer.write(data);
                transfer.close();
            }
        });
    }
    doSaveState(terminal) {
        this.saveFile(terminal.frontend.saveState(), 'state.txt');
    }
    doCopyState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = '```' + JSON.stringify(terminal.frontend.saveState()) + '```';
            this.platform.setClipboard({ text: data });
        });
    }
    doLoadState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = yield this.loadFile();
            if (data) {
                terminal.frontend.restoreState(data);
            }
        });
    }
    doPasteState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (data) {
                if (data.startsWith('`')) {
                    data = data.substring(3, data.length - 3);
                }
                terminal.frontend.restoreState(JSON.parse(data));
            }
        });
    }
    doSaveOutput(buffer) {
        this.saveFile(buffer, 'output.txt');
    }
    doCopyOutput(buffer) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = '```' + JSON.stringify(buffer) + '```';
            this.platform.setClipboard({ text: data });
        });
    }
    doLoadOutput(terminal) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const data = yield this.loadFile();
            if (data) {
                yield ((_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.write(data));
            }
        });
    }
    doPasteOutput(terminal) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (data) {
                if (data.startsWith('`')) {
                    data = data.substring(3, data.length - 3);
                }
                yield ((_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.write(JSON.parse(data)));
            }
        });
    }
};
DebugDecorator.ctorParameters = () => [
    { type: external_tabby_core_.PlatformService }
];
DebugDecorator = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService])
], DebugDecorator);


// EXTERNAL MODULE: ./node_modules/zmodem.js/index.js
var zmodem_js = __webpack_require__(701);
;// ./src/api/middleware.ts


class SessionMiddleware {
    constructor() {
        this.outputToSession = new external_rxjs_.Subject();
        this.outputToTerminal = new external_rxjs_.Subject();
    }
    get outputToSession$() { return this.outputToSession; }
    get outputToTerminal$() { return this.outputToTerminal; }
    feedFromSession(data) {
        this.outputToTerminal.next(data);
    }
    feedFromTerminal(data) {
        this.outputToSession.next(data);
    }
    close() {
        this.outputToSession.complete();
        this.outputToTerminal.complete();
    }
}
class SessionMiddlewareStack extends SessionMiddleware {
    constructor() {
        super();
        this.stack = [];
        this.subs = new external_tabby_core_.SubscriptionContainer();
        this.push(new SessionMiddleware());
    }
    push(middleware) {
        this.stack.push(middleware);
        this.relink();
    }
    unshift(middleware) {
        this.stack.unshift(middleware);
        this.relink();
    }
    remove(middleware) {
        this.stack = this.stack.filter(m => m !== middleware);
        this.relink();
    }
    replace(middleware, newMiddleware) {
        const index = this.stack.indexOf(middleware);
        if (index >= 0) {
            this.stack[index].close();
            this.stack[index] = newMiddleware;
        }
        else {
            this.stack.push(newMiddleware);
        }
        this.relink();
    }
    feedFromSession(data) {
        this.stack[0].feedFromSession(data);
    }
    feedFromTerminal(data) {
        this.stack[this.stack.length - 1].feedFromTerminal(data);
    }
    close() {
        for (const m of this.stack) {
            m.close();
        }
        this.subs.cancelAll();
        super.close();
    }
    relink() {
        this.subs.cancelAll();
        for (let i = 0; i < this.stack.length - 1; i++) {
            this.subs.subscribe(this.stack[i].outputToTerminal$, x => this.stack[i + 1].feedFromSession(x));
        }
        this.subs.subscribe(this.stack[this.stack.length - 1].outputToTerminal$, x => this.outputToTerminal.next(x));
        for (let i = this.stack.length - 2; i >= 0; i--) {
            this.subs.subscribe(this.stack[i + 1].outputToSession$, x => this.stack[i].feedFromTerminal(x));
        }
        this.subs.subscribe(this.stack[0].outputToSession$, x => this.outputToSession.next(x));
    }
}

;// ./src/features/zmodem.ts
var _ZModemDecorator_injector;








const SPACER = '            ';
class ZModemMiddleware extends SessionMiddleware {
    constructor() {
        super();
        this.isActive = false;
        this.activeSession = null;
        this.log = (0,core_.inject)(external_tabby_core_.LogService);
        this.translate = (0,core_.inject)(external_tabby_core_.TranslateService);
        this.platform = (0,core_.inject)(external_tabby_core_.PlatformService);
        this.cancelEvent = this.outputToSession$.pipe((0,external_rxjs_.filter)(x => x.length === 1 && x[0] === 3));
        this.logger = this.log.create('zmodem');
        this.sentry = new zmodem_js.Sentry({
            to_terminal: data => {
                if (this.isActive && this.activeSession) {
                    this.outputToTerminal.next(Buffer.from(data));
                }
            },
            sender: data => this.outputToSession.next(Buffer.from(data)),
            on_detect: (detection) => __awaiter(this, void 0, void 0, function* () {
                if ((yield this.platform.showMessageBox({
                    type: 'warning',
                    message: this.translate.instant('Accept a ZMODEM session?'),
                    detail: this.translate.instant('If you have not requested it, it could be a sign of malicious activity.'),
                    buttons: [
                        this.translate.instant('Accept'),
                        this.translate.instant('Reject'),
                    ],
                    defaultId: 0,
                    cancelId: 1,
                })).response === 1) {
                    return;
                }
                try {
                    this.isActive = true;
                    yield this.process(detection);
                }
                finally {
                    this.isActive = false;
                }
            }),
            on_retract: () => {
                this.showMessage('transfer cancelled');
                this.activeSession = null;
                this.isActive = false;
            },
        });
    }
    feedFromSession(data) {
        var _a;
        if (this.isActive || this.activeSession) {
            try {
                this.sentry.consume(data);
            }
            catch (e) {
                this.showMessage(ansi_colors_default().bgRed.black(' Error ') + ' ' + e);
                this.logger.error('protocol error', e);
                (_a = this.activeSession) === null || _a === void 0 ? void 0 : _a.abort();
                this.activeSession = null;
                this.isActive = false;
                // Don't forward the problematic data to terminal
                return;
            }
        }
        else {
            try {
                this.sentry.consume(data);
            }
            catch (e) {
                this.logger.error('zmodem detection error', e);
            }
            this.outputToTerminal.next(data);
        }
    }
    process(detection) {
        return __awaiter(this, void 0, void 0, function* () {
            this.showMessage(ansi_colors_default().bgBlue.black(' ZMODEM ') + ' Session started');
            this.showMessage('------------------------');
            const zsession = detection.confirm();
            this.activeSession = zsession;
            this.logger.info('new session', zsession);
            try {
                if (zsession.type === 'send') {
                    const transfers = yield this.platform.startUpload({ multiple: true });
                    let filesRemaining = transfers.length;
                    let sizeRemaining = transfers.reduce((a, b) => a + b.getSize(), 0);
                    for (const transfer of transfers) {
                        yield this.sendFile(zsession, transfer, filesRemaining, sizeRemaining);
                        filesRemaining--;
                        sizeRemaining -= transfer.getSize();
                    }
                    yield zsession.close();
                }
                else {
                    zsession.on('offer', xfer => {
                        this.receiveFile(xfer, zsession);
                    });
                    zsession.start();
                    yield new Promise(resolve => zsession.on('session_end', resolve));
                }
                this.showMessage(ansi_colors_default().bgBlue.black(' ZMODEM ') + ' Complete');
            }
            catch (error) {
                this.logger.error('ZMODEM session error', error);
                this.showMessage(ansi_colors_default().bgRed.black(' ZMODEM ') + ` Session failed: ${error.message}`);
                try {
                    zsession.abort();
                }
                catch (_a) { }
            }
            finally {
                this.activeSession = null;
            }
        });
    }
    receiveFile(xfer, zsession) {
        return __awaiter(this, void 0, void 0, function* () {
            const details = xfer.get_details();
            this.showMessage(ansi_colors_default().bgYellow.black(' Offered ') + ' ' + details.name, true);
            this.logger.info('offered', xfer);
            const transfer = yield this.platform.startDownload(details.name, 0o644, details.size);
            if (!transfer) {
                this.showMessage(ansi_colors_default().bgRed.black(' Rejected ') + ' ' + details.name);
                xfer.skip();
                return;
            }
            let canceled = false;
            const cancelSubscription = this.cancelEvent.subscribe(() => {
                try {
                    zsession._skip();
                }
                catch (_a) { }
                canceled = true;
            });
            let writeQueue = Promise.resolve();
            let receivedBytes = 0;
            let lastUpdateTime = 0;
            try {
                yield Promise.race([
                    xfer.accept({
                        on_input: chunk => {
                            if (canceled) {
                                return;
                            }
                            receivedBytes += chunk.length;
                            const now = Date.now();
                            if (now - lastUpdateTime > 500) {
                                lastUpdateTime = now;
                                const percent = Math.round(100 * receivedBytes / details.size);
                                const percentStr = percent.toString().padStart(3, ' ');
                                this.showMessage(ansi_colors_default().bgYellow.black(` ${percentStr}% `) + ' ' + details.name, true);
                            }
                            writeQueue = writeQueue
                                .then(() => transfer.write(Buffer.from(chunk)))
                                .catch(err => {
                                this.logger.error('Zmodem write error', err);
                            });
                        },
                    }),
                    this.cancelEvent.pipe((0,external_rxjs_.first)()).toPromise(),
                ]);
                yield writeQueue;
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    transfer.cancel();
                    this.showMessage(ansi_colors_default().bgRed.black(' Canceled ') + ' ' + details.name);
                }
                else {
                    transfer.close();
                    this.showMessage(ansi_colors_default().bgGreen.black(' Received ') + ' ' + details.name);
                }
            }
            catch (_a) {
                this.showMessage(ansi_colors_default().bgRed.black(' Error ') + ' ' + details.name);
            }
            cancelSubscription.unsubscribe();
        });
    }
    sendFile(zsession, transfer, filesRemaining, sizeRemaining) {
        return __awaiter(this, void 0, void 0, function* () {
            const offer = {
                name: transfer.getName(),
                size: transfer.getSize(),
                mode: transfer.getMode(),
                files_remaining: filesRemaining,
                bytes_remaining: sizeRemaining,
            };
            this.logger.info('offering', offer);
            this.showMessage(ansi_colors_default().bgYellow.black(' Offered ') + ' ' + offer.name, true);
            const xfer = yield zsession.send_offer(offer);
            if (xfer) {
                let canceled = false;
                const cancelSubscription = this.cancelEvent.subscribe(() => {
                    canceled = true;
                });
                while (true) {
                    const chunk = yield transfer.read();
                    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                    if (canceled || !chunk.length) {
                        break;
                    }
                    yield xfer.send(chunk);
                    this.showMessage(ansi_colors_default().bgYellow.black(' ' + Math.round(100 * transfer.getCompletedBytes() / offer.size).toString().padStart(3, ' ') + '% ') + offer.name, true);
                }
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    transfer.cancel();
                }
                else {
                    transfer.close();
                }
                yield xfer.end();
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    this.showMessage(ansi_colors_default().bgRed.black(' Canceled ') + ' ' + offer.name);
                }
                else {
                    this.showMessage(ansi_colors_default().bgGreen.black(' Sent ') + ' ' + offer.name);
                }
                cancelSubscription.unsubscribe();
            }
            else {
                transfer.cancel();
                this.showMessage(ansi_colors_default().bgRed.black(' Rejected ') + ' ' + offer.name);
                this.logger.warn('rejected by the other side');
            }
        });
    }
    showMessage(msg, overwrite = false) {
        this.outputToTerminal.next(Buffer.from(`\r${msg}${SPACER}`));
        if (!overwrite) {
            this.outputToTerminal.next(Buffer.from('\r\n'));
        }
    }
}
/** @hidden */
let ZModemDecorator = class ZModemDecorator extends TerminalDecorator {
    constructor() {
        super(...arguments);
        _ZModemDecorator_injector.set(this, (0,core_.inject)(core_.EnvironmentInjector));
    }
    attach(terminal) {
        setTimeout(() => {
            this.attachToSession(terminal);
            this.subscribeUntilDetached(terminal, terminal.sessionChanged$.subscribe(() => {
                this.attachToSession(terminal);
            }));
        });
    }
    attachToSession(terminal) {
        if (!terminal.session) {
            return;
        }
        terminal.session.middleware.unshift(__classPrivateFieldGet(this, _ZModemDecorator_injector, "f").runInContext(() => new ZModemMiddleware()));
    }
};
_ZModemDecorator_injector = new WeakMap();
ZModemDecorator = __decorate([
    (0,core_.Injectable)()
], ZModemDecorator);


;// ./src/colorSchemes.ts
var DefaultColorSchemes_1;



let DefaultColorSchemes = DefaultColorSchemes_1 = class DefaultColorSchemes extends TerminalColorSchemeProvider {
    getSchemes() {
        return __awaiter(this, void 0, void 0, function* () {
            return [
                DefaultColorSchemes_1.defaultColorScheme,
                DefaultColorSchemes_1.defaultLightColorScheme,
            ];
        });
    }
};
DefaultColorSchemes.defaultColorScheme = {
    name: 'Tabby Default',
    foreground: '#cacaca',
    background: '#171717',
    cursor: '#bbbbbb',
    colors: [
        '#000000',
        '#ff615a',
        '#b1e969',
        '#ebd99c',
        '#5da9f6',
        '#e86aff',
        '#82fff7',
        '#dedacf',
        '#313131',
        '#f58c80',
        '#ddf88f',
        '#eee5b2',
        '#a5c7ff',
        '#ddaaff',
        '#b7fff9',
        '#ffffff',
    ],
    selection: undefined,
    cursorAccent: undefined,
};
DefaultColorSchemes.defaultLightColorScheme = {
    name: 'Tabby Default Light',
    foreground: '#4d4d4c',
    background: '#ffffff',
    cursor: '#4d4d4c',
    colors: [
        '#000000',
        '#c82829',
        '#718c00',
        '#eab700',
        '#4271ae',
        '#8959a8',
        '#3e999f',
        '#ffffff',
        '#000000',
        '#c82829',
        '#718c00',
        '#eab700',
        '#4271ae',
        '#8959a8',
        '#3e999f',
        '#ffffff',
    ],
    selection: undefined,
    cursorAccent: undefined,
};
DefaultColorSchemes = DefaultColorSchemes_1 = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' })
], DefaultColorSchemes);


;// ./src/config.ts


/** @hidden */
class TerminalConfigProvider extends external_tabby_core_.ConfigProvider {
    constructor() {
        super(...arguments);
        this.defaults = {
            hotkeys: {
                'copy-current-path': [],
            },
            terminal: {
                frontend: 'xterm-webgl',
                fontSize: 14,
                fontWeight: 400,
                fontWeightBold: 700,
                fallbackFont: null,
                linePadding: 0,
                bell: 'off',
                bracketedPaste: true,
                background: 'theme',
                ligatures: false,
                cursor: 'block',
                cursorBlink: true,
                hideTabIndex: false,
                showTabProfileIcon: false,
                hideCloseButton: false,
                hideTabOptionsButton: false,
                rightClick: 'menu',
                pasteOnMiddleClick: true,
                copyOnSelect: false,
                copyAsHTML: true,
                scrollOnInput: true,
                altIsMeta: false,
                wordSeparator: ' ()[]{}\'"',
                colorScheme: Object.assign({ __nonStructural: true }, DefaultColorSchemes.defaultColorScheme),
                lightColorScheme: Object.assign({ __nonStructural: true }, DefaultColorSchemes.defaultLightColorScheme),
                customColorSchemes: [],
                warnOnMultilinePaste: true,
                searchRegexAlwaysEnabled: false,
                searchOptions: {
                    regex: false,
                    wholeWord: false,
                    caseSensitive: false,
                },
                detectProgress: true,
                scrollbackLines: 25000,
                drawBoldTextInBrightColors: true,
                sixel: true,
                minimumContrastRatio: 4,
                paletteGenerate: false,
                paletteHarmonious: false,
                replaceNewlinesWithSpacesOnPaste: false,
                trimWhitespaceOnPaste: true,
            },
        };
        this.platformDefaults = {
            [external_tabby_core_.Platform.macOS]: {
                terminal: {
                    font: 'Menlo',
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        '⌘-C',
                    ],
                    paste: [
                        '⌘-V',
                    ],
                    clear: [
                        '⌘-K',
                    ],
                    'select-all': ['⌘-A'],
                    'zoom-in': [
                        '⌘-=',
                        '⌘-Shift-=',
                    ],
                    'zoom-out': [
                        '⌘--',
                        '⌘-Shift--',
                    ],
                    'reset-zoom': [
                        '⌘-0',
                    ],
                    home: ['⌘-Left', 'Home'],
                    end: ['⌘-Right', 'End'],
                    'previous-word': ['⌥-Left'],
                    'next-word': ['⌥-Right'],
                    'delete-previous-word': ['⌥-Backspace'],
                    'delete-line': ['⌘-Backspace'],
                    'delete-next-word': ['⌥-Delete'],
                    search: [
                        '⌘-F',
                    ],
                    'pane-focus-all': [
                        '⌘-Shift-I',
                    ],
                    'focus-all-tabs': [
                        '⌘-⌥-Shift-I',
                    ],
                    'scroll-to-top': ['Shift-PageUp'],
                    'scroll-page-up': ['⌥-PageUp'],
                    'scroll-up': ['Ctrl-Shift-Up'],
                    'scroll-down': ['Ctrl-Shift-Down'],
                    'scroll-page-down': ['⌥-PageDown'],
                    'scroll-to-bottom': ['Shift-PageDown'],
                },
            },
            [external_tabby_core_.Platform.Windows]: {
                terminal: {
                    font: 'Consolas',
                    rightClick: 'clipboard',
                    pasteOnMiddleClick: false,
                    copyOnSelect: true,
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        'Ctrl-Shift-C',
                    ],
                    paste: [
                        'Ctrl-Shift-V',
                        'Shift-Insert',
                    ],
                    'select-all': ['Ctrl-Shift-A'],
                    clear: [],
                    'zoom-in': [
                        'Ctrl-=',
                        'Ctrl-Shift-=',
                    ],
                    'zoom-out': [
                        'Ctrl--',
                        'Ctrl-Shift--',
                    ],
                    'reset-zoom': [
                        'Ctrl-0',
                    ],
                    home: ['Home'],
                    end: ['End'],
                    'previous-word': ['Ctrl-Left'],
                    'next-word': ['Ctrl-Right'],
                    'delete-previous-word': ['Ctrl-Backspace'],
                    'delete-line': ['Ctrl-Shift-Backspace'],
                    'delete-next-word': ['Ctrl-Delete'],
                    search: [
                        'Ctrl-Shift-F',
                    ],
                    'pane-focus-all': [
                        'Ctrl-Shift-I',
                    ],
                    'focus-all-tabs': [
                        'Ctrl-Alt-Shift-I',
                    ],
                    'scroll-to-top': ['Ctrl-PageUp'],
                    'scroll-page-up': ['Alt-PageUp'],
                    'scroll-up': ['Ctrl-Shift-Up'],
                    'scroll-down': ['Ctrl-Shift-Down'],
                    'scroll-page-down': ['Alt-PageDown'],
                    'scroll-to-bottom': ['Ctrl-PageDown'],
                },
            },
            [external_tabby_core_.Platform.Linux]: {
                terminal: {
                    font: 'Liberation Mono',
                    pasteOnMiddleClick: false, // handled by OS
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        'Ctrl-Shift-C',
                    ],
                    paste: [
                        'Ctrl-Shift-V',
                        'Shift-Insert',
                    ],
                    'select-all': ['Ctrl-Shift-A'],
                    clear: [],
                    'zoom-in': [
                        'Ctrl-=',
                        'Ctrl-Shift-=',
                    ],
                    'zoom-out': [
                        'Ctrl--',
                        'Ctrl-Shift--',
                    ],
                    'reset-zoom': [
                        'Ctrl-0',
                    ],
                    home: ['Home'],
                    end: ['End'],
                    'previous-word': ['Ctrl-Left'],
                    'next-word': ['Ctrl-Right'],
                    'delete-previous-word': ['Ctrl-Backspace'],
                    'delete-line': ['Ctrl-Shift-Backspace'],
                    'delete-next-word': ['Ctrl-Delete'],
                    search: [
                        'Ctrl-Shift-F',
                    ],
                    'pane-focus-all': [
                        'Ctrl-Shift-I',
                    ],
                    'focus-all-tabs': [
                        'Ctrl-Alt-Shift-I',
                    ],
                    'scroll-to-top': ['Ctrl-PageUp'],
                    'scroll-page-up': ['Alt-PageUp'],
                    'scroll-up': ['Ctrl-Shift-Up'],
                    'scroll-down': ['Ctrl-Shift-Down'],
                    'scroll-page-down': ['Alt-PageDown'],
                    'scroll-to-bottom': ['Ctrl-PageDown'],
                },
            },
        };
    }
}

;// ./src/hotkeys.ts



/** @hidden */
let TerminalHotkeyProvider = class TerminalHotkeyProvider extends external_tabby_core_.HotkeyProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.hotkeys = [
            {
                id: 'copy',
                name: this.translate.instant('Copy to clipboard'),
            },
            {
                id: 'paste',
                name: this.translate.instant('Paste from clipboard'),
            },
            {
                id: 'select-all',
                name: this.translate.instant('Select all'),
            },
            {
                id: 'home',
                name: this.translate.instant('Beginning of the line'),
            },
            {
                id: 'end',
                name: this.translate.instant('End of the line'),
            },
            {
                id: 'previous-word',
                name: this.translate.instant('Jump to previous word'),
            },
            {
                id: 'next-word',
                name: this.translate.instant('Jump to next word'),
            },
            {
                id: 'delete-previous-word',
                name: this.translate.instant('Delete previous word'),
            },
            {
                id: 'delete-line',
                name: this.translate.instant('Delete entire line'),
            },
            {
                id: 'delete-next-word',
                name: this.translate.instant('Delete next word'),
            },
            {
                id: 'clear',
                name: this.translate.instant('Clear terminal'),
            },
            {
                id: 'zoom-in',
                name: this.translate.instant('Zoom in'),
            },
            {
                id: 'zoom-out',
                name: this.translate.instant('Zoom out'),
            },
            {
                id: 'reset-zoom',
                name: this.translate.instant('Reset zoom'),
            },
            {
                id: 'ctrl-c',
                name: this.translate.instant('Intelligent Ctrl-C (copy/abort)'),
            },
            {
                id: 'copy-current-path',
                name: this.translate.instant('Copy current path'),
            },
            {
                id: 'search',
                name: this.translate.instant('Search'),
            },
            {
                id: 'pane-focus-all',
                name: this.translate.instant('Focus all panes at once (broadcast)'),
            },
            {
                id: 'focus-all-tabs',
                name: this.translate.instant('Focus all tabs at once (broadcast)'),
            },
            {
                id: 'scroll-to-top',
                name: this.translate.instant('Scroll terminal to top'),
            },
            {
                id: 'scroll-page-up',
                name: this.translate.instant('Scroll terminal one page up'),
            },
            {
                id: 'scroll-up',
                name: this.translate.instant('Scroll terminal one line up'),
            },
            {
                id: 'scroll-down',
                name: this.translate.instant('Scroll terminal one line down'),
            },
            {
                id: 'scroll-page-down',
                name: this.translate.instant('Scroll terminal one page down'),
            },
            {
                id: 'scroll-to-bottom',
                name: this.translate.instant('Scroll terminal to bottom'),
            },
            {
                id: 'reconnect-tab',
                name: this.translate.instant('Reconnect current tab (Serial/Telnet/SSH)'),
            },
            {
                id: 'disconnect-tab',
                name: this.translate.instant('Disconnect current tab (Serial/Telnet/SSH)'),
            },
        ];
    }
    provide() {
        return __awaiter(this, void 0, void 0, function* () {
            return this.hotkeys;
        });
    }
};
TerminalHotkeyProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
TerminalHotkeyProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TerminalHotkeyProvider);


;// ./src/api/connectableTerminalTab.component.ts





/**
 * A class to base your custom connectable terminal tabs on
 */
let ConnectableTerminalTabComponent = class ConnectableTerminalTabComponent extends BaseTerminalTabComponent {
    constructor(injector) {
        super(injector);
        this.injector = injector;
        this.reconnectOffered = false;
        this.isDisconnectedByHand = false;
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, hotkey => {
            if (!this.hasFocus) {
                return;
            }
            switch (hotkey) {
                case 'reconnect-tab':
                    this.reconnect();
                    this.notifications.notice(this.translate.instant('Reconnect'));
                    break;
                case 'disconnect-tab':
                    this.disconnect();
                    this.notifications.notice(this.translate.instant('Disconnect'));
                    break;
            }
        });
    }
    ngOnInit() {
        this.logger = this.log.create(`${this.profile.type}Tab`);
        super.ngOnInit();
    }
    onFrontendReady() {
        this.initializeSession().then(() => {
            this.clearServiceMessagesOnConnect();
        });
        super.onFrontendReady();
    }
    /**
    * Initialize Connectable Session.
    * Set reconnectOffered to false
    */
    initializeSession() {
        return __awaiter(this, void 0, void 0, function* () {
            this.reconnectOffered = false;
            this.isDisconnectedByHand = false;
        });
    }
    /**
    * Method called when session is destroyed. Handle the tab behavior on session end for connectable tab
    */
    onSessionDestroyed() {
        super.onSessionDestroyed();
        if (this.frontend) {
            if (this.profile.behaviorOnSessionEnd === 'reconnect' && !this.isDisconnectedByHand) {
                this.reconnect();
            }
            else if (this.profile.behaviorOnSessionEnd === 'keep' || !this.shouldTabBeDestroyedOnSessionClose()) {
                this.offerReconnection();
            }
        }
    }
    /**
    * Offering reconnection to the user if it hasn't been done yet.
    * Set reconnectOffered to true
    */
    offerReconnection() {
        if (!this.reconnectOffered) {
            this.reconnectOffered = true;
            this.write(this.translate.instant(marker('Press any key to reconnect')) + '\r\n');
            this.input$.pipe((0,external_rxjs_.first)()).subscribe(() => {
                var _a;
                if (!((_a = this.session) === null || _a === void 0 ? void 0 : _a.open) && this.reconnectOffered) {
                    this.reconnect();
                }
            });
        }
    }
    /**
     * Return true if tab should be destroyed on session closed.
     */
    shouldTabBeDestroyedOnSessionClose() {
        if (this.isDisconnectedByHand) {
            return false;
        }
        return super.shouldTabBeDestroyedOnSessionClose();
    }
    getRecoveryToken(options) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            return {
                type: `app:${this.profile.type}-tab`,
                profile: this.profile,
                savedState: (options === null || options === void 0 ? void 0 : options.includeState) && ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.saveState()),
            };
        });
    }
    disconnect() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            this.isDisconnectedByHand = true;
            yield ((_a = this.session) === null || _a === void 0 ? void 0 : _a.destroy());
        });
    }
    reconnect() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            (_a = this.session) === null || _a === void 0 ? void 0 : _a.destroy();
            yield this.initializeSession();
            this.clearServiceMessagesOnConnect();
            (_b = this.session) === null || _b === void 0 ? void 0 : _b.releaseInitialDataBuffer();
        });
    }
    clearServiceMessagesOnConnect() {
        var _a, _b;
        if (this.profile.clearServiceMessagesOnConnect && ((_a = this.session) === null || _a === void 0 ? void 0 : _a.open)) {
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.clear();
        }
    }
};
ConnectableTerminalTabComponent.ctorParameters = () => [
    { type: core_.Injector }
];
ConnectableTerminalTabComponent = __decorate([
    (0,core_.Component)({ template: '' }),
    __metadata("design:paramtypes", [core_.Injector])
], ConnectableTerminalTabComponent);


// EXTERNAL MODULE: ../app/node_modules/uuid/index.js
var uuid = __webpack_require__(6757);
// EXTERNAL MODULE: ../node_modules/slugify/slugify.js
var slugify = __webpack_require__(7562);
var slugify_default = /*#__PURE__*/__webpack_require__.n(slugify);
;// ./src/tabContextMenu.ts










/** @hidden */
let CopyPasteContextMenu = class CopyPasteContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(notifications, translate) {
        super();
        this.notifications = notifications;
        this.translate = translate;
        this.weight = -10;
    }
    getItems(tab, tabHeader) {
        return __awaiter(this, void 0, void 0, function* () {
            if (tabHeader) {
                return [];
            }
            if (tab instanceof BaseTerminalTabComponent) {
                return [
                    {
                        label: this.translate.instant('Copy'),
                        click: () => {
                            setTimeout(() => {
                                var _a;
                                (_a = tab.frontend) === null || _a === void 0 ? void 0 : _a.copySelection();
                                this.notifications.notice(this.translate.instant('Copied'));
                            });
                        },
                    },
                    {
                        label: this.translate.instant('Paste'),
                        click: () => tab.paste(),
                    },
                ];
            }
            return [];
        });
    }
};
CopyPasteContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.NotificationsService },
    { type: external_tabby_core_.TranslateService }
];
CopyPasteContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService])
], CopyPasteContextMenu);

/** @hidden */
let MiscContextMenu = class MiscContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(translate, multifocus) {
        super();
        this.translate = translate;
        this.multifocus = multifocus;
        this.weight = 1;
    }
    getItems(tab) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const items = [];
            if (tab instanceof BaseTerminalTabComponent && tab.enableToolbar && !tab.pinToolbar) {
                items.push({
                    label: this.translate.instant('Show toolbar'),
                    click: () => {
                        tab.pinToolbar = true;
                    },
                });
            }
            if (tab instanceof BaseTerminalTabComponent && ((_a = tab.session) === null || _a === void 0 ? void 0 : _a.supportsWorkingDirectory())) {
                items.push({
                    label: this.translate.instant('Copy current path'),
                    click: () => tab.copyCurrentPath(),
                });
            }
            items.push({
                label: this.translate.instant('Focus all tabs'),
                click: () => {
                    this.multifocus.focusAllTabs();
                },
            });
            if (tab.parent instanceof external_tabby_core_.SplitTabComponent && tab.parent.getAllTabs().length > 1) {
                items.push({
                    label: this.translate.instant('Focus all panes'),
                    click: () => {
                        this.multifocus.focusAllPanes();
                    },
                });
            }
            return items;
        });
    }
};
MiscContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService },
    { type: MultifocusService }
];
MiscContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService,
        MultifocusService])
], MiscContextMenu);

/** @hidden */
let ReconnectContextMenu = class ReconnectContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(translate, notifications) {
        super();
        this.translate = translate;
        this.notifications = notifications;
        this.weight = 1;
    }
    getItems(tab) {
        return __awaiter(this, void 0, void 0, function* () {
            if (tab instanceof ConnectableTerminalTabComponent) {
                return [
                    {
                        label: this.translate.instant('Disconnect'),
                        click: () => {
                            setTimeout(() => {
                                tab.disconnect();
                                this.notifications.notice(this.translate.instant('Disconnect'));
                            });
                        },
                    },
                    {
                        label: this.translate.instant('Reconnect'),
                        click: () => {
                            setTimeout(() => {
                                tab.reconnect();
                                this.notifications.notice(this.translate.instant('Reconnect'));
                            });
                        },
                    },
                ];
            }
            return [];
        });
    }
};
ReconnectContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.NotificationsService }
];
ReconnectContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService,
        external_tabby_core_.NotificationsService])
], ReconnectContextMenu);

/** @hidden */
let LegacyContextMenu = class LegacyContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(contextMenuProviders) {
        super();
        this.contextMenuProviders = contextMenuProviders;
        this.weight = 1;
    }
    getItems(tab) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.contextMenuProviders) {
                return [];
            }
            if (tab instanceof BaseTerminalTabComponent) {
                let items = [];
                for (const p of this.contextMenuProviders) {
                    items = items.concat(yield p.getItems(tab));
                }
                return items;
            }
            return [];
        });
    }
};
LegacyContextMenu.ctorParameters = () => [
    { type: Array, decorators: [{ type: core_.Optional }, { type: core_.Inject, args: [TerminalContextMenuItemProvider,] }] }
];
LegacyContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [Object])
], LegacyContextMenu);

/** @hidden */
let SaveAsProfileContextMenu = class SaveAsProfileContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(config, ngbModal, notifications, translate) {
        super();
        this.config = config;
        this.ngbModal = ngbModal;
        this.notifications = notifications;
        this.translate = translate;
    }
    getItems(tab) {
        return __awaiter(this, void 0, void 0, function* () {
            if (tab instanceof BaseTerminalTabComponent) {
                return [
                    {
                        label: this.translate.instant('Save as profile'),
                        click: () => __awaiter(this, void 0, void 0, function* () {
                            var _a, _b, _c;
                            const modal = this.ngbModal.open(external_tabby_core_.PromptModalComponent);
                            modal.componentInstance.prompt = this.translate.instant('New profile name');
                            modal.componentInstance.value = tab.profile.name;
                            const name = (_a = (yield modal.result.catch(() => null))) === null || _a === void 0 ? void 0 : _a.value;
                            if (!name) {
                                return;
                            }
                            const options = JSON.parse(JSON.stringify(tab.profile.options));
                            const cwd = (_c = yield ((_b = tab.session) === null || _b === void 0 ? void 0 : _b.getWorkingDirectory())) !== null && _c !== void 0 ? _c : tab.profile.options.cwd;
                            if (cwd) {
                                options.cwd = cwd;
                            }
                            const profile = {
                                type: tab.profile.type,
                                name,
                                options,
                            };
                            profile.id = `${profile.type}:custom:${slugify_default()(name)}:${(0,uuid.v4)()}`;
                            profile.group = tab.profile.group;
                            profile.icon = tab.profile.icon;
                            profile.color = tab.profile.color;
                            profile.disableDynamicTitle = tab.profile.disableDynamicTitle;
                            profile.behaviorOnSessionEnd = tab.profile.behaviorOnSessionEnd;
                            this.config.store.profiles = [
                                ...this.config.store.profiles,
                                profile,
                            ];
                            this.config.save();
                            this.notifications.info(this.translate.instant('Saved'));
                        }),
                    },
                ];
            }
            return [];
        });
    }
};
SaveAsProfileContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: ng_bootstrap_.NgbModal },
    { type: external_tabby_core_.NotificationsService },
    { type: external_tabby_core_.TranslateService }
];
SaveAsProfileContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        ng_bootstrap_.NgbModal,
        external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService])
], SaveAsProfileContextMenu);


// EXTERNAL MODULE: ../node_modules/shell-quote/index.js
var shell_quote = __webpack_require__(6045);
;// ./src/cli.ts





let TerminalCLIHandler = class TerminalCLIHandler extends external_tabby_core_.CLIHandler {
    constructor(app, hostWindow, platform, translate) {
        super();
        this.app = app;
        this.hostWindow = hostWindow;
        this.platform = platform;
        this.translate = translate;
        this.firstMatchOnly = true;
        this.priority = 0;
    }
    handle(event) {
        return __awaiter(this, void 0, void 0, function* () {
            const op = event.argv._[0];
            if (op === 'paste') {
                let text = event.argv.text;
                if (event.argv.escape) {
                    text = shell_quote.quote([text]);
                }
                if ((yield this.platform.showMessageBox({
                    type: 'warning',
                    message: this.translate.instant(`Paste "{text}"?`, { text }),
                    buttons: [
                        this.translate.instant('Paste'),
                        this.translate.instant('Cancel'),
                    ],
                    defaultId: 0,
                    cancelId: 1,
                })).response === 1) {
                    return true;
                }
                this.handlePaste(text);
                return true;
            }
            return false;
        });
    }
    handlePaste(text) {
        if (this.app.activeTab instanceof BaseTerminalTabComponent && this.app.activeTab.session) {
            this.app.activeTab.sendInput(text);
            this.hostWindow.bringToFront();
        }
    }
};
TerminalCLIHandler.ctorParameters = () => [
    { type: external_tabby_core_.AppService },
    { type: external_tabby_core_.HostWindowService },
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.TranslateService }
];
TerminalCLIHandler = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.AppService,
        external_tabby_core_.HostWindowService,
        external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService])
], TerminalCLIHandler);


// EXTERNAL MODULE: ./node_modules/hexer/index.js
var hexer = __webpack_require__(2902);
var hexer_default = /*#__PURE__*/__webpack_require__.n(hexer);
// EXTERNAL MODULE: ./node_modules/buffer-replace/index.js
var buffer_replace = __webpack_require__(8915);
var buffer_replace_default = /*#__PURE__*/__webpack_require__.n(buffer_replace);
// EXTERNAL MODULE: ./node_modules/binstring/lib/binstring.js
var binstring = __webpack_require__(4848);
var binstring_default = /*#__PURE__*/__webpack_require__.n(binstring);
// EXTERNAL MODULE: external "stream"
var external_stream_ = __webpack_require__(7748);
// EXTERNAL MODULE: external "readline"
var external_readline_ = __webpack_require__(4902);
;// ./src/middleware/streamProcessing.ts








class TerminalStreamProcessor extends SessionMiddleware {
    constructor(options) {
        super();
        this.options = options;
        this.forceEcho = false;
        this.inputReadline = null;
        this.inputPromptVisible = false;
        this.started = false;
        this.inputReadlineInStream = new external_stream_.PassThrough();
        this.inputReadlineOutStream = new external_stream_.PassThrough();
        this.inputReadlineOutStream.on('data', data => {
            this.outputToTerminal.next(Buffer.from(data));
        });
        this.outputToTerminal$.pipe((0,external_rxjs_.debounce)(() => (0,external_rxjs_.interval)(500))).subscribe(() => {
            if (this.started) {
                this.onOutputSettled();
            }
        });
    }
    start() {
        this.inputReadline = (0,external_readline_.createInterface)({
            input: this.inputReadlineInStream,
            output: this.inputReadlineOutStream,
            terminal: true,
            prompt: this.options.inputMode === 'readline-hex' ? 'hex> ' : '> ',
        });
        this.inputReadline.on('line', line => {
            this.onTerminalInput(Buffer.from(line + '\n'));
            this.resetInputPrompt();
        });
        this.started = true;
    }
    feedFromSession(data) {
        var _a;
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            if (this.inputPromptVisible) {
                (0,external_readline_.clearLine)(this.inputReadlineOutStream, 0);
                this.outputToTerminal.next(Buffer.from('\r'));
                this.inputPromptVisible = false;
            }
        }
        data = this.replaceNewlines(data, this.options.outputNewlines);
        if (this.options.outputMode === 'hex') {
            this.outputToTerminal.next(Buffer.concat([
                Buffer.from('\r\n'),
                Buffer.from(hexer_default()(data, {
                    group: 1,
                    gutter: 4,
                    divide: ansi_colors_default().gray(' ｜ '),
                    emptyHuman: ansi_colors_default().gray('╳'),
                }).replaceAll('\n', '\r\n')),
                Buffer.from('\r\n\n'),
            ]));
        }
        else {
            this.outputToTerminal.next(data);
        }
    }
    feedFromTerminal(data) {
        var _a;
        if (this.options.inputMode === 'local-echo' || this.forceEcho) {
            this.outputToTerminal.next(this.replaceNewlines(data, 'crlf'));
        }
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            this.inputReadlineInStream.write(data);
        }
        else {
            this.onTerminalInput(data);
        }
    }
    resize() {
        var _a;
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            this.inputReadlineOutStream.emit('resize');
        }
    }
    close() {
        var _a;
        (_a = this.inputReadline) === null || _a === void 0 ? void 0 : _a.close();
        super.close();
    }
    onTerminalInput(data) {
        if (this.options.inputMode === 'readline-hex') {
            const tokens = data.toString().split(/\s/g);
            data = Buffer.concat(tokens.filter(t => !!t).map(t => {
                if (t.startsWith('0x')) {
                    t = t.substring(2);
                }
                return binstring_default()(t, { 'in': 'hex' });
            }));
        }
        data = this.replaceNewlines(data, this.options.inputNewlines);
        this.outputToSession.next(data);
    }
    onOutputSettled() {
        var _a;
        if (((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) && !this.inputPromptVisible) {
            this.resetInputPrompt();
        }
    }
    resetInputPrompt() {
        var _a;
        this.outputToTerminal.next(Buffer.from('\r\n'));
        (_a = this.inputReadline) === null || _a === void 0 ? void 0 : _a.prompt(true);
        this.inputPromptVisible = true;
    }
    replaceNewlines(data, mode) {
        if (!mode) {
            return data;
        }
        else if (mode === 'implicit_cr') {
            return buffer_replace_default()(data, '\n', '\r\n');
        }
        else if (mode === 'implicit_lf') {
            return buffer_replace_default()(data, '\r', '\r\n');
        }
        data = buffer_replace_default()(data, '\r\n', '\n');
        data = buffer_replace_default()(data, '\r', '\n');
        const replacement = {
            strip: '',
            cr: '\r',
            lf: '\n',
            crlf: '\r\n',
        }[mode];
        return buffer_replace_default()(data, '\n', replacement);
    }
}

// EXTERNAL MODULE: ../node_modules/clone-deep/index.js
var clone_deep = __webpack_require__(4732);
var clone_deep_default = /*#__PURE__*/__webpack_require__.n(clone_deep);
;// ./src/middleware/loginScriptProcessing.ts


class LoginScriptProcessor extends SessionMiddleware {
    constructor(logger, options) {
        super();
        this.logger = logger;
        this.remainingScripts = [];
        this.escapeSeqMap = {
            a: '\x07',
            b: '\x08',
            e: '\x1b',
            f: '\x0c',
            n: '\x0a',
            r: '\x0d',
            t: '\x09',
            v: '\x0b',
        };
        this.remainingScripts = clone_deep_default()(options.scripts);
        for (const script of this.remainingScripts) {
            if (!script.isRegex) {
                script.expect = this.unescape(script.expect);
            }
            script.send = this.unescape(script.send);
        }
    }
    feedFromSession(data) {
        const dataString = data.toString();
        for (const script of this.remainingScripts) {
            if (!script.expect) {
                continue;
            }
            let match = false;
            if (script.isRegex) {
                const re = new RegExp(script.expect, 'g');
                match = re.test(dataString);
            }
            else {
                match = dataString.includes(script.expect);
            }
            if (match) {
                this.logger.info('Executing script:', script);
                this.outputToSession.next(Buffer.from(script.send + '\n'));
                this.remainingScripts = this.remainingScripts.filter(x => x !== script);
            }
            else {
                if (script.optional) {
                    this.logger.debug('Skip optional script: ' + script.expect);
                    this.remainingScripts = this.remainingScripts.filter(x => x !== script);
                }
                else {
                    break;
                }
            }
        }
        super.feedFromSession(data);
    }
    executeUnconditionalScripts() {
        for (const script of this.remainingScripts) {
            if (!script.expect) {
                this.logger.info('Executing script:', script.send);
                this.outputToSession.next(Buffer.from(script.send + '\n'));
                this.remainingScripts = this.remainingScripts.filter(x => x !== script);
            }
            else {
                break;
            }
        }
    }
    unescape(line) {
        line = line.replace(/\\((x\d{2})|(u\d{4}))/g, (match, g) => {
            return String.fromCharCode(parseInt(g.substr(1), 16));
        });
        return line.replace(/\\(.)/g, (match, g) => {
            return this.escapeSeqMap[g] || g;
        });
    }
}

// EXTERNAL MODULE: external "os"
var external_os_ = __webpack_require__(4234);
;// ./src/middleware/oscProcessing.ts



const OSCPrefix = Buffer.from('\x1b]');
const OSCSuffixes = [Buffer.from('\x07'), Buffer.from('\x1b\\')];
class OSCProcessor extends SessionMiddleware {
    constructor() {
        super(...arguments);
        this.cwdReported = new external_rxjs_.Subject();
        this.buffer = null;
        this.copyRequested = new external_rxjs_.Subject();
    }
    get cwdReported$() { return this.cwdReported; }
    get copyRequested$() { return this.copyRequested; }
    feedFromSession(data) {
        // Prepend any buffered data from previous chunks
        if (this.buffer) {
            data = Buffer.concat([this.buffer, data]);
            this.buffer = null;
        }
        let startIndex = 0;
        const processedData = [];
        while (startIndex < data.length) {
            const prefixIndex = data.indexOf(OSCPrefix, startIndex);
            if (prefixIndex === -1) {
                // No more OSC sequences, pass remaining data
                if (startIndex < data.length) {
                    processedData.push(data.subarray(startIndex));
                }
                break;
            }
            // Pass data before this OSC sequence
            if (prefixIndex > startIndex) {
                processedData.push(data.subarray(startIndex, prefixIndex));
            }
            // Look for suffix after the prefix
            const suffixSearchStart = prefixIndex + OSCPrefix.length;
            let foundSuffix = null;
            for (const suffix of OSCSuffixes) {
                const suffixIndex = data.indexOf(suffix, suffixSearchStart);
                if (suffixIndex !== -1) {
                    if (!foundSuffix || suffixIndex < foundSuffix[1]) {
                        foundSuffix = [suffix, suffixIndex];
                    }
                }
            }
            if (!foundSuffix) {
                // No suffix found - buffer the rest and wait for next chunk
                this.buffer = data.subarray(prefixIndex);
                break;
            }
            // Extract OSC string (between prefix and suffix)
            const oscString = data.subarray(suffixSearchStart, foundSuffix[1]).toString();
            const [oscCodeString, ...oscParams] = oscString.split(';');
            const oscCode = parseInt(oscCodeString);
            if (oscCode === 1337) {
                const paramString = oscParams.join(';');
                if (paramString.startsWith('CurrentDir=')) {
                    let reportedCWD = paramString.split('=', 2)[1];
                    if (reportedCWD.startsWith('~')) {
                        reportedCWD = external_os_.homedir() + reportedCWD.substring(1);
                    }
                    this.cwdReported.next(reportedCWD);
                }
                else {
                    console.debug('Unsupported OSC 1337 parameter:', paramString);
                }
            }
            else if (oscCode === 52) {
                if (oscParams[0] === 'c' || oscParams[0] === '') {
                    const content = Buffer.from(oscParams[1], 'base64');
                    this.copyRequested.next(content.toString());
                }
            }
            // Move past this OSC sequence
            startIndex = foundSuffix[1] + foundSuffix[0].length;
        }
        // Pass through all processed data
        if (processedData.length > 0) {
            super.feedFromSession(Buffer.concat(processedData));
        }
    }
    close() {
        this.cwdReported.complete();
        this.copyRequested.complete();
        super.close();
    }
}

;// ./src/middleware/utf8Splitter.ts


/**
 * Ensures that the session output is chunked at UTF8 character boundaries.
 */
class UTF8SplitterMiddleware extends SessionMiddleware {
    constructor() {
        super(...arguments);
        this.decoder = new external_tabby_core_.UTF8Splitter();
    }
    feedFromSession(data) {
        super.feedFromSession(this.decoder.write(data));
    }
    close() {
        const remainder = this.decoder.flush();
        if (remainder.length) {
            super.feedFromSession(remainder);
        }
        super.close();
    }
}

;// ./src/middleware/inputProcessing.ts

class InputProcessor extends SessionMiddleware {
    constructor(options) {
        super();
        this.options = options;
    }
    feedFromTerminal(data) {
        if (data.length === 1 && data[0] === 0x7f) {
            if (this.options.backspace === 'ctrl-h') {
                data = Buffer.from('\x08');
            }
            else if (this.options.backspace === 'ctrl-?') {
                data = Buffer.from('\x7f');
            }
            else if (this.options.backspace === 'delete') {
                data = Buffer.from('\x1b[3~');
            }
            else {
                data = Buffer.from('\x7f');
            }
        }
        this.outputToSession.next(data);
    }
}

;// ./src/session.ts





/**
 * A session object for a [[BaseTerminalTabComponent]]
 * Extend this to implement custom I/O and process management for your terminal tab
 */
class BaseSession {
    get output$() { return this.output; }
    get binaryOutput$() { return this.binaryOutput; }
    get closed$() { return this.closed; }
    get destroyed$() { return this.destroyed; }
    constructor(logger) {
        this.logger = logger;
        this.oscProcessor = new OSCProcessor();
        this.middleware = new SessionMiddlewareStack();
        this.output = new external_rxjs_.Subject();
        this.binaryOutput = new external_rxjs_.Subject();
        this.closed = new external_rxjs_.Subject();
        this.destroyed = new external_rxjs_.Subject();
        this.loginScriptProcessor = null;
        this.initialDataBuffer = Buffer.from('');
        this.initialDataBufferReleased = false;
        this.middleware.push(this.oscProcessor);
        this.oscProcessor.cwdReported$.subscribe(cwd => {
            this.reportedCWD = cwd;
        });
        this.middleware.outputToTerminal$.subscribe(data => {
            if (!this.initialDataBufferReleased) {
                this.initialDataBuffer = Buffer.concat([this.initialDataBuffer, data]);
            }
            else {
                this.output.next(data.toString());
                this.binaryOutput.next(data);
            }
        });
        this.middleware.outputToSession$.subscribe(data => this.write(data));
    }
    feedFromTerminal(data) {
        this.middleware.feedFromTerminal(data);
    }
    emitOutput(data) {
        this.middleware.feedFromSession(data);
    }
    releaseInitialDataBuffer() {
        this.initialDataBufferReleased = true;
        this.output.next(this.initialDataBuffer.toString());
        this.binaryOutput.next(this.initialDataBuffer);
        this.initialDataBuffer = Buffer.from('');
    }
    setLoginScriptsOptions(options) {
        const newProcessor = new LoginScriptProcessor(this.logger, options);
        if (this.loginScriptProcessor) {
            this.middleware.replace(this.loginScriptProcessor, newProcessor);
        }
        else {
            this.middleware.push(newProcessor);
        }
        this.loginScriptProcessor = newProcessor;
    }
    destroy() {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.open) {
                this.logger.info('Destroying');
                this.open = false;
                this.closed.next();
                this.destroyed.next();
                yield this.gracefullyKillProcess();
            }
            this.middleware.close();
            this.closed.complete();
            this.destroyed.complete();
            this.output.complete();
            this.binaryOutput.complete();
        });
    }
}

;// ./src/index.ts


































/** @hidden */
let TerminalModule = class TerminalModule {
}; // eslint-disable-line @typescript-eslint/no-extraneous-class
TerminalModule = __decorate([
    (0,core_.NgModule)({
        imports: [
            common_.CommonModule,
            forms_.FormsModule,
            ng_bootstrap_.NgbModule,
            external_ngx_toastr_.ToastrModule,
            (external_tabby_core_default()),
            NgxColorsModule,
        ],
        providers: [
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: AppearanceSettingsTabProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: ColorSchemeSettingsTabProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: TerminalSettingsTabProvider, multi: true },
            { provide: external_tabby_core_.ConfigProvider, useClass: TerminalConfigProvider, multi: true },
            { provide: external_tabby_core_.HotkeyProvider, useClass: TerminalHotkeyProvider, multi: true },
            { provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
            { provide: TerminalDecorator, useClass: DebugDecorator, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: CopyPasteContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: MiscContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: LegacyContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: ReconnectContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: SaveAsProfileContextMenu, multi: true },
            { provide: external_tabby_core_.CLIHandler, useClass: TerminalCLIHandler, multi: true },
            { provide: TerminalColorSchemeProvider, useClass: DefaultColorSchemes, multi: true },
        ],
        declarations: [
            colorPicker_component_ColorPickerComponent,
            ColorSchemePreviewComponent,
            ColorSchemeSelectorComponent,
            AppearanceSettingsTabComponent,
            ColorSchemeSettingsTabComponent,
            TerminalSettingsTabComponent,
            SearchPanelComponent,
            StreamProcessingSettingsComponent,
            LoginScriptsSettingsComponent,
            TerminalToolbarComponent,
            InputProcessingSettingsComponent,
            ColorSchemeSettingsForModeComponent,
        ],
        exports: [
            colorPicker_component_ColorPickerComponent,
            ColorSchemeSelectorComponent,
            SearchPanelComponent,
            StreamProcessingSettingsComponent,
            LoginScriptsSettingsComponent,
            TerminalToolbarComponent,
            InputProcessingSettingsComponent,
        ],
    })
], TerminalModule);
/* harmony default export */ const src = (TerminalModule);















})();

/******/ 	return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=../../../app.asar.unpacked/assets/webpack/index.js.map