From 8c00cd0a84d50600870f79b0d18880543a0a9815 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Fri, 4 Sep 2020 12:54:48 +0200 Subject: [PATCH] Release 2020.3.0-beta.3 --- gns3server/static/web-ui/ReleaseNotes.txt | 16 ++++++++++++++-- gns3server/static/web-ui/index.html | 2 +- ...ec6933a30.js => main.fc6e4d196640e6d4d699.js} | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) rename gns3server/static/web-ui/{main.2c70c08d7e7ec6933a30.js => main.fc6e4d196640e6d4d699.js} (69%) diff --git a/gns3server/static/web-ui/ReleaseNotes.txt b/gns3server/static/web-ui/ReleaseNotes.txt index 74dee899..75d82a76 100644 --- a/gns3server/static/web-ui/ReleaseNotes.txt +++ b/gns3server/static/web-ui/ReleaseNotes.txt @@ -1,6 +1,18 @@ GNS3 WebUI is web implementation of user interface for GNS3 software. -Current version: 2020.3.0-beta.1 +Current version: 2020.3.0-beta.3 + +Bug Fixes & enhancements +- direct download URL in template dialog +- fix for issues with suspnded nodes +- fix for bug with deleting templates +- fix for importing images + +What's new +- Option to resize console +- Improvements in creating templates + +GNS3 Web UI 2020.3.0-beta.1 Bug Fixes & enhancements - refreshing list of templates after adding new template from project mapĀ  @@ -15,7 +27,7 @@ Bug Fixes & enhancements What's new - Option to import appliances -Current version: 2020.2.0-beta.5 +GNS3 Web UI 2020.2.0-beta.5 Bug Fixes diff --git a/gns3server/static/web-ui/index.html b/gns3server/static/web-ui/index.html index 38a97387..cf3ea1be 100644 --- a/gns3server/static/web-ui/index.html +++ b/gns3server/static/web-ui/index.html @@ -48,5 +48,5 @@ gtag('config', 'G-5D6FZL9923'); - + diff --git a/gns3server/static/web-ui/main.2c70c08d7e7ec6933a30.js b/gns3server/static/web-ui/main.fc6e4d196640e6d4d699.js similarity index 69% rename from gns3server/static/web-ui/main.2c70c08d7e7ec6933a30.js rename to gns3server/static/web-ui/main.fc6e4d196640e6d4d699.js index 1cf0bfb5..c4cc8e81 100644 --- a/gns3server/static/web-ui/main.2c70c08d7e7ec6933a30.js +++ b/gns3server/static/web-ui/main.fc6e4d196640e6d4d699.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+/L5":function(t,e,n){var i=n("t1UP").isCustomProperty,r=n("vd7W").TYPE,o=n("4njK").mode,a=r.Ident,s=r.Hash,c=r.Colon,l=r.Semicolon,u=r.Delim;function h(t){return this.Raw(t,o.exclamationMarkOrSemicolon,!0)}function d(t){return this.Raw(t,o.exclamationMarkOrSemicolon,!1)}function f(){var t=this.scanner.tokenIndex,e=this.Value();return"Raw"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==l&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(t)&&this.error(),e}function p(){var t=this.scanner.tokenStart;if(this.scanner.tokenType===u)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next()}return this.eat(this.scanner.tokenType===s?s:a),this.scanner.substrToCursor(t)}function m(){this.eat(u),this.scanner.skipSC();var t=this.consume(a);return"important"===t||t}t.exports={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var t,e=this.scanner.tokenStart,n=this.scanner.tokenIndex,r=p.call(this),o=i(r),a=o?this.parseCustomProperty:this.parseValue,s=o?d:h,u=!1;return this.scanner.skipSC(),this.eat(c),o||this.scanner.skipSC(),t=a?this.parseWithFallback(f,s):s.call(this,this.scanner.tokenIndex),this.scanner.isDelim(33)&&(u=m.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==l&&!1===this.scanner.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.scanner.tokenStart),important:u,property:r,value:t}},generate:function(t){this.chunk(t.property),this.chunk(":"),this.node(t.value),t.important&&this.chunk(!0===t.important?"!important":"!"+t.important)},walkContext:"declaration"}},"+4/i":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("odkN");i.Observable.prototype.let=r.letProto,i.Observable.prototype.letBind=r.letProto},"+Kd2":function(t,e,n){var i=n("vd7W").TYPE,r=n("4njK").mode,o=i.Comma;t.exports=function(){var t=this.createList();return this.scanner.skipSC(),t.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===o&&(t.push(this.Operator()),t.push(this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,r.exclamationMarkOrSemicolon,!1))),t}},"+oeQ":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("H+DX");i.Observable.prototype.observeOn=r.observeOn},"+psR":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("16Oq");i.Observable.prototype.retry=r.retry},"+qxJ":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("GsYY");i.Observable.prototype.distinctUntilChanged=r.distinctUntilChanged},"+v8i":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp");i.Observable.concat=i.concat},"/+5V":function(t,e){function n(t){function e(t){return null!==t&&("Type"===t.type||"Property"===t.type||"Keyword"===t.type)}var n=null;return null!==this.matched&&function i(r){if(Array.isArray(r.match)){for(var o=0;o>22},e.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?o.stringFromCodePoint(2097151&this.content):""},e.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},e.prototype.setFromCharData=function(t){this.fg=t[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var e=!1;if(t[a.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(2===t[a.CHAR_DATA_CHAR_INDEX].length){var n=t[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){var i=t[a.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=i&&i<=57343?this.content=1024*(n-55296)+i-56320+65536|t[a.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=t[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[a.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=t[a.CHAR_DATA_CHAR_INDEX],this.content=2097152|t[a.CHAR_DATA_WIDTH_INDEX]<<22)},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(s.AttributeData);e.CellData=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISoundService=e.ISelectionService=e.IRenderService=e.IMouseService=e.ICoreBrowserService=e.ICharSizeService=void 0;var i=n(14);e.ICharSizeService=i.createDecorator("CharSizeService"),e.ICoreBrowserService=i.createDecorator("CoreBrowserService"),e.IMouseService=i.createDecorator("MouseService"),e.IRenderService=i.createDecorator("RenderService"),e.ISelectionService=i.createDecorator("SelectionService"),e.ISoundService=i.createDecorator("SoundService")},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;var i=function(){function t(){this.fg=0,this.bg=0,this.extended=new r}return t.toColorRGB=function(t){return[t>>>16&255,t>>>8&255,255&t]},t.fromColorRGB=function(t){return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},t.prototype.clone=function(){var e=new t;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e},t.prototype.isInverse=function(){return 67108864&this.fg},t.prototype.isBold=function(){return 134217728&this.fg},t.prototype.isUnderline=function(){return 268435456&this.fg},t.prototype.isBlink=function(){return 536870912&this.fg},t.prototype.isInvisible=function(){return 1073741824&this.fg},t.prototype.isItalic=function(){return 67108864&this.bg},t.prototype.isDim=function(){return 134217728&this.bg},t.prototype.getFgColorMode=function(){return 50331648&this.fg},t.prototype.getBgColorMode=function(){return 50331648&this.bg},t.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},t.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},t.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},t.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},t.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},t.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},t.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},t.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},t.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},t.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},t.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},t.prototype.getUnderlineColor=function(){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()},t.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},t.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()},t.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()},t.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()},t.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},t}();e.AttributeData=i;var r=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=-1),this.underlineStyle=t,this.underlineColor=e}return t.prototype.clone=function(){return new t(this.underlineStyle,this.underlineColor)},t.prototype.isEmpty=function(){return 0===this.underlineStyle},t}();e.ExtendedAttrs=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(t,e,n,i){t.addEventListener(e,n,i);var r=!1;return{dispose:function(){r||(r=!0,t.removeEventListener(e,n,i))}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(t){return t>65535?(t-=65536,String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)},e.utf32ToString=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);for(var i="",r=e;r65535?(o-=65536,i+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):i+=String.fromCharCode(o)}return i};var i=function(){function t(){this._interim=0}return t.prototype.clear=function(){this._interim=0},t.prototype.decode=function(t,e){var n=t.length;if(!n)return 0;var i=0,r=0;this._interim&&(56320<=(s=t.charCodeAt(r++))&&s<=57343?e[i++]=1024*(this._interim-55296)+s-56320+65536:(e[i++]=this._interim,e[i++]=s),this._interim=0);for(var o=r;o=n)return this._interim=a,i;var s;56320<=(s=t.charCodeAt(o))&&s<=57343?e[i++]=1024*(a-55296)+s-56320+65536:(e[i++]=a,e[i++]=s)}else e[i++]=a}return i},t}();e.StringToUtf32=i;var r=function(){function t(){this.interim=new Uint8Array(3)}return t.prototype.clear=function(){this.interim.fill(0)},t.prototype.decode=function(t,e){var n=t.length;if(!n)return 0;var i,r,o,a,s=0,c=0,l=0;if(this.interim[0]){var u=!1,h=this.interim[0];h&=192==(224&h)?31:224==(240&h)?15:7;for(var d=0,f=void 0;(f=63&this.interim[++d])&&d<4;)h<<=6,h|=f;for(var p=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,m=p-d;l=n)return 0;if(128!=(192&(f=t[l++]))){l--,u=!0;break}this.interim[d++]=f,h<<=6,h|=63&f}u||(2===p?h<128?l--:e[s++]=h:3===p?h<2048||h>=55296&&h<=57343||(e[s++]=h):h<65536||h>1114111||(e[s++]=h)),this.interim.fill(0)}for(var g=n-4,v=l;v=n)return this.interim[0]=i,s;if(128!=(192&(r=t[v++]))){v--;continue}if((c=(31&i)<<6|63&r)<128){v--;continue}e[s++]=c}else if(224==(240&i)){if(v>=n)return this.interim[0]=i,s;if(128!=(192&(r=t[v++]))){v--;continue}if(v>=n)return this.interim[0]=i,this.interim[1]=r,s;if(128!=(192&(o=t[v++]))){v--;continue}if((c=(15&i)<<12|(63&r)<<6|63&o)<2048||c>=55296&&c<=57343)continue;e[s++]=c}else if(240==(248&i)){if(v>=n)return this.interim[0]=i,s;if(128!=(192&(r=t[v++]))){v--;continue}if(v>=n)return this.interim[0]=i,this.interim[1]=r,s;if(128!=(192&(o=t[v++]))){v--;continue}if(v>=n)return this.interim[0]=i,this.interim[1]=r,this.interim[2]=o,s;if(128!=(192&(a=t[v++]))){v--;continue}if((c=(7&i)<<18|(63&r)<<12|(63&o)<<6|63&a)<65536||c>1114111)continue;e[s++]=c}}return s},t}();e.Utf8ToUtf32=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR_ATLAS_CELL_SPACING=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0,e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.CHAR_ATLAS_CELL_SPACING=1},function(t,e,n){"use strict";var i,r,o,a;function s(t){var e=t.toString(16);return e.length<2?"0"+e:e}function c(t,e){return t>>0}}(i=e.channels||(e.channels={})),(r=e.color||(e.color={})).blend=function(t,e){var n=(255&e.rgba)/255;if(1===n)return{css:e.css,rgba:e.rgba};var r=e.rgba>>16&255,o=e.rgba>>8&255,a=t.rgba>>24&255,s=t.rgba>>16&255,c=t.rgba>>8&255,l=a+Math.round(((e.rgba>>24&255)-a)*n),u=s+Math.round((r-s)*n),h=c+Math.round((o-c)*n);return{css:i.toCss(l,u,h),rgba:i.toRgba(l,u,h)}},r.isOpaque=function(t){return 255==(255&t.rgba)},r.ensureContrastRatio=function(t,e,n){var i=a.ensureContrastRatio(t.rgba,e.rgba,n);if(i)return a.toColor(i>>24&255,i>>16&255,i>>8&255)},r.opaque=function(t){var e=(255|t.rgba)>>>0,n=a.toChannels(e);return{css:i.toCss(n[0],n[1],n[2]),rgba:e}},r.opacity=function(t,e){var n=Math.round(255*e),r=a.toChannels(t.rgba),o=r[0],s=r[1],c=r[2];return{css:i.toCss(o,s,c,n),rgba:i.toRgba(o,s,c,n)}},(e.css||(e.css={})).toColor=function(t){switch(t.length){case 7:return{css:t,rgba:(parseInt(t.slice(1),16)<<8|255)>>>0};case 9:return{css:t,rgba:parseInt(t.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(t){function e(t,e,n){var i=t/255,r=e/255,o=n/255;return.2126*(i<=.03928?i/12.92:Math.pow((i+.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))}t.relativeLuminance=function(t){return e(t>>16&255,t>>8&255,255&t)},t.relativeLuminance2=e}(o=e.rgb||(e.rgb={})),function(t){function e(t,e,n){for(var i=t>>24&255,r=t>>16&255,a=t>>8&255,s=e>>24&255,l=e>>16&255,u=e>>8&255,h=c(o.relativeLuminance2(s,u,l),o.relativeLuminance2(i,r,a));h0||l>0||u>0);)s-=Math.max(0,Math.ceil(.1*s)),l-=Math.max(0,Math.ceil(.1*l)),u-=Math.max(0,Math.ceil(.1*u)),h=c(o.relativeLuminance2(s,u,l),o.relativeLuminance2(i,r,a));return(s<<24|l<<16|u<<8|255)>>>0}function n(t,e,n){for(var i=t>>24&255,r=t>>16&255,a=t>>8&255,s=e>>24&255,l=e>>16&255,u=e>>8&255,h=c(o.relativeLuminance2(s,u,l),o.relativeLuminance2(i,r,a));h>>0}t.ensureContrastRatio=function(t,i,r){var a=o.relativeLuminance(t>>8),s=o.relativeLuminance(i>>8);if(c(a,s)>24&255,t>>16&255,t>>8&255,255&t]},t.toColor=function(t,e,n){return{css:i.toCss(t,e,n),rgba:i.toRgba(t,e,n)}}}(a=e.rgba||(e.rgba={})),e.toPaddedHex=s,e.contrastRatio=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.isSafari=e.isFirefox=void 0;var i="undefined"==typeof navigator,r=i?"node":navigator.userAgent,o=i?"node":navigator.platform;function a(t,e){return t.indexOf(e)>=0}e.isFirefox=!!~r.indexOf("Firefox"),e.isSafari=/^((?!chrome|android).)*safari/i.test(r),e.isMac=a(["Macintosh","MacIntel","MacPPC","Mac68K"],o),e.isIpad="iPad"===o,e.isIphone="iPhone"===o,e.isWindows=a(["Windows","Win16","Win32","WinCE"],o),e.isLinux=o.indexOf("Linux")>=0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.C1=e.C0=void 0,function(t){t.NUL="\0",t.SOH="\x01",t.STX="\x02",t.ETX="\x03",t.EOT="\x04",t.ENQ="\x05",t.ACK="\x06",t.BEL="\x07",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="\x0e",t.SI="\x0f",t.DLE="\x10",t.DC1="\x11",t.DC2="\x12",t.DC3="\x13",t.DC4="\x14",t.NAK="\x15",t.SYN="\x16",t.ETB="\x17",t.CAN="\x18",t.EM="\x19",t.SUB="\x1a",t.ESC="\x1b",t.FS="\x1c",t.GS="\x1d",t.RS="\x1e",t.US="\x1f",t.SP=" ",t.DEL="\x7f"}(e.C0||(e.C0={})),function(t){t.PAD="\x80",t.HOP="\x81",t.BPH="\x82",t.NBH="\x83",t.IND="\x84",t.NEL="\x85",t.SSA="\x86",t.ESA="\x87",t.HTS="\x88",t.HTJ="\x89",t.VTS="\x8a",t.PLD="\x8b",t.PLU="\x8c",t.RI="\x8d",t.SS2="\x8e",t.SS3="\x8f",t.DCS="\x90",t.PU1="\x91",t.PU2="\x92",t.STS="\x93",t.CCH="\x94",t.MW="\x95",t.SPA="\x96",t.EPA="\x97",t.SOS="\x98",t.SGCI="\x99",t.SCI="\x9a",t.CSI="\x9b",t.ST="\x9c",t.OSC="\x9d",t.PM="\x9e",t.APC="\x9f"}(e.C1||(e.C1={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;var i=n(3),r=n(9),o=n(25),a=n(6),s=n(28),c=n(10),l=n(17),u=function(){function t(t,e,n,i,r,o,a,s){this._container=t,this._alpha=i,this._colors=r,this._rendererId=o,this._bufferService=a,this._optionsService=s,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+e+"-layer"),this._canvas.style.zIndex=n.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return t.prototype.dispose=function(){var t;l.removeElementFromParent(this._canvas),null===(t=this._charAtlas)||void 0===t||t.dispose()},t.prototype._initCanvas=function(){this._ctx=s.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},t.prototype.onOptionsChanged=function(){},t.prototype.onBlur=function(){},t.prototype.onFocus=function(){},t.prototype.onCursorMove=function(){},t.prototype.onGridChanged=function(t,e){},t.prototype.onSelectionChanged=function(t,e,n){void 0===n&&(n=!1)},t.prototype.setColors=function(t){this._refreshCharAtlas(t)},t.prototype._setTransparency=function(t){if(t!==this._alpha){var e=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,e),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},t.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=o.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},t.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},t.prototype._fillCells=function(t,e,n,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight)},t.prototype._fillBottomLineAtCells=function(t,e,n){void 0===n&&(n=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,n*this._scaledCellWidth,window.devicePixelRatio)},t.prototype._fillLeftLineAtCell=function(t,e,n){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio*n,this._scaledCellHeight)},t.prototype._strokeRectAtCell=function(t,e,n,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,n*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},t.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype._clearCells=function(t,e,n,i){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight))},t.prototype._fillCharTrueColor=function(t,e,n){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(n),this._ctx.fillText(t.getChars(),e*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},t.prototype._drawChars=function(t,e,n){var o,a,s=this._getContrastColor(t);s||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,e,n,s):(t.isInverse()?(o=t.isBgDefault()?r.INVERTED_DEFAULT_COLOR:t.getBgColor(),a=t.isFgDefault()?r.INVERTED_DEFAULT_COLOR:t.getFgColor()):(a=t.isBgDefault()?i.DEFAULT_COLOR:t.getBgColor(),o=t.isFgDefault()?i.DEFAULT_COLOR:t.getFgColor()),o+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&o<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||i.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||i.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=a,this._currentGlyphIdentifier.fg=o,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,e*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,e,n))},t.prototype._drawUncachedChars=function(t,e,n,i){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(i)this._ctx.fillStyle=i.css;else if(t.isBgDefault())this._ctx.fillStyle=c.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var o=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&o<8&&(o+=8),this._ctx.fillStyle=this._colors.ansi[o].css}else if(i)this._ctx.fillStyle=i.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var s=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&s<8&&(s+=8),this._ctx.fillStyle=this._colors.ansi[s].css}this._clipRow(n),t.isDim()&&(this._ctx.globalAlpha=r.DIM_OPACITY),this._ctx.fillText(t.getChars(),e*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},t.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},t.prototype._getFont=function(t,e){return(e?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},t.prototype._getContrastColor=function(t){if(1!==this._optionsService.options.minimumContrastRatio){var e=this._colors.contrastCache.getColor(t.bg,t.fg);if(void 0!==e)return e||void 0;var n=t.getFgColor(),i=t.getFgColorMode(),r=t.getBgColor(),o=t.getBgColorMode(),a=!!t.isInverse(),s=!!t.isInverse();if(a){var l=n;n=r,r=l;var u=i;i=o,o=u}var h=this._resolveBackgroundRgba(o,r,a),d=this._resolveForegroundRgba(i,n,a,s),f=c.rgba.ensureContrastRatio(h,d,this._optionsService.options.minimumContrastRatio);if(f){var p={css:c.channels.toCss(f>>24&255,f>>16&255,f>>8&255),rgba:f};return this._colors.contrastCache.setColor(t.bg,t.fg,p),p}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},t.prototype._resolveBackgroundRgba=function(t,e,n){switch(t){case 16777216:case 33554432:return this._colors.ansi[e].rgba;case 50331648:return e<<8;case 0:default:return n?this._colors.foreground.rgba:this._colors.background.rgba}},t.prototype._resolveForegroundRgba=function(t,e,n,i){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&i&&e<8&&(e+=8),this._colors.ansi[e].rgba;case 50331648:return e<<8;case 0:default:return n?this._colors.background.rgba:this._colors.foreground.rgba}},t}();e.BaseRenderLayer=u},function(t,e,n){"use strict";function i(t,e,n){e.di$target===e?e.di$dependencies.push({id:t,index:n}):(e.di$dependencies=[{id:t,index:n}],e.di$target=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0,e.serviceRegistry=new Map,e.getServiceDependencies=function(t){return t.di$dependencies||[]},e.createDecorator=function(t){if(e.serviceRegistry.has(t))return e.serviceRegistry.get(t);var n=function t(e,n,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");i(t,e,r)};return n.toString=function(){return t},e.serviceRegistry.set(t,n),n}},function(t,e,n){"use strict";function i(t,e,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),n>=t.length)return t;i=i>=t.length?t.length:(t.length+i)%t.length;for(var r=n=(t.length+n)%t.length;r>22,2097152&e?this._combined[t].charCodeAt(this._combined[t].length-1):n]},t.prototype.set=function(t,e){this._data[3*t+1]=e[r.CHAR_DATA_ATTR_INDEX],e[r.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[t]=e[1],this._data[3*t+0]=2097152|t|e[r.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*t+0]=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[r.CHAR_DATA_WIDTH_INDEX]<<22},t.prototype.getWidth=function(t){return this._data[3*t+0]>>22},t.prototype.hasWidth=function(t){return 12582912&this._data[3*t+0]},t.prototype.getFg=function(t){return this._data[3*t+1]},t.prototype.getBg=function(t){return this._data[3*t+2]},t.prototype.hasContent=function(t){return 4194303&this._data[3*t+0]},t.prototype.getCodePoint=function(t){var e=this._data[3*t+0];return 2097152&e?this._combined[t].charCodeAt(this._combined[t].length-1):2097151&e},t.prototype.isCombined=function(t){return 2097152&this._data[3*t+0]},t.prototype.getString=function(t){var e=this._data[3*t+0];return 2097152&e?this._combined[t]:2097151&e?i.stringFromCodePoint(2097151&e):""},t.prototype.loadCell=function(t,e){var n=3*t;return e.content=this._data[n+0],e.fg=this._data[n+1],e.bg=this._data[n+2],2097152&e.content&&(e.combinedData=this._combined[t]),268435456&e.bg&&(e.extended=this._extendedAttrs[t]),e},t.prototype.setCell=function(t,e){2097152&e.content&&(this._combined[t]=e.combinedData),268435456&e.bg&&(this._extendedAttrs[t]=e.extended),this._data[3*t+0]=e.content,this._data[3*t+1]=e.fg,this._data[3*t+2]=e.bg},t.prototype.setCellFromCodePoint=function(t,e,n,i,r,o){268435456&r&&(this._extendedAttrs[t]=o),this._data[3*t+0]=e|n<<22,this._data[3*t+1]=i,this._data[3*t+2]=r},t.prototype.addCodepointToCell=function(t,e){var n=this._data[3*t+0];2097152&n?this._combined[t]+=i.stringFromCodePoint(e):(2097151&n?(this._combined[t]=i.stringFromCodePoint(2097151&n)+i.stringFromCodePoint(e),n&=-2097152,n|=2097152):n=e|1<<22,this._data[3*t+0]=n)},t.prototype.insertCells=function(t,e,n,i){if((t%=this.length)&&2===this.getWidth(t-1)&&this.setCellFromCodePoint(t-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new a.ExtendedAttrs),e=0;--s)this.setCell(t+e+s,this.loadCell(t+s,r));for(s=0;sthis.length){var n=new Uint32Array(3*t);this.length&&n.set(3*t=t&&delete this._combined[o]}}else this._data=new Uint32Array(0),this._combined={};this.length=t}},t.prototype.fill=function(t){this._combined={},this._extendedAttrs={};for(var e=0;e=0;--t)if(4194303&this._data[3*t+0])return t+(this._data[3*t+0]>>22);return 0},t.prototype.copyCellsFrom=function(t,e,n,i,r){var o=t._data;if(r)for(var a=i-1;a>=0;a--)for(var s=0;s<3;s++)this._data[3*(n+a)+s]=o[3*(e+a)+s];else for(a=0;a=e&&(this._combined[l-e+n]=t._combined[l])}},t.prototype.translateToString=function(t,e,n){void 0===t&&(t=!1),void 0===e&&(e=0),void 0===n&&(n=this.length),t&&(n=Math.min(n,this.getTrimmedLength()));for(var o="";e>22||1}return o},t}();e.BufferLine=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementFromParent=void 0,e.removeElementFromParent=function(){for(var t,e=[],n=0;n24)return e.setWinLines||!1;switch(t){case 1:return!!e.restoreWin;case 2:return!!e.minimizeWin;case 3:return!!e.setWinPosition;case 4:return!!e.setWinSizePixels;case 5:return!!e.raiseWin;case 6:return!!e.lowerWin;case 7:return!!e.refreshWin;case 8:return!!e.setWinSizeChars;case 9:return!!e.maximizeWin;case 10:return!!e.fullscreenWin;case 11:return!!e.getWinState;case 13:return!!e.getWinPosition;case 14:return!!e.getWinSizePixels;case 15:return!!e.getScreenSizePixels;case 16:return!!e.getCellSizePixels;case 18:return!!e.getWinSizeChars;case 19:return!!e.getScreenSizeChars;case 20:return!!e.getIconTitle;case 21:return!!e.getWinTitle;case 22:return!!e.pushTitle;case 23:return!!e.popTitle;case 24:return!!e.setWinLines}return!1}!function(t){t[t.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",t[t.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(o=e.WindowsOptionsReportType||(e.WindowsOptionsReportType={}));var w=function(){function t(t,e,n,i){this._bufferService=t,this._coreService=e,this._logService=n,this._optionsService=i,this._data=new Uint32Array(0)}return t.prototype.hook=function(t){this._data=new Uint32Array(0)},t.prototype.put=function(t,e,n){this._data=u.concat(this._data,t.subarray(e,n))},t.prototype.unhook=function(t){if(t){var e=h.utf32ToString(this._data);switch(this._data=new Uint32Array(0),e){case'"q':return this._coreService.triggerDataEvent(a.C0.ESC+'P1$r0"q'+a.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(a.C0.ESC+'P1$r61;1"p'+a.C0.ESC+"\\");case"r":return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r"+(this._bufferService.buffer.scrollTop+1)+";"+(this._bufferService.buffer.scrollBottom+1)+"r"+a.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r0m"+a.C0.ESC+"\\");case" q":var n={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r"+(n-=this._optionsService.options.cursorBlink?1:0)+" q"+a.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",e),this._coreService.triggerDataEvent(a.C0.ESC+"P0$r"+a.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},t}(),k=function(t){function e(e,n,i,r,o,l,u,p,g){void 0===g&&(g=new c.EscapeSequenceParser);var b=t.call(this)||this;b._bufferService=e,b._charsetService=n,b._coreService=i,b._dirtyRowService=r,b._logService=o,b._optionsService=l,b._coreMouseService=u,b._unicodeService=p,b._parser=g,b._parseBuffer=new Uint32Array(4096),b._stringDecoder=new h.StringToUtf32,b._utf8Decoder=new h.Utf8ToUtf32,b._workCell=new m.CellData,b._windowTitle="",b._iconName="",b._windowTitleStack=[],b._iconNameStack=[],b._curAttrData=d.DEFAULT_ATTR_DATA.clone(),b._eraseAttrDataInternal=d.DEFAULT_ATTR_DATA.clone(),b._onRequestBell=new f.EventEmitter,b._onRequestRefreshRows=new f.EventEmitter,b._onRequestReset=new f.EventEmitter,b._onRequestScroll=new f.EventEmitter,b._onRequestSyncScrollBar=new f.EventEmitter,b._onRequestWindowsOptionsReport=new f.EventEmitter,b._onA11yChar=new f.EventEmitter,b._onA11yTab=new f.EventEmitter,b._onCursorMove=new f.EventEmitter,b._onLineFeed=new f.EventEmitter,b._onScroll=new f.EventEmitter,b._onTitleChange=new f.EventEmitter,b.register(b._parser),b._parser.setCsiHandlerFallback((function(t,e){b._logService.debug("Unknown CSI code: ",{identifier:b._parser.identToString(t),params:e.toArray()})})),b._parser.setEscHandlerFallback((function(t){b._logService.debug("Unknown ESC code: ",{identifier:b._parser.identToString(t)})})),b._parser.setExecuteHandlerFallback((function(t){b._logService.debug("Unknown EXECUTE code: ",{code:t})})),b._parser.setOscHandlerFallback((function(t,e,n){b._logService.debug("Unknown OSC code: ",{identifier:t,action:e,data:n})})),b._parser.setDcsHandlerFallback((function(t,e,n){"HOOK"===e&&(n=n.toArray()),b._logService.debug("Unknown DCS code: ",{identifier:b._parser.identToString(t),action:e,payload:n})})),b._parser.setPrintHandler((function(t,e,n){return b.print(t,e,n)})),b._parser.setCsiHandler({final:"@"},(function(t){return b.insertChars(t)})),b._parser.setCsiHandler({intermediates:" ",final:"@"},(function(t){return b.scrollLeft(t)})),b._parser.setCsiHandler({final:"A"},(function(t){return b.cursorUp(t)})),b._parser.setCsiHandler({intermediates:" ",final:"A"},(function(t){return b.scrollRight(t)})),b._parser.setCsiHandler({final:"B"},(function(t){return b.cursorDown(t)})),b._parser.setCsiHandler({final:"C"},(function(t){return b.cursorForward(t)})),b._parser.setCsiHandler({final:"D"},(function(t){return b.cursorBackward(t)})),b._parser.setCsiHandler({final:"E"},(function(t){return b.cursorNextLine(t)})),b._parser.setCsiHandler({final:"F"},(function(t){return b.cursorPrecedingLine(t)})),b._parser.setCsiHandler({final:"G"},(function(t){return b.cursorCharAbsolute(t)})),b._parser.setCsiHandler({final:"H"},(function(t){return b.cursorPosition(t)})),b._parser.setCsiHandler({final:"I"},(function(t){return b.cursorForwardTab(t)})),b._parser.setCsiHandler({final:"J"},(function(t){return b.eraseInDisplay(t)})),b._parser.setCsiHandler({prefix:"?",final:"J"},(function(t){return b.eraseInDisplay(t)})),b._parser.setCsiHandler({final:"K"},(function(t){return b.eraseInLine(t)})),b._parser.setCsiHandler({prefix:"?",final:"K"},(function(t){return b.eraseInLine(t)})),b._parser.setCsiHandler({final:"L"},(function(t){return b.insertLines(t)})),b._parser.setCsiHandler({final:"M"},(function(t){return b.deleteLines(t)})),b._parser.setCsiHandler({final:"P"},(function(t){return b.deleteChars(t)})),b._parser.setCsiHandler({final:"S"},(function(t){return b.scrollUp(t)})),b._parser.setCsiHandler({final:"T"},(function(t){return b.scrollDown(t)})),b._parser.setCsiHandler({final:"X"},(function(t){return b.eraseChars(t)})),b._parser.setCsiHandler({final:"Z"},(function(t){return b.cursorBackwardTab(t)})),b._parser.setCsiHandler({final:"`"},(function(t){return b.charPosAbsolute(t)})),b._parser.setCsiHandler({final:"a"},(function(t){return b.hPositionRelative(t)})),b._parser.setCsiHandler({final:"b"},(function(t){return b.repeatPrecedingCharacter(t)})),b._parser.setCsiHandler({final:"c"},(function(t){return b.sendDeviceAttributesPrimary(t)})),b._parser.setCsiHandler({prefix:">",final:"c"},(function(t){return b.sendDeviceAttributesSecondary(t)})),b._parser.setCsiHandler({final:"d"},(function(t){return b.linePosAbsolute(t)})),b._parser.setCsiHandler({final:"e"},(function(t){return b.vPositionRelative(t)})),b._parser.setCsiHandler({final:"f"},(function(t){return b.hVPosition(t)})),b._parser.setCsiHandler({final:"g"},(function(t){return b.tabClear(t)})),b._parser.setCsiHandler({final:"h"},(function(t){return b.setMode(t)})),b._parser.setCsiHandler({prefix:"?",final:"h"},(function(t){return b.setModePrivate(t)})),b._parser.setCsiHandler({final:"l"},(function(t){return b.resetMode(t)})),b._parser.setCsiHandler({prefix:"?",final:"l"},(function(t){return b.resetModePrivate(t)})),b._parser.setCsiHandler({final:"m"},(function(t){return b.charAttributes(t)})),b._parser.setCsiHandler({final:"n"},(function(t){return b.deviceStatus(t)})),b._parser.setCsiHandler({prefix:"?",final:"n"},(function(t){return b.deviceStatusPrivate(t)})),b._parser.setCsiHandler({intermediates:"!",final:"p"},(function(t){return b.softReset(t)})),b._parser.setCsiHandler({intermediates:" ",final:"q"},(function(t){return b.setCursorStyle(t)})),b._parser.setCsiHandler({final:"r"},(function(t){return b.setScrollRegion(t)})),b._parser.setCsiHandler({final:"s"},(function(t){return b.saveCursor(t)})),b._parser.setCsiHandler({final:"t"},(function(t){return b.windowOptions(t)})),b._parser.setCsiHandler({final:"u"},(function(t){return b.restoreCursor(t)})),b._parser.setCsiHandler({intermediates:"'",final:"}"},(function(t){return b.insertColumns(t)})),b._parser.setCsiHandler({intermediates:"'",final:"~"},(function(t){return b.deleteColumns(t)})),b._parser.setExecuteHandler(a.C0.BEL,(function(){return b.bell()})),b._parser.setExecuteHandler(a.C0.LF,(function(){return b.lineFeed()})),b._parser.setExecuteHandler(a.C0.VT,(function(){return b.lineFeed()})),b._parser.setExecuteHandler(a.C0.FF,(function(){return b.lineFeed()})),b._parser.setExecuteHandler(a.C0.CR,(function(){return b.carriageReturn()})),b._parser.setExecuteHandler(a.C0.BS,(function(){return b.backspace()})),b._parser.setExecuteHandler(a.C0.HT,(function(){return b.tab()})),b._parser.setExecuteHandler(a.C0.SO,(function(){return b.shiftOut()})),b._parser.setExecuteHandler(a.C0.SI,(function(){return b.shiftIn()})),b._parser.setExecuteHandler(a.C1.IND,(function(){return b.index()})),b._parser.setExecuteHandler(a.C1.NEL,(function(){return b.nextLine()})),b._parser.setExecuteHandler(a.C1.HTS,(function(){return b.tabSet()})),b._parser.setOscHandler(0,new v.OscHandler((function(t){b.setTitle(t),b.setIconName(t)}))),b._parser.setOscHandler(1,new v.OscHandler((function(t){return b.setIconName(t)}))),b._parser.setOscHandler(2,new v.OscHandler((function(t){return b.setTitle(t)}))),b._parser.setEscHandler({final:"7"},(function(){return b.saveCursor()})),b._parser.setEscHandler({final:"8"},(function(){return b.restoreCursor()})),b._parser.setEscHandler({final:"D"},(function(){return b.index()})),b._parser.setEscHandler({final:"E"},(function(){return b.nextLine()})),b._parser.setEscHandler({final:"H"},(function(){return b.tabSet()})),b._parser.setEscHandler({final:"M"},(function(){return b.reverseIndex()})),b._parser.setEscHandler({final:"="},(function(){return b.keypadApplicationMode()})),b._parser.setEscHandler({final:">"},(function(){return b.keypadNumericMode()})),b._parser.setEscHandler({final:"c"},(function(){return b.fullReset()})),b._parser.setEscHandler({final:"n"},(function(){return b.setgLevel(2)})),b._parser.setEscHandler({final:"o"},(function(){return b.setgLevel(3)})),b._parser.setEscHandler({final:"|"},(function(){return b.setgLevel(3)})),b._parser.setEscHandler({final:"}"},(function(){return b.setgLevel(2)})),b._parser.setEscHandler({final:"~"},(function(){return b.setgLevel(1)})),b._parser.setEscHandler({intermediates:"%",final:"@"},(function(){return b.selectDefaultCharset()})),b._parser.setEscHandler({intermediates:"%",final:"G"},(function(){return b.selectDefaultCharset()}));var y=function(t){_._parser.setEscHandler({intermediates:"(",final:t},(function(){return b.selectCharset("("+t)})),_._parser.setEscHandler({intermediates:")",final:t},(function(){return b.selectCharset(")"+t)})),_._parser.setEscHandler({intermediates:"*",final:t},(function(){return b.selectCharset("*"+t)})),_._parser.setEscHandler({intermediates:"+",final:t},(function(){return b.selectCharset("+"+t)})),_._parser.setEscHandler({intermediates:"-",final:t},(function(){return b.selectCharset("-"+t)})),_._parser.setEscHandler({intermediates:".",final:t},(function(){return b.selectCharset("."+t)})),_._parser.setEscHandler({intermediates:"/",final:t},(function(){return b.selectCharset("/"+t)}))},_=this;for(var k in s.CHARSETS)y(k);return b._parser.setEscHandler({intermediates:"#",final:"8"},(function(){return b.screenAlignmentPattern()})),b._parser.setErrorHandler((function(t){return b._logService.error("Parsing error: ",t),t})),b._parser.setDcsHandler({intermediates:"$",final:"q"},new w(b._bufferService,b._coreService,b._logService,b._optionsService)),b}return r(e,t),Object.defineProperty(e.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){t.prototype.dispose.call(this)},e.prototype.parse=function(t){var e=this._bufferService.buffer,n=e.x,i=e.y;if(this._logService.debug("parsing data",t),this._parseBuffer.length131072)for(var r=0;r0&&2===f.getWidth(o.x-1)&&f.setCellFromCodePoint(o.x-1,0,1,d.fg,d.bg,d.extended);for(var m=e;m=c)if(l){for(;o.x=this._bufferService.rows&&(o.y=this._bufferService.rows-1),o.lines.get(o.ybase+o.y).isWrapped=!0),f=o.lines.get(o.ybase+o.y)}else if(o.x=c-1,2===r)continue;if(u&&(f.insertCells(o.x,r,o.getNullCell(d),d),2===f.getWidth(c-1)&&f.setCellFromCodePoint(c-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,d.fg,d.bg,d.extended)),f.setCellFromCodePoint(o.x++,i,r,d.fg,d.bg,d.extended),r>0)for(;--r;)f.setCellFromCodePoint(o.x++,0,0,d.fg,d.bg,d.extended)}else f.getWidth(o.x-1)?f.addCodepointToCell(o.x-1,i):f.addCodepointToCell(o.x-2,i)}n-e>0&&(f.loadCell(o.x-1,this._workCell),this._parser.precedingCodepoint=2===this._workCell.getWidth()||this._workCell.getCode()>65535?0:this._workCell.isCombined()?this._workCell.getChars().charCodeAt(0):this._workCell.content),o.x0&&0===f.getWidth(o.x)&&!f.hasContent(o.x)&&f.setCellFromCodePoint(o.x,0,1,d.fg,d.bg,d.extended),this._dirtyRowService.markDirty(o.y)},e.prototype.addCsiHandler=function(t,e){var n=this;return this._parser.addCsiHandler(t,"t"!==t.final||t.prefix||t.intermediates?e:function(t){return!_(t.params[0],n._optionsService.options.windowOptions)||e(t)})},e.prototype.addDcsHandler=function(t,e){return this._parser.addDcsHandler(t,new b.DcsHandler(e))},e.prototype.addEscHandler=function(t,e){return this._parser.addEscHandler(t,e)},e.prototype.addOscHandler=function(t,e){return this._parser.addOscHandler(t,new v.OscHandler(e))},e.prototype.bell=function(){this._onRequestBell.fire()},e.prototype.lineFeed=function(){var t=this._bufferService.buffer;this._dirtyRowService.markDirty(t.y),this._optionsService.options.convertEol&&(t.x=0),t.y++,t.y===t.scrollBottom+1?(t.y--,this._onRequestScroll.fire(this._eraseAttrData())):t.y>=this._bufferService.rows&&(t.y=this._bufferService.rows-1),t.x>=this._bufferService.cols&&t.x--,this._dirtyRowService.markDirty(t.y),this._onLineFeed.fire()},e.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},e.prototype.backspace=function(){var t,e=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(e.x>0&&e.x--);if(this._restrictCursor(this._bufferService.cols),e.x>0)e.x--;else if(0===e.x&&e.y>e.scrollTop&&e.y<=e.scrollBottom&&(null===(t=e.lines.get(e.ybase+e.y))||void 0===t?void 0:t.isWrapped)){e.lines.get(e.ybase+e.y).isWrapped=!1,e.y--,e.x=this._bufferService.cols-1;var n=e.lines.get(e.ybase+e.y);n.hasWidth(e.x)&&!n.hasContent(e.x)&&e.x--}this._restrictCursor()},e.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var t=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-t)}},e.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},e.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},e.prototype._restrictCursor=function(t){void 0===t&&(t=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(t,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},e.prototype._setCursor=function(t,e){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=t,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+e):(this._bufferService.buffer.x=t,this._bufferService.buffer.y=e),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},e.prototype._moveCursor=function(t,e){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+t,this._bufferService.buffer.y+e)},e.prototype.cursorUp=function(t){var e=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;this._moveCursor(0,e>=0?-Math.min(e,t.params[0]||1):-(t.params[0]||1))},e.prototype.cursorDown=function(t){var e=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;this._moveCursor(0,e>=0?Math.min(e,t.params[0]||1):t.params[0]||1)},e.prototype.cursorForward=function(t){this._moveCursor(t.params[0]||1,0)},e.prototype.cursorBackward=function(t){this._moveCursor(-(t.params[0]||1),0)},e.prototype.cursorNextLine=function(t){this.cursorDown(t),this._bufferService.buffer.x=0},e.prototype.cursorPrecedingLine=function(t){this.cursorUp(t),this._bufferService.buffer.x=0},e.prototype.cursorCharAbsolute=function(t){this._setCursor((t.params[0]||1)-1,this._bufferService.buffer.y)},e.prototype.cursorPosition=function(t){this._setCursor(t.length>=2?(t.params[1]||1)-1:0,(t.params[0]||1)-1)},e.prototype.charPosAbsolute=function(t){this._setCursor((t.params[0]||1)-1,this._bufferService.buffer.y)},e.prototype.hPositionRelative=function(t){this._moveCursor(t.params[0]||1,0)},e.prototype.linePosAbsolute=function(t){this._setCursor(this._bufferService.buffer.x,(t.params[0]||1)-1)},e.prototype.vPositionRelative=function(t){this._moveCursor(0,t.params[0]||1)},e.prototype.hVPosition=function(t){this.cursorPosition(t)},e.prototype.tabClear=function(t){var e=t.params[0];0===e?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:3===e&&(this._bufferService.buffer.tabs={})},e.prototype.cursorForwardTab=function(t){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var e=t.params[0]||1;e--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},e.prototype.cursorBackwardTab=function(t){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var e=t.params[0]||1,n=this._bufferService.buffer;e--;)n.x=n.prevStop()},e.prototype._eraseInBufferLine=function(t,e,n,i){void 0===i&&(i=!1);var r=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+t);r.replaceCells(e,n,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i&&(r.isWrapped=!1)},e.prototype._resetBufferLine=function(t){var e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+t);e.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1},e.prototype.eraseInDisplay=function(t){var e;switch(this._restrictCursor(),t.params[0]){case 0:for(this._dirtyRowService.markDirty(e=this._bufferService.buffer.y),this._eraseInBufferLine(e++,this._bufferService.buffer.x,this._bufferService.cols,0===this._bufferService.buffer.x);e=this._bufferService.cols&&(this._bufferService.buffer.lines.get(e+1).isWrapped=!1);e--;)this._resetBufferLine(e);this._dirtyRowService.markDirty(0);break;case 2:for(this._dirtyRowService.markDirty((e=this._bufferService.rows)-1);e--;)this._resetBufferLine(e);this._dirtyRowService.markDirty(0);break;case 3:var n=this._bufferService.buffer.lines.length-this._bufferService.rows;n>0&&(this._bufferService.buffer.lines.trimStart(n),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-n,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-n,0),this._onScroll.fire(0))}},e.prototype.eraseInLine=function(t){switch(this._restrictCursor(),t.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},e.prototype.insertLines=function(t){this._restrictCursor();var e=t.params[0]||1,n=this._bufferService.buffer;if(!(n.y>n.scrollBottom||n.yn.scrollBottom||n.ye.scrollBottom||e.ye.scrollBottom||e.ye.scrollBottom||e.ye.scrollBottom||e.y0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c"))},e.prototype.sendDeviceAttributesSecondary=function(t){t.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(t.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c"))},e.prototype._is=function(t){return 0===(this._optionsService.options.termName+"").indexOf(t)},e.prototype.setMode=function(t){for(var e=0;e=2||2===i[1]&&o+r>=5)break;i[1]&&(r=1)}while(++o+e5)&&(t=1),e.extended.underlineStyle=t,e.fg|=268435456,0===t&&(e.fg&=-268435457),e.updateExtended()},e.prototype.charAttributes=function(t){if(1===t.length&&0===t.params[0])return this._curAttrData.fg=d.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=d.DEFAULT_ATTR_DATA.bg);for(var e,n=t.length,i=this._curAttrData,r=0;r=30&&e<=37?(i.fg&=-50331904,i.fg|=16777216|e-30):e>=40&&e<=47?(i.bg&=-50331904,i.bg|=16777216|e-40):e>=90&&e<=97?(i.fg&=-50331904,i.fg|=16777224|e-90):e>=100&&e<=107?(i.bg&=-50331904,i.bg|=16777224|e-100):0===e?(i.fg=d.DEFAULT_ATTR_DATA.fg,i.bg=d.DEFAULT_ATTR_DATA.bg):1===e?i.fg|=134217728:3===e?i.bg|=67108864:4===e?(i.fg|=268435456,this._processUnderline(t.hasSubParams(r)?t.getSubParams(r)[0]:1,i)):5===e?i.fg|=536870912:7===e?i.fg|=67108864:8===e?i.fg|=1073741824:2===e?i.bg|=134217728:21===e?this._processUnderline(2,i):22===e?(i.fg&=-134217729,i.bg&=-134217729):23===e?i.bg&=-67108865:24===e?i.fg&=-268435457:25===e?i.fg&=-536870913:27===e?i.fg&=-67108865:28===e?i.fg&=-1073741825:39===e?(i.fg&=-67108864,i.fg|=16777215&d.DEFAULT_ATTR_DATA.fg):49===e?(i.bg&=-67108864,i.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):38===e||48===e||58===e?r+=this._extractColor(t,r,i):59===e?(i.extended=i.extended.clone(),i.extended.underlineColor=-1,i.updateExtended()):100===e?(i.fg&=-67108864,i.fg|=16777215&d.DEFAULT_ATTR_DATA.fg,i.bg&=-67108864,i.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",e)},e.prototype.deviceStatus=function(t){switch(t.params[0]){case 5:this._coreService.triggerDataEvent(a.C0.ESC+"[0n");break;case 6:this._coreService.triggerDataEvent(a.C0.ESC+"["+(this._bufferService.buffer.y+1)+";"+(this._bufferService.buffer.x+1)+"R")}},e.prototype.deviceStatusPrivate=function(t){switch(t.params[0]){case 6:this._coreService.triggerDataEvent(a.C0.ESC+"[?"+(this._bufferService.buffer.y+1)+";"+(this._bufferService.buffer.x+1)+"R")}},e.prototype.softReset=function(t){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=d.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},e.prototype.setCursorStyle=function(t){var e=t.params[0]||1;switch(e){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"}this._optionsService.options.cursorBlink=e%2==1},e.prototype.setScrollRegion=function(t){var e,n=t.params[0]||1;(t.length<2||(e=t.params[1])>this._bufferService.rows||0===e)&&(e=this._bufferService.rows),e>n&&(this._bufferService.buffer.scrollTop=n-1,this._bufferService.buffer.scrollBottom=e-1,this._setCursor(0,0))},e.prototype.windowOptions=function(t){if(_(t.params[0],this._optionsService.options.windowOptions)){var e=t.length>1?t.params[1]:0;switch(t.params[0]){case 14:2!==e&&this._onRequestWindowsOptionsReport.fire(o.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(o.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(a.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:0!==e&&2!==e||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==e&&1!==e||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==e&&2!==e||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==e&&1!==e||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},e.prototype.saveCursor=function(t){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},e.prototype.restoreCursor=function(t){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},e.prototype.setTitle=function(t){this._windowTitle=t,this._onTitleChange.fire(t)},e.prototype.setIconName=function(t){this._iconName=t},e.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},e.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},e.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},e.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,s.DEFAULT_CHARSET)},e.prototype.selectCharset=function(t){2===t.length?"/"!==t[0]&&this._charsetService.setgCharset(y[t[0]],s.CHARSETS[t[1]]||s.DEFAULT_CHARSET):this.selectDefaultCharset()},e.prototype.index=function(){this._restrictCursor();var t=this._bufferService.buffer;this._bufferService.buffer.y++,t.y===t.scrollBottom+1?(t.y--,this._onRequestScroll.fire(this._eraseAttrData())):t.y>=this._bufferService.rows&&(t.y=this._bufferService.rows-1),this._restrictCursor()},e.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},e.prototype.reverseIndex=function(){this._restrictCursor();var t=this._bufferService.buffer;t.y===t.scrollTop?(t.lines.shiftElements(t.ybase+t.y,t.scrollBottom-t.scrollTop,1),t.lines.set(t.ybase+t.y,t.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)):(t.y--,this._restrictCursor())},e.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},e.prototype.reset=function(){this._curAttrData=d.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=d.DEFAULT_ATTR_DATA.clone()},e.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},e.prototype.setgLevel=function(t){this._charsetService.setgLevel(t)},e.prototype.screenAlignmentPattern=function(){var t=new m.CellData;t.content=1<<22|"E".charCodeAt(0),t.fg=this._curAttrData.fg,t.bg=this._curAttrData.bg;var e=this._bufferService.buffer;this._setCursor(0,0);for(var n=0;n256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(e),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return t.fromArray=function(e){var n=new t;if(!e.length)return n;for(var i=e[0]instanceof Array?1:0;i>8,i=255&this._subParamsIdx[e];i-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,i))}return t},t.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},t.prototype.addParam=function(t){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>2147483647?2147483647:t}},t.prototype.addSubParam=function(t){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>2147483647?2147483647:t,this._subParamsIdx[this.length-1]++}},t.prototype.hasSubParams=function(t){return(255&this._subParamsIdx[t])-(this._subParamsIdx[t]>>8)>0},t.prototype.getSubParams=function(t){var e=this._subParamsIdx[t]>>8,n=255&this._subParamsIdx[t];return n-e>0?this._subParams.subarray(e,n):null},t.prototype.getSubParamsAll=function(){for(var t={},e=0;e>8,i=255&this._subParamsIdx[e];i-n>0&&(t[e]=this._subParams.slice(n,i))}return t},t.prototype.addDigit=function(t){var e;if(!(this._rejectDigits||!(e=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var n=this._digitIsSub?this._subParams:this.params,i=n[e-1];n[e-1]=~i?Math.min(10*i+t,2147483647):t}},t}();e.Params=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OscHandler=e.OscParser=void 0;var i=n(23),r=n(8),o=function(){function t(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return t.prototype.addHandler=function(t,e){void 0===this._handlers[t]&&(this._handlers[t]=[]);var n=this._handlers[t];return n.push(e),{dispose:function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}}},t.prototype.setHandler=function(t,e){this._handlers[t]=[e]},t.prototype.clearHandler=function(t){this._handlers[t]&&delete this._handlers[t]},t.prototype.setHandlerFallback=function(t){this._handlerFb=t},t.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},t.prototype.reset=function(){2===this._state&&this.end(!1),this._id=-1,this._state=0},t.prototype._start=function(){var t=this._handlers[this._id];if(t)for(var e=t.length-1;e>=0;e--)t[e].start();else this._handlerFb(this._id,"START")},t.prototype._put=function(t,e,n){var i=this._handlers[this._id];if(i)for(var o=i.length-1;o>=0;o--)i[o].put(t,e,n);else this._handlerFb(this._id,"PUT",r.utf32ToString(t,e,n))},t.prototype._end=function(t){var e=this._handlers[this._id];if(e){for(var n=e.length-1;n>=0&&!1===e[n].end(t);n--);for(n--;n>=0;n--)e[n].end(!1)}else this._handlerFb(this._id,"END",t)},t.prototype.start=function(){this.reset(),this._id=-1,this._state=1},t.prototype.put=function(t,e,n){if(3!==this._state){if(1===this._state)for(;e0&&this._put(t,e,n)}},t.prototype.end=function(t){0!==this._state&&(3!==this._state&&(1===this._state&&this._start(),this._end(t)),this._id=-1,this._state=0)},t}();e.OscParser=o;var a=function(){function t(t){this._handler=t,this._data="",this._hitLimit=!1}return t.prototype.start=function(){this._data="",this._hitLimit=!1},t.prototype.put=function(t,e,n){this._hitLimit||(this._data+=r.utf32ToString(t,e,n),this._data.length>i.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},t.prototype.end=function(t){var e;return this._hitLimit?e=!1:t&&(e=this._handler(this._data)),this._data="",this._hitLimit=!1,e},t}();e.OscHandler=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PAYLOAD_LIMIT=void 0,e.PAYLOAD_LIMIT=1e7},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DcsHandler=e.DcsParser=void 0;var i=n(8),r=n(21),o=n(23),a=[],s=function(){function t(){this._handlers=Object.create(null),this._active=a,this._ident=0,this._handlerFb=function(){}}return t.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},t.prototype.addHandler=function(t,e){void 0===this._handlers[t]&&(this._handlers[t]=[]);var n=this._handlers[t];return n.push(e),{dispose:function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}}},t.prototype.setHandler=function(t,e){this._handlers[t]=[e]},t.prototype.clearHandler=function(t){this._handlers[t]&&delete this._handlers[t]},t.prototype.setHandlerFallback=function(t){this._handlerFb=t},t.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=a,this._ident=0},t.prototype.hook=function(t,e){if(this.reset(),this._ident=t,this._active=this._handlers[t]||a,this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].hook(e);else this._handlerFb(this._ident,"HOOK",e)},t.prototype.put=function(t,e,n){if(this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].put(t,e,n);else this._handlerFb(this._ident,"PUT",i.utf32ToString(t,e,n))},t.prototype.unhook=function(t){if(this._active.length){for(var e=this._active.length-1;e>=0&&!1===this._active[e].unhook(t);e--);for(e--;e>=0;e--)this._active[e].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",t);this._active=a,this._ident=0},t}();e.DcsParser=s;var c=function(){function t(t){this._handler=t,this._data="",this._hitLimit=!1}return t.prototype.hook=function(t){this._params=t.clone(),this._data="",this._hitLimit=!1},t.prototype.put=function(t,e,n){this._hitLimit||(this._data+=i.utf32ToString(t,e,n),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},t.prototype.unhook=function(t){var e;return this._hitLimit?e=!1:t&&(e=this._handler(this._data,this._params||new r.Params)),this._params=void 0,this._data="",this._hitLimit=!1,e},t}();e.DcsHandler=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireCharAtlas=void 0;var i=n(26),r=n(43),o=[];e.acquireCharAtlas=function(t,e,n,a,s){for(var c=i.generateConfig(a,s,t,n),l=0;l=0){if(i.configEquals(h.config,c))return h.atlas;1===h.ownedBy.length?(h.atlas.dispose(),o.splice(l,1)):h.ownedBy.splice(u,1);break}}for(l=0;l1)for(var h=this._getJoinedRanges(i,s,o,e,r),d=0;d1)for(h=this._getJoinedRanges(i,s,o,e,r),d=0;d=this._line.length))return e?(this._line.loadCell(t,e),e):this._line.loadCell(t,new i.CellData)},t.prototype.translateToString=function(t,e,n){return this._line.translateToString(t,e,n)},t}(),d=function(){function t(t){this._core=t}return t.prototype.registerCsiHandler=function(t,e){return this._core.addCsiHandler(t,(function(t){return e(t.toArray())}))},t.prototype.addCsiHandler=function(t,e){return this.registerCsiHandler(t,e)},t.prototype.registerDcsHandler=function(t,e){return this._core.addDcsHandler(t,(function(t,n){return e(t,n.toArray())}))},t.prototype.addDcsHandler=function(t,e){return this.registerDcsHandler(t,e)},t.prototype.registerEscHandler=function(t,e){return this._core.addEscHandler(t,e)},t.prototype.addEscHandler=function(t,e){return this.registerEscHandler(t,e)},t.prototype.registerOscHandler=function(t,e){return this._core.addOscHandler(t,e)},t.prototype.addOscHandler=function(t,e){return this.registerOscHandler(t,e)},t}(),f=function(){function t(t){this._core=t}return t.prototype.register=function(t){this._core.unicodeService.register(t)},Object.defineProperty(t.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(t){this._core.unicodeService.activeVersion=t},enumerable:!1,configurable:!0}),t}()},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Terminal=void 0;var o=n(36),a=n(37),s=n(38),c=n(12),l=n(19),u=n(40),h=n(50),d=n(51),f=n(11),p=n(7),m=n(18),g=n(54),v=n(55),b=n(56),y=n(57),_=n(59),w=n(0),k=n(16),C=n(27),S=n(60),x=n(5),O=n(61),M=n(62),T=n(63),E=n(64),P=n(65),A="undefined"!=typeof window?window.document:null,j=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.browser=f,n._keyDownHandled=!1,n._onCursorMove=new w.EventEmitter,n._onKey=new w.EventEmitter,n._onRender=new w.EventEmitter,n._onSelectionChange=new w.EventEmitter,n._onTitleChange=new w.EventEmitter,n._onFocus=new w.EventEmitter,n._onBlur=new w.EventEmitter,n._onA11yCharEmitter=new w.EventEmitter,n._onA11yTabEmitter=new w.EventEmitter,n._setup(),n.linkifier=n._instantiationService.createInstance(h.Linkifier),n.linkifier2=n.register(n._instantiationService.createInstance(T.Linkifier2)),n.register(n._inputHandler.onRequestBell((function(){return n.bell()}))),n.register(n._inputHandler.onRequestRefreshRows((function(t,e){return n.refresh(t,e)}))),n.register(n._inputHandler.onRequestReset((function(){return n.reset()}))),n.register(n._inputHandler.onRequestScroll((function(t,e){return n.scroll(t,e||void 0)}))),n.register(n._inputHandler.onRequestWindowsOptionsReport((function(t){return n._reportWindowsOptions(t)}))),n.register(w.forwardEvent(n._inputHandler.onCursorMove,n._onCursorMove)),n.register(w.forwardEvent(n._inputHandler.onTitleChange,n._onTitleChange)),n.register(w.forwardEvent(n._inputHandler.onA11yChar,n._onA11yCharEmitter)),n.register(w.forwardEvent(n._inputHandler.onA11yTab,n._onA11yTabEmitter)),n.register(n._bufferService.onResize((function(t){return n._afterResize(t.cols,t.rows)}))),n}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){var e,n,i;this._isDisposed||(t.prototype.dispose.call(this),null===(e=this._renderService)||void 0===e||e.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},null===(i=null===(n=this.element)||void 0===n?void 0:n.parentNode)||void 0===i||i.removeChild(this.element))},e.prototype._setup=function(){t.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(e.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},e.prototype._updateOptions=function(e){var n,i,r,o;switch(t.prototype._updateOptions.call(this,e),e){case"fontFamily":case"fontSize":null===(n=this._renderService)||void 0===n||n.clear(),null===(i=this._charSizeService)||void 0===i||i.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":null===(r=this.viewport)||void 0===r||r.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)):(null===(o=this._accessibilityManager)||void 0===o||o.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},e.prototype._onTextAreaFocus=function(t){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(c.C0.ESC+"[I"),this.updateCursorStyle(t),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},e.prototype.blur=function(){var t;return null===(t=this.textarea)||void 0===t?void 0:t.blur()},e.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(c.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},e.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var t=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),e=this._bufferService.buffer.y*t;this.textarea.style.left=this._bufferService.buffer.x*this._charSizeService.width+"px",this.textarea.style.top=e+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=t+"px",this.textarea.style.lineHeight=t+"px",this.textarea.style.zIndex="-5"}},e.prototype._initGlobal=function(){var t=this;this._bindKeys(),this.register(p.addDisposableDomListener(this.element,"copy",(function(e){t.hasSelection()&&s.copyHandler(e,t._selectionService)})));var e=function(e){return s.handlePasteEvent(e,t.textarea,t._coreService)};this.register(p.addDisposableDomListener(this.textarea,"paste",e)),this.register(p.addDisposableDomListener(this.element,"paste",e)),this.register(f.isFirefox?p.addDisposableDomListener(this.element,"mousedown",(function(e){2===e.button&&s.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})):p.addDisposableDomListener(this.element,"contextmenu",(function(e){s.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)}))),f.isLinux&&this.register(p.addDisposableDomListener(this.element,"auxclick",(function(e){1===e.button&&s.moveTextAreaUnderMouseCursor(e,t.textarea,t.screenElement)})))},e.prototype._bindKeys=function(){var t=this;this.register(p.addDisposableDomListener(this.textarea,"keyup",(function(e){return t._keyUp(e)}),!0)),this.register(p.addDisposableDomListener(this.textarea,"keydown",(function(e){return t._keyDown(e)}),!0)),this.register(p.addDisposableDomListener(this.textarea,"keypress",(function(e){return t._keyPress(e)}),!0)),this.register(p.addDisposableDomListener(this.textarea,"compositionstart",(function(){return t._compositionHelper.compositionstart()}))),this.register(p.addDisposableDomListener(this.textarea,"compositionupdate",(function(e){return t._compositionHelper.compositionupdate(e)}))),this.register(p.addDisposableDomListener(this.textarea,"compositionend",(function(){return t._compositionHelper.compositionend()}))),this.register(this.onRender((function(){return t._compositionHelper.updateCompositionElements()}))),this.register(this.onRender((function(e){return t._queueLinkification(e.start,e.end)})))},e.prototype.open=function(t){var e=this;if(!t)throw new Error("Terminal requires a parent element.");A.body.contains(t)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=t.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),t.appendChild(this.element);var n=A.createDocumentFragment();this._viewportElement=A.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),n.appendChild(this._viewportElement),this._viewportScrollArea=A.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=A.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=A.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),n.appendChild(this.screenElement),this.textarea=A.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),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.register(p.addDisposableDomListener(this.textarea,"focus",(function(t){return e._onTextAreaFocus(t)}))),this.register(p.addDisposableDomListener(this.textarea,"blur",(function(){return e._onTextAreaBlur()}))),this._helperContainer.appendChild(this.textarea);var i=this._instantiationService.createInstance(E.CoreBrowserService,this.textarea);this._instantiationService.setService(x.ICoreBrowserService,i),this._charSizeService=this._instantiationService.createInstance(O.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._compositionView=A.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(n),this._theme=this.options.theme||this._theme,this._colorManager=new C.ColorManager(A,this.options.allowTransparency),this.register(this.optionsService.onOptionChange((function(t){return e._colorManager.onOptionsChange(t)}))),this._colorManager.setTheme(this._theme);var r=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(S.RenderService,r,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange((function(t){return e._onRender.fire(t)}))),this.onResize((function(t){return e._renderService.resize(t.cols,t.rows)})),this._soundService=this._instantiationService.createInstance(g.SoundService),this._instantiationService.setService(x.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,(function(t,n){return e.scrollLines(t,n)}),this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar((function(){return e.viewport.syncScrollArea()}))),this.register(this.viewport),this.register(this.onCursorMove((function(){e._renderService.onCursorMove(),e._syncTextArea()}))),this.register(this.onResize((function(){return e._renderService.onResize(e.cols,e.rows)}))),this.register(this.onBlur((function(){return e._renderService.onBlur()}))),this.register(this.onFocus((function(){return e._renderService.onFocus()}))),this.register(this._renderService.onDimensionsChange((function(){return e.viewport.syncScrollArea()}))),this._selectionService=this.register(this._instantiationService.createInstance(d.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((function(t){return e.scrollLines(t.amount,t.suppressScrollEvent)}))),this.register(this._selectionService.onSelectionChange((function(){return e._onSelectionChange.fire()}))),this.register(this._selectionService.onRequestRedraw((function(t){return e._renderService.onSelectionChanged(t.start,t.end,t.columnSelectMode)}))),this.register(this._selectionService.onLinuxMouseSelection((function(t){e.textarea.value=t,e.textarea.focus(),e.textarea.select()}))),this.register(this.onScroll((function(){e.viewport.syncScrollArea(),e._selectionService.refresh()}))),this.register(p.addDisposableDomListener(this._viewportElement,"scroll",(function(){return e._selectionService.refresh()}))),this._mouseZoneManager=this._instantiationService.createInstance(v.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll((function(){return e._mouseZoneManager.clearAll()}))),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(p.addDisposableDomListener(this.element,"mousedown",(function(t){return e._selectionService.onMouseDown(t)}))),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},e.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(u.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(y.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},e.prototype._setTheme=function(t){var e,n,i;this._theme=t,null===(e=this._colorManager)||void 0===e||e.setTheme(t),null===(n=this._renderService)||void 0===n||n.setColors(this._colorManager.colors),null===(i=this.viewport)||void 0===i||i.onThemeChange(this._colorManager.colors)},e.prototype.bindMouse=function(){var t=this,e=this,n=this.element;function i(t){var n,i,r=e._mouseService.getRawByteCoords(t,e.screenElement,e.cols,e.rows);if(!r)return!1;switch(t.overrideType||t.type){case"mousemove":i=32,void 0===t.buttons?(n=3,void 0!==t.button&&(n=t.button<3?t.button:3)):n=1&t.buttons?0:4&t.buttons?1:2&t.buttons?2:3;break;case"mouseup":i=0,n=t.button<3?t.button:3;break;case"mousedown":i=1,n=t.button<3?t.button:3;break;case"wheel":0!==t.deltaY&&(i=t.deltaY<0?0:1),n=4;break;default:return!1}return!(void 0===i||void 0===n||n>4)&&e._coreMouseService.triggerMouseEvent({col:r.x-33,row:r.y-33,button:n,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}var r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o=function(e){return i(e),e.buttons||(t._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&t._document.removeEventListener("mousemove",r.mousedrag)),t.cancel(e)},a=function(e){return i(e),e.preventDefault(),t.cancel(e)},s=function(t){t.buttons&&i(t)},l=function(t){t.buttons||i(t)};this.register(this._coreMouseService.onProtocolChange((function(e){e?("debug"===t.optionsService.options.logLevel&&t._logService.debug("Binding to mouse events:",t._coreMouseService.explainEvents(e)),t.element.classList.add("enable-mouse-events"),t._selectionService.disable()):(t._logService.debug("Unbinding from mouse events."),t.element.classList.remove("enable-mouse-events"),t._selectionService.enable()),8&e?r.mousemove||(n.addEventListener("mousemove",l),r.mousemove=l):(n.removeEventListener("mousemove",r.mousemove),r.mousemove=null),16&e?r.wheel||(n.addEventListener("wheel",a,{passive:!1}),r.wheel=a):(n.removeEventListener("wheel",r.wheel),r.wheel=null),2&e?r.mouseup||(r.mouseup=o):(t._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),4&e?r.mousedrag||(r.mousedrag=s):(t._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)}))),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(p.addDisposableDomListener(n,"mousedown",(function(e){if(e.preventDefault(),t.focus(),t._coreMouseService.areMouseEventsActive&&!t._selectionService.shouldForceSelection(e))return i(e),r.mouseup&&t._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&t._document.addEventListener("mousemove",r.mousedrag),t.cancel(e)}))),this.register(p.addDisposableDomListener(n,"wheel",(function(e){if(r.wheel);else if(!t.buffer.hasScrollback){var n=t.viewport.getLinesScrolled(e);if(0===n)return;for(var i=c.C0.ESC+(t._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(e.deltaY<0?"A":"B"),o="",a=0;a47)},e.prototype._keyUp=function(t){this._customKeyEventHandler&&!1===this._customKeyEventHandler(t)||(function(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode}(t)||this.focus(),this.updateCursorStyle(t))},e.prototype._keyPress=function(t){var e;if(this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(t))return!1;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!this._isThirdLevelShift(this.browser,t)||(e=String.fromCharCode(e),this._onKey.fire({key:e,domEvent:t}),this._showCursor(),this._coreService.triggerDataEvent(e,!0),0))},e.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},e.prototype.resize=function(e,n){e!==this.cols||n!==this.rows?t.prototype.resize.call(this,e,n):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},e.prototype._afterResize=function(t,e){var n,i;null===(n=this._charSizeService)||void 0===n||n.measure(),null===(i=this.viewport)||void 0===i||i.syncScrollArea(!0)},e.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){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(var t=1;t=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionHelper=void 0;var o=n(5),a=n(1),s=function(){function t(t,e,n,i,r,o){this._textarea=t,this._compositionView=e,this._bufferService=n,this._optionsService=i,this._charSizeService=r,this._coreService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(t.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),t.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this._compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout((function(){e._compositionPosition.end=e._textarea.value.length}),0)},t.prototype.compositionend=function(){this._finalizeComposition(!0)},t.prototype.keydown=function(t){if(this._isComposing||this._isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this._finalizeComposition(!1)}return 229!==t.keyCode||(this._handleAnyTextareaChanges(),!1)},t.prototype._finalizeComposition=function(t){var e=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,t){var n={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((function(){var t;e._isSendingComposition&&(e._isSendingComposition=!1,t=e._isComposing?e._textarea.value.substring(n.start,n.end):e._textarea.value.substring(n.start),e._coreService.triggerDataEvent(t,!0))}),0)}else{this._isSendingComposition=!1;var i=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(i,!0)}},t.prototype._handleAnyTextareaChanges=function(){var t=this,e=this._textarea.value;setTimeout((function(){if(!t._isComposing){var n=t._textarea.value.replace(e,"");n.length>0&&t._coreService.triggerDataEvent(n,!0)}}),0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var n=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),i=this._bufferService.buffer.y*n,r=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=i+"px",this._compositionView.style.height=n+"px",this._compositionView.style.lineHeight=n+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var o=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=i+"px",this._textarea.style.width=o.width+"px",this._textarea.style.height=o.height+"px",this._textarea.style.lineHeight=o.height+"px"}t||setTimeout((function(){return e.updateCompositionElements(!0)}),0)}},i([r(2,a.IBufferService),r(3,a.IOptionsService),r(4,o.ICharSizeService),r(5,a.ICoreService)],t)}();e.CompositionHelper=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.Viewport=void 0;var s=n(2),c=n(7),l=n(5),u=n(1),h=function(t){function e(e,n,i,r,o,a,s){var l=t.call(this)||this;return l._scrollLines=e,l._viewportElement=n,l._scrollArea=i,l._bufferService=r,l._optionsService=o,l._charSizeService=a,l._renderService=s,l.scrollBarWidth=0,l._currentRowHeight=0,l._lastRecordedBufferLength=0,l._lastRecordedViewportHeight=0,l._lastRecordedBufferHeight=0,l._lastTouchY=0,l._lastScrollTop=0,l._wheelPartialScroll=0,l._refreshAnimationFrame=null,l._ignoreNextScrollEvent=!1,l.scrollBarWidth=l._viewportElement.offsetWidth-l._scrollArea.offsetWidth||15,l.register(c.addDisposableDomListener(l._viewportElement,"scroll",l._onScroll.bind(l))),setTimeout((function(){return l.syncScrollArea()}),0),l}return r(e,t),e.prototype.onThemeChange=function(t){this._viewportElement.style.backgroundColor=t.background.css},e.prototype._refresh=function(t){var e=this;if(t)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=requestAnimationFrame((function(){return e._innerRefresh()})))},e.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var t=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==t&&(this._lastRecordedBufferHeight=t,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var e=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==e&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=e),this._refreshAnimationFrame=null},e.prototype.syncScrollArea=function(t){if(void 0===t&&(t=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(t);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._bufferService.buffer.ydisp*this._currentRowHeight&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(t)},e.prototype._onScroll=function(t){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var e=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(e,!0)}},e.prototype._bubbleScroll=function(t,e){return!(e<0&&0!==this._viewportElement.scrollTop||e>0&&this._viewportElement.scrollTop+this._lastRecordedViewportHeight0?1:-1),this._wheelPartialScroll%=1):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._bufferService.rows),e},e.prototype._applyScrollModifier=function(t,e){var n=this._optionsService.options.fastScrollModifier;return"alt"===n&&e.altKey||"ctrl"===n&&e.ctrlKey||"shift"===n&&e.shiftKey?t*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:t*this._optionsService.options.scrollSensitivity},e.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},e.prototype.onTouchMove=function(t){var e=this._lastTouchY-t.touches[0].pageY;return this._lastTouchY=t.touches[0].pageY,0!==e&&(this._viewportElement.scrollTop+=e,this._bubbleScroll(t,e))},o([a(3,u.IBufferService),a(4,u.IOptionsService),a(5,l.ICharSizeService),a(6,l.IRenderService)],e)}(s.Disposable);e.Viewport=h},function(t,e,n){"use strict";function i(t){return t.replace(/\r?\n/g,"\r")}function r(t,e){return e?"\x1b[200~"+t+"\x1b[201~":t}function o(t,e,n){t=r(t=i(t),n.decPrivateModes.bracketedPasteMode),n.triggerDataEvent(t,!0),e.value=""}function a(t,e,n){var i=n.getBoundingClientRect(),r=t.clientX-i.left-10,o=t.clientY-i.top-10;e.style.width="20px",e.style.height="20px",e.style.left=r+"px",e.style.top=o+"px",e.style.zIndex="1000",e.focus()}Object.defineProperty(e,"__esModule",{value:!0}),e.rightClickHandler=e.moveTextAreaUnderMouseCursor=e.paste=e.handlePasteEvent=e.copyHandler=e.bracketTextForPaste=e.prepareTextForTerminal=void 0,e.prepareTextForTerminal=i,e.bracketTextForPaste=r,e.copyHandler=function(t,e){t.clipboardData&&t.clipboardData.setData("text/plain",e.selectionText),t.preventDefault()},e.handlePasteEvent=function(t,e,n){t.stopPropagation(),t.clipboardData&&o(t.clipboardData.getData("text/plain"),e,n)},e.paste=o,e.moveTextAreaUnderMouseCursor=a,e.rightClickHandler=function(t,e,n,i,r){a(t,e,n),r&&!i.isClickInSelection(t)&&i.selectWordAtCursor(t),e.value=i.selectionText,e.select()}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.EscapeSequenceParser=e.VT500_TRANSITION_TABLE=e.TransitionTable=void 0;var o=n(2),a=n(15),s=n(21),c=n(22),l=n(24),u=function(){function t(t){this.table=new Uint8Array(t)}return t.prototype.setDefault=function(t,e){a.fill(this.table,t<<4|e)},t.prototype.add=function(t,e,n,i){this.table[e<<8|t]=n<<4|i},t.prototype.addMany=function(t,e,n,i){for(var r=0;r1)throw new Error("only one byte as prefix supported");if((n=t.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var i=0;ir||r>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=r}}if(1!==t.final.length)throw new Error("final must be a single byte");var o=t.final.charCodeAt(0);if(e[0]>o||o>e[1])throw new Error("final must be in range "+e[0]+" .. "+e[1]);return(n<<=8)|o},n.prototype.identToString=function(t){for(var e=[];t;)e.push(String.fromCharCode(255&t)),t>>=8;return e.reverse().join("")},n.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},n.prototype.setPrintHandler=function(t){this._printHandler=t},n.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},n.prototype.addEscHandler=function(t,e){var n=this._identifier(t,[48,126]);void 0===this._escHandlers[n]&&(this._escHandlers[n]=[]);var i=this._escHandlers[n];return i.push(e),{dispose:function(){var t=i.indexOf(e);-1!==t&&i.splice(t,1)}}},n.prototype.setEscHandler=function(t,e){this._escHandlers[this._identifier(t,[48,126])]=[e]},n.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},n.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},n.prototype.setExecuteHandler=function(t,e){this._executeHandlers[t.charCodeAt(0)]=e},n.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},n.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},n.prototype.addCsiHandler=function(t,e){var n=this._identifier(t);void 0===this._csiHandlers[n]&&(this._csiHandlers[n]=[]);var i=this._csiHandlers[n];return i.push(e),{dispose:function(){var t=i.indexOf(e);-1!==t&&i.splice(t,1)}}},n.prototype.setCsiHandler=function(t,e){this._csiHandlers[this._identifier(t)]=[e]},n.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},n.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},n.prototype.addDcsHandler=function(t,e){return this._dcsParser.addHandler(this._identifier(t),e)},n.prototype.setDcsHandler=function(t,e){this._dcsParser.setHandler(this._identifier(t),e)},n.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},n.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},n.prototype.addOscHandler=function(t,e){return this._oscParser.addHandler(t,e)},n.prototype.setOscHandler=function(t,e){this._oscParser.setHandler(t,e)},n.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},n.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},n.prototype.setErrorHandler=function(t){this._errorHandler=t},n.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},n.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},n.prototype.parse=function(t,e){for(var n=0,i=0,r=this.currentState,o=this._oscParser,a=this._dcsParser,s=this._collect,c=this._params,l=this._transitions.table,u=0;u>4){case 2:for(var h=u+1;;++h){if(h>=e||(n=t[h])<32||n>126&&n<160){this._printHandler(t,u,h),u=h-1;break}if(++h>=e||(n=t[h])<32||n>126&&n<160){this._printHandler(t,u,h),u=h-1;break}if(++h>=e||(n=t[h])<32||n>126&&n<160){this._printHandler(t,u,h),u=h-1;break}if(++h>=e||(n=t[h])<32||n>126&&n<160){this._printHandler(t,u,h),u=h-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:u,code:n,currentState:r,collect:s,params:c,abort:!1}).abort)return;break;case 7:for(var d=this._csiHandlers[s<<8|n],f=d?d.length-1:-1;f>=0&&!1===d[f](c);f--);f<0&&this._csiHandlerFb(s<<8|n,c),this.precedingCodepoint=0;break;case 8:do{switch(n){case 59:c.addParam(0);break;case 58:c.addSubParam(-1);break;default:c.addDigit(n-48)}}while(++u47&&n<60);u--;break;case 9:s<<=8,s|=n;break;case 10:for(var p=this._escHandlers[s<<8|n],m=p?p.length-1:-1;m>=0&&!1===p[m]();m--);m<0&&this._escHandlerFb(s<<8|n),this.precedingCodepoint=0;break;case 11:c.reset(),c.addParam(0),s=0;break;case 12:a.hook(s<<8|n,c);break;case 13:for(var g=u+1;;++g)if(g>=e||24===(n=t[g])||26===n||27===n||n>127&&n<160){a.put(t,u,g),u=g-1;break}break;case 14:a.unhook(24!==n&&26!==n),27===n&&(i|=1),c.reset(),c.addParam(0),s=0,this.precedingCodepoint=0;break;case 4:o.start();break;case 5:for(var v=u+1;;v++)if(v>=e||(n=t[v])<32||n>127&&n<=159){o.put(t,u,v),u=v-1;break}break;case 6:o.end(24!==n&&26!==n),27===n&&(i|=1),c.reset(),c.addParam(0),s=0,this.precedingCodepoint=0}r=15&i}this._collect=s,this.currentState=r},n}(o.Disposable);e.EscapeSequenceParser=h},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=void 0;var s=n(41),c=n(47),l=n(48),u=n(49),h=n(29),d=n(2),f=n(5),p=n(1),m=n(25),g=n(0),v=1,b=function(t){function e(e,n,i,r,o,a,d,f,p){var m=t.call(this)||this;m._colors=e,m._screenElement=n,m._bufferService=o,m._charSizeService=a,m._optionsService=d,m._id=v++,m._onRequestRedraw=new g.EventEmitter;var b=m._optionsService.options.allowTransparency;return m._characterJoinerRegistry=new h.CharacterJoinerRegistry(m._bufferService),m._renderLayers=[new s.TextRenderLayer(m._screenElement,0,m._colors,m._characterJoinerRegistry,b,m._id,m._bufferService,d),new c.SelectionRenderLayer(m._screenElement,1,m._colors,m._id,m._bufferService,d),new u.LinkRenderLayer(m._screenElement,2,m._colors,m._id,i,r,m._bufferService,d),new l.CursorRenderLayer(m._screenElement,3,m._colors,m._id,m._onRequestRedraw,m._bufferService,d,f,p)],m.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},m._devicePixelRatio=window.devicePixelRatio,m._updateDimensions(),m.onOptionsChanged(),m}return r(e,t),Object.defineProperty(e.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(var e=0,n=this._renderLayers;e0&&u===s[0][0]){d=!0;var p=s.shift();h=new l.JoinedCellData(this._workCell,a.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1}!d&&this._isOverlapping(h)&&fthis._characterWidth;return this._ctx.restore(),this._characterOverlapCache[e]=n,n},e}(a.BaseRenderLayer);e.TextRenderLayer=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridCache=void 0;var i=function(){function t(){this.cache=[]}return t.prototype.resize=function(t,e){for(var n=0;n>>24,r=e.rgba>>>16&255,o=e.rgba>>>8&255,a=0;a=this.capacity)this._unlinkNode(n=this._head),delete this._map[n.key],n.key=t,n.value=e,this._map[t]=n;else{var i=this._nodePool;i.length>0?((n=i.pop()).key=t,n.value=e):n={prev:null,next:null,key:t,value:e},this._map[t]=n,this.size++}this._appendNode(n)},t}();e.LRUMap=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRenderLayer=void 0;var o=function(t){function e(e,n,i,r,o,a){var s=t.call(this,e,"selection",n,!0,i,r,o,a)||this;return s._clearState(),s}return r(e,t),e.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this._clearState()},e.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},e.prototype.onSelectionChanged=function(t,e,n){if(this._didStateChange(t,e,n,this._bufferService.buffer.ydisp))if(this._clearAll(),t&&e){var i=t[1]-this._bufferService.buffer.ydisp,r=e[1]-this._bufferService.buffer.ydisp,o=Math.max(i,0),a=Math.min(r,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||a<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var s=t[0];this._fillCells(s,o,e[0]-s,a-o+1)}else{this._fillCells(s=i===o?t[0]:0,o,(o===a?e[0]:this._bufferService.cols)-s,1);var c=Math.max(a-o-1,0);this._fillCells(0,o+1,this._bufferService.cols,c),o!==a&&this._fillCells(0,a,r===a?e[0]:this._bufferService.cols,1)}this._state.start=[t[0],t[1]],this._state.end=[e[0],e[1]],this._state.columnSelectMode=n,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},e.prototype._didStateChange=function(t,e,n,i){return!this._areCoordinatesEqual(t,this._state.start)||!this._areCoordinatesEqual(e,this._state.end)||n!==this._state.columnSelectMode||i!==this._state.ydisp},e.prototype._areCoordinatesEqual=function(t,e){return!(!t||!e)&&t[0]===e[0]&&t[1]===e[1]},e}(n(13).BaseRenderLayer);e.SelectionRenderLayer=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;var o=n(13),a=n(4),s=function(t){function e(e,n,i,r,o,s,c,l,u){var h=t.call(this,e,"cursor",n,!0,i,r,s,c)||this;return h._onRequestRedraw=o,h._coreService=l,h._coreBrowserService=u,h._cell=new a.CellData,h._state={x:0,y:0,isFocused:!1,style:"",width:0},h._cursorRenderers={bar:h._renderBarCursor.bind(h),block:h._renderBlockCursor.bind(h),underline:h._renderUnderlineCursor.bind(h)},h}return r(e,t),e.prototype.resize=function(e){t.prototype.resize.call(this,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},e.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},e.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},e.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},e.prototype.onOptionsChanged=function(){var t,e=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new c(this._coreBrowserService.isFocused,(function(){e._render(!0)}))):(null===(t=this._cursorBlinkStateManager)||void 0===t||t.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},e.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},e.prototype.onGridChanged=function(t,e){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},e.prototype._render=function(t){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var e=this._bufferService.buffer.ybase+this._bufferService.buffer.y,n=e-this._bufferService.buffer.ydisp;if(n<0||n>=this._bufferService.rows)this._clearCursor();else{var i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(e).loadCell(i,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&"block"!==r?this._cursorRenderers[r](i,n,this._cell):this._renderBlurCursor(i,n,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=n,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===i&&this._state.y===n&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](i,n,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=n,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},e.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},e.prototype._renderBarCursor=function(t,e,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(t,e,this._optionsService.options.cursorWidth),this._ctx.restore()},e.prototype._renderBlockCursor=function(t,e,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(t,e,n.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(n,t,e),this._ctx.restore()},e.prototype._renderUnderlineCursor=function(t,e,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(t,e),this._ctx.restore()},e.prototype._renderBlurCursor=function(t,e,n){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(t,e,n.getWidth(),1),this._ctx.restore()},e}(o.BaseRenderLayer);e.CursorRenderLayer=s;var c=function(){function t(t,e){this._renderCallback=e,this.isCursorVisible=!0,t&&this._restartInterval()}return Object.defineProperty(t.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},t.prototype.restartBlinkAnimation=function(){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0}))))},t.prototype._restartInterval=function(t){var e=this;void 0===t&&(t=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout((function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);if(e._animationTimeRestarted=void 0,t>0)return void e._restartInterval(t)}e.isCursorVisible=!1,e._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0})),e._blinkInterval=window.setInterval((function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);return e._animationTimeRestarted=void 0,void e._restartInterval(t)}e.isCursorVisible=!e.isCursorVisible,e._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0}))}),600)}),t)},t.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},t.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},t}()},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;var o=n(13),a=n(9),s=n(26),c=function(t){function e(e,n,i,r,o,a,s,c){var l=t.call(this,e,"link",n,!0,i,r,s,c)||this;return o.onShowLinkUnderline((function(t){return l._onShowLinkUnderline(t)})),o.onHideLinkUnderline((function(t){return l._onHideLinkUnderline(t)})),a.onShowLinkUnderline((function(t){return l._onShowLinkUnderline(t)})),a.onHideLinkUnderline((function(t){return l._onHideLinkUnderline(t)})),l}return r(e,t),e.prototype.resize=function(e){t.prototype.resize.call(this,e),this._state=void 0},e.prototype.reset=function(){this._clearCurrentLink()},e.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var t=this._state.y2-this._state.y1-1;t>0&&this._clearCells(0,this._state.y1+1,this._state.cols,t),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},e.prototype._onShowLinkUnderline=function(t){if(this._ctx.fillStyle=t.fg===a.INVERTED_DEFAULT_COLOR?this._colors.background.css:t.fg&&s.is256Color(t.fg)?this._colors.ansi[t.fg].css:this._colors.foreground.css,t.y1===t.y2)this._fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this._fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(var e=t.y1+1;e=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.MouseZone=e.Linkifier=void 0;var o=n(0),a=n(1),s=function(){function t(t,e,n){this._bufferService=t,this._logService=e,this._unicodeService=n,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new o.EventEmitter,this._onHideLinkUnderline=new o.EventEmitter,this._onLinkTooltip=new o.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),t.prototype.attachToDom=function(t,e){this._element=t,this._mouseZoneManager=e},t.prototype.linkifyRows=function(e,n){var i=this;this._mouseZoneManager&&(void 0===this._rowsToLinkify.start||void 0===this._rowsToLinkify.end?(this._rowsToLinkify.start=e,this._rowsToLinkify.end=n):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,e),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,n)),this._mouseZoneManager.clearAll(e,n),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout((function(){return i._linkifyRows()}),t._timeBeforeLatency))},t.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var t=this._bufferService.buffer;if(void 0!==this._rowsToLinkify.start&&void 0!==this._rowsToLinkify.end){var e=t.ydisp+this._rowsToLinkify.start;if(!(e>=t.lines.length)){for(var n=t.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,i=Math.ceil(2e3/this._bufferService.cols),r=this._bufferService.buffer.iterator(!1,e,n,i,i);r.hasNext();)for(var o=r.next(),a=0;a=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)}else this._linkMatchers.push(t)},t.prototype.deregisterLinkMatcher=function(t){for(var e=0;e>9&511:void 0;n.validationCallback?n.validationCallback(s,(function(t){r._rowsTimeoutId||t&&r._addLink(l[1],l[0]-r._bufferService.buffer.ydisp,s,n,d)})):c._addLink(l[1],l[0]-c._bufferService.buffer.ydisp,s,n,d)},c=this;null!==(i=o.exec(e))&&"break"!==s(););},t.prototype._addLink=function(t,e,n,i,r){var o=this;if(this._mouseZoneManager&&this._element){var a=this._unicodeService.getStringCellWidth(n),s=t%this._bufferService.cols,l=e+Math.floor(t/this._bufferService.cols),u=(s+a)%this._bufferService.cols,h=l+Math.floor((s+a)/this._bufferService.cols);0===u&&(u=this._bufferService.cols,h--),this._mouseZoneManager.add(new c(s+1,l+1,u+1,h+1,(function(t){if(i.handler)return i.handler(t,n);var e=window.open();e?(e.opener=null,e.location.href=n):console.warn("Opening link blocked as opener could not be cleared")}),(function(){o._onShowLinkUnderline.fire(o._createLinkHoverEvent(s,l,u,h,r)),o._element.classList.add("xterm-cursor-pointer")}),(function(t){o._onLinkTooltip.fire(o._createLinkHoverEvent(s,l,u,h,r)),i.hoverTooltipCallback&&i.hoverTooltipCallback(t,n,{start:{x:s,y:l},end:{x:u,y:h}})}),(function(){o._onHideLinkUnderline.fire(o._createLinkHoverEvent(s,l,u,h,r)),o._element.classList.remove("xterm-cursor-pointer"),i.hoverLeaveCallback&&i.hoverLeaveCallback()}),(function(t){return!i.willLinkActivate||i.willLinkActivate(t,n)})))}},t.prototype._createLinkHoverEvent=function(t,e,n,i,r){return{x1:t,y1:e,x2:n,y2:i,cols:this._bufferService.cols,fg:r}},t._timeBeforeLatency=200,t=i([r(0,a.IBufferService),r(1,a.ILogService),r(2,a.IUnicodeService)],t)}();e.Linkifier=s;var c=function(t,e,n,i,r,o,a,s,c){this.x1=t,this.y1=e,this.x2=n,this.y2=i,this.clickCallback=r,this.hoverCallback=o,this.tooltipCallback=a,this.leaveCallback=s,this.willLinkActivate=c};e.MouseZone=c},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionService=void 0;var s=n(11),c=n(52),l=n(4),u=n(0),h=n(5),d=n(1),f=n(30),p=n(53),m=n(2),g=String.fromCharCode(160),v=new RegExp(g,"g"),b=function(t){function e(e,n,i,r,o,a,s){var h=t.call(this)||this;return h._element=e,h._screenElement=n,h._bufferService=i,h._coreService=r,h._mouseService=o,h._optionsService=a,h._renderService=s,h._dragScrollAmount=0,h._enabled=!0,h._workCell=new l.CellData,h._mouseDownTimeStamp=0,h._onLinuxMouseSelection=h.register(new u.EventEmitter),h._onRedrawRequest=h.register(new u.EventEmitter),h._onSelectionChange=h.register(new u.EventEmitter),h._onRequestScrollLines=h.register(new u.EventEmitter),h._mouseMoveListener=function(t){return h._onMouseMove(t)},h._mouseUpListener=function(t){return h._onMouseUp(t)},h._coreService.onUserInput((function(){h.hasSelection&&h.clearSelection()})),h._trimListener=h._bufferService.buffer.lines.onTrim((function(t){return h._onTrim(t)})),h.register(h._bufferService.buffers.onBufferActivate((function(t){return h._onBufferActivate(t)}))),h.enable(),h._model=new c.SelectionModel(h._bufferService),h._activeSelectionMode=0,h}return r(e,t),Object.defineProperty(e.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._removeMouseDownListeners()},e.prototype.reset=function(){this.clearSelection()},e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},Object.defineProperty(e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasSelection",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;return!(!t||!e||t[0]===e[0]&&t[1]===e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;if(!t||!e)return"";var n=this._bufferService.buffer,i=[];if(3===this._activeSelectionMode){if(t[0]===e[0])return"";for(var r=t[1];r<=e[1];r++){var o=n.translateBufferLineToString(r,!0,t[0],e[0]);i.push(o)}}else{for(i.push(n.translateBufferLineToString(t[1],!0,t[0],t[1]===e[1]?e[0]:void 0)),r=t[1]+1;r<=e[1]-1;r++){var a=n.lines.get(r);o=n.translateBufferLineToString(r,!0),a&&a.isWrapped?i[i.length-1]+=o:i.push(o)}t[1]!==e[1]&&(a=n.lines.get(e[1]),o=n.translateBufferLineToString(e[1],!0,0,e[0]),a&&a.isWrapped?i[i.length-1]+=o:i.push(o))}return i.map((function(t){return t.replace(v," ")})).join(s.isWindows?"\r\n":"\n")},enumerable:!1,configurable:!0}),e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},e.prototype.refresh=function(t){var e=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame((function(){return e._refresh()}))),s.isLinux&&t&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},e.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})},e.prototype.isClickInSelection=function(t){var e=this._getMouseBufferCoords(t),n=this._model.finalSelectionStart,i=this._model.finalSelectionEnd;return!!(n&&i&&e)&&this._areCoordsInSelection(e,n,i)},e.prototype._areCoordsInSelection=function(t,e,n){return t[1]>e[1]&&t[1]=e[0]&&t[0]=e[0]},e.prototype.selectWordAtCursor=function(t){var e=this._getMouseBufferCoords(t);e&&(this._selectWordAt(e,!1),this._model.selectionEnd=void 0,this.refresh(!0))},e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},e.prototype.selectLines=function(t,e){this._model.clearSelection(),t=Math.max(t,0),e=Math.min(e,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,t],this._model.selectionEnd=[this._bufferService.cols,e],this.refresh(),this._onSelectionChange.fire()},e.prototype._onTrim=function(t){this._model.onTrim(t)&&this.refresh()},e.prototype._getMouseBufferCoords=function(t){var e=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(e)return e[0]--,e[1]--,e[1]+=this._bufferService.buffer.ydisp,e},e.prototype._getMouseEventScrollAmount=function(t){var e=f.getCoordsRelativeToElement(t,this._screenElement)[1],n=this._renderService.dimensions.canvasHeight;return e>=0&&e<=n?0:(e>n&&(e-=n),e=Math.min(Math.max(e,-50),50),(e/=50)/Math.abs(e)+Math.round(14*e))},e.prototype.shouldForceSelection=function(t){return s.isMac?t.altKey&&this._optionsService.options.macOptionClickForcesSelection:t.shiftKey},e.prototype.onMouseDown=function(t){if(this._mouseDownTimeStamp=t.timeStamp,(2!==t.button||!this.hasSelection)&&0===t.button){if(!this._enabled){if(!this.shouldForceSelection(t))return;t.stopPropagation()}t.preventDefault(),this._dragScrollAmount=0,this._enabled&&t.shiftKey?this._onIncrementalClick(t):1===t.detail?this._onSingleClick(t):2===t.detail?this._onDoubleClick(t):3===t.detail&&this._onTripleClick(t),this._addMouseDownListeners(),this.refresh(!0)}},e.prototype._addMouseDownListeners=function(){var t=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval((function(){return t._dragScroll()}),50)},e.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},e.prototype._onIncrementalClick=function(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))},e.prototype._onSingleClick=function(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(t)?3:0,this._model.selectionStart=this._getMouseBufferCoords(t),this._model.selectionStart){this._model.selectionEnd=void 0;var e=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);e&&e.length!==this._model.selectionStart[0]&&0===e.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}},e.prototype._onDoubleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=1,this._selectWordAt(e,!0))},e.prototype._onTripleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=2,this._selectLineAt(e[1]))},e.prototype.shouldColumnSelect=function(t){return t.altKey&&!(s.isMac&&this._optionsService.options.macOptionClickForcesSelection)},e.prototype._onMouseMove=function(t){if(t.stopImmediatePropagation(),this._model.selectionStart){var e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),this._model.selectionEnd){2===this._activeSelectionMode?this._model.selectionEnd[0]=this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var n=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(t.ydisp+this._bufferService.rows,t.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=t.ydisp),this.refresh()}},e.prototype._onMouseUp=function(t){var e=t.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&e<500&&t.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var n=this._mouseService.getCoords(t,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(n&&void 0!==n[0]&&void 0!==n[1]){var i=p.moveToCellSequence(n[0]-1,n[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(i,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},e.prototype._onBufferActivate=function(t){var e=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=t.activeBuffer.lines.onTrim((function(t){return e._onTrim(t)}))},e.prototype._convertViewportColToCharacterIndex=function(t,e){for(var n=e[0],i=0;e[0]>=i;i++){var r=t.loadCell(i,this._workCell).getChars().length;0===this._workCell.getWidth()?n--:r>1&&e[0]!==i&&(n+=r-1)}return n},e.prototype.setSelection=function(t,e,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[t,e],this._model.selectionStartLength=n,this.refresh()},e.prototype._getWordAt=function(t,e,n,i){if(void 0===n&&(n=!0),void 0===i&&(i=!0),!(t[0]>=this._bufferService.cols)){var r=this._bufferService.buffer,o=r.lines.get(t[1]);if(o){var a=r.translateBufferLineToString(t[1],!1),s=this._convertViewportColToCharacterIndex(o,t),c=s,l=t[0]-s,u=0,h=0,d=0,f=0;if(" "===a.charAt(s)){for(;s>0&&" "===a.charAt(s-1);)s--;for(;c1&&(f+=g-1,c+=g-1);p>0&&s>0&&!this._isCharWordSeparator(o.loadCell(p-1,this._workCell));){o.loadCell(p-1,this._workCell);var v=this._workCell.getChars().length;0===this._workCell.getWidth()?(u++,p--):v>1&&(d+=v-1,s-=v-1),s--,p--}for(;m1&&(f+=b-1,c+=b-1),c++,m++}}c++;var y=s+l-u+d,_=Math.min(this._bufferService.cols,c-s+u+h-d-f);if(e||""!==a.slice(s,c).trim()){if(n&&0===y&&32!==o.getCodePoint(0)){var w=r.lines.get(t[1]-1);if(w&&o.isWrapped&&32!==w.getCodePoint(this._bufferService.cols-1)){var k=this._getWordAt([this._bufferService.cols-1,t[1]-1],!1,!0,!1);if(k){var C=this._bufferService.cols-k.start;y-=C,_+=C}}}if(i&&y+_===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){var S=r.lines.get(t[1]+1);if(S&&S.isWrapped&&32!==S.getCodePoint(0)){var x=this._getWordAt([0,t[1]+1],!1,!1,!0);x&&(_+=x.length)}}return{start:y,length:_}}}}},e.prototype._selectWordAt=function(t,e){var n=this._getWordAt(t,e);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,t[1]--;this._model.selectionStart=[n.start,t[1]],this._model.selectionStartLength=n.length}},e.prototype._selectToWordAt=function(t){var e=this._getWordAt(t,!0);if(e){for(var n=t[1];e.start<0;)e.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;e.start+e.length>this._bufferService.cols;)e.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?e.start:e.start+e.length,n]}},e.prototype._isCharWordSeparator=function(t){return 0!==t.getWidth()&&this._optionsService.options.wordSeparator.indexOf(t.getChars())>=0},e.prototype._selectLineAt=function(t){var e=this._bufferService.buffer.getWrappedRangeForLine(t);this._model.selectionStart=[0,e.first],this._model.selectionEnd=[this._bufferService.cols,e.last],this._model.selectionStartLength=0},o([a(2,d.IBufferService),a(3,d.ICoreService),a(4,h.IMouseService),a(5,d.IOptionsService),a(6,h.IRenderService)],e)}(m.Disposable);e.SelectionService=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionModel=void 0;var i=function(){function t(t){this._bufferService=t,this.isSelectAllActive=!1,this.selectionStartLength=0}return t.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(t.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var t=this.selectionStart[0]+this.selectionStartLength;return t>this._bufferService.cols?[t%this._bufferService.cols,this.selectionStart[1]+Math.floor(t/this._bufferService.cols)]:[t,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),t.prototype.areSelectionValuesReversed=function(){var t=this.selectionStart,e=this.selectionEnd;return!(!t||!e)&&(t[1]>e[1]||t[1]===e[1]&&t[0]>e[0])},t.prototype.onTrim=function(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},t}();e.SelectionModel=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.moveToCellSequence=void 0;var i=n(12);function r(t,e,n,i){var r=t-o(n,t),s=e-o(n,e);return l(Math.abs(r-s)-function(t,e,n){for(var i=0,r=t-o(n,t),s=e-o(n,e),c=0;c=0&&ee?"A":"B"}function s(t,e,n,i,r,o){for(var a=t,s=e,c="";a!==n||s!==i;)a+=r?1:-1,r&&a>o.cols-1?(c+=o.buffer.translateBufferLineToString(s,!1,t,a),a=0,t=0,s++):!r&&a<0&&(c+=o.buffer.translateBufferLineToString(s,!1,0,t+1),t=a=o.cols-1,s--);return c+o.buffer.translateBufferLineToString(s,!1,t,a)}function c(t,e){return i.C0.ESC+(e?"O":"[")+t}function l(t,e){t=Math.floor(t);for(var n="",i=0;i0?i-o(a,i):e;var d=i,f=function(t,e,n,i,a,s){var c;return c=r(n,i,a,s).length>0?i-o(a,i):e,t=n&&ct?"D":"C",l(Math.abs(u-t),c(a,i));a=h>e?"D":"C";var d=Math.abs(h-e);return l(function(t,e){return e.cols-t}(h>e?t:u,n)+(d-1)*n.cols+1+((h>e?u:t)-1),c(a,i))}},function(t,e,n){"use strict";var i=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.SoundService=void 0;var o=n(1),a=function(){function t(t){this._optionsService=t}return Object.defineProperty(t,"audioContext",{get:function(){if(!t._audioContext){var e=window.AudioContext||window.webkitAudioContext;if(!e)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;t._audioContext=new e}return t._audioContext},enumerable:!1,configurable:!0}),t.prototype.playBellSound=function(){var e=t.audioContext;if(e){var n=e.createBufferSource();e.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),(function(t){n.buffer=t,n.connect(e.destination),n.start(0)}))}},t.prototype._base64ToArrayBuffer=function(t){for(var e=window.atob(t),n=e.length,i=new Uint8Array(n),r=0;r=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.MouseZoneManager=void 0;var s=n(2),c=n(7),l=n(5),u=n(1),h=function(t){function e(e,n,i,r,o,a){var s=t.call(this)||this;return s._element=e,s._screenElement=n,s._bufferService=i,s._mouseService=r,s._selectionService=o,s._optionsService=a,s._zones=[],s._areZonesActive=!1,s._lastHoverCoords=[void 0,void 0],s._initialSelectionLength=0,s.register(c.addDisposableDomListener(s._element,"mousedown",(function(t){return s._onMouseDown(t)}))),s._mouseMoveListener=function(t){return s._onMouseMove(t)},s._mouseLeaveListener=function(t){return s._onMouseLeave(t)},s._clickListener=function(t){return s._onClick(t)},s}return r(e,t),e.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},e.prototype.add=function(t){this._zones.push(t),1===this._zones.length&&this._activate()},e.prototype.clearAll=function(t,e){if(0!==this._zones.length){t&&e||(t=0,e=this._bufferService.rows-1);for(var n=0;nt&&i.y1<=e+1||i.y2>t&&i.y2<=e+1||i.y1e+1)&&(this._currentZone&&this._currentZone===i&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(n--,1))}0===this._zones.length&&this._deactivate()}},e.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},e.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},e.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},e.prototype._onHover=function(t){var e=this,n=this._findZoneEventAt(t);n!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),n&&(this._currentZone=n,n.hoverCallback&&n.hoverCallback(t),this._tooltipTimeout=window.setTimeout((function(){return e._onTooltip(t)}),this._optionsService.options.linkTooltipHoverDuration)))},e.prototype._onTooltip=function(t){this._tooltipTimeout=void 0;var e=this._findZoneEventAt(t);e&&e.tooltipCallback&&e.tooltipCallback(t)},e.prototype._onMouseDown=function(t){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var e=this._findZoneEventAt(t);(null==e?void 0:e.willLinkActivate(t))&&(t.preventDefault(),t.stopImmediatePropagation())}},e.prototype._onMouseLeave=function(t){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},e.prototype._onClick=function(t){var e=this._findZoneEventAt(t),n=this._getSelectionLength();e&&n===this._initialSelectionLength&&(e.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},e.prototype._getSelectionLength=function(){var t=this._selectionService.selectionText;return t?t.length:0},e.prototype._findZoneEventAt=function(t){var e=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(e)for(var n=e[0],i=e[1],r=0;r=o.x1&&n=o.x1||i===o.y2&&no.y1&&it;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var e=0;e0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,"\n"===t&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=o.tooMuchOutput)),a.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((function(){e._accessibilityTreeRoot.appendChild(e._liveRegion)}),0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,a.isMac&&h.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,e){this._renderRowsDebouncer.refresh(t,e,this._terminal.rows)},e.prototype._renderRows=function(t,e){for(var n=this._terminal.buffer,i=n.lines.length.toString(),r=t;r<=e;r++){var o=n.translateBufferLineToString(n.ydisp+r,!0),a=(n.ydisp+r+1).toString(),s=this._rowElements[r];s&&(0===o.length?s.innerHTML=" ":s.textContent=o,s.setAttribute("aria-posinset",a),s.setAttribute("aria-setsize",i))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomRenderer=void 0;var s=n(58),c=n(9),l=n(2),u=n(5),h=n(1),d=n(0),f=n(10),p=n(17),m=1,g=function(t){function e(e,n,i,r,o,a,c,l,u){var h=t.call(this)||this;return h._colors=e,h._element=n,h._screenElement=i,h._viewportElement=r,h._linkifier=o,h._linkifier2=a,h._charSizeService=c,h._optionsService=l,h._bufferService=u,h._terminalClass=m++,h._rowElements=[],h._rowContainer=document.createElement("div"),h._rowContainer.classList.add("xterm-rows"),h._rowContainer.style.lineHeight="normal",h._rowContainer.setAttribute("aria-hidden","true"),h._refreshRowElements(h._bufferService.cols,h._bufferService.rows),h._selectionContainer=document.createElement("div"),h._selectionContainer.classList.add("xterm-selection"),h._selectionContainer.setAttribute("aria-hidden","true"),h.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},h._updateDimensions(),h._injectCss(),h._rowFactory=new s.DomRendererRowFactory(document,h._optionsService,h._colors),h._element.classList.add("xterm-dom-renderer-owner-"+h._terminalClass),h._screenElement.appendChild(h._rowContainer),h._screenElement.appendChild(h._selectionContainer),h._linkifier.onShowLinkUnderline((function(t){return h._onLinkHover(t)})),h._linkifier.onHideLinkUnderline((function(t){return h._onLinkLeave(t)})),h._linkifier2.onShowLinkUnderline((function(t){return h._onLinkHover(t)})),h._linkifier2.onHideLinkUnderline((function(t){return h._onLinkLeave(t)})),h}return r(e,t),Object.defineProperty(e.prototype,"onRequestRedraw",{get:function(){return(new d.EventEmitter).event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),p.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),t.prototype.dispose.call(this)},e.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var t=0,e=this._rowElements;te;)this._rowContainer.removeChild(this._rowElements.pop())},e.prototype.onResize=function(t,e){this._refreshRowElements(t,e),this._updateDimensions()},e.prototype.onCharSizeChanged=function(){this._updateDimensions()},e.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},e.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},e.prototype.onSelectionChanged=function(t,e,n){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(t&&e){var i=t[1]-this._bufferService.buffer.ydisp,r=e[1]-this._bufferService.buffer.ydisp,o=Math.max(i,0),a=Math.min(r,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||a<0)){var s=document.createDocumentFragment();n?s.appendChild(this._createSelectionElement(o,t[0],e[0],a-o+1)):(s.appendChild(this._createSelectionElement(o,i===o?t[0]:0,o===a?e[0]:this._bufferService.cols)),s.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,a-o-1)),o!==a&&s.appendChild(this._createSelectionElement(a,0,r===a?e[0]:this._bufferService.cols))),this._selectionContainer.appendChild(s)}}},e.prototype._createSelectionElement=function(t,e,n,i){void 0===i&&(i=1);var r=document.createElement("div");return r.style.height=i*this.dimensions.actualCellHeight+"px",r.style.top=t*this.dimensions.actualCellHeight+"px",r.style.left=e*this.dimensions.actualCellWidth+"px",r.style.width=this.dimensions.actualCellWidth*(n-e)+"px",r},e.prototype.onCursorMove=function(){},e.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},e.prototype.clear=function(){for(var t=0,e=this._rowElements;t=r&&(t=0,n++)}},o([a(6,u.ICharSizeService),a(7,h.IOptionsService),a(8,h.IBufferService)],e)}(l.Disposable);e.DomRenderer=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomRendererRowFactory=e.CURSOR_STYLE_UNDERLINE_CLASS=e.CURSOR_STYLE_BAR_CLASS=e.CURSOR_STYLE_BLOCK_CLASS=e.CURSOR_BLINK_CLASS=e.CURSOR_CLASS=e.UNDERLINE_CLASS=e.ITALIC_CLASS=e.DIM_CLASS=e.BOLD_CLASS=void 0;var i=n(9),r=n(3),o=n(4),a=n(10);e.BOLD_CLASS="xterm-bold",e.DIM_CLASS="xterm-dim",e.ITALIC_CLASS="xterm-italic",e.UNDERLINE_CLASS="xterm-underline",e.CURSOR_CLASS="xterm-cursor",e.CURSOR_BLINK_CLASS="xterm-cursor-blink",e.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",e.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",e.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var s=function(){function t(t,e,n){this._document=t,this._optionsService=e,this._colors=n,this._workCell=new o.CellData}return t.prototype.setColors=function(t){this._colors=t},t.prototype.createRow=function(t,n,o,s,l,u,h){for(var d=this._document.createDocumentFragment(),f=0,p=Math.min(t.length,h)-1;p>=0;p--)if(t.loadCell(p,this._workCell).getCode()!==r.NULL_CELL_CODE||n&&p===s){f=p+1;break}for(p=0;p1&&(g.style.width=u*m+"px"),n&&p===s)switch(g.classList.add(e.CURSOR_CLASS),l&&g.classList.add(e.CURSOR_BLINK_CLASS),o){case"bar":g.classList.add(e.CURSOR_STYLE_BAR_CLASS);break;case"underline":g.classList.add(e.CURSOR_STYLE_UNDERLINE_CLASS);break;default:g.classList.add(e.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&g.classList.add(e.BOLD_CLASS),this._workCell.isItalic()&&g.classList.add(e.ITALIC_CLASS),this._workCell.isDim()&&g.classList.add(e.DIM_CLASS),this._workCell.isUnderline()&&g.classList.add(e.UNDERLINE_CLASS),g.textContent=this._workCell.isInvisible()?r.WHITESPACE_CELL_CHAR:this._workCell.getChars()||r.WHITESPACE_CELL_CHAR;var v=this._workCell.getFgColor(),b=this._workCell.getFgColorMode(),y=this._workCell.getBgColor(),_=this._workCell.getBgColorMode(),w=!!this._workCell.isInverse();if(w){var k=v;v=y,y=k;var C=b;b=_,_=C}switch(b){case 16777216:case 33554432:this._workCell.isBold()&&v<8&&this._optionsService.options.drawBoldTextInBrightColors&&(v+=8),this._applyMinimumContrast(g,this._colors.background,this._colors.ansi[v])||g.classList.add("xterm-fg-"+v);break;case 50331648:var S=a.rgba.toColor(v>>16&255,v>>8&255,255&v);this._applyMinimumContrast(g,this._colors.background,S)||this._addStyle(g,"color:#"+c(v.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(g,this._colors.background,this._colors.foreground)||w&&g.classList.add("xterm-fg-"+i.INVERTED_DEFAULT_COLOR)}switch(_){case 16777216:case 33554432:g.classList.add("xterm-bg-"+y);break;case 50331648:this._addStyle(g,"background-color:#"+c(y.toString(16),"0",6));break;case 0:default:w&&g.classList.add("xterm-bg-"+i.INVERTED_DEFAULT_COLOR)}d.appendChild(g)}}return d},t.prototype._applyMinimumContrast=function(t,e,n){if(1===this._optionsService.options.minimumContrastRatio)return!1;var i=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===i&&(i=a.color.ensureContrastRatio(e,n,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=i?i:null)),!!i&&(this._addStyle(t,"color:"+i.css),!0)},t.prototype._addStyle=function(t,e){t.setAttribute("style",""+(t.getAttribute("style")||"")+e+";")},t}();function c(t,e,n){for(;t.length"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};e.evaluateKeyboardEvent=function(t,e,n,o){var a={type:0,cancel:!1,key:void 0},s=(t.shiftKey?1:0)|(t.altKey?2:0)|(t.ctrlKey?4:0)|(t.metaKey?8:0);switch(t.keyCode){case 0:"UIKeyInputUpArrow"===t.key?a.key=e?i.C0.ESC+"OA":i.C0.ESC+"[A":"UIKeyInputLeftArrow"===t.key?a.key=e?i.C0.ESC+"OD":i.C0.ESC+"[D":"UIKeyInputRightArrow"===t.key?a.key=e?i.C0.ESC+"OC":i.C0.ESC+"[C":"UIKeyInputDownArrow"===t.key&&(a.key=e?i.C0.ESC+"OB":i.C0.ESC+"[B");break;case 8:if(t.shiftKey){a.key=i.C0.BS;break}if(t.altKey){a.key=i.C0.ESC+i.C0.DEL;break}a.key=i.C0.DEL;break;case 9:if(t.shiftKey){a.key=i.C0.ESC+"[Z";break}a.key=i.C0.HT,a.cancel=!0;break;case 13:a.key=t.altKey?i.C0.ESC+i.C0.CR:i.C0.CR,a.cancel=!0;break;case 27:a.key=i.C0.ESC,t.altKey&&(a.key=i.C0.ESC+i.C0.ESC),a.cancel=!0;break;case 37:if(t.metaKey)break;s?(a.key=i.C0.ESC+"[1;"+(s+1)+"D",a.key===i.C0.ESC+"[1;3D"&&(a.key=i.C0.ESC+(n?"b":"[1;5D"))):a.key=e?i.C0.ESC+"OD":i.C0.ESC+"[D";break;case 39:if(t.metaKey)break;s?(a.key=i.C0.ESC+"[1;"+(s+1)+"C",a.key===i.C0.ESC+"[1;3C"&&(a.key=i.C0.ESC+(n?"f":"[1;5C"))):a.key=e?i.C0.ESC+"OC":i.C0.ESC+"[C";break;case 38:if(t.metaKey)break;s?(a.key=i.C0.ESC+"[1;"+(s+1)+"A",n||a.key!==i.C0.ESC+"[1;3A"||(a.key=i.C0.ESC+"[1;5A")):a.key=e?i.C0.ESC+"OA":i.C0.ESC+"[A";break;case 40:if(t.metaKey)break;s?(a.key=i.C0.ESC+"[1;"+(s+1)+"B",n||a.key!==i.C0.ESC+"[1;3B"||(a.key=i.C0.ESC+"[1;5B")):a.key=e?i.C0.ESC+"OB":i.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(a.key=i.C0.ESC+"[2~");break;case 46:a.key=s?i.C0.ESC+"[3;"+(s+1)+"~":i.C0.ESC+"[3~";break;case 36:a.key=s?i.C0.ESC+"[1;"+(s+1)+"H":e?i.C0.ESC+"OH":i.C0.ESC+"[H";break;case 35:a.key=s?i.C0.ESC+"[1;"+(s+1)+"F":e?i.C0.ESC+"OF":i.C0.ESC+"[F";break;case 33:t.shiftKey?a.type=2:a.key=i.C0.ESC+"[5~";break;case 34:t.shiftKey?a.type=3:a.key=i.C0.ESC+"[6~";break;case 112:a.key=s?i.C0.ESC+"[1;"+(s+1)+"P":i.C0.ESC+"OP";break;case 113:a.key=s?i.C0.ESC+"[1;"+(s+1)+"Q":i.C0.ESC+"OQ";break;case 114:a.key=s?i.C0.ESC+"[1;"+(s+1)+"R":i.C0.ESC+"OR";break;case 115:a.key=s?i.C0.ESC+"[1;"+(s+1)+"S":i.C0.ESC+"OS";break;case 116:a.key=s?i.C0.ESC+"[15;"+(s+1)+"~":i.C0.ESC+"[15~";break;case 117:a.key=s?i.C0.ESC+"[17;"+(s+1)+"~":i.C0.ESC+"[17~";break;case 118:a.key=s?i.C0.ESC+"[18;"+(s+1)+"~":i.C0.ESC+"[18~";break;case 119:a.key=s?i.C0.ESC+"[19;"+(s+1)+"~":i.C0.ESC+"[19~";break;case 120:a.key=s?i.C0.ESC+"[20;"+(s+1)+"~":i.C0.ESC+"[20~";break;case 121:a.key=s?i.C0.ESC+"[21;"+(s+1)+"~":i.C0.ESC+"[21~";break;case 122:a.key=s?i.C0.ESC+"[23;"+(s+1)+"~":i.C0.ESC+"[23~";break;case 123:a.key=s?i.C0.ESC+"[24;"+(s+1)+"~":i.C0.ESC+"[24~";break;default:if(!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)if(n&&!o||!t.altKey||t.metaKey)n&&!t.altKey&&!t.ctrlKey&&t.metaKey?65===t.keyCode&&(a.type=1):t.key&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&t.keyCode>=48&&1===t.key.length?a.key=t.key:t.key&&t.ctrlKey&&"_"===t.key&&(a.key=i.C0.US);else{var c=r[t.keyCode],l=c&&c[t.shiftKey?1:0];l?a.key=i.C0.ESC+l:t.keyCode>=65&&t.keyCode<=90&&(a.key=i.C0.ESC+String.fromCharCode(t.ctrlKey?t.keyCode-64:t.keyCode+32))}else t.keyCode>=65&&t.keyCode<=90?a.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?a.key=i.C0.NUL:t.keyCode>=51&&t.keyCode<=55?a.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?a.key=i.C0.DEL:219===t.keyCode?a.key=i.C0.ESC:220===t.keyCode?a.key=i.C0.FS:221===t.keyCode&&(a.key=i.C0.GS)}return a}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.RenderService=void 0;var s=n(31),c=n(0),l=n(2),u=n(32),h=n(7),d=n(1),f=n(5),p=function(t){function e(e,n,i,r,o,a){var l=t.call(this)||this;if(l._renderer=e,l._rowCount=n,l._isPaused=!1,l._needsFullRefresh=!1,l._isNextRenderRedrawOnly=!0,l._needsSelectionRefresh=!1,l._canvasWidth=0,l._canvasHeight=0,l._selectionState={start:void 0,end:void 0,columnSelectMode:!1},l._onDimensionsChange=new c.EventEmitter,l._onRender=new c.EventEmitter,l._onRefreshRequest=new c.EventEmitter,l.register({dispose:function(){return l._renderer.dispose()}}),l._renderDebouncer=new s.RenderDebouncer((function(t,e){return l._renderRows(t,e)})),l.register(l._renderDebouncer),l._screenDprMonitor=new u.ScreenDprMonitor,l._screenDprMonitor.setListener((function(){return l.onDevicePixelRatioChange()})),l.register(l._screenDprMonitor),l.register(a.onResize((function(t){return l._fullRefresh()}))),l.register(r.onOptionChange((function(){return l._renderer.onOptionsChanged()}))),l.register(o.onCharSizeChange((function(){return l.onCharSizeChanged()}))),l._renderer.onRequestRedraw((function(t){return l.refreshRows(t.start,t.end,!0)})),l.register(h.addDisposableDomListener(window,"resize",(function(){return l.onDevicePixelRatioChange()}))),"IntersectionObserver"in window){var d=new IntersectionObserver((function(t){return l._onIntersectionChange(t[t.length-1])}),{threshold:0});d.observe(i),l.register({dispose:function(){return d.disconnect()}})}return l}return r(e,t),Object.defineProperty(e.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),e.prototype._onIntersectionChange=function(t){this._isPaused=0===t.intersectionRatio,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},e.prototype.refreshRows=function(t,e,n){void 0===n&&(n=!1),this._isPaused?this._needsFullRefresh=!0:(n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(t,e,this._rowCount))},e.prototype._renderRows=function(t,e){this._renderer.renderRows(t,e),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:t,end:e}),this._isNextRenderRedrawOnly=!0},e.prototype.resize=function(t,e){this._rowCount=e,this._fireOnCanvasResize()},e.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},e.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},e.prototype.dispose=function(){t.prototype.dispose.call(this)},e.prototype.setRenderer=function(t){var e=this;this._renderer.dispose(),this._renderer=t,this._renderer.onRequestRedraw((function(t){return e.refreshRows(t.start,t.end,!0)})),this._needsSelectionRefresh=!0,this._fullRefresh()},e.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},e.prototype.setColors=function(t){this._renderer.setColors(t),this._fullRefresh()},e.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},e.prototype.onResize=function(t,e){this._renderer.onResize(t,e),this._fullRefresh()},e.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},e.prototype.onBlur=function(){this._renderer.onBlur()},e.prototype.onFocus=function(){this._renderer.onFocus()},e.prototype.onSelectionChanged=function(t,e,n){this._selectionState.start=t,this._selectionState.end=e,this._selectionState.columnSelectMode=n,this._renderer.onSelectionChanged(t,e,n)},e.prototype.onCursorMove=function(){this._renderer.onCursorMove()},e.prototype.clear=function(){this._renderer.clear()},e.prototype.registerCharacterJoiner=function(t){return this._renderer.registerCharacterJoiner(t)},e.prototype.deregisterCharacterJoiner=function(t){return this._renderer.deregisterCharacterJoiner(t)},o([a(3,d.IOptionsService),a(4,f.ICharSizeService),a(5,d.IBufferService)],e)}(l.Disposable);e.RenderService=p},function(t,e,n){"use strict";var i=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CharSizeService=void 0;var o=n(1),a=n(0),s=function(){function t(t,e,n){this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=new a.EventEmitter,this._measureStrategy=new c(t,e,this._optionsService)}return Object.defineProperty(t.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),t.prototype.measure=function(){var t=this._measureStrategy.measure();t.width===this.width&&t.height===this.height||(this.width=t.width,this.height=t.height,this._onCharSizeChange.fire())},i([r(2,o.IOptionsService)],t)}();e.CharSizeService=s;var c=function(){function t(t,e,n){this._document=t,this._parentElement=e,this._optionsService=n,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return t.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var t=this._measureElement.getBoundingClientRect();return 0!==t.width&&0!==t.height&&(this._result.width=t.width,this._result.height=Math.ceil(t.height)),this._result},t}()},function(t,e,n){"use strict";var i=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.MouseService=void 0;var o=n(5),a=n(30),s=function(){function t(t,e){this._renderService=t,this._charSizeService=e}return t.prototype.getCoords=function(t,e,n,i,r){return a.getCoords(t,e,n,i,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,r)},t.prototype.getRawByteCoords=function(t,e,n,i){var r=this.getCoords(t,e,n,i);return a.getRawByteCoords(r)},i([r(0,o.IRenderService),r(1,o.ICharSizeService)],t)}();e.MouseService=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.Linkifier2=void 0;var s=n(1),c=n(0),l=n(2),u=n(7),h=function(t){function e(e){var n=t.call(this)||this;return n._bufferService=e,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new c.EventEmitter),n._onHideLinkUnderline=n.register(new c.EventEmitter),n.register(l.getDisposeArrayDisposable(n._linkCacheDisposables)),n}return r(e,t),Object.defineProperty(e.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),e.prototype.registerLinkProvider=function(t){var e=this;return this._linkProviders.push(t),{dispose:function(){var n=e._linkProviders.indexOf(t);-1!==n&&e._linkProviders.splice(n,1)}}},e.prototype.attachToDom=function(t,e,n){var i=this;this._element=t,this._mouseService=e,this._renderService=n,this.register(u.addDisposableDomListener(this._element,"mouseleave",(function(){i._isMouseOut=!0,i._clearCurrentLink()}))),this.register(u.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(u.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},e.prototype._onMouseMove=function(t){if(this._lastMouseEvent=t,this._element&&this._mouseService){var e=this._positionFromMouseEvent(t,this._element,this._mouseService);if(e){this._isMouseOut=!1;for(var n=t.composedPath(),i=0;it?this._bufferService.cols:a.link.range.end.x,c=a.link.range.start.y=t&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,l.disposeArray(this._linkCacheDisposables))},e.prototype._handleNewLink=function(t){var e=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._linkAtPosition(t.link,n)&&(this._currentLink=t,this._currentLink.state={decorations:{underline:void 0===t.link.decorations||t.link.decorations.underline,pointerCursor:void 0===t.link.decorations||t.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,t.link,this._lastMouseEvent),t.link.decorations={},Object.defineProperties(t.link.decorations,{pointerCursor:{get:function(){var t,n;return null===(n=null===(t=e._currentLink)||void 0===t?void 0:t.state)||void 0===n?void 0:n.decorations.pointerCursor},set:function(t){var n,i;(null===(n=e._currentLink)||void 0===n?void 0:n.state)&&e._currentLink.state.decorations.pointerCursor!==t&&(e._currentLink.state.decorations.pointerCursor=t,e._currentLink.state.isHovered&&(null===(i=e._element)||void 0===i||i.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:function(){var t,n;return null===(n=null===(t=e._currentLink)||void 0===t?void 0:t.state)||void 0===n?void 0:n.decorations.underline},set:function(n){var i,r,o;(null===(i=e._currentLink)||void 0===i?void 0:i.state)&&(null===(o=null===(r=e._currentLink)||void 0===r?void 0:r.state)||void 0===o?void 0:o.decorations.underline)!==n&&(e._currentLink.state.decorations.underline=n,e._currentLink.state.isHovered&&e._fireUnderlineEvent(t.link,n))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange((function(t){e._clearCurrentLink(0===t.start?0:t.start+1+e._bufferService.buffer.ydisp,t.end+1+e._bufferService.buffer.ydisp)}))))}},e.prototype._linkHover=function(t,e,n){var i;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&t.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(n,e.text)},e.prototype._fireUnderlineEvent=function(t,e){var n=t.range,i=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-i-1,n.end.x,n.end.y-i-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)},e.prototype._linkLeave=function(t,e,n){var i;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&t.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(n,e.text)},e.prototype._linkAtPosition=function(t,e){var n=t.range.start.ye.y;return(t.range.start.y===t.range.end.y&&t.range.start.x<=e.x&&t.range.end.x>=e.x||n&&t.range.end.x>=e.x||i&&t.range.start.x<=e.x||n&&i)&&t.range.start.y<=e.y&&t.range.end.y>=e.y},e.prototype._positionFromMouseEvent=function(t,e,n){var i=n.getCoords(t,e,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}},e.prototype._createLinkUnderlineEvent=function(t,e,n,i,r){return{x1:t,y1:e,x2:n,y2:i,cols:this._bufferService.cols,fg:r}},o([a(0,s.IBufferService)],e)}(l.Disposable);e.Linkifier2=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreBrowserService=void 0;var i=function(){function t(t){this._textarea=t}return Object.defineProperty(t.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),t}();e.CoreBrowserService=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.CoreTerminal=void 0;var o=n(2),a=n(1),s=n(66),c=n(67),l=n(68),u=n(74),h=n(75),d=n(0),f=n(76),p=n(77),m=n(78),g=n(80),v=n(81),b=n(19),y=n(82),_=function(t){function e(e){var n=t.call(this)||this;return n._onBinary=new d.EventEmitter,n._onData=new d.EventEmitter,n._onLineFeed=new d.EventEmitter,n._onResize=new d.EventEmitter,n._onScroll=new d.EventEmitter,n._instantiationService=new s.InstantiationService,n.optionsService=new u.OptionsService(e),n._instantiationService.setService(a.IOptionsService,n.optionsService),n._bufferService=n.register(n._instantiationService.createInstance(l.BufferService)),n._instantiationService.setService(a.IBufferService,n._bufferService),n._logService=n._instantiationService.createInstance(c.LogService),n._instantiationService.setService(a.ILogService,n._logService),n._coreService=n.register(n._instantiationService.createInstance(h.CoreService,(function(){return n.scrollToBottom()}))),n._instantiationService.setService(a.ICoreService,n._coreService),n._coreMouseService=n._instantiationService.createInstance(f.CoreMouseService),n._instantiationService.setService(a.ICoreMouseService,n._coreMouseService),n._dirtyRowService=n._instantiationService.createInstance(p.DirtyRowService),n._instantiationService.setService(a.IDirtyRowService,n._dirtyRowService),n.unicodeService=n._instantiationService.createInstance(m.UnicodeService),n._instantiationService.setService(a.IUnicodeService,n.unicodeService),n._charsetService=n._instantiationService.createInstance(g.CharsetService),n._instantiationService.setService(a.ICharsetService,n._charsetService),n._inputHandler=new b.InputHandler(n._bufferService,n._charsetService,n._coreService,n._dirtyRowService,n._logService,n.optionsService,n._coreMouseService,n.unicodeService),n.register(d.forwardEvent(n._inputHandler.onLineFeed,n._onLineFeed)),n.register(n._inputHandler),n.register(d.forwardEvent(n._bufferService.onResize,n._onResize)),n.register(d.forwardEvent(n._coreService.onData,n._onData)),n.register(d.forwardEvent(n._coreService.onBinary,n._onBinary)),n.register(n.optionsService.onOptionChange((function(t){return n._updateOptions(t)}))),n._writeBuffer=new y.WriteBuffer((function(t){return n._inputHandler.parse(t)})),n}return r(e,t),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){var e;this._isDisposed||(t.prototype.dispose.call(this),null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0)},e.prototype.write=function(t,e){this._writeBuffer.write(t,e)},e.prototype.writeSync=function(t){this._writeBuffer.writeSync(t)},e.prototype.resize=function(t,e){isNaN(t)||isNaN(e)||(t=Math.max(t,l.MINIMUM_COLS),e=Math.max(e,l.MINIMUM_ROWS),this._bufferService.resize(t,e))},e.prototype.scroll=function(t,e){void 0===e&&(e=!1);var n,i=this._bufferService.buffer;(n=this._cachedBlankLine)&&n.length===this.cols&&n.getFg(0)===t.fg&&n.getBg(0)===t.bg||(n=i.getBlankLine(t,e),this._cachedBlankLine=n),n.isWrapped=e;var r=i.ybase+i.scrollTop,o=i.ybase+i.scrollBottom;if(0===i.scrollTop){var a=i.lines.isFull;o===i.lines.length-1?a?i.lines.recycle().copyFrom(n):i.lines.push(n.clone()):i.lines.splice(o+1,0,n.clone()),a?this._bufferService.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this._bufferService.isUserScrolling||i.ydisp++)}else i.lines.shiftElements(r+1,o-r+1-1,-1),i.lines.set(o,n.clone());this._bufferService.isUserScrolling||(i.ydisp=i.ybase),this._dirtyRowService.markRangeDirty(i.scrollTop,i.scrollBottom),this._onScroll.fire(i.ydisp)},e.prototype.scrollLines=function(t,e){var n=this._bufferService.buffer;if(t<0){if(0===n.ydisp)return;this._bufferService.isUserScrolling=!0}else t+n.ydisp>=n.ybase&&(this._bufferService.isUserScrolling=!1);var i=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+t,n.ybase),0),i!==n.ydisp&&(e||this._onScroll.fire(n.ydisp))},e.prototype.scrollPages=function(t){this.scrollLines(t*(this.rows-1))},e.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},e.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},e.prototype.scrollToLine=function(t){var e=t-this._bufferService.buffer.ydisp;0!==e&&this.scrollLines(e)},e.prototype.addEscHandler=function(t,e){return this._inputHandler.addEscHandler(t,e)},e.prototype.addDcsHandler=function(t,e){return this._inputHandler.addDcsHandler(t,e)},e.prototype.addCsiHandler=function(t,e){return this._inputHandler.addCsiHandler(t,e)},e.prototype.addOscHandler=function(t,e){return this._inputHandler.addOscHandler(t,e)},e.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},e.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},e.prototype._updateOptions=function(t){var e;switch(t){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():(null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0)}},e.prototype._enableWindowsMode=function(){var t=this;if(!this._windowsMode){var e=[];e.push(this.onLineFeed(v.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.addCsiHandler({final:"H"},(function(){return v.updateWindowsModeWrappedState(t._bufferService),!1}))),this._windowsMode={dispose:function(){for(var t=0,n=e;t0?r[0].index:e.length;if(e.length!==h)throw new Error("[createInstance] First service dependency of "+t.name+" at position "+(h+1)+" conflicts with "+e.length+" static arguments");return new(t.bind.apply(t,i([void 0],i(e,a))))},t}();e.InstantiationService=s},function(t,e,n){"use strict";var i=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}},o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.BufferService=e.MINIMUM_ROWS=e.MINIMUM_COLS=void 0;var s=n(1),c=n(69),l=n(0),u=n(2);e.MINIMUM_COLS=2,e.MINIMUM_ROWS=1;var h=function(t){function n(n){var i=t.call(this)||this;return i._optionsService=n,i.isUserScrolling=!1,i._onResize=new l.EventEmitter,i.cols=Math.max(n.options.cols,e.MINIMUM_COLS),i.rows=Math.max(n.options.rows,e.MINIMUM_ROWS),i.buffers=new c.BufferSet(n,i),i}return r(n,t),Object.defineProperty(n.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},n.prototype.resize=function(t,e){this.cols=t,this.rows=e,this.buffers.resize(t,e),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:t,rows:e})},n.prototype.reset=function(){this.buffers.dispose(),this.buffers=new c.BufferSet(this._optionsService,this),this.isUserScrolling=!1},o([a(0,s.IOptionsService)],n)}(u.Disposable);e.BufferService=h},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.BufferSet=void 0;var o=n(70),a=n(0),s=function(t){function e(e,n){var i=t.call(this)||this;return i._onBufferActivate=i.register(new a.EventEmitter),i._normal=new o.Buffer(!0,e,n),i._normal.fillViewportRows(),i._alt=new o.Buffer(!1,e,n),i._activeBuffer=i._normal,i.setupTabStops(),i}return r(e,t),Object.defineProperty(e.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),e.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},e.prototype.activateAltBuffer=function(t){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(t),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}))},e.prototype.resize=function(t,e){this._normal.resize(t,e),this._alt.resize(t,e)},e.prototype.setupTabStops=function(t){this._normal.setupTabStops(t),this._alt.setupTabStops(t)},e}(n(2).Disposable);e.BufferSet=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferStringIterator=e.Buffer=e.MAX_BUFFER_SIZE=void 0;var i=n(71),r=n(16),o=n(4),a=n(3),s=n(72),c=n(73),l=n(20),u=n(6);e.MAX_BUFFER_SIZE=4294967295;var h=function(){function t(t,e,n){this._hasScrollback=t,this._optionsService=e,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=r.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=o.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),this._whitespaceCell=o.CellData.fromCharData([0,a.WHITESPACE_CELL_CHAR,a.WHITESPACE_CELL_WIDTH,a.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new i.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return t.prototype.getNullCell=function(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell},t.prototype.getWhitespaceCell=function(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell},t.prototype.getBlankLine=function(t,e){return new r.BufferLine(this._bufferService.cols,this.getNullCell(t),e)},Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&te.MAX_BUFFER_SIZE?e.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(t){if(0===this.lines.length){void 0===t&&(t=r.DEFAULT_ATTR_DATA);for(var e=this._rows;e--;)this.lines.push(this.getBlankLine(t))}},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new i.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(t,e){var n=this.getNullCell(r.DEFAULT_ATTR_DATA),i=this._getCorrectBufferLength(e);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new r.BufferLine(t,n)));else for(s=this._rows;s>e;s--)this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i0&&(this.lines.trimStart(c),this.ybase=Math.max(this.ybase-c,0),this.ydisp=Math.max(this.ydisp-c,0),this.savedY=Math.max(this.savedY-c,0)),this.lines.maxLength=i}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,e-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=e-1,this._isReflowEnabled&&(this._reflow(t,e),this._cols>t))for(o=0;othis._cols?this._reflowLarger(t,e):this._reflowSmaller(t,e))},t.prototype._reflowLarger=function(t,e){var n=s.reflowLargerGetLinesToRemove(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(r.DEFAULT_ATTR_DATA));if(n.length>0){var i=s.reflowLargerCreateNewLayout(this.lines,n);s.reflowLargerApplyNewLayout(this.lines,i.layout),this._reflowLargerAdjustViewport(t,e,i.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(t,e,n){for(var i=this.getNullCell(r.DEFAULT_ATTR_DATA),o=n;o-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length=0;a--){var c=this.lines.get(a);if(!(!c||!c.isWrapped&&c.getTrimmedLength()<=t)){for(var l=[c];c.isWrapped&&a>0;)c=this.lines.get(--a),l.unshift(c);var u=this.ybase+this.y;if(!(u>=a&&u0&&(i.push({start:a+l.length+o,newLines:m}),o+=m.length),l.push.apply(l,m);var b=f.length-1,y=f[b];0===y&&(y=f[--b]);for(var _=l.length-p-1,w=d;_>=0;){var k=Math.min(w,y);if(l[b].copyCellsFrom(l[_],w-k,y-k,k,!0),0==(y-=k)&&(y=f[--b]),0==(w-=k)){_--;var C=Math.max(_,0);w=s.getWrappedLineTrimmedLength(l,C,this._cols)}}for(g=0;g0;)0===this.ybase?this.y0){var x=[],O=[];for(g=0;g=0;g--)if(P&&P.start>T+A){for(var j=P.newLines.length-1;j>=0;j--)this.lines.set(g--,P.newLines[j]);g++,x.push({index:T+1,amount:P.newLines.length}),A+=P.newLines.length,P=i[++E]}else this.lines.set(g,O[T--]);var I=0;for(g=x.length-1;g>=0;g--)x[g].index+=I,this.lines.onInsertEmitter.fire(x[g]),I+=x[g].amount;var D=Math.max(0,M+o-this.lines.maxLength);D>0&&this.lines.onTrimEmitter.fire(D)}},t.prototype.stringIndexToBufferIndex=function(t,e,n){for(void 0===n&&(n=!1);e;){var i=this.lines.get(t);if(!i)return[-1,-1];for(var r=n?i.getTrimmedLength():i.length,o=0;o0&&this.lines.get(e).isWrapped;)e--;for(;n+10;);return t>=this._cols?this._cols-1:t<0?0:t},t.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t=this._cols?this._cols-1:t<0?0:t},t.prototype.addMarker=function(t){var e=this,n=new c.Marker(t);return this.markers.push(n),n.register(this.lines.onTrim((function(t){n.line-=t,n.line<0&&n.dispose()}))),n.register(this.lines.onInsert((function(t){n.line>=t.index&&(n.line+=t.amount)}))),n.register(this.lines.onDelete((function(t){n.line>=t.index&&n.linet.index&&(n.line-=t.amount)}))),n.register(n.onDispose((function(){return e._removeMarker(n)}))),n},t.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},t.prototype.iterator=function(t,e,n,i,r){return new d(this,t,e,n,i,r)},t}();e.Buffer=h;var d=function(){function t(t,e,n,i,r,o){void 0===n&&(n=0),void 0===i&&(i=t.lines.length),void 0===r&&(r=0),void 0===o&&(o=0),this._buffer=t,this._trimRight=e,this._startIndex=n,this._endIndex=i,this._startOverscan=r,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return t.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(t.last=this._endIndex+this._endOverscan),t.first=Math.max(t.first,0),t.last=Math.min(t.last,this._buffer.lines.length);for(var e="",n=t.first;n<=t.last;++n)e+=this._buffer.translateBufferLineToString(n,this._trimRight);return this._current=t.last+1,{range:t,content:e}},t}();e.BufferStringIterator=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CircularList=void 0;var i=n(0),r=function(){function t(t){this._maxLength=t,this.onDeleteEmitter=new i.EventEmitter,this.onInsertEmitter=new i.EventEmitter,this.onTrimEmitter=new i.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(t.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._maxLength},set:function(t){if(this._maxLength!==t){for(var e=new Array(t),n=0;nthis._length)for(var e=this._length;e=t;r--)this._array[this._getCyclicIndex(r+n.length)]=this._array[this._getCyclicIndex(r)];for(r=0;rthis._maxLength){var o=this._length+n.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=n.length},t.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.onTrimEmitter.fire(t)},t.prototype.shiftElements=function(t,e,n){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(var i=e-1;i>=0;i--)this.set(t+i+n,this.get(t+i));var r=t+e+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i=s&&r0&&(b>h||0===u[b].getTrimmedLength());b--)v++;v>0&&(a.push(s+u.length-v),a.push(v)),s+=u.length-1}}}return a},e.reflowLargerCreateNewLayout=function(t,e){for(var n=[],i=0,r=e[i],o=0,a=0;al&&(a-=l,s++);var u=2===t[s].getWidth(a-1);u&&a--;var h=u?n-1:n;r.push(h),c+=h}return r},e.getWrappedLineTrimmedLength=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Marker=void 0;var o=n(0),a=function(t){function e(n){var i=t.call(this)||this;return i.line=n,i._id=e._nextId++,i.isDisposed=!1,i._onDispose=new o.EventEmitter,i}return r(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},e._nextId=1,e}(n(2).Disposable);e.Marker=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OptionsService=e.DEFAULT_OPTIONS=e.DEFAULT_BELL_SOUND=void 0;var i=n(0),r=n(11),o=n(33);e.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",e.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:e.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:r.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var a=["cols","rows"],s=function(){function t(t){this._onOptionChange=new i.EventEmitter,this.options=o.clone(e.DEFAULT_OPTIONS);for(var n=0,r=Object.keys(t);n=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoreService=void 0;var s=n(1),c=n(0),l=n(33),u=n(2),h=Object.freeze({insertMode:!1}),d=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),f=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._bufferService=n,o._logService=i,o._optionsService=r,o.isCursorInitialized=!1,o.isCursorHidden=!1,o._onData=o.register(new c.EventEmitter),o._onUserInput=o.register(new c.EventEmitter),o._onBinary=o.register(new c.EventEmitter),o._scrollToBottom=e,o.register({dispose:function(){return o._scrollToBottom=void 0}}),o.modes=l.clone(h),o.decPrivateModes=l.clone(d),o}return r(e,t),Object.defineProperty(e.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.modes=l.clone(h),this.decPrivateModes=l.clone(d)},e.prototype.triggerDataEvent=function(t,e){if(void 0===e&&(e=!1),!this._optionsService.options.disableStdin){var n=this._bufferService.buffer;n.ybase!==n.ydisp&&this._scrollToBottom(),e&&this._onUserInput.fire(),this._logService.debug('sending data "'+t+'"',(function(){return t.split("").map((function(t){return t.charCodeAt(0)}))})),this._onData.fire(t)}},e.prototype.triggerBinaryEvent=function(t){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+t+'"',(function(){return t.split("").map((function(t){return t.charCodeAt(0)}))})),this._onBinary.fire(t))},o([a(1,s.IBufferService),a(2,s.ILogService),a(3,s.IOptionsService)],e)}(u.Disposable);e.CoreService=f},function(t,e,n){"use strict";var i=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoreMouseService=void 0;var o=n(1),a=n(0),s={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(t){return 4!==t.button&&1===t.action&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)}},VT200:{events:19,restrict:function(t){return 32!==t.action}},DRAG:{events:23,restrict:function(t){return 32!==t.action||3!==t.button}},ANY:{events:31,restrict:function(t){return!0}}};function c(t,e){var n=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return 4===t.button?(n|=64,n|=t.action):(n|=3&t.button,4&t.button&&(n|=64),8&t.button&&(n|=128),32===t.action?n|=32:0!==t.action||e||(n|=3)),n}var l=String.fromCharCode,u={DEFAULT:function(t){var e=[c(t,!1)+32,t.col+32,t.row+32];return e[0]>255||e[1]>255||e[2]>255?"":"\x1b[M"+l(e[0])+l(e[1])+l(e[2])},SGR:function(t){var e=0===t.action&&4!==t.button?"m":"M";return"\x1b[<"+c(t,!0)+";"+t.col+";"+t.row+e}},h=function(){function t(t,e){this._bufferService=t,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new a.EventEmitter,this._lastEvent=null;for(var n=0,i=Object.keys(s);n=this._bufferService.cols||t.row<0||t.row>=this._bufferService.rows)return!1;if(4===t.button&&32===t.action)return!1;if(3===t.button&&32!==t.action)return!1;if(4!==t.button&&(2===t.action||3===t.action))return!1;if(t.col++,t.row++,32===t.action&&this._lastEvent&&this._compareEvents(this._lastEvent,t))return!1;if(!this._protocols[this._activeProtocol].restrict(t))return!1;var e=this._encodings[this._activeEncoding](t);return e&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=t,!0},t.prototype.explainEvents=function(t){return{down:!!(1&t),up:!!(2&t),drag:!!(4&t),move:!!(8&t),wheel:!!(16&t)}},t.prototype._compareEvents=function(t,e){return t.col===e.col&&t.row===e.row&&t.button===e.button&&t.action===e.action&&t.ctrl===e.ctrl&&t.alt===e.alt&&t.shift===e.shift},i([r(0,o.IBufferService),r(1,o.ICoreService)],t)}();e.CoreMouseService=h},function(t,e,n){"use strict";var i=this&&this.__decorate||function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},r=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.DirtyRowService=void 0;var o=n(1),a=function(){function t(t){this._bufferService=t,this.clearRange()}return Object.defineProperty(t.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),t.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},t.prototype.markDirty=function(t){tthis._end&&(this._end=t)},t.prototype.markRangeDirty=function(t,e){if(t>e){var n=t;t=e,e=n}tthis._end&&(this._end=e)},t.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},i([r(0,o.IBufferService)],t)}();e.DirtyRowService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeService=void 0;var i=n(0),r=n(79),o=function(){function t(){this._providers=Object.create(null),this._active="",this._onChange=new i.EventEmitter;var t=new r.UnicodeV6;this.register(t),this._active=t.version,this._activeProvider=t}return Object.defineProperty(t.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeVersion",{get:function(){return this._active},set:function(t){if(!this._providers[t])throw new Error('unknown Unicode version "'+t+'"');this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)},enumerable:!1,configurable:!0}),t.prototype.register=function(t){this._providers[t.version]=t},t.prototype.wcwidth=function(t){return this._activeProvider.wcwidth(t)},t.prototype.getStringCellWidth=function(t){for(var e=0,n=t.length,i=0;i=n)return e+this.wcwidth(r);var o=t.charCodeAt(i);56320<=o&&o<=57343?r=1024*(r-55296)+o-56320+65536:e+=this.wcwidth(o)}e+=this.wcwidth(r)}return e},t}();e.UnicodeService=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeV6=void 0;var i,r=n(15),o=[[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]],a=[[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]],s=function(){function t(){if(this.version="6",!i){i=new Uint8Array(65536),r.fill(i,1),i[0]=0,r.fill(i,0,1,32),r.fill(i,0,127,160),r.fill(i,2,4352,4448),i[9001]=2,i[9002]=2,r.fill(i,2,11904,42192),i[12351]=1,r.fill(i,2,44032,55204),r.fill(i,2,63744,64256),r.fill(i,2,65040,65050),r.fill(i,2,65072,65136),r.fill(i,2,65280,65377),r.fill(i,2,65504,65511);for(var t=0;te[r][1])return!1;for(;r>=i;)if(t>e[n=i+r>>1][1])i=n+1;else{if(!(t=131072&&t<=196605||t>=196608&&t<=262141?2:1},t}();e.UnicodeV6=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharsetService=void 0;var i=function(){function t(){this.glevel=0,this._charsets=[]}return t.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},t.prototype.setgLevel=function(t){this.glevel=t,this.charset=this._charsets[t]},t.prototype.setgCharset=function(t,e){this._charsets[t]=e,this.glevel===t&&(this.charset=e)},t}();e.CharsetService=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateWindowsModeWrappedState=void 0;var i=n(3);e.updateWindowsModeWrappedState=function(t){var e=t.buffer.lines.get(t.buffer.ybase+t.buffer.y-1),n=null==e?void 0:e.get(t.cols-1),r=t.buffer.lines.get(t.buffer.ybase+t.buffer.y);r&&n&&(r.isWrapped=n[i.CHAR_DATA_CODE_INDEX]!==i.NULL_CELL_CODE&&n[i.CHAR_DATA_CODE_INDEX]!==i.WHITESPACE_CELL_CODE)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteBuffer=void 0;var i=function(){function t(t){this._action=t,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return t.prototype.writeSync=function(t){if(this._writeBuffer.length){for(var e=this._bufferOffset;e5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout((function(){return n._innerWrite()}))),this._pendingData+=t.length,this._writeBuffer.push(t),this._callbacks.push(e)},t.prototype._innerWrite=function(){for(var t=this,e=Date.now();this._writeBuffer.length>this._bufferOffset;){var n=this._writeBuffer[this._bufferOffset],i=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(n),this._pendingData-=n.length,i&&i(),Date.now()-e>=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((function(){return t._innerWrite()}),0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},t}();e.WriteBuffer=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddonManager=void 0;var i=function(){function t(){this._addons=[]}return t.prototype.dispose=function(){for(var t=this._addons.length-1;t>=0;t--)this._addons[t].instance.dispose()},t.prototype.loadAddon=function(t,e){var n=this,i={instance:e,dispose:e.dispose,isDisposed:!1};this._addons.push(i),e.dispose=function(){return n._wrappedAddonDispose(i)},e.activate(t)},t.prototype._wrappedAddonDispose=function(t){if(!t.isDisposed){for(var e=-1,n=0;n100&&(l=o-60+3,o=58);for(var u=a;u<=s;u++)u>=0&&u0&&i[u].length>l?"\u2026":"")+i[u].substr(l,98)+(i[u].length>l+100-1?"\u2026":""));return[n(a,r),new Array(o+c+2).join("-")+"^",n(r,s)].filter(Boolean).join("\n")}t.exports=function(t,e,n,o,a){var s=i("SyntaxError",t);return s.source=e,s.offset=n,s.line=o,s.column=a,s.sourceFragment=function(t){return r(s,isNaN(t)?0:t)},Object.defineProperty(s,"formattedMessage",{get:function(){return"Parse error: "+s.message+"\n"+r(s,2)}}),s.parseError={offset:n,line:o,column:a},s}},"1gRP":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("kU1M");e.materialize=function(){return i.materialize()(this)}},"1uah":function(t,e,n){"use strict";n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return p}));var i=n("Ji7U"),r=n("LK+K"),o=n("1OyB"),a=n("vuIU"),s=n("yCtX"),c=n("DH7j"),l=n("7o/Q"),u=n("l7GE"),h=n("ZUHj"),d=n("Lhse");function f(){for(var t=arguments.length,e=new Array(t),n=0;n2&&void 0!==arguments[2]?arguments[2]:Object.create(null);return Object(o.a)(this,n),(r=e.call(this,t)).iterators=[],r.active=0,r.resultSelector="function"==typeof i?i:null,r.values=a,r}return Object(a.a)(n,[{key:"_next",value:function(t){var e=this.iterators;Object(c.a)(t)?e.push(new v(t)):e.push("function"==typeof t[d.a]?new g(t[d.a]()):new b(this.destination,this,t))}},{key:"_complete",value:function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;nthis.index}},{key:"hasCompleted",value:function(){return this.array.length===this.index}}]),t}(),b=function(t){Object(i.a)(n,t);var e=Object(r.a)(n);function n(t,i,r){var a;return Object(o.a)(this,n),(a=e.call(this,t)).parent=i,a.observable=r,a.stillUnsubscribed=!0,a.buffer=[],a.isComplete=!1,a}return Object(a.a)(n,[{key:d.a,value:function(){return this}},{key:"next",value:function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}}},{key:"hasValue",value:function(){return this.buffer.length>0}},{key:"hasCompleted",value:function(){return 0===this.buffer.length&&this.isComplete}},{key:"notifyComplete",value:function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}},{key:"notifyNext",value:function(t,e,n,i,r){this.buffer.push(e),this.parent.checkIterators()}},{key:"subscribe",value:function(t,e){return Object(h.a)(this,this.observable,this,e)}}]),n}(u.a)},"2+DN":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("uMcE");i.Observable.prototype.shareReplay=r.shareReplay},"25BE":function(t,e,n){"use strict";function i(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n.d(e,"a",(function(){return i}))},"2Gxe":function(t,e,n){var i=n("vd7W").TYPE,r=i.Ident,o=i.String,a=i.Colon,s=i.LeftSquareBracket,c=i.RightSquareBracket;function l(){this.scanner.eof&&this.error("Unexpected end of input");var t=this.scanner.tokenStart,e=!1,n=!0;return this.scanner.isDelim(42)?(e=!0,n=!1,this.scanner.next()):this.scanner.isDelim(124)||this.eat(r),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(r)):e&&this.error("Identifier is expected",this.scanner.tokenEnd):e&&this.error("Vertical line is expected"),n&&this.scanner.tokenType===a&&(this.scanner.next(),this.eat(r)),{type:"Identifier",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}}function u(){var t=this.scanner.tokenStart,e=this.scanner.source.charCodeAt(t);return 61!==e&&126!==e&&94!==e&&36!==e&&42!==e&&124!==e&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),61!==e&&(this.scanner.isDelim(61)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(t)}t.exports={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var t,e=this.scanner.tokenStart,n=null,i=null,a=null;return this.eat(s),this.scanner.skipSC(),t=l.call(this),this.scanner.skipSC(),this.scanner.tokenType!==c&&(this.scanner.tokenType!==r&&(n=u.call(this),this.scanner.skipSC(),i=this.scanner.tokenType===o?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===r&&(a=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(c),{type:"AttributeSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:t,matcher:n,value:i,flags:a}},generate:function(t){var e=" ";this.chunk("["),this.node(t.name),null!==t.matcher&&(this.chunk(t.matcher),null!==t.value&&(this.node(t.value),"String"===t.value.type&&(e=""))),null!==t.flags&&(this.chunk(e),this.chunk(t.flags)),this.chunk("]")}}},"2IC2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("j5kd");i.Observable.prototype.windowTime=r.windowTime},"2QA8":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},"2TAq":function(t,e,n){var i=n("vd7W").isHexDigit,r=n("vd7W").cmpChar,o=n("vd7W").TYPE,a=o.Ident,s=o.Delim,c=o.Number,l=o.Dimension;function u(t,e){return null!==t&&t.type===s&&t.value.charCodeAt(0)===e}function h(t,e){return t.value.charCodeAt(0)===e}function d(t,e,n){for(var r=e,o=0;r0?6:0;if(!i(a))return 0;if(++o>6)return 0}return o}function f(t,e,n){if(!t)return 0;for(;u(n(e),63);){if(++t>6)return 0;e++}return e}t.exports=function(t,e){var n=0;if(null===t||t.type!==a||!r(t.value,0,117))return 0;if(null===(t=e(++n)))return 0;if(u(t,43))return null===(t=e(++n))?0:t.type===a?f(d(t,0,!0),++n,e):u(t,63)?f(1,++n,e):0;if(t.type===c){if(!h(t,43))return 0;var i=d(t,1,!0);return 0===i?0:null===(t=e(++n))?n:t.type===l||t.type===c?h(t,45)&&d(t,1,!1)?n+1:0:f(i,n,e)}return t.type===l&&h(t,43)?f(d(t,1,!0),++n,e):0}},"2Vo4":function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("1OyB"),r=n("vuIU"),o=n("ReuC"),a=n("foSv"),s=n("Ji7U"),c=n("LK+K"),l=n("XNiG"),u=n("9ppp"),h=function(t){Object(s.a)(n,t);var e=Object(c.a)(n);function n(t){var r;return Object(i.a)(this,n),(r=e.call(this))._value=t,r}return Object(r.a)(n,[{key:"_subscribe",value:function(t){var e=Object(o.a)(Object(a.a)(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new u.a;return this._value}},{key:"next",value:function(t){Object(o.a)(Object(a.a)(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(l.b)},"2WcH":function(t,e,n){"use strict";function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}n.d(e,"a",(function(){return i}))},"2fFW":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=!1,r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},"2pxp":function(t,e){t.exports={parse:function(){return this.createSingleNodeList(this.SelectorList())}}},"338f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("kU1M");e.concatMap=function(t){return i.concatMap(t)(this)}},"33Dm":function(t,e,n){var i=n("vd7W").TYPE,r=i.WhiteSpace,o=i.Comment,a=i.Ident,s=i.LeftParenthesis;t.exports={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var t=this.createList(),e=null,n=null;t:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case o:this.scanner.next();continue;case r:n=this.WhiteSpace();continue;case a:e=this.Identifier();break;case s:e=this.MediaFeature();break;default:break t}null!==n&&(t.push(n),n=null),t.push(e)}return null===e&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t)}}},"37L2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("338f");i.Observable.prototype.concatMap=r.concatMap},"3E0/":function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("Ji7U"),r=n("LK+K"),o=n("1OyB"),a=n("vuIU"),s=n("D0XW"),c=n("mlxB"),l=n("7o/Q"),u=n("WMd4");function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.a,n=Object(c.a)(t),i=n?+t-e.now():Math.abs(t);return function(t){return t.lift(new d(i,e))}}var d=function(){function t(e,n){Object(o.a)(this,t),this.delay=e,this.scheduler=n}return Object(a.a)(t,[{key:"call",value:function(t,e){return e.subscribe(new f(t,this.delay,this.scheduler))}}]),t}(),f=function(t){Object(i.a)(n,t);var e=Object(r.a)(n);function n(t,i,r){var a;return Object(o.a)(this,n),(a=e.call(this,t)).delay=i,a.scheduler=r,a.queue=[],a.active=!1,a.errored=!1,a}return Object(a.a)(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new p(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(u.a.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(u.a.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1}}]),n}(l.a),p=function t(e,n){Object(o.a)(this,t),this.time=e,this.notification=n}},"3EiV":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp"),r=n("dL1u");i.Observable.prototype.buffer=r.buffer},"3N8a":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("1OyB"),r=n("vuIU"),o=n("Ji7U"),a=n("LK+K"),s=function(t){Object(o.a)(n,t);var e=Object(a.a)(n);function n(t,r){var o;return Object(i.a)(this,n),(o=e.call(this,t,r)).scheduler=t,o.work=r,o.pending=!1,o}return Object(r.a)(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value:function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){Object(o.a)(n,t);var e=Object(a.a)(n);function n(t,r){return Object(i.a)(this,n),e.call(this)}return Object(r.a)(n,[{key:"schedule",value:function(t){return this}}]),n}(n("quSY").a))},"3Qpg":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("qCKp");i.Observable.fromPromise=i.from},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},"3UWI":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("D0XW"),r=n("tnsW"),o=n("PqYM");function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.a;return Object(r.a)((function(){return Object(o.a)(t,e)}))}},"3XNy":function(t,e){function n(t){return t>=48&&t<=57}function i(t){return t>=65&&t<=90}function r(t){return t>=97&&t<=122}function o(t){return i(t)||r(t)}function a(t){return t>=128}function s(t){return o(t)||a(t)||95===t}function c(t){return t>=0&&t<=8||11===t||t>=14&&t<=31||127===t}function l(t){return 10===t||13===t||12===t}function u(t){return l(t)||32===t||9===t}function h(t,e){return 92===t&&!l(e)&&0!==e}var d=new Array(128);p.Eof=128,p.WhiteSpace=130,p.Digit=131,p.NameStart=132,p.NonPrintable=133;for(var f=0;f=65&&t<=70||t>=97&&t<=102},isUppercaseLetter:i,isLowercaseLetter:r,isLetter:o,isNonAscii:a,isNameStart:s,isName:function(t){return s(t)||n(t)||45===t},isNonPrintable:c,isNewline:l,isWhiteSpace:u,isValidEscape:h,isIdentifierStart:function(t,e,n){return 45===t?s(e)||45===e||h(e,n):!!s(t)||92===t&&h(t,e)},isNumberStart:function(t,e,i){return 43===t||45===t?n(e)?2:46===e&&n(i)?3:0:46===t?n(e)?2:0:n(t)?1:0},isBOM:function(t){return 65279===t||65534===t?1:0},charCodeCategory:p}},"3uOa":function(t,e,n){"use strict";n.r(e);var i=n("lcII");n.d(e,"webSocket",(function(){return i.a}));var r=n("wxn8");n.d(e,"WebSocketSubject",(function(){return r.a}))},"4AtU":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("kU1M");e.expand=function(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),i.expand(t,e=(e||0)<1?Number.POSITIVE_INFINITY:e,n)(this)}},"4HHr":function(t,e){var n=Object.prototype.hasOwnProperty,i=function(){};function r(t){return"function"==typeof t?t:i}function o(t,e){return function(n,i,r){n.type===e&&t.call(this,n,i,r)}}function a(t,e){var i=e.structure,r=[];for(var o in i)if(!1!==n.call(i,o)){var a=i[o],s={name:o,type:!1,nullable:!1};Array.isArray(i[o])||(a=[i[o]]);for(var c=0;c>>((3&e)<<3)&255;return r}}},"4hIw":function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var i=n("1OyB"),r=n("D0XW"),o=n("Kqap"),a=n("NXyV"),s=n("lJxs");function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a;return function(e){return Object(a.a)((function(){return e.pipe(Object(o.a)((function(e,n){var i=e.current;return{value:n,current:t.now(),last:i}}),{current:t.now(),value:void 0,last:void 0}),Object(s.a)((function(t){return new l(t.value,t.current-t.last)})))}))}}var l=function t(e,n){Object(i.a)(this,t),this.value=e,this.interval=n}},"4njK":function(t,e,n){var i=n("vd7W").TYPE,r=i.WhiteSpace,o=i.Semicolon,a=i.LeftCurlyBracket,s=i.Delim;function c(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===r?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function l(){return 0}t.exports={name:"Raw",structure:{value:String},parse:function(t,e,n){var i,r=this.scanner.getTokenStart(t);return this.scanner.skip(this.scanner.getRawLength(t,e||l)),i=n&&this.scanner.tokenStart>r?c.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(r,i),value:this.scanner.source.substring(r,i)}},generate:function(t){this.chunk(t.value)},mode:{default:l,leftCurlyBracket:function(t){return t===a?1:0},leftCurlyBracketOrSemicolon:function(t){return t===a||t===o?1:0},exclamationMarkOrSemicolon:function(t,e,n){return t===s&&33===e.charCodeAt(n)||t===o?1:0},semicolonIncluded:function(t){return t===o?2:0}}}},"4vYp":function(t){t.exports=JSON.parse('{"generic":true,"types":{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","attachment":"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"[\'~\'|\'|\'|\'^\'|\'$\'|\'*\']? \'=\'","attr-modifier":"i|s","attribute-selector":"\'[\' \']\'|\'[\' [|] ? \']\'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"|||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity","box":"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [[\'+\'|\'-\'] ]*","calc-product":" [\'*\' |\'/\' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"\'.\' ","clip-source":"","color":"||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ","combinator":"\'>\'|\'+\'|\'~\'|[\'||\']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat":"searchfield|textarea|push-button|button-bevel|slider-horizontal|checkbox|radio|square-button|menulist|menulist-button|listbox|meter|progress-bar","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||counter( , <\'list-style-type\'>? )]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","counter()":"counter( , [|none]? )","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , [|none]? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" \'{\' \'}\'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<\'background-color\'>|||| [/ ]?||||||||","fit-content()":"fit-content( [|] )","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box","gradient":"|||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )","hue":"|","hue-rotate()":"hue-rotate( )","image":"|||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] ","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"||min-content|max-content|auto","inset()":"inset( {1,4} [round <\'border-radius\'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"\'[\' * \']\'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" [\'<\'|\'>\']? \'=\'? | [\'<\'|\'>\']? \'=\'? | \'<\' \'=\'? \'<\' \'=\'? | \'>\' \'=\'? \'>\' \'=\'? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [|||min-content|max-content|auto] , [|||min-content|max-content|auto] )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"","ns-prefix":"[|\'*\']? \'|\'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]","nth":"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" \'{\' \'}\'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","perspective()":"perspective( )","polygon()":"polygon( ? , [ ]# )","position":"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pseudo-class-selector":"\':\' |\':\' \')\'","pseudo-element-selector":"\':\' ","pseudo-page":": [left|right|first|blank]","quote":"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","saturate()":"saturate( )","scale()":"scale( , ? )","scale3d()":"scale3d( , , )","scaleX()":"scaleX( )","scaleY()":"scaleY( )","scaleZ()":"scaleZ( )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )","shadow":"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]","shape":"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"