Files
smartsites-www/906.066c4d93.async.js
2022-09-14 07:55:11 +00:00

8 lines
344 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self.webpackChunkgms_ui=self.webpackChunkgms_ui||[]).push([[906],{80638:function(){},13277:function(){},15746:function(te,X,U){"use strict";var z=U(21584);X.Z=z.Z},89032:function(te,X,U){"use strict";var z=U(38663),V=U.n(z),B=U(6999)},99134:function(te,X,U){"use strict";var z=U(67294),V=(0,z.createContext)({});X.Z=V},21584:function(te,X,U){"use strict";var z=U(46823),V=U(16184),B=U(65459),a=U(94184),g=U.n(a),h=U(67294),_=U(53124),u=U(99134),f=function(o,l){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&l.indexOf(t)<0&&(n[t]=o[t]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(o);e<t.length;e++)l.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(o,t[e])&&(n[t[e]]=o[t[e]]);return n};function C(o){return typeof o=="number"?"".concat(o," ").concat(o," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(o)?"0 0 ".concat(o):o}var p=["xs","sm","md","lg","xl","xxl"],i=h.forwardRef(function(o,l){var n,t=h.useContext(_.E_),e=t.getPrefixCls,r=t.direction,s=h.useContext(u.Z),c=s.gutter,d=s.wrap,v=s.supportFlexGap,b=o.prefixCls,S=o.span,y=o.order,m=o.offset,A=o.push,w=o.pull,M=o.className,x=o.children,L=o.flex,D=o.style,O=f(o,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),j=e("col",b),W={};p.forEach(function(R){var k,I={},T=o[R];typeof T=="number"?I.span=T:(0,B.Z)(T)==="object"&&(I=T||{}),delete O[R],W=(0,V.Z)((0,V.Z)({},W),(k={},(0,z.Z)(k,"".concat(j,"-").concat(R,"-").concat(I.span),I.span!==void 0),(0,z.Z)(k,"".concat(j,"-").concat(R,"-order-").concat(I.order),I.order||I.order===0),(0,z.Z)(k,"".concat(j,"-").concat(R,"-offset-").concat(I.offset),I.offset||I.offset===0),(0,z.Z)(k,"".concat(j,"-").concat(R,"-push-").concat(I.push),I.push||I.push===0),(0,z.Z)(k,"".concat(j,"-").concat(R,"-pull-").concat(I.pull),I.pull||I.pull===0),(0,z.Z)(k,"".concat(j,"-rtl"),r==="rtl"),k))});var F=g()(j,(n={},(0,z.Z)(n,"".concat(j,"-").concat(S),S!==void 0),(0,z.Z)(n,"".concat(j,"-order-").concat(y),y),(0,z.Z)(n,"".concat(j,"-offset-").concat(m),m),(0,z.Z)(n,"".concat(j,"-push-").concat(A),A),(0,z.Z)(n,"".concat(j,"-pull-").concat(w),w),n),M,W),N={};if(c&&c[0]>0){var G=c[0]/2;N.paddingLeft=G,N.paddingRight=G}if(c&&c[1]>0&&!v){var E=c[1]/2;N.paddingTop=E,N.paddingBottom=E}return L&&(N.flex=C(L),d===!1&&!N.minWidth&&(N.minWidth=0)),h.createElement("div",(0,V.Z)({},O,{style:(0,V.Z)((0,V.Z)({},N),D),className:F,ref:l}),x)});X.Z=i},92820:function(te,X,U){"use strict";var z=U(16184),V=U(46823),B=U(65459),a=U(33671),g=U(94184),h=U.n(g),_=U(67294),u=U(53124),f=U(98082),C=U(24308),p=U(93355),i=U(99134),o=function(e,r){var s={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&r.indexOf(c)<0&&(s[c]=e[c]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(e);d<c.length;d++)r.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(e,c[d])&&(s[c[d]]=e[c[d]]);return s},l=(0,p.b)("top","middle","bottom","stretch"),n=(0,p.b)("start","end","center","space-around","space-between","space-evenly"),t=_.forwardRef(function(e,r){var s,c=e.prefixCls,d=e.justify,v=e.align,b=e.className,S=e.style,y=e.children,m=e.gutter,A=m===void 0?0:m,w=e.wrap,M=o(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),x=_.useContext(u.E_),L=x.getPrefixCls,D=x.direction,O=_.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),j=(0,a.Z)(O,2),W=j[0],F=j[1],N=(0,f.Z)(),G=_.useRef(A);_.useEffect(function(){var ne=C.ZP.subscribe(function(ee){var oe=G.current||0;(!Array.isArray(oe)&&(0,B.Z)(oe)==="object"||Array.isArray(oe)&&((0,B.Z)(oe[0])==="object"||(0,B.Z)(oe[1])==="object"))&&F(ee)});return function(){return C.ZP.unsubscribe(ne)}},[]);var E=function(){var ee=[void 0,void 0],oe=Array.isArray(A)?A:[A,void 0];return oe.forEach(function(le,ve){if((0,B.Z)(le)==="object")for(var he=0;he<C.c4.length;he++){var me=C.c4[he];if(W[me]&&le[me]!==void 0){ee[ve]=le[me];break}}else ee[ve]=le}),ee},R=L("row",c),k=E(),I=h()(R,(s={},(0,V.Z)(s,"".concat(R,"-no-wrap"),w===!1),(0,V.Z)(s,"".concat(R,"-").concat(d),d),(0,V.Z)(s,"".concat(R,"-").concat(v),v),(0,V.Z)(s,"".concat(R,"-rtl"),D==="rtl"),s),b),T={},K=k[0]!=null&&k[0]>0?k[0]/-2:void 0,Z=k[1]!=null&&k[1]>0?k[1]/-2:void 0;if(K&&(T.marginLeft=K,T.marginRight=K),N){var Y=(0,a.Z)(k,2);T.rowGap=Y[1]}else Z&&(T.marginTop=Z,T.marginBottom=Z);var Q=(0,a.Z)(k,2),re=Q[0],q=Q[1],J=_.useMemo(function(){return{gutter:[re,q],wrap:w,supportFlexGap:N}},[re,q,w,N]);return _.createElement(i.Z.Provider,{value:J},_.createElement("div",(0,z.Z)({},M,{className:I,style:(0,z.Z)((0,z.Z)({},T),S),ref:r}),y))});X.Z=t},6999:function(te,X,U){"use strict";var z=U(38663),V=U.n(z),B=U(80638),a=U.n(B)},71230:function(te,X,U){"use strict";var z=U(92820);X.Z=z.Z},13062:function(te,X,U){"use strict";var z=U(38663),V=U.n(z),B=U(6999)},60331:function(te,X,U){"use strict";U.d(X,{Z:function(){return c}});var z=U(46823),V=U(16184),B=U(33671),a=U(17358),g=U(94184),h=U.n(g),_=U(10366),u=U(67294),f=U(53124),C=U(98787),p=U(21790),i=function(d,v){var b={};for(var S in d)Object.prototype.hasOwnProperty.call(d,S)&&v.indexOf(S)<0&&(b[S]=d[S]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,S=Object.getOwnPropertySymbols(d);y<S.length;y++)v.indexOf(S[y])<0&&Object.prototype.propertyIsEnumerable.call(d,S[y])&&(b[S[y]]=d[S[y]]);return b},o=function(v){var b,S=v.prefixCls,y=v.className,m=v.checked,A=v.onChange,w=v.onClick,M=i(v,["prefixCls","className","checked","onChange","onClick"]),x=u.useContext(f.E_),L=x.getPrefixCls,D=function(F){A==null||A(!m),w==null||w(F)},O=L("tag",S),j=h()(O,(b={},(0,z.Z)(b,"".concat(O,"-checkable"),!0),(0,z.Z)(b,"".concat(O,"-checkable-checked"),m),b),y);return u.createElement("span",(0,V.Z)({},M,{className:j,onClick:D}))},l=o,n=function(d,v){var b={};for(var S in d)Object.prototype.hasOwnProperty.call(d,S)&&v.indexOf(S)<0&&(b[S]=d[S]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,S=Object.getOwnPropertySymbols(d);y<S.length;y++)v.indexOf(S[y])<0&&Object.prototype.propertyIsEnumerable.call(d,S[y])&&(b[S[y]]=d[S[y]]);return b},t=new RegExp("^(".concat(C.Y.join("|"),")(-inverse)?$")),e=new RegExp("^(".concat(C.E.join("|"),")$")),r=function(v,b){var S,y=v.prefixCls,m=v.className,A=v.style,w=v.children,M=v.icon,x=v.color,L=v.onClose,D=v.closeIcon,O=v.closable,j=O===void 0?!1:O,W=n(v,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),F=u.useContext(f.E_),N=F.getPrefixCls,G=F.direction,E=u.useState(!0),R=(0,B.Z)(E,2),k=R[0],I=R[1];u.useEffect(function(){"visible"in W&&I(W.visible)},[W.visible]);var T=function(){return x?t.test(x)||e.test(x):!1},K=(0,V.Z)({backgroundColor:x&&!T()?x:void 0},A),Z=T(),Y=N("tag",y),Q=h()(Y,(S={},(0,z.Z)(S,"".concat(Y,"-").concat(x),Z),(0,z.Z)(S,"".concat(Y,"-has-color"),x&&!Z),(0,z.Z)(S,"".concat(Y,"-hidden"),!k),(0,z.Z)(S,"".concat(Y,"-rtl"),G==="rtl"),S),m),re=function(he){he.stopPropagation(),L==null||L(he),!he.defaultPrevented&&("visible"in W||I(!1))},q=function(){return j?D?u.createElement("span",{className:"".concat(Y,"-close-icon"),onClick:re},D):u.createElement(a.Z,{className:"".concat(Y,"-close-icon"),onClick:re}):null},J="onClick"in W||w&&w.type==="a",ne=(0,_.Z)(W,["visible"]),ee=M||null,oe=ee?u.createElement(u.Fragment,null,ee,u.createElement("span",null,w)):w,le=u.createElement("span",(0,V.Z)({},ne,{ref:b,className:Q,style:K}),oe,q());return J?u.createElement(p.Z,null,le):le},s=u.forwardRef(r);s.CheckableTag=l;var c=s},71153:function(te,X,U){"use strict";var z=U(38663),V=U.n(z),B=U(13277),a=U.n(B)},28441:function(te,X,U){"use strict";var z=this&&this.__createBinding||(Object.create?function(B,a,g,h){h===void 0&&(h=g),Object.defineProperty(B,h,{enumerable:!0,get:function(){return a[g]}})}:function(B,a,g,h){h===void 0&&(h=g),B[h]=a[g]}),V=this&&this.__exportStar||function(B,a){for(var g in B)g!=="default"&&!Object.prototype.hasOwnProperty.call(a,g)&&z(a,B,g)};Object.defineProperty(X,"__esModule",{value:!0}),V(U(21328),X),V(U(52637),X),V(U(64437),X)},21328:function(te,X,U){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.useBreakpoints=X.useBreakpoint=void 0;var z=U(64437);function V(a){var g=(0,z.useWindowSize)().width;return g<a}X.useBreakpoint=V;function B(a){var g=(0,z.useWindowSize)().width;return a.map(function(h){return g<h})}X.useBreakpoints=B},52637:function(te,X,U){"use strict";var z=this&&this.__assign||function(){return z=Object.assign||function(_){for(var u,f=1,C=arguments.length;f<C;f++){u=arguments[f];for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(_[p]=u[p])}return _},z.apply(this,arguments)},V=this&&this.__createBinding||(Object.create?function(_,u,f,C){C===void 0&&(C=f),Object.defineProperty(_,C,{enumerable:!0,get:function(){return u[f]}})}:function(_,u,f,C){C===void 0&&(C=f),_[C]=u[f]}),B=this&&this.__setModuleDefault||(Object.create?function(_,u){Object.defineProperty(_,"default",{enumerable:!0,value:u})}:function(_,u){_.default=u}),a=this&&this.__importStar||function(_){if(_&&_.__esModule)return _;var u={};if(_!=null)for(var f in _)f!=="default"&&Object.prototype.hasOwnProperty.call(_,f)&&V(u,_,f);return B(u,_),u};Object.defineProperty(X,"__esModule",{value:!0}),X.useComponentSize=void 0;var g=a(U(67294));function h(){var _=g.useState({height:0,width:0}),u=_[0],f=_[1],C=g.useRef(),p=g.useCallback(function(){if(!!C.current){var i=C.current.offsetHeight,o=C.current.offsetWidth;(i!==u.height||o!==u.width)&&f({height:i,width:o})}},[u.height,u.width]);return g.useLayoutEffect(function(){if(!(!C||!C.current)){var i=new ResizeObserver(p);return i.observe(C.current),function(){return i.disconnect()}}},[C,p]),z({ref:C},u)}X.useComponentSize=h},64437:function(te,X,U){"use strict";var z=this&&this.__createBinding||(Object.create?function(_,u,f,C){C===void 0&&(C=f),Object.defineProperty(_,C,{enumerable:!0,get:function(){return u[f]}})}:function(_,u,f,C){C===void 0&&(C=f),_[C]=u[f]}),V=this&&this.__setModuleDefault||(Object.create?function(_,u){Object.defineProperty(_,"default",{enumerable:!0,value:u})}:function(_,u){_.default=u}),B=this&&this.__importStar||function(_){if(_&&_.__esModule)return _;var u={};if(_!=null)for(var f in _)f!=="default"&&Object.prototype.hasOwnProperty.call(_,f)&&z(u,_,f);return V(u,_),u};Object.defineProperty(X,"__esModule",{value:!0}),X.useWindowSize=void 0;var a=B(U(67294));function g(){return{height:window.innerHeight,width:window.innerWidth}}function h(){var _=a.useState(g()),u=_[0],f=_[1];return a.useLayoutEffect(function(){function C(){f(g())}return window.addEventListener("resize",C),function(){return window.removeEventListener("resize",C)}},[]),u}X.useWindowSize=h},44586:function(te,X,U){"use strict";U.d(X,{Z:function(){return i}});var z,V=new Uint8Array(16);function B(){if(!z&&(z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!z))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return z(V)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function g(o){return typeof o=="string"&&a.test(o)}for(var h=g,_=[],u=0;u<256;++u)_.push((u+256).toString(16).substr(1));function f(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(_[o[l+0]]+_[o[l+1]]+_[o[l+2]]+_[o[l+3]]+"-"+_[o[l+4]]+_[o[l+5]]+"-"+_[o[l+6]]+_[o[l+7]]+"-"+_[o[l+8]]+_[o[l+9]]+"-"+_[o[l+10]]+_[o[l+11]]+_[o[l+12]]+_[o[l+13]]+_[o[l+14]]+_[o[l+15]]).toLowerCase();if(!h(n))throw TypeError("Stringified UUID is invalid");return n}var C=f;function p(o,l,n){o=o||{};var t=o.random||(o.rng||B)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,l){n=n||0;for(var e=0;e<16;++e)l[n+e]=t[e];return l}return C(t)}var i=p},12617:function(te){(function(X,U){te.exports=U()})(self,function(){return(()=>{"use strict";var X={775:(z,V)=>{Object.defineProperty(V,"__esModule",{value:!0}),V.FitAddon=void 0;var B=function(){function a(){}return a.prototype.activate=function(g){this._terminal=g},a.prototype.dispose=function(){},a.prototype.fit=function(){var g=this.proposeDimensions();if(g&&this._terminal){var h=this._terminal._core;this._terminal.rows===g.rows&&this._terminal.cols===g.cols||(h._renderService.clear(),this._terminal.resize(g.cols,g.rows))}},a.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var g=this._terminal._core;if(g._renderService.dimensions.actualCellWidth!==0&&g._renderService.dimensions.actualCellHeight!==0){var h=window.getComputedStyle(this._terminal.element.parentElement),_=parseInt(h.getPropertyValue("height")),u=Math.max(0,parseInt(h.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),C=_-(parseInt(f.getPropertyValue("padding-top"))+parseInt(f.getPropertyValue("padding-bottom"))),p=u-(parseInt(f.getPropertyValue("padding-right"))+parseInt(f.getPropertyValue("padding-left")))-g.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(p/g._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(C/g._renderService.dimensions.actualCellHeight))}}}},a}();V.FitAddon=B}},U={};return function z(V){if(U[V])return U[V].exports;var B=U[V]={exports:{}};return X[V](B,B.exports,z),B.exports}(775)})()})},12320:function(te){(function(X,U){if(!0)te.exports=U();else var z,V})(self,function(){return(()=>{"use strict";var X={4567:function(B,a,g){var h,_=this&&this.__extends||(h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(r[c]=s[c])},h(t,e)},function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}h(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var u=g(9042),f=g(6114),C=g(9924),p=g(3656),i=g(844),o=g(5596),l=g(9631),n=function(t){function e(r,s){var c=t.call(this)||this;c._terminal=r,c._renderService=s,c._liveRegionLineCount=0,c._charsToConsume=[],c._charsToAnnounce="",c._accessibilityTreeRoot=document.createElement("div"),c._accessibilityTreeRoot.setAttribute("role","document"),c._accessibilityTreeRoot.classList.add("xterm-accessibility"),c._rowContainer=document.createElement("div"),c._rowContainer.setAttribute("role","list"),c._rowContainer.classList.add("xterm-accessibility-tree"),c._rowElements=[];for(var d=0;d<c._terminal.rows;d++)c._rowElements[d]=c._createAccessibilityTreeNode(),c._rowContainer.appendChild(c._rowElements[d]);if(c._topBoundaryFocusListener=function(v){return c._onBoundaryFocus(v,0)},c._bottomBoundaryFocusListener=function(v){return c._onBoundaryFocus(v,1)},c._rowElements[0].addEventListener("focus",c._topBoundaryFocusListener),c._rowElements[c._rowElements.length-1].addEventListener("focus",c._bottomBoundaryFocusListener),c._refreshRowsDimensions(),c._accessibilityTreeRoot.appendChild(c._rowContainer),c._renderRowsDebouncer=new C.TimeBasedDebouncer(c._renderRows.bind(c)),c._refreshRows(),c._liveRegion=document.createElement("div"),c._liveRegion.classList.add("live-region"),c._liveRegion.setAttribute("aria-live","assertive"),c._accessibilityTreeRoot.appendChild(c._liveRegion),!c._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return c._terminal.element.insertAdjacentElement("afterbegin",c._accessibilityTreeRoot),c.register(c._renderRowsDebouncer),c.register(c._terminal.onResize(function(v){return c._onResize(v.rows)})),c.register(c._terminal.onRender(function(v){return c._refreshRows(v.start,v.end)})),c.register(c._terminal.onScroll(function(){return c._refreshRows()})),c.register(c._terminal.onA11yChar(function(v){return c._onChar(v)})),c.register(c._terminal.onLineFeed(function(){return c._onChar(`
`)})),c.register(c._terminal.onA11yTab(function(v){return c._onTab(v)})),c.register(c._terminal.onKey(function(v){return c._onKey(v.key)})),c.register(c._terminal.onBlur(function(){return c._clearLiveRegion()})),c.register(c._renderService.onDimensionsChange(function(){return c._refreshRowsDimensions()})),c._screenDprMonitor=new o.ScreenDprMonitor,c.register(c._screenDprMonitor),c._screenDprMonitor.setListener(function(){return c._refreshRowsDimensions()}),c.register((0,p.addDisposableDomListener)(window,"resize",function(){return c._refreshRowsDimensions()})),c}return _(e,t),e.prototype.dispose=function(){t.prototype.dispose.call(this),(0,l.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(r,s){var c=r.target,d=this._rowElements[s===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")!==(s===0?"1":""+this._terminal.buffer.lines.length)&&r.relatedTarget===d){var v,b;if(s===0?(v=c,b=this._rowElements.pop(),this._rowContainer.removeChild(b)):(v=this._rowElements.shift(),b=c,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),b.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){var S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else S=this._createAccessibilityTreeNode(),this._rowElements.push(S),this._rowContainer.appendChild(S);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}},e.prototype._onResize=function(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var r=document.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r},e.prototype._onTab=function(r){for(var s=0;s<r;s++)this._onChar(" ")},e.prototype._onChar=function(r){var s=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)),f.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){s._accessibilityTreeRoot.appendChild(s._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,f.isMac&&(0,l.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(r){this._clearLiveRegion(),this._charsToConsume.push(r)},e.prototype._refreshRows=function(r,s){this._renderRowsDebouncer.refresh(r,s,this._terminal.rows)},e.prototype._renderRows=function(r,s){for(var c=this._terminal.buffer,d=c.lines.length.toString(),v=r;v<=s;v++){var b=c.translateBufferLineToString(c.ydisp+v,!0),S=(c.ydisp+v+1).toString(),y=this._rowElements[v];y&&(b.length===0?y.innerText="\xA0":y.textContent=b,y.setAttribute("aria-posinset",S),y.setAttribute("aria-setsize",d))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}},e.prototype._refreshRowDimensions=function(r){r.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(i.Disposable);a.AccessibilityManager=n},3614:(B,a)=>{function g(f){return f.replace(/\r?\n/g,"\r")}function h(f,C){return C?"[200~"+f+"[201~":f}function _(f,C,p){f=h(f=g(f),p.decPrivateModes.bracketedPasteMode),p.triggerDataEvent(f,!0),C.value=""}function u(f,C,p){var i=p.getBoundingClientRect(),o=f.clientX-i.left-10,l=f.clientY-i.top-10;C.style.width="20px",C.style.height="20px",C.style.left=o+"px",C.style.top=l+"px",C.style.zIndex="1000",C.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=g,a.bracketTextForPaste=h,a.copyHandler=function(f,C){f.clipboardData&&f.clipboardData.setData("text/plain",C.selectionText),f.preventDefault()},a.handlePasteEvent=function(f,C,p){f.stopPropagation(),f.clipboardData&&_(f.clipboardData.getData("text/plain"),C,p)},a.paste=_,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(f,C,p,i,o){u(f,C,p),o&&i.rightClickSelect(f),C.value=i.selectionText,C.select()}},4774:(B,a)=>{var g,h,_,u;function f(p){var i=p.toString(16);return i.length<2?"0"+i:i}function C(p,i){return p<i?(i+.05)/(p+.05):(p+.05)/(i+.05)}Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=void 0,function(p){p.toCss=function(i,o,l,n){return n!==void 0?"#"+f(i)+f(o)+f(l)+f(n):"#"+f(i)+f(o)+f(l)},p.toRgba=function(i,o,l,n){return n===void 0&&(n=255),(i<<24|o<<16|l<<8|n)>>>0}}(g=a.channels||(a.channels={})),(h=a.color||(a.color={})).blend=function(p,i){var o=(255&i.rgba)/255;if(o===1)return{css:i.css,rgba:i.rgba};var l=i.rgba>>24&255,n=i.rgba>>16&255,t=i.rgba>>8&255,e=p.rgba>>24&255,r=p.rgba>>16&255,s=p.rgba>>8&255,c=e+Math.round((l-e)*o),d=r+Math.round((n-r)*o),v=s+Math.round((t-s)*o);return{css:g.toCss(c,d,v),rgba:g.toRgba(c,d,v)}},h.isOpaque=function(p){return(255&p.rgba)==255},h.ensureContrastRatio=function(p,i,o){var l=u.ensureContrastRatio(p.rgba,i.rgba,o);if(l)return u.toColor(l>>24&255,l>>16&255,l>>8&255)},h.opaque=function(p){var i=(255|p.rgba)>>>0,o=u.toChannels(i),l=o[0],n=o[1],t=o[2];return{css:g.toCss(l,n,t),rgba:i}},h.opacity=function(p,i){var o=Math.round(255*i),l=u.toChannels(p.rgba),n=l[0],t=l[1],e=l[2];return{css:g.toCss(n,t,e,o),rgba:g.toRgba(n,t,e,o)}},(a.css||(a.css={})).toColor=function(p){switch(p.length){case 7:return{css:p,rgba:(parseInt(p.slice(1),16)<<8|255)>>>0};case 9:return{css:p,rgba:parseInt(p.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(p){function i(o,l,n){var t=o/255,e=l/255,r=n/255;return .2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))}p.relativeLuminance=function(o){return i(o>>16&255,o>>8&255,255&o)},p.relativeLuminance2=i}(_=a.rgb||(a.rgb={})),function(p){function i(l,n,t){for(var e=l>>24&255,r=l>>16&255,s=l>>8&255,c=n>>24&255,d=n>>16&255,v=n>>8&255,b=C(_.relativeLuminance2(c,v,d),_.relativeLuminance2(e,r,s));b<t&&(c>0||d>0||v>0);)c-=Math.max(0,Math.ceil(.1*c)),d-=Math.max(0,Math.ceil(.1*d)),v-=Math.max(0,Math.ceil(.1*v)),b=C(_.relativeLuminance2(c,v,d),_.relativeLuminance2(e,r,s));return(c<<24|d<<16|v<<8|255)>>>0}function o(l,n,t){for(var e=l>>24&255,r=l>>16&255,s=l>>8&255,c=n>>24&255,d=n>>16&255,v=n>>8&255,b=C(_.relativeLuminance2(c,v,d),_.relativeLuminance2(e,r,s));b<t&&(c<255||d<255||v<255);)c=Math.min(255,c+Math.ceil(.1*(255-c))),d=Math.min(255,d+Math.ceil(.1*(255-d))),v=Math.min(255,v+Math.ceil(.1*(255-v))),b=C(_.relativeLuminance2(c,v,d),_.relativeLuminance2(e,r,s));return(c<<24|d<<16|v<<8|255)>>>0}p.ensureContrastRatio=function(l,n,t){var e=_.relativeLuminance(l>>8),r=_.relativeLuminance(n>>8);if(C(e,r)<t)return r<e?i(l,n,t):o(l,n,t)},p.reduceLuminance=i,p.increaseLuminance=o,p.toChannels=function(l){return[l>>24&255,l>>16&255,l>>8&255,255&l]},p.toColor=function(l,n,t){return{css:g.toCss(l,n,t),rgba:g.toRgba(l,n,t)}}}(u=a.rgba||(a.rgba={})),a.toPaddedHex=f,a.contrastRatio=C},7239:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;var g=function(){function h(){this._color={},this._rgba={}}return h.prototype.clear=function(){this._color={},this._rgba={}},h.prototype.setCss=function(_,u,f){this._rgba[_]||(this._rgba[_]={}),this._rgba[_][u]=f},h.prototype.getCss=function(_,u){return this._rgba[_]?this._rgba[_][u]:void 0},h.prototype.setColor=function(_,u,f){this._color[_]||(this._color[_]={}),this._color[_][u]=f},h.prototype.getColor=function(_,u){return this._color[_]?this._color[_][u]:void 0},h}();a.ColorContrastCache=g},5680:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorManager=a.DEFAULT_ANSI_COLORS=void 0;var h=g(4774),_=g(7239),u=h.css.toColor("#ffffff"),f=h.css.toColor("#000000"),C=h.css.toColor("#ffffff"),p=h.css.toColor("#000000"),i={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var l=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],n=[0,95,135,175,215,255],t=0;t<216;t++){var e=n[t/36%6|0],r=n[t/6%6|0],s=n[t%6];l.push({css:h.channels.toCss(e,r,s),rgba:h.channels.toRgba(e,r,s)})}for(t=0;t<24;t++){var c=8+10*t;l.push({css:h.channels.toCss(c,c,c),rgba:h.channels.toRgba(c,c,c)})}return l}());var o=function(){function l(n,t){this.allowTransparency=t;var e=n.createElement("canvas");e.width=1,e.height=1;var r=e.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new _.ColorContrastCache,this.colors={foreground:u,background:f,cursor:C,cursorAccent:p,selectionTransparent:i,selectionOpaque:h.color.blend(f,i),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return l.prototype.onOptionsChange=function(n){n==="minimumContrastRatio"&&this._contrastCache.clear()},l.prototype.setTheme=function(n){n===void 0&&(n={}),this.colors.foreground=this._parseColor(n.foreground,u),this.colors.background=this._parseColor(n.background,f),this.colors.cursor=this._parseColor(n.cursor,C,!0),this.colors.cursorAccent=this._parseColor(n.cursorAccent,p,!0),this.colors.selectionTransparent=this._parseColor(n.selection,i,!0),this.colors.selectionOpaque=h.color.blend(this.colors.background,this.colors.selectionTransparent),h.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=h.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(n.black,a.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(n.red,a.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(n.green,a.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(n.yellow,a.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(n.blue,a.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(n.magenta,a.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(n.cyan,a.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(n.white,a.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(n.brightBlack,a.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(n.brightRed,a.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(n.brightGreen,a.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(n.brightYellow,a.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(n.brightBlue,a.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(n.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(n.brightCyan,a.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(n.brightWhite,a.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},l.prototype._parseColor=function(n,t,e){if(e===void 0&&(e=this.allowTransparency),n===void 0)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=n,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+n+" is invalid using fallback "+t.css),t;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!e)return console.warn("Color: "+n+" is using transparency, but allowTransparency is false. Using fallback "+t.css+"."),t;var s=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(y){return Number(y)}),c=s[0],d=s[1],v=s[2],b=s[3],S=Math.round(255*b);return{rgba:h.channels.toRgba(c,d,v,S),css:n}}return{css:this._ctx.fillStyle,rgba:h.channels.toRgba(r[0],r[1],r[2],r[3])}},l}();a.ColorManager=o},9631:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeElementFromParent=void 0,a.removeElementFromParent=function(){for(var g,h=[],_=0;_<arguments.length;_++)h[_]=arguments[_];for(var u=0,f=h;u<f.length;u++){var C=f[u];(g=C==null?void 0:C.parentElement)===null||g===void 0||g.removeChild(C)}}},3656:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(g,h,_,u){g.addEventListener(h,_,u);var f=!1;return{dispose:function(){f||(f=!0,g.removeEventListener(h,_,u))}}}},3551:function(B,a,g){var h=this&&this.__decorate||function(i,o,l,n){var t,e=arguments.length,r=e<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,l):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,l,n);else for(var s=i.length-1;s>=0;s--)(t=i[s])&&(r=(e<3?t(r):e>3?t(o,l,r):t(o,l))||r);return e>3&&r&&Object.defineProperty(o,l,r),r},_=this&&this.__param||function(i,o){return function(l,n){o(l,n,i)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZone=a.Linkifier=void 0;var u=g(8460),f=g(2585),C=function(){function i(o,l,n){this._bufferService=o,this._logService=l,this._unicodeService=n,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new u.EventEmitter,this._onHideLinkUnderline=new u.EventEmitter,this._onLinkTooltip=new u.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),i.prototype.attachToDom=function(o,l){this._element=o,this._mouseZoneManager=l},i.prototype.linkifyRows=function(o,l){var n=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=o,this._rowsToLinkify.end=l):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,o),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,l)),this._mouseZoneManager.clearAll(o,l),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return n._linkifyRows()},i._timeBeforeLatency))},i.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var o=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var l=o.ydisp+this._rowsToLinkify.start;if(!(l>=o.lines.length)){for(var n=o.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,t=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,l,n,t,t);e.hasNext();)for(var r=e.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(r.range.first,r.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},i.prototype.registerLinkMatcher=function(o,l,n){if(n===void 0&&(n={}),!l)throw new Error("handler must be defined");var t={id:this._nextLinkMatcherId++,regex:o,handler:l,matchIndex:n.matchIndex,validationCallback:n.validationCallback,hoverTooltipCallback:n.tooltipCallback,hoverLeaveCallback:n.leaveCallback,willLinkActivate:n.willLinkActivate,priority:n.priority||0};return this._addLinkMatcherToList(t),t.id},i.prototype._addLinkMatcherToList=function(o){if(this._linkMatchers.length!==0){for(var l=this._linkMatchers.length-1;l>=0;l--)if(o.priority<=this._linkMatchers[l].priority)return void this._linkMatchers.splice(l+1,0,o);this._linkMatchers.splice(0,0,o)}else this._linkMatchers.push(o)},i.prototype.deregisterLinkMatcher=function(o){for(var l=0;l<this._linkMatchers.length;l++)if(this._linkMatchers[l].id===o)return this._linkMatchers.splice(l,1),!0;return!1},i.prototype._doLinkifyRow=function(o,l,n){for(var t,e=this,r=new RegExp(n.regex.source,(n.regex.flags||"")+"g"),s=-1,c=function(){var v=t[typeof n.matchIndex!="number"?0:n.matchIndex];if(!v)return d._logService.debug("match found without corresponding matchIndex",t,n),"break";if(s=l.indexOf(v,s+1),r.lastIndex=s+v.length,s<0)return"break";var b=d._bufferService.buffer.stringIndexToBufferIndex(o,s);if(b[0]<0)return"break";var S=d._bufferService.buffer.lines.get(b[0]);if(!S)return"break";var y=S.getFg(b[1]),m=y?y>>9&511:void 0;n.validationCallback?n.validationCallback(v,function(A){e._rowsTimeoutId||A&&e._addLink(b[1],b[0]-e._bufferService.buffer.ydisp,v,n,m)}):d._addLink(b[1],b[0]-d._bufferService.buffer.ydisp,v,n,m)},d=this;(t=r.exec(l))!==null&&c()!=="break";);},i.prototype._addLink=function(o,l,n,t,e){var r=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(n),c=o%this._bufferService.cols,d=l+Math.floor(o/this._bufferService.cols),v=(c+s)%this._bufferService.cols,b=d+Math.floor((c+s)/this._bufferService.cols);v===0&&(v=this._bufferService.cols,b--),this._mouseZoneManager.add(new p(c+1,d+1,v+1,b+1,function(S){if(t.handler)return t.handler(S,n);var y=window.open();y?(y.opener=null,y.location.href=n):console.warn("Opening link blocked as opener could not be cleared")},function(){r._onShowLinkUnderline.fire(r._createLinkHoverEvent(c,d,v,b,e)),r._element.classList.add("xterm-cursor-pointer")},function(S){r._onLinkTooltip.fire(r._createLinkHoverEvent(c,d,v,b,e)),t.hoverTooltipCallback&&t.hoverTooltipCallback(S,n,{start:{x:c,y:d},end:{x:v,y:b}})},function(){r._onHideLinkUnderline.fire(r._createLinkHoverEvent(c,d,v,b,e)),r._element.classList.remove("xterm-cursor-pointer"),t.hoverLeaveCallback&&t.hoverLeaveCallback()},function(S){return!t.willLinkActivate||t.willLinkActivate(S,n)}))}},i.prototype._createLinkHoverEvent=function(o,l,n,t,e){return{x1:o,y1:l,x2:n,y2:t,cols:this._bufferService.cols,fg:e}},i._timeBeforeLatency=200,i=h([_(0,f.IBufferService),_(1,f.ILogService),_(2,f.IUnicodeService)],i)}();a.Linkifier=C;var p=function(i,o,l,n,t,e,r,s,c){this.x1=i,this.y1=o,this.x2=l,this.y2=n,this.clickCallback=t,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=s,this.willLinkActivate=c};a.MouseZone=p},6465:function(B,a,g){var h,_=this&&this.__extends||(h=function(n,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},h(n,t)},function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}h(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),u=this&&this.__decorate||function(n,t,e,r){var s,c=arguments.length,d=c<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,t,e,r);else for(var v=n.length-1;v>=0;v--)(s=n[v])&&(d=(c<3?s(d):c>3?s(t,e,d):s(t,e))||d);return c>3&&d&&Object.defineProperty(t,e,d),d},f=this&&this.__param||function(n,t){return function(e,r){t(e,r,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier2=void 0;var C=g(2585),p=g(8460),i=g(844),o=g(3656),l=function(n){function t(e){var r=n.call(this)||this;return r._bufferService=e,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new p.EventEmitter),r._onHideLinkUnderline=r.register(new p.EventEmitter),r.register((0,i.getDisposeArrayDisposable)(r._linkCacheDisposables)),r}return _(t,n),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),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}),t.prototype.registerLinkProvider=function(e){var r=this;return this._linkProviders.push(e),{dispose:function(){var s=r._linkProviders.indexOf(e);s!==-1&&r._linkProviders.splice(s,1)}}},t.prototype.attachToDom=function(e,r,s){var c=this;this._element=e,this._mouseService=r,this._renderService=s,this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",function(){c._isMouseOut=!0,c._clearCurrentLink()})),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},t.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(r){this._isMouseOut=!1;for(var s=e.composedPath(),c=0;c<s.length;c++){var d=s[c];if(d.classList.contains("xterm"))break;if(d.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._onHover(r),this._lastBufferCell=r)}}},t.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},t.prototype._askForLink=function(e,r){var s,c=this;this._activeProviderReplies&&r||((s=this._activeProviderReplies)===null||s===void 0||s.forEach(function(v){v==null||v.forEach(function(b){b.link.dispose&&b.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);var d=!1;this._linkProviders.forEach(function(v,b){var S;r?((S=c._activeProviderReplies)===null||S===void 0?void 0:S.get(b))&&(d=c._checkLinkProviderResult(b,e,d)):v.provideLinks(e.y,function(y){var m,A;if(!c._isMouseOut){var w=y==null?void 0:y.map(function(M){return{link:M}});(m=c._activeProviderReplies)===null||m===void 0||m.set(b,w),d=c._checkLinkProviderResult(b,e,d),((A=c._activeProviderReplies)===null||A===void 0?void 0:A.size)===c._linkProviders.length&&c._removeIntersectingLinks(e.y,c._activeProviderReplies)}})})},t.prototype._removeIntersectingLinks=function(e,r){for(var s=new Set,c=0;c<r.size;c++){var d=r.get(c);if(d)for(var v=0;v<d.length;v++)for(var b=d[v],S=b.link.range.start.y<e?0:b.link.range.start.x,y=b.link.range.end.y>e?this._bufferService.cols:b.link.range.end.x,m=S;m<=y;m++){if(s.has(m)){d.splice(v--,1);break}s.add(m)}}},t.prototype._checkLinkProviderResult=function(e,r,s){var c,d=this;if(!this._activeProviderReplies)return s;for(var v=this._activeProviderReplies.get(e),b=!1,S=0;S<e;S++)this._activeProviderReplies.has(S)&&!this._activeProviderReplies.get(S)||(b=!0);if(!b&&v){var y=v.find(function(A){return d._linkAtPosition(A.link,r)});y&&(s=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviders.length&&!s)for(S=0;S<this._activeProviderReplies.size;S++){var m=(c=this._activeProviderReplies.get(S))===null||c===void 0?void 0:c.find(function(A){return d._linkAtPosition(A.link,r)});if(m){s=!0,this._handleNewLink(m);break}}return s},t.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,i.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(e){var r=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var c,d;return(d=(c=r._currentLink)===null||c===void 0?void 0:c.state)===null||d===void 0?void 0:d.decorations.pointerCursor},set:function(c){var d,v;((d=r._currentLink)===null||d===void 0?void 0:d.state)&&r._currentLink.state.decorations.pointerCursor!==c&&(r._currentLink.state.decorations.pointerCursor=c,r._currentLink.state.isHovered&&((v=r._element)===null||v===void 0||v.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,d;return(d=(c=r._currentLink)===null||c===void 0?void 0:c.state)===null||d===void 0?void 0:d.decorations.underline},set:function(c){var d,v,b;((d=r._currentLink)===null||d===void 0?void 0:d.state)&&((b=(v=r._currentLink)===null||v===void 0?void 0:v.state)===null||b===void 0?void 0:b.decorations.underline)!==c&&(r._currentLink.state.decorations.underline=c,r._currentLink.state.isHovered&&r._fireUnderlineEvent(e.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(c){var d=c.start===0?0:c.start+1+r._bufferService.buffer.ydisp;r._clearCurrentLink(d,c.end+1+r._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(e,r,s){var c;((c=this._currentLink)===null||c===void 0?void 0:c.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(s,r.text)},t.prototype._fireUnderlineEvent=function(e,r){var s=e.range,c=this._bufferService.buffer.ydisp,d=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-c-1,s.end.x,s.end.y-c-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(d)},t.prototype._linkLeave=function(e,r,s){var c;((c=this._currentLink)===null||c===void 0?void 0:c.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(s,r.text)},t.prototype._linkAtPosition=function(e,r){var s=e.range.start.y===e.range.end.y,c=e.range.start.y<r.y,d=e.range.end.y>r.y;return(s&&e.range.start.x<=r.x&&e.range.end.x>=r.x||c&&e.range.end.x>=r.x||d&&e.range.start.x<=r.x||c&&d)&&e.range.start.y<=r.y&&e.range.end.y>=r.y},t.prototype._positionFromMouseEvent=function(e,r,s){var c=s.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(e,r,s,c,d){return{x1:e,y1:r,x2:s,y2:c,cols:this._bufferService.cols,fg:d}},u([f(0,C.IBufferService)],t)}(i.Disposable);a.Linkifier2=l},9042:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(B,a,g){var h,_=this&&this.__extends||(h=function(n,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},h(n,t)},function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}h(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),u=this&&this.__decorate||function(n,t,e,r){var s,c=arguments.length,d=c<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,t,e,r);else for(var v=n.length-1;v>=0;v--)(s=n[v])&&(d=(c<3?s(d):c>3?s(t,e,d):s(t,e))||d);return c>3&&d&&Object.defineProperty(t,e,d),d},f=this&&this.__param||function(n,t){return function(e,r){t(e,r,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZoneManager=void 0;var C=g(844),p=g(3656),i=g(4725),o=g(2585),l=function(n){function t(e,r,s,c,d,v){var b=n.call(this)||this;return b._element=e,b._screenElement=r,b._bufferService=s,b._mouseService=c,b._selectionService=d,b._optionsService=v,b._zones=[],b._areZonesActive=!1,b._lastHoverCoords=[void 0,void 0],b._initialSelectionLength=0,b.register((0,p.addDisposableDomListener)(b._element,"mousedown",function(S){return b._onMouseDown(S)})),b._mouseMoveListener=function(S){return b._onMouseMove(S)},b._mouseLeaveListener=function(S){return b._onMouseLeave(S)},b._clickListener=function(S){return b._onClick(S)},b}return _(t,n),t.prototype.dispose=function(){n.prototype.dispose.call(this),this._deactivate()},t.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},t.prototype.clearAll=function(e,r){if(this._zones.length!==0){e&&r||(e=0,r=this._bufferService.rows-1);for(var s=0;s<this._zones.length;s++){var c=this._zones[s];(c.y1>e&&c.y1<=r+1||c.y2>e&&c.y2<=r+1||c.y1<e&&c.y2>r+1)&&(this._currentZone&&this._currentZone===c&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(s--,1))}this._zones.length===0&&this._deactivate()}},t.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))},t.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))},t.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},t.prototype._onHover=function(e){var r=this,s=this._findZoneEventAt(e);s!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),s&&(this._currentZone=s,s.hoverCallback&&s.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return r._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},t.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r==null||r.tooltipCallback(e)},t.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var r=this._findZoneEventAt(e);(r==null?void 0:r.willLinkActivate(e))&&(e.preventDefault(),e.stopImmediatePropagation())}},t.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},t.prototype._onClick=function(e){var r=this._findZoneEventAt(e),s=this._getSelectionLength();r&&s===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},t.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},t.prototype._findZoneEventAt=function(e){var r=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(r)for(var s=r[0],c=r[1],d=0;d<this._zones.length;d++){var v=this._zones[d];if(v.y1===v.y2){if(c===v.y1&&s>=v.x1&&s<v.x2)return v}else if(c===v.y1&&s>=v.x1||c===v.y2&&s<v.x2||c>v.y1&&c<v.y2)return v}},u([f(2,o.IBufferService),f(3,i.IMouseService),f(4,i.ISelectionService),f(5,o.IOptionsService)],t)}(C.Disposable);a.MouseZoneManager=l},6193:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0;var g=function(){function h(_){this._renderCallback=_}return h.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},h.prototype.refresh=function(_,u,f){var C=this;this._rowCount=f,_=_!==void 0?_:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return C._innerRefresh()}))},h.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var _=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(_,u)}},h}();a.RenderDebouncer=g},5596:function(B,a,g){var h,_=this&&this.__extends||(h=function(f,C){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(p[o]=i[o])},h(f,C)},function(f,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function p(){this.constructor=f}h(f,C),f.prototype=C===null?Object.create(C):(p.prototype=C.prototype,new p)});Object.defineProperty(a,"__esModule",{value:!0}),a.ScreenDprMonitor=void 0;var u=function(f){function C(){var p=f!==null&&f.apply(this,arguments)||this;return p._currentDevicePixelRatio=window.devicePixelRatio,p}return _(C,f),C.prototype.setListener=function(p){var i=this;this._listener&&this.clearListener(),this._listener=p,this._outerListener=function(){i._listener&&(i._listener(window.devicePixelRatio,i._currentDevicePixelRatio),i._updateDpr())},this._updateDpr()},C.prototype.dispose=function(){f.prototype.dispose.call(this),this.clearListener()},C.prototype._updateDpr=function(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},C.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},C}(g(844).Disposable);a.ScreenDprMonitor=u},3236:function(B,a,g){var h,_=this&&this.__extends||(h=function(G,E){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,k){R.__proto__=k}||function(R,k){for(var I in k)Object.prototype.hasOwnProperty.call(k,I)&&(R[I]=k[I])},h(G,E)},function(G,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function R(){this.constructor=G}h(G,E),G.prototype=E===null?Object.create(E):(R.prototype=E.prototype,new R)});Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;var u=g(2950),f=g(1680),C=g(3614),p=g(2584),i=g(5435),o=g(3525),l=g(3551),n=g(9312),t=g(6114),e=g(3656),r=g(9042),s=g(357),c=g(6954),d=g(4567),v=g(1296),b=g(7399),S=g(8460),y=g(8437),m=g(5680),A=g(3230),w=g(4725),M=g(428),x=g(8934),L=g(6465),D=g(5114),O=g(8969),j=g(4774),W=g(4269),F=typeof window!="undefined"?window.document:null,N=function(G){function E(R){R===void 0&&(R={});var k=G.call(this,R)||this;return k.browser=t,k._keyDownHandled=!1,k._keyPressHandled=!1,k._unprocessedDeadKey=!1,k._onCursorMove=new S.EventEmitter,k._onKey=new S.EventEmitter,k._onRender=new S.EventEmitter,k._onSelectionChange=new S.EventEmitter,k._onTitleChange=new S.EventEmitter,k._onBell=new S.EventEmitter,k._onFocus=new S.EventEmitter,k._onBlur=new S.EventEmitter,k._onA11yCharEmitter=new S.EventEmitter,k._onA11yTabEmitter=new S.EventEmitter,k._setup(),k.linkifier=k._instantiationService.createInstance(l.Linkifier),k.linkifier2=k.register(k._instantiationService.createInstance(L.Linkifier2)),k.register(k._inputHandler.onRequestBell(function(){return k.bell()})),k.register(k._inputHandler.onRequestRefreshRows(function(I,T){return k.refresh(I,T)})),k.register(k._inputHandler.onRequestSendFocus(function(){return k._reportFocus()})),k.register(k._inputHandler.onRequestReset(function(){return k.reset()})),k.register(k._inputHandler.onRequestWindowsOptionsReport(function(I){return k._reportWindowsOptions(I)})),k.register(k._inputHandler.onAnsiColorChange(function(I){return k._changeAnsiColor(I)})),k.register((0,S.forwardEvent)(k._inputHandler.onCursorMove,k._onCursorMove)),k.register((0,S.forwardEvent)(k._inputHandler.onTitleChange,k._onTitleChange)),k.register((0,S.forwardEvent)(k._inputHandler.onA11yChar,k._onA11yCharEmitter)),k.register((0,S.forwardEvent)(k._inputHandler.onA11yTab,k._onA11yTabEmitter)),k.register(k._bufferService.onResize(function(I){return k._afterResize(I.cols,I.rows)})),k}return _(E,G),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,"onBell",{get:function(){return this._onBell.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._changeAnsiColor=function(R){var k,I;if(this._colorManager){for(var T=0,K=R.colors;T<K.length;T++){var Z=K[T],Y=j.rgba.toColor(Z.red,Z.green,Z.blue);this._colorManager.colors.ansi[Z.colorIndex]=Y}(k=this._renderService)===null||k===void 0||k.setColors(this._colorManager.colors),(I=this.viewport)===null||I===void 0||I.onThemeChange(this._colorManager.colors)}},E.prototype.dispose=function(){var R,k,I;this._isDisposed||(G.prototype.dispose.call(this),(R=this._renderService)===null||R===void 0||R.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(I=(k=this.element)===null||k===void 0?void 0:k.parentNode)===null||I===void 0||I.removeChild(this.element))},E.prototype._setup=function(){G.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(R){var k,I,T,K;switch(G.prototype._updateOptions.call(this,R),R){case"fontFamily":case"fontSize":(k=this._renderService)===null||k===void 0||k.clear(),(I=this._charSizeService)===null||I===void 0||I.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":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":(T=this.viewport)===null||T===void 0||T.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new d.AccessibilityManager(this,this._renderService)):((K=this._accessibilityManager)===null||K===void 0||K.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},E.prototype._onTextAreaFocus=function(R){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(R),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},E.prototype.blur=function(){var R;return(R=this.textarea)===null||R===void 0?void 0:R.blur()},E.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},E.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var R=this.buffer.ybase+this.buffer.y,k=this.buffer.lines.get(R);if(k){var I=Math.min(this.buffer.x,this.cols-1),T=this._renderService.dimensions.actualCellHeight,K=k.getWidth(I),Z=this._renderService.dimensions.actualCellWidth*K,Y=this.buffer.y*this._renderService.dimensions.actualCellHeight,Q=I*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=Q+"px",this.textarea.style.top=Y+"px",this.textarea.style.width=Z+"px",this.textarea.style.height=T+"px",this.textarea.style.lineHeight=T+"px",this.textarea.style.zIndex="-5"}}},E.prototype._initGlobal=function(){var R=this;this._bindKeys(),this.register((0,e.addDisposableDomListener)(this.element,"copy",function(I){R.hasSelection()&&(0,C.copyHandler)(I,R._selectionService)}));var k=function(I){return(0,C.handlePasteEvent)(I,R.textarea,R.coreService)};this.register((0,e.addDisposableDomListener)(this.textarea,"paste",k)),this.register((0,e.addDisposableDomListener)(this.element,"paste",k)),t.isFirefox?this.register((0,e.addDisposableDomListener)(this.element,"mousedown",function(I){I.button===2&&(0,C.rightClickHandler)(I,R.textarea,R.screenElement,R._selectionService,R.options.rightClickSelectsWord)})):this.register((0,e.addDisposableDomListener)(this.element,"contextmenu",function(I){(0,C.rightClickHandler)(I,R.textarea,R.screenElement,R._selectionService,R.options.rightClickSelectsWord)})),t.isLinux&&this.register((0,e.addDisposableDomListener)(this.element,"auxclick",function(I){I.button===1&&(0,C.moveTextAreaUnderMouseCursor)(I,R.textarea,R.screenElement)}))},E.prototype._bindKeys=function(){var R=this;this.register((0,e.addDisposableDomListener)(this.textarea,"keyup",function(k){return R._keyUp(k)},!0)),this.register((0,e.addDisposableDomListener)(this.textarea,"keydown",function(k){return R._keyDown(k)},!0)),this.register((0,e.addDisposableDomListener)(this.textarea,"keypress",function(k){return R._keyPress(k)},!0)),this.register((0,e.addDisposableDomListener)(this.textarea,"compositionstart",function(){return R._compositionHelper.compositionstart()})),this.register((0,e.addDisposableDomListener)(this.textarea,"compositionupdate",function(k){return R._compositionHelper.compositionupdate(k)})),this.register((0,e.addDisposableDomListener)(this.textarea,"compositionend",function(){return R._compositionHelper.compositionend()})),this.register((0,e.addDisposableDomListener)(this.textarea,"input",function(k){return R._inputEvent(k)},!0)),this.register(this.onRender(function(){return R._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(k){return R._queueLinkification(k.start,k.end)}))},E.prototype.open=function(R){var k=this;if(!R)throw new Error("Terminal requires a parent element.");R.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=R.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"),R.appendChild(this.element);var I=F.createDocumentFragment();this._viewportElement=F.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),I.appendChild(this._viewportElement),this._viewportScrollArea=F.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=F.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=F.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),I.appendChild(this.screenElement),this.textarea=F.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.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((0,e.addDisposableDomListener)(this.textarea,"focus",function(Z){return k._onTextAreaFocus(Z)})),this.register((0,e.addDisposableDomListener)(this.textarea,"blur",function(){return k._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var T=this._instantiationService.createInstance(D.CoreBrowserService,this.textarea);this._instantiationService.setService(w.ICoreBrowserService,T),this._charSizeService=this._instantiationService.createInstance(M.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(w.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new m.ColorManager(F,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(Z){return k._colorManager.onOptionsChange(Z)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(W.CharacterJoinerService),this._instantiationService.setService(w.ICharacterJoinerService,this._characterJoinerService);var K=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,K,this.rows,this.screenElement)),this._instantiationService.setService(w.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(Z){return k._onRender.fire(Z)})),this.onResize(function(Z){return k._renderService.resize(Z.cols,Z.rows)}),this._compositionView=F.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(u.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(I),this._soundService=this._instantiationService.createInstance(s.SoundService),this._instantiationService.setService(w.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(x.MouseService),this._instantiationService.setService(w.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(f.Viewport,function(Z){return k.scrollLines(Z,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return k.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){k._renderService.onCursorMove(),k._syncTextArea()})),this.register(this.onResize(function(){return k._renderService.onResize(k.cols,k.rows)})),this.register(this.onBlur(function(){return k._renderService.onBlur()})),this.register(this.onFocus(function(){return k._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return k.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(n.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(w.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(Z){return k.scrollLines(Z.amount,Z.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return k._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(Z){return k._renderService.onSelectionChanged(Z.start,Z.end,Z.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(Z){k.textarea.value=Z,k.textarea.focus(),k.textarea.select()})),this.register(this._onScroll.event(function(Z){k.viewport.syncScrollArea(),k._selectionService.refresh()})),this.register((0,e.addDisposableDomListener)(this._viewportElement,"scroll",function(){return k._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(c.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return k._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register((0,e.addDisposableDomListener)(this.element,"mousedown",function(Z){return k._selectionService.onMouseDown(Z)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new d.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(o.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(v.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(R){var k,I,T;this._theme=R,(k=this._colorManager)===null||k===void 0||k.setTheme(R),(I=this._renderService)===null||I===void 0||I.setColors(this._colorManager.colors),(T=this.viewport)===null||T===void 0||T.onThemeChange(this._colorManager.colors)},E.prototype.bindMouse=function(){var R=this,k=this,I=this.element;function T(q){var J,ne,ee=k._mouseService.getRawByteCoords(q,k.screenElement,k.cols,k.rows);if(!ee)return!1;switch(q.overrideType||q.type){case"mousemove":ne=32,q.buttons===void 0?(J=3,q.button!==void 0&&(J=q.button<3?q.button:3)):J=1&q.buttons?0:4&q.buttons?1:2&q.buttons?2:3;break;case"mouseup":ne=0,J=q.button<3?q.button:3;break;case"mousedown":ne=1,J=q.button<3?q.button:3;break;case"wheel":q.deltaY!==0&&(ne=q.deltaY<0?0:1),J=4;break;default:return!1}return!(ne===void 0||J===void 0||J>4)&&k.coreMouseService.triggerMouseEvent({col:ee.x-33,row:ee.y-33,button:J,action:ne,ctrl:q.ctrlKey,alt:q.altKey,shift:q.shiftKey})}var K={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Z=function(q){return T(q),q.buttons||(R._document.removeEventListener("mouseup",K.mouseup),K.mousedrag&&R._document.removeEventListener("mousemove",K.mousedrag)),R.cancel(q)},Y=function(q){return T(q),R.cancel(q,!0)},Q=function(q){q.buttons&&T(q)},re=function(q){q.buttons||T(q)};this.register(this.coreMouseService.onProtocolChange(function(q){q?(R.optionsService.options.logLevel==="debug"&&R._logService.debug("Binding to mouse events:",R.coreMouseService.explainEvents(q)),R.element.classList.add("enable-mouse-events"),R._selectionService.disable()):(R._logService.debug("Unbinding from mouse events."),R.element.classList.remove("enable-mouse-events"),R._selectionService.enable()),8&q?K.mousemove||(I.addEventListener("mousemove",re),K.mousemove=re):(I.removeEventListener("mousemove",K.mousemove),K.mousemove=null),16&q?K.wheel||(I.addEventListener("wheel",Y,{passive:!1}),K.wheel=Y):(I.removeEventListener("wheel",K.wheel),K.wheel=null),2&q?K.mouseup||(K.mouseup=Z):(R._document.removeEventListener("mouseup",K.mouseup),K.mouseup=null),4&q?K.mousedrag||(K.mousedrag=Q):(R._document.removeEventListener("mousemove",K.mousedrag),K.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,e.addDisposableDomListener)(I,"mousedown",function(q){if(q.preventDefault(),R.focus(),R.coreMouseService.areMouseEventsActive&&!R._selectionService.shouldForceSelection(q))return T(q),K.mouseup&&R._document.addEventListener("mouseup",K.mouseup),K.mousedrag&&R._document.addEventListener("mousemove",K.mousedrag),R.cancel(q)})),this.register((0,e.addDisposableDomListener)(I,"wheel",function(q){if(!K.wheel){if(!R.buffer.hasScrollback){var J=R.viewport.getLinesScrolled(q);if(J===0)return;for(var ne=p.C0.ESC+(R.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(q.deltaY<0?"A":"B"),ee="",oe=0;oe<Math.abs(J);oe++)ee+=ne;return R.coreService.triggerDataEvent(ee,!0),R.cancel(q,!0)}return R.viewport.onWheel(q)?void 0:R.cancel(q)}},{passive:!1})),this.register((0,e.addDisposableDomListener)(I,"touchstart",function(q){if(!R.coreMouseService.areMouseEventsActive)return R.viewport.onTouchStart(q),R.cancel(q)},{passive:!0})),this.register((0,e.addDisposableDomListener)(I,"touchmove",function(q){if(!R.coreMouseService.areMouseEventsActive)return R.viewport.onTouchMove(q)?void 0:R.cancel(q)},{passive:!1}))},E.prototype.refresh=function(R,k){var I;(I=this._renderService)===null||I===void 0||I.refreshRows(R,k)},E.prototype._queueLinkification=function(R,k){var I;(I=this.linkifier)===null||I===void 0||I.linkifyRows(R,k)},E.prototype.updateCursorStyle=function(R){var k;((k=this._selectionService)===null||k===void 0?void 0:k.shouldColumnSelect(R))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},E.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},E.prototype.scrollLines=function(R,k,I){I===void 0&&(I=0),G.prototype.scrollLines.call(this,R,k,I),this.refresh(0,this.rows-1)},E.prototype.paste=function(R){(0,C.paste)(R,this.textarea,this.coreService)},E.prototype.attachCustomKeyEventHandler=function(R){this._customKeyEventHandler=R},E.prototype.registerLinkMatcher=function(R,k,I){var T=this.linkifier.registerLinkMatcher(R,k,I);return this.refresh(0,this.rows-1),T},E.prototype.deregisterLinkMatcher=function(R){this.linkifier.deregisterLinkMatcher(R)&&this.refresh(0,this.rows-1)},E.prototype.registerLinkProvider=function(R){return this.linkifier2.registerLinkProvider(R)},E.prototype.registerCharacterJoiner=function(R){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var k=this._characterJoinerService.register(R);return this.refresh(0,this.rows-1),k},E.prototype.deregisterCharacterJoiner=function(R){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(R)&&this.refresh(0,this.rows-1)},Object.defineProperty(E.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),E.prototype.addMarker=function(R){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+R)},E.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},E.prototype.select=function(R,k,I){this._selectionService.setSelection(R,k,I)},E.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},E.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},E.prototype.clearSelection=function(){var R;(R=this._selectionService)===null||R===void 0||R.clearSelection()},E.prototype.selectAll=function(){var R;(R=this._selectionService)===null||R===void 0||R.selectAll()},E.prototype.selectLines=function(R,k){var I;(I=this._selectionService)===null||I===void 0||I.selectLines(R,k)},E.prototype._keyDown=function(R){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1)return!1;if(!this._compositionHelper.keydown(R))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;R.key!=="Dead"&&R.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var k=(0,b.evaluateKeyboardEvent)(R,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(R),k.type===3||k.type===2){var I=this.rows-1;return this.scrollLines(k.type===2?-I:I),this.cancel(R,!0)}return k.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,R)||(k.cancel&&this.cancel(R,!0),!k.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(k.key!==p.C0.ETX&&k.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:k.key,domEvent:R}),this._showCursor(),this.coreService.triggerDataEvent(k.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(R,!0))))},E.prototype._isThirdLevelShift=function(R,k){var I=R.isMac&&!this.options.macOptionIsMeta&&k.altKey&&!k.ctrlKey&&!k.metaKey||R.isWindows&&k.altKey&&k.ctrlKey&&!k.metaKey||R.isWindows&&k.getModifierState("AltGraph");return k.type==="keypress"?I:I&&(!k.keyCode||k.keyCode>47)},E.prototype._keyUp=function(R){this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1||(function(k){return k.keyCode===16||k.keyCode===17||k.keyCode===18}(R)||this.focus(),this.updateCursorStyle(R),this._keyPressHandled=!1)},E.prototype._keyPress=function(R){var k;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1)return!1;if(this.cancel(R),R.charCode)k=R.charCode;else if(R.which===null||R.which===void 0)k=R.keyCode;else{if(R.which===0||R.charCode===0)return!1;k=R.which}return!(!k||(R.altKey||R.ctrlKey||R.metaKey)&&!this._isThirdLevelShift(this.browser,R)||(k=String.fromCharCode(k),this._onKey.fire({key:k,domEvent:R}),this._showCursor(),this.coreService.triggerDataEvent(k,!0),this._keyPressHandled=!0,0))},E.prototype._inputEvent=function(R){if(R.data&&R.inputType==="insertText"&&!this.optionsService.options.screenReaderMode){if(this._keyPressHandled)return!1;var k=R.data;return this.coreService.triggerDataEvent(k,!0),this.cancel(R),!0}return!1},E.prototype.bell=function(){var R;this._soundBell()&&((R=this._soundService)===null||R===void 0||R.playBellSound()),this._onBell.fire()},E.prototype.resize=function(R,k){R!==this.cols||k!==this.rows?G.prototype.resize.call(this,R,k):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},E.prototype._afterResize=function(R,k){var I,T;(I=this._charSizeService)===null||I===void 0||I.measure(),(T=this.viewport)===null||T===void 0||T.syncScrollArea(!0)},E.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){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 R=1;R<this.rows;R++)this.buffer.lines.push(this.buffer.getBlankLine(y.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},E.prototype.reset=function(){var R,k;this.options.rows=this.rows,this.options.cols=this.cols;var I=this._customKeyEventHandler;this._setup(),G.prototype.reset.call(this),(R=this._selectionService)===null||R===void 0||R.reset(),this._customKeyEventHandler=I,this.refresh(0,this.rows-1),(k=this.viewport)===null||k===void 0||k.syncScrollArea()},E.prototype.clearTextureAtlas=function(){var R;(R=this._renderService)===null||R===void 0||R.clearTextureAtlas()},E.prototype._reportFocus=function(){var R;((R=this.element)===null||R===void 0?void 0:R.classList.contains("focus"))?this.coreService.triggerDataEvent(p.C0.ESC+"[I"):this.coreService.triggerDataEvent(p.C0.ESC+"[O")},E.prototype._reportWindowsOptions=function(R){if(this._renderService)switch(R){case i.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var k=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),I=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[4;"+I+";"+k+"t");break;case i.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var T=this._renderService.dimensions.scaledCellWidth.toFixed(0),K=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[6;"+K+";"+T+"t")}},E.prototype.cancel=function(R,k){if(this.options.cancelEvents||k)return R.preventDefault(),R.stopPropagation(),!1},E.prototype._visualBell=function(){return!1},E.prototype._soundBell=function(){return this.options.bellStyle==="sound"},E}(O.CoreTerminal);a.Terminal=N},9924:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0;var g=function(){function h(_,u){u===void 0&&(u=1e3),this._renderCallback=_,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return h.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},h.prototype.refresh=function(_,u,f){var C=this;this._rowCount=f,_=_!==void 0?_:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;var p=Date.now();if(p-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=p,this._innerRefresh();else if(!this._additionalRefreshRequested){var i=p-this._lastRefreshMs,o=this._debounceThresholdMS-i;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){C._lastRefreshMs=Date.now(),C._innerRefresh(),C._additionalRefreshRequested=!1,C._refreshTimeoutID=void 0},o)}},h.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var _=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(_,u)}},h}();a.TimeBasedDebouncer=g},1680:function(B,a,g){var h,_=this&&this.__extends||(h=function(n,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},h(n,t)},function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}h(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),u=this&&this.__decorate||function(n,t,e,r){var s,c=arguments.length,d=c<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,t,e,r);else for(var v=n.length-1;v>=0;v--)(s=n[v])&&(d=(c<3?s(d):c>3?s(t,e,d):s(t,e))||d);return c>3&&d&&Object.defineProperty(t,e,d),d},f=this&&this.__param||function(n,t){return function(e,r){t(e,r,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;var C=g(844),p=g(3656),i=g(4725),o=g(2585),l=function(n){function t(e,r,s,c,d,v,b,S){var y=n.call(this)||this;return y._scrollLines=e,y._viewportElement=r,y._scrollArea=s,y._element=c,y._bufferService=d,y._optionsService=v,y._charSizeService=b,y._renderService=S,y.scrollBarWidth=0,y._currentRowHeight=0,y._currentScaledCellHeight=0,y._lastRecordedBufferLength=0,y._lastRecordedViewportHeight=0,y._lastRecordedBufferHeight=0,y._lastTouchY=0,y._lastScrollTop=0,y._lastHadScrollBar=!1,y._wheelPartialScroll=0,y._refreshAnimationFrame=null,y._ignoreNextScrollEvent=!1,y.scrollBarWidth=y._viewportElement.offsetWidth-y._scrollArea.offsetWidth||15,y._lastHadScrollBar=!0,y.register((0,p.addDisposableDomListener)(y._viewportElement,"scroll",y._onScroll.bind(y))),y._activeBuffer=y._bufferService.buffer,y.register(y._bufferService.buffers.onBufferActivate(function(m){return y._activeBuffer=m.activeBuffer})),y._renderDimensions=y._renderService.dimensions,y.register(y._renderService.onDimensionsChange(function(m){return y._renderDimensions=m})),setTimeout(function(){return y.syncScrollArea()},0),y}return _(t,n),t.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},t.prototype._refresh=function(e){var r=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return r._innerRefresh()}))},t.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._optionsService.options.scrollback===0?this.scrollBarWidth=0:this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var s=window.getComputedStyle(this._element),c=parseInt(s.paddingLeft)+parseInt(s.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?c:0)).toString()+"px",this._refreshAnimationFrame=null},t.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight?this._lastHadScrollBar!==this._optionsService.options.scrollback>0&&this._refresh(e):this._refresh(e)},t.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var r=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(r)}},t.prototype._bubbleScroll=function(e,r){var s=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(r<0&&this._viewportElement.scrollTop!==0||r>0&&s<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},t.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},t.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?r*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._currentRowHeight*this._bufferService.rows),r},t.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=this._currentRowHeight+0,this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r},t.prototype._applyScrollModifier=function(e,r){var s=this._optionsService.options.fastScrollModifier;return s==="alt"&&r.altKey||s==="ctrl"&&r.ctrlKey||s==="shift"&&r.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},t.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},t.prototype.onTouchMove=function(e){var r=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},u([f(4,o.IBufferService),f(5,o.IOptionsService),f(6,i.ICharSizeService),f(7,i.IRenderService)],t)}(C.Disposable);a.Viewport=l},2950:function(B,a,g){var h=this&&this.__decorate||function(p,i,o,l){var n,t=arguments.length,e=t<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(p,i,o,l);else for(var r=p.length-1;r>=0;r--)(n=p[r])&&(e=(t<3?n(e):t>3?n(i,o,e):n(i,o))||e);return t>3&&e&&Object.defineProperty(i,o,e),e},_=this&&this.__param||function(p,i){return function(o,l){i(o,l,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;var u=g(4725),f=g(2585),C=function(){function p(i,o,l,n,t,e){this._textarea=i,this._compositionView=o,this._bufferService=l,this._optionsService=n,this._coreService=t,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(p.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),p.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},p.prototype.compositionupdate=function(i){var o=this;this._compositionView.textContent=i.data,this.updateCompositionElements(),setTimeout(function(){o._compositionPosition.end=o._textarea.value.length},0)},p.prototype.compositionend=function(){this._finalizeComposition(!0)},p.prototype.keydown=function(i){if(this._isComposing||this._isSendingComposition){if(i.keyCode===229||i.keyCode===16||i.keyCode===17||i.keyCode===18)return!1;this._finalizeComposition(!1)}return i.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},p.prototype._finalizeComposition=function(i){var o=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,i){var l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(o._isSendingComposition){o._isSendingComposition=!1;var t;l.start+=o._dataAlreadySent.length,(t=o._isComposing?o._textarea.value.substring(l.start,l.end):o._textarea.value.substring(l.start)).length>0&&o._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;var n=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(n,!0)}},p.prototype._handleAnyTextareaChanges=function(){var i=this,o=this._textarea.value;setTimeout(function(){if(!i._isComposing){var l=i._textarea.value.replace(o,"");l.length>0&&(i._dataAlreadySent=l,i._coreService.triggerDataEvent(l,!0))}},0)},p.prototype.updateCompositionElements=function(i){var o=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._renderService.dimensions.actualCellHeight,t=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=l*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=t+"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 r=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=t+"px",this._textarea.style.width=Math.max(r.width,1)+"px",this._textarea.style.height=Math.max(r.height,1)+"px",this._textarea.style.lineHeight=r.height+"px"}i||setTimeout(function(){return o.updateCompositionElements(!0)},0)}},h([_(2,f.IBufferService),_(3,f.IOptionsService),_(4,f.ICoreService),_(5,u.IRenderService)],p)}();a.CompositionHelper=C},9806:(B,a)=>{function g(h,_){var u=_.getBoundingClientRect();return[h.clientX-u.left,h.clientY-u.top]}Object.defineProperty(a,"__esModule",{value:!0}),a.getRawByteCoords=a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=g,a.getCoords=function(h,_,u,f,C,p,i,o){if(C){var l=g(h,_);if(l)return l[0]=Math.ceil((l[0]+(o?p/2:0))/p),l[1]=Math.ceil(l[1]/i),l[0]=Math.min(Math.max(l[0],1),u+(o?1:0)),l[1]=Math.min(Math.max(l[1],1),f),l}},a.getRawByteCoords=function(h){if(h)return{x:h[0]+32,y:h[1]+32}}},9504:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;var h=g(2584);function _(o,l,n,t){var e=o-u(n,o),r=l-u(n,l),s=Math.abs(e-r)-function(c,d,v){for(var b=0,S=c-u(v,c),y=d-u(v,d),m=0;m<Math.abs(S-y);m++){var A=f(c,d)==="A"?-1:1,w=v.buffer.lines.get(S+A*m);w&&w.isWrapped&&b++}return b}(o,l,n);return i(s,p(f(o,l),t))}function u(o,l){for(var n=0,t=o.buffer.lines.get(l),e=t&&t.isWrapped;e&&l>=0&&l<o.rows;)n++,e=(t=o.buffer.lines.get(--l))&&t.isWrapped;return n}function f(o,l){return o>l?"A":"B"}function C(o,l,n,t,e,r){for(var s=o,c=l,d="";s!==n||c!==t;)s+=e?1:-1,e&&s>r.cols-1?(d+=r.buffer.translateBufferLineToString(c,!1,o,s),s=0,o=0,c++):!e&&s<0&&(d+=r.buffer.translateBufferLineToString(c,!1,0,o+1),o=s=r.cols-1,c--);return d+r.buffer.translateBufferLineToString(c,!1,o,s)}function p(o,l){var n=l?"O":"[";return h.C0.ESC+n+o}function i(o,l){o=Math.floor(o);for(var n="",t=0;t<o;t++)n+=l;return n}a.moveToCellSequence=function(o,l,n,t){var e,r=n.buffer.x,s=n.buffer.y;if(!n.buffer.hasScrollback)return function(d,v,b,S,y,m){return _(v,S,y,m).length===0?"":i(C(d,v,d,v-u(y,v),!1,y).length,p("D",m))}(r,s,0,l,n,t)+_(s,l,n,t)+function(d,v,b,S,y,m){var A;A=_(v,S,y,m).length>0?S-u(y,S):v;var w=S,M=function(x,L,D,O,j,W){var F;return F=_(D,O,j,W).length>0?O-u(j,O):L,x<D&&F<=O||x>=D&&F<O?"C":"D"}(d,v,b,S,y,m);return i(C(d,A,b,w,M==="C",y).length,p(M,m))}(r,s,o,l,n,t);if(s===l)return e=r>o?"D":"C",i(Math.abs(r-o),p(e,t));e=s>l?"D":"C";var c=Math.abs(s-l);return i(function(d,v){return v.cols-d}(s>l?o:r,n)+(c-1)*n.cols+1+((s>l?r:o)-1),p(e,t))}},1546:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;var h=g(643),_=g(8803),u=g(1420),f=g(3734),C=g(1752),p=g(4774),i=g(9631),o=g(8978),l=function(){function n(t,e,r,s,c,d,v,b){this._container=t,this._alpha=s,this._colors=c,this._rendererId=d,this._bufferService=v,this._optionsService=b,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=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return n.prototype.dispose=function(){var t;(0,i.removeElementFromParent)(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},n.prototype._initCanvas=function(){this._ctx=(0,C.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},n.prototype.onOptionsChanged=function(){},n.prototype.onBlur=function(){},n.prototype.onFocus=function(){},n.prototype.onCursorMove=function(){},n.prototype.onGridChanged=function(t,e){},n.prototype.onSelectionChanged=function(t,e,r){r===void 0&&(r=!1)},n.prototype.setColors=function(t){this._refreshCharAtlas(t)},n.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)}},n.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,u.acquireCharAtlas)(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},n.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)},n.prototype.clearTextureAtlas=function(){var t;(t=this._charAtlas)===null||t===void 0||t.clear()},n.prototype._fillCells=function(t,e,r,s){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,r*this._scaledCellWidth,s*this._scaledCellHeight)},n.prototype._fillMiddleLineAtCells=function(t,e,r){r===void 0&&(r=1);var s=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-s-window.devicePixelRatio,r*this._scaledCellWidth,window.devicePixelRatio)},n.prototype._fillBottomLineAtCells=function(t,e,r){r===void 0&&(r=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,r*this._scaledCellWidth,window.devicePixelRatio)},n.prototype._fillLeftLineAtCell=function(t,e,r){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio*r,this._scaledCellHeight)},n.prototype._strokeRectAtCell=function(t,e,r,s){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,r*this._scaledCellWidth-window.devicePixelRatio,s*this._scaledCellHeight-window.devicePixelRatio)},n.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))},n.prototype._clearCells=function(t,e,r,s){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,r*this._scaledCellWidth,s*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,r*this._scaledCellWidth,s*this._scaledCellHeight))},n.prototype._fillCharTrueColor=function(t,e,r){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipRow(r);var s=!1;this._optionsService.options.customGlyphs!==!1&&(s=(0,o.tryDrawCustomChar)(this._ctx,t.getChars(),e*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),s||this._ctx.fillText(t.getChars(),e*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},n.prototype._drawChars=function(t,e,r){var s,c,d=this._getContrastColor(t);d||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,e,r,d):(t.isInverse()?(s=t.isBgDefault()?_.INVERTED_DEFAULT_COLOR:t.getBgColor(),c=t.isFgDefault()?_.INVERTED_DEFAULT_COLOR:t.getFgColor()):(c=t.isBgDefault()?h.DEFAULT_COLOR:t.getBgColor(),s=t.isFgDefault()?h.DEFAULT_COLOR:t.getFgColor()),s+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&s<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||h.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||h.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=c,this._currentGlyphIdentifier.fg=s,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,r*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,e,r))},n.prototype._drawUncachedChars=function(t,e,r,s){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline=_.TEXT_BASELINE,t.isInverse())if(s)this._ctx.fillStyle=s.css;else if(t.isBgDefault())this._ctx.fillStyle=p.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+f.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var c=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}else if(s)this._ctx.fillStyle=s.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+f.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var d=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&d<8&&(d+=8),this._ctx.fillStyle=this._colors.ansi[d].css}this._clipRow(r),t.isDim()&&(this._ctx.globalAlpha=_.DIM_OPACITY);var v=!1;this._optionsService.options.customGlyphs!==!1&&(v=(0,o.tryDrawCustomChar)(this._ctx,t.getChars(),e*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),v||this._ctx.fillText(t.getChars(),e*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},n.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},n.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},n.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var e=this._colors.contrastCache.getColor(t.bg,t.fg);if(e!==void 0)return e||void 0;var r=t.getFgColor(),s=t.getFgColorMode(),c=t.getBgColor(),d=t.getBgColorMode(),v=!!t.isInverse(),b=!!t.isInverse();if(v){var S=r;r=c,c=S;var y=s;s=d,d=y}var m=this._resolveBackgroundRgba(d,c,v),A=this._resolveForegroundRgba(s,r,v,b),w=p.rgba.ensureContrastRatio(m,A,this._optionsService.options.minimumContrastRatio);if(w){var M={css:p.channels.toCss(w>>24&255,w>>16&255,w>>8&255),rgba:w};return this._colors.contrastCache.setColor(t.bg,t.fg,M),M}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},n.prototype._resolveBackgroundRgba=function(t,e,r){switch(t){case 16777216:case 33554432:return this._colors.ansi[e].rgba;case 50331648:return e<<8;default:return r?this._colors.foreground.rgba:this._colors.background.rgba}},n.prototype._resolveForegroundRgba=function(t,e,r,s){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&s&&e<8&&(e+=8),this._colors.ansi[e].rgba;case 50331648:return e<<8;default:return r?this._colors.background.rgba:this._colors.foreground.rgba}},n}();a.BaseRenderLayer=l},2512:function(B,a,g){var h,_=this&&this.__extends||(h=function(e,r){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(s[d]=c[d])},h(e,r)},function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}h(e,r),e.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}),u=this&&this.__decorate||function(e,r,s,c){var d,v=arguments.length,b=v<3?r:c===null?c=Object.getOwnPropertyDescriptor(r,s):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(e,r,s,c);else for(var S=e.length-1;S>=0;S--)(d=e[S])&&(b=(v<3?d(b):v>3?d(r,s,b):d(r,s))||b);return v>3&&b&&Object.defineProperty(r,s,b),b},f=this&&this.__param||function(e,r){return function(s,c){r(s,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;var C=g(1546),p=g(511),i=g(2585),o=g(4725),l=600,n=function(e){function r(s,c,d,v,b,S,y,m,A){var w=e.call(this,s,"cursor",c,!0,d,v,S,y)||this;return w._onRequestRedraw=b,w._coreService=m,w._coreBrowserService=A,w._cell=new p.CellData,w._state={x:0,y:0,isFocused:!1,style:"",width:0},w._cursorRenderers={bar:w._renderBarCursor.bind(w),block:w._renderBlockCursor.bind(w),underline:w._renderUnderlineCursor.bind(w)},w}return _(r,e),r.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},r.prototype.resize=function(s){e.prototype.resize.call(this,s),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},r.prototype.reset=function(){var s;this._clearCursor(),(s=this._cursorBlinkStateManager)===null||s===void 0||s.restartBlinkAnimation(),this.onOptionsChanged()},r.prototype.onBlur=function(){var s;(s=this._cursorBlinkStateManager)===null||s===void 0||s.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},r.prototype.onFocus=function(){var s;(s=this._cursorBlinkStateManager)===null||s===void 0||s.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},r.prototype.onOptionsChanged=function(){var s,c=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new t(this._coreBrowserService.isFocused,function(){c._render(!0)})):((s=this._cursorBlinkStateManager)===null||s===void 0||s.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},r.prototype.onCursorMove=function(){var s;(s=this._cursorBlinkStateManager)===null||s===void 0||s.restartBlinkAnimation()},r.prototype.onGridChanged=function(s,c){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},r.prototype._render=function(s){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var c=this._bufferService.buffer.ybase+this._bufferService.buffer.y,d=c-this._bufferService.buffer.ydisp;if(d<0||d>=this._bufferService.rows)this._clearCursor();else{var v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(c).loadCell(v,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var b=this._optionsService.options.cursorStyle;return b&&b!=="block"?this._cursorRenderers[b](v,d,this._cell):this._renderBlurCursor(v,d,this._cell),this._ctx.restore(),this._state.x=v,this._state.y=d,this._state.isFocused=!1,this._state.style=b,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===v&&this._state.y===d&&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"](v,d,this._cell),this._ctx.restore(),this._state.x=v,this._state.y=d,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},r.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},r.prototype._renderBarCursor=function(s,c,d){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(s,c,this._optionsService.options.cursorWidth),this._ctx.restore()},r.prototype._renderBlockCursor=function(s,c,d){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(s,c,d.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(d,s,c),this._ctx.restore()},r.prototype._renderUnderlineCursor=function(s,c,d){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(s,c),this._ctx.restore()},r.prototype._renderBlurCursor=function(s,c,d){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(s,c,d.getWidth(),1),this._ctx.restore()},u([f(5,i.IBufferService),f(6,i.IOptionsService),f(7,i.ICoreService),f(8,o.ICoreBrowserService)],r)}(C.BaseRenderLayer);a.CursorRenderLayer=n;var t=function(){function e(r,s){this._renderCallback=s,this.isCursorVisible=!0,r&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.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)},e.prototype.restartBlinkAnimation=function(){var r=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){r._renderCallback(),r._animationFrame=void 0})))},e.prototype._restartInterval=function(r){var s=this;r===void 0&&(r=l),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(s._animationTimeRestarted){var c=l-(Date.now()-s._animationTimeRestarted);if(s._animationTimeRestarted=void 0,c>0)return void s._restartInterval(c)}s.isCursorVisible=!1,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0}),s._blinkInterval=window.setInterval(function(){if(s._animationTimeRestarted){var d=l-(Date.now()-s._animationTimeRestarted);return s._animationTimeRestarted=void 0,void s._restartInterval(d)}s.isCursorVisible=!s.isCursorVisible,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0})},l)},r)},e.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)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:(B,a,g)=>{var h,_,u,f,C,p,i,o,l,n,t,e,r,s,c,d,v,b,S,y,m,A,w,M,x,L,D,O,j,W,F,N,G,E,R,k,I,T,K,Z,Y,Q,re,q,J,ne,ee,oe,le,ve,he,me,kt,Ot,Tt,Dt,Pt,Bt,It,Ht,jt,Ft,De,Pe,Be,Ie,He,je,Fe,We,Ue,qe,Ne,ze,Ke,Ze,Ve,Ge,Xe,Ye,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,_t,dt,pt,vt,gt,yt,mt,Ct,St,bt,wt,Lt,Et,xt,Mt,At,Wt,Ut,qt,Nt,zt,Kt,Zt,Vt,Gt,Xt,Yt,Jt,$t,Qt,er,tr;Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;var nr=g(1752);a.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:9,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var ar={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"\u2500":(h={},h[1]="M0,.5 L1,.5",h),"\u2501":(_={},_[3]="M0,.5 L1,.5",_),"\u2502":(u={},u[1]="M.5,0 L.5,1",u),"\u2503":(f={},f[3]="M.5,0 L.5,1",f),"\u250C":(C={},C[1]="M0.5,1 L.5,.5 L1,.5",C),"\u250F":(p={},p[3]="M0.5,1 L.5,.5 L1,.5",p),"\u2510":(i={},i[1]="M0,.5 L.5,.5 L.5,1",i),"\u2513":(o={},o[3]="M0,.5 L.5,.5 L.5,1",o),"\u2514":(l={},l[1]="M.5,0 L.5,.5 L1,.5",l),"\u2517":(n={},n[3]="M.5,0 L.5,.5 L1,.5",n),"\u2518":(t={},t[1]="M.5,0 L.5,.5 L0,.5",t),"\u251B":(e={},e[3]="M.5,0 L.5,.5 L0,.5",e),"\u251C":(r={},r[1]="M.5,0 L.5,1 M.5,.5 L1,.5",r),"\u2523":(s={},s[3]="M.5,0 L.5,1 M.5,.5 L1,.5",s),"\u2524":(c={},c[1]="M.5,0 L.5,1 M.5,.5 L0,.5",c),"\u252B":(d={},d[3]="M.5,0 L.5,1 M.5,.5 L0,.5",d),"\u252C":(v={},v[1]="M0,.5 L1,.5 M.5,.5 L.5,1",v),"\u2533":(b={},b[3]="M0,.5 L1,.5 M.5,.5 L.5,1",b),"\u2534":(S={},S[1]="M0,.5 L1,.5 M.5,.5 L.5,0",S),"\u253B":(y={},y[3]="M0,.5 L1,.5 M.5,.5 L.5,0",y),"\u253C":(m={},m[1]="M0,.5 L1,.5 M.5,0 L.5,1",m),"\u254B":(A={},A[3]="M0,.5 L1,.5 M.5,0 L.5,1",A),"\u2574":(w={},w[1]="M.5,.5 L0,.5",w),"\u2578":(M={},M[3]="M.5,.5 L0,.5",M),"\u2575":(x={},x[1]="M.5,.5 L.5,0",x),"\u2579":(L={},L[3]="M.5,.5 L.5,0",L),"\u2576":(D={},D[1]="M.5,.5 L1,.5",D),"\u257A":(O={},O[3]="M.5,.5 L1,.5",O),"\u2577":(j={},j[1]="M.5,.5 L.5,1",j),"\u257B":(W={},W[3]="M.5,.5 L.5,1",W),"\u2550":(F={},F[1]=function(H,P){return"M0,"+(.5-P)+" L1,"+(.5-P)+" M0,"+(.5+P)+" L1,"+(.5+P)},F),"\u2551":(N={},N[1]=function(H,P){return"M"+(.5-H)+",0 L"+(.5-H)+",1 M"+(.5+H)+",0 L"+(.5+H)+",1"},N),"\u2552":(G={},G[1]=function(H,P){return"M.5,1 L.5,"+(.5-P)+" L1,"+(.5-P)+" M.5,"+(.5+P)+" L1,"+(.5+P)},G),"\u2553":(E={},E[1]=function(H,P){return"M"+(.5-H)+",1 L"+(.5-H)+",.5 L1,.5 M"+(.5+H)+",.5 L"+(.5+H)+",1"},E),"\u2554":(R={},R[1]=function(H,P){return"M1,"+(.5-P)+" L"+(.5-H)+","+(.5-P)+" L"+(.5-H)+",1 M1,"+(.5+P)+" L"+(.5+H)+","+(.5+P)+" L"+(.5+H)+",1"},R),"\u2555":(k={},k[1]=function(H,P){return"M0,"+(.5-P)+" L.5,"+(.5-P)+" L.5,1 M0,"+(.5+P)+" L.5,"+(.5+P)},k),"\u2556":(I={},I[1]=function(H,P){return"M"+(.5+H)+",1 L"+(.5+H)+",.5 L0,.5 M"+(.5-H)+",.5 L"+(.5-H)+",1"},I),"\u2557":(T={},T[1]=function(H,P){return"M0,"+(.5+P)+" L"+(.5-H)+","+(.5+P)+" L"+(.5-H)+",1 M0,"+(.5-P)+" L"+(.5+H)+","+(.5-P)+" L"+(.5+H)+",1"},T),"\u2558":(K={},K[1]=function(H,P){return"M.5,0 L.5,"+(.5+P)+" L1,"+(.5+P)+" M.5,"+(.5-P)+" L1,"+(.5-P)},K),"\u2559":(Z={},Z[1]=function(H,P){return"M1,.5 L"+(.5-H)+",.5 L"+(.5-H)+",0 M"+(.5+H)+",.5 L"+(.5+H)+",0"},Z),"\u255A":(Y={},Y[1]=function(H,P){return"M1,"+(.5-P)+" L"+(.5+H)+","+(.5-P)+" L"+(.5+H)+",0 M1,"+(.5+P)+" L"+(.5-H)+","+(.5+P)+" L"+(.5-H)+",0"},Y),"\u255B":(Q={},Q[1]=function(H,P){return"M0,"+(.5+P)+" L.5,"+(.5+P)+" L.5,0 M0,"+(.5-P)+" L.5,"+(.5-P)},Q),"\u255C":(re={},re[1]=function(H,P){return"M0,.5 L"+(.5+H)+",.5 L"+(.5+H)+",0 M"+(.5-H)+",.5 L"+(.5-H)+",0"},re),"\u255D":(q={},q[1]=function(H,P){return"M0,"+(.5-P)+" L"+(.5-H)+","+(.5-P)+" L"+(.5-H)+",0 M0,"+(.5+P)+" L"+(.5+H)+","+(.5+P)+" L"+(.5+H)+",0"},q),"\u255E":(J={},J[1]=function(H,P){return"M.5,0 L.5,1 M.5,"+(.5-P)+" L1,"+(.5-P)+" M.5,"+(.5+P)+" L1,"+(.5+P)},J),"\u255F":(ne={},ne[1]=function(H,P){return"M"+(.5-H)+",0 L"+(.5-H)+",1 M"+(.5+H)+",0 L"+(.5+H)+",1 M"+(.5+H)+",.5 L1,.5"},ne),"\u2560":(ee={},ee[1]=function(H,P){return"M"+(.5-H)+",0 L"+(.5-H)+",1 M1,"+(.5+P)+" L"+(.5+H)+","+(.5+P)+" L"+(.5+H)+",1 M1,"+(.5-P)+" L"+(.5+H)+","+(.5-P)+" L"+(.5+H)+",0"},ee),"\u2561":(oe={},oe[1]=function(H,P){return"M.5,0 L.5,1 M0,"+(.5-P)+" L.5,"+(.5-P)+" M0,"+(.5+P)+" L.5,"+(.5+P)},oe),"\u2562":(le={},le[1]=function(H,P){return"M0,.5 L"+(.5-H)+",.5 M"+(.5-H)+",0 L"+(.5-H)+",1 M"+(.5+H)+",0 L"+(.5+H)+",1"},le),"\u2563":(ve={},ve[1]=function(H,P){return"M"+(.5+H)+",0 L"+(.5+H)+",1 M0,"+(.5+P)+" L"+(.5-H)+","+(.5+P)+" L"+(.5-H)+",1 M0,"+(.5-P)+" L"+(.5-H)+","+(.5-P)+" L"+(.5-H)+",0"},ve),"\u2564":(he={},he[1]=function(H,P){return"M0,"+(.5-P)+" L1,"+(.5-P)+" M0,"+(.5+P)+" L1,"+(.5+P)+" M.5,"+(.5+P)+" L.5,1"},he),"\u2565":(me={},me[1]=function(H,P){return"M0,.5 L1,.5 M"+(.5-H)+",.5 L"+(.5-H)+",1 M"+(.5+H)+",.5 L"+(.5+H)+",1"},me),"\u2566":(kt={},kt[1]=function(H,P){return"M0,"+(.5-P)+" L1,"+(.5-P)+" M0,"+(.5+P)+" L"+(.5-H)+","+(.5+P)+" L"+(.5-H)+",1 M1,"+(.5+P)+" L"+(.5+H)+","+(.5+P)+" L"+(.5+H)+",1"},kt),"\u2567":(Ot={},Ot[1]=function(H,P){return"M.5,0 L.5,"+(.5-P)+" M0,"+(.5-P)+" L1,"+(.5-P)+" M0,"+(.5+P)+" L1,"+(.5+P)},Ot),"\u2568":(Tt={},Tt[1]=function(H,P){return"M0,.5 L1,.5 M"+(.5-H)+",.5 L"+(.5-H)+",0 M"+(.5+H)+",.5 L"+(.5+H)+",0"},Tt),"\u2569":(Dt={},Dt[1]=function(H,P){return"M0,"+(.5+P)+" L1,"+(.5+P)+" M0,"+(.5-P)+" L"+(.5-H)+","+(.5-P)+" L"+(.5-H)+",0 M1,"+(.5-P)+" L"+(.5+H)+","+(.5-P)+" L"+(.5+H)+",0"},Dt),"\u256A":(Pt={},Pt[1]=function(H,P){return"M.5,0 L.5,1 M0,"+(.5-P)+" L1,"+(.5-P)+" M0,"+(.5+P)+" L1,"+(.5+P)},Pt),"\u256B":(Bt={},Bt[1]=function(H,P){return"M0,.5 L1,.5 M"+(.5-H)+",0 L"+(.5-H)+",1 M"+(.5+H)+",0 L"+(.5+H)+",1"},Bt),"\u256C":(It={},It[1]=function(H,P){return"M0,"+(.5+P)+" L"+(.5-H)+","+(.5+P)+" L"+(.5-H)+",1 M1,"+(.5+P)+" L"+(.5+H)+","+(.5+P)+" L"+(.5+H)+",1 M0,"+(.5-P)+" L"+(.5-H)+","+(.5-P)+" L"+(.5-H)+",0 M1,"+(.5-P)+" L"+(.5+H)+","+(.5-P)+" L"+(.5+H)+",0"},It),"\u2571":(Ht={},Ht[1]="M1,0 L0,1",Ht),"\u2572":(jt={},jt[1]="M0,0 L1,1",jt),"\u2573":(Ft={},Ft[1]="M1,0 L0,1 M0,0 L1,1",Ft),"\u257C":(De={},De[1]="M.5,.5 L0,.5",De[3]="M.5,.5 L1,.5",De),"\u257D":(Pe={},Pe[1]="M.5,.5 L.5,0",Pe[3]="M.5,.5 L.5,1",Pe),"\u257E":(Be={},Be[1]="M.5,.5 L1,.5",Be[3]="M.5,.5 L0,.5",Be),"\u257F":(Ie={},Ie[1]="M.5,.5 L.5,1",Ie[3]="M.5,.5 L.5,0",Ie),"\u250D":(He={},He[1]="M.5,.5 L.5,1",He[3]="M.5,.5 L1,.5",He),"\u250E":(je={},je[1]="M.5,.5 L1,.5",je[3]="M.5,.5 L.5,1",je),"\u2511":(Fe={},Fe[1]="M.5,.5 L.5,1",Fe[3]="M.5,.5 L0,.5",Fe),"\u2512":(We={},We[1]="M.5,.5 L0,.5",We[3]="M.5,.5 L.5,1",We),"\u2515":(Ue={},Ue[1]="M.5,.5 L.5,0",Ue[3]="M.5,.5 L1,.5",Ue),"\u2516":(qe={},qe[1]="M.5,.5 L1,.5",qe[3]="M.5,.5 L.5,0",qe),"\u2519":(Ne={},Ne[1]="M.5,.5 L.5,0",Ne[3]="M.5,.5 L0,.5",Ne),"\u251A":(ze={},ze[1]="M.5,.5 L0,.5",ze[3]="M.5,.5 L.5,0",ze),"\u251D":(Ke={},Ke[1]="M.5,0 L.5,1",Ke[3]="M.5,.5 L1,.5",Ke),"\u251E":(Ze={},Ze[1]="M0.5,1 L.5,.5 L1,.5",Ze[3]="M.5,.5 L.5,0",Ze),"\u251F":(Ve={},Ve[1]="M.5,0 L.5,.5 L1,.5",Ve[3]="M.5,.5 L.5,1",Ve),"\u2520":(Ge={},Ge[1]="M.5,.5 L1,.5",Ge[3]="M.5,0 L.5,1",Ge),"\u2521":(Xe={},Xe[1]="M.5,.5 L.5,1",Xe[3]="M.5,0 L.5,.5 L1,.5",Xe),"\u2522":(Ye={},Ye[1]="M.5,.5 L.5,0",Ye[3]="M0.5,1 L.5,.5 L1,.5",Ye),"\u2525":(Je={},Je[1]="M.5,0 L.5,1",Je[3]="M.5,.5 L0,.5",Je),"\u2526":($e={},$e[1]="M0,.5 L.5,.5 L.5,1",$e[3]="M.5,.5 L.5,0",$e),"\u2527":(Qe={},Qe[1]="M.5,0 L.5,.5 L0,.5",Qe[3]="M.5,.5 L.5,1",Qe),"\u2528":(et={},et[1]="M.5,.5 L0,.5",et[3]="M.5,0 L.5,1",et),"\u2529":(tt={},tt[1]="M.5,.5 L.5,1",tt[3]="M.5,0 L.5,.5 L0,.5",tt),"\u252A":(rt={},rt[1]="M.5,.5 L.5,0",rt[3]="M0,.5 L.5,.5 L.5,1",rt),"\u252D":(it={},it[1]="M0.5,1 L.5,.5 L1,.5",it[3]="M.5,.5 L0,.5",it),"\u252E":(nt={},nt[1]="M0,.5 L.5,.5 L.5,1",nt[3]="M.5,.5 L1,.5",nt),"\u252F":(ot={},ot[1]="M.5,.5 L.5,1",ot[3]="M0,.5 L1,.5",ot),"\u2530":(st={},st[1]="M0,.5 L1,.5",st[3]="M.5,.5 L.5,1",st),"\u2531":(at={},at[1]="M.5,.5 L1,.5",at[3]="M0,.5 L.5,.5 L.5,1",at),"\u2532":(ct={},ct[1]="M.5,.5 L0,.5",ct[3]="M0.5,1 L.5,.5 L1,.5",ct),"\u2535":(lt={},lt[1]="M.5,0 L.5,.5 L1,.5",lt[3]="M.5,.5 L0,.5",lt),"\u2536":(ht={},ht[1]="M.5,0 L.5,.5 L0,.5",ht[3]="M.5,.5 L1,.5",ht),"\u2537":(ut={},ut[1]="M.5,.5 L.5,0",ut[3]="M0,.5 L1,.5",ut),"\u2538":(ft={},ft[1]="M0,.5 L1,.5",ft[3]="M.5,.5 L.5,0",ft),"\u2539":(_t={},_t[1]="M.5,.5 L1,.5",_t[3]="M.5,0 L.5,.5 L0,.5",_t),"\u253A":(dt={},dt[1]="M.5,.5 L0,.5",dt[3]="M.5,0 L.5,.5 L1,.5",dt),"\u253D":(pt={},pt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",pt[3]="M.5,.5 L0,.5",pt),"\u253E":(vt={},vt[1]="M.5,0 L.5,1 M.5,.5 L0,.5",vt[3]="M.5,.5 L1,.5",vt),"\u253F":(gt={},gt[1]="M.5,0 L.5,1",gt[3]="M0,.5 L1,.5",gt),"\u2540":(yt={},yt[1]="M0,.5 L1,.5 M.5,.5 L.5,1",yt[3]="M.5,.5 L.5,0",yt),"\u2541":(mt={},mt[1]="M.5,.5 L.5,0 M0,.5 L1,.5",mt[3]="M.5,.5 L.5,1",mt),"\u2542":(Ct={},Ct[1]="M0,.5 L1,.5",Ct[3]="M.5,0 L.5,1",Ct),"\u2543":(St={},St[1]="M0.5,1 L.5,.5 L1,.5",St[3]="M.5,0 L.5,.5 L0,.5",St),"\u2544":(bt={},bt[1]="M0,.5 L.5,.5 L.5,1",bt[3]="M.5,0 L.5,.5 L1,.5",bt),"\u2545":(wt={},wt[1]="M.5,0 L.5,.5 L1,.5",wt[3]="M0,.5 L.5,.5 L.5,1",wt),"\u2546":(Lt={},Lt[1]="M.5,0 L.5,.5 L0,.5",Lt[3]="M0.5,1 L.5,.5 L1,.5",Lt),"\u2547":(Et={},Et[1]="M.5,.5 L.5,1",Et[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Et),"\u2548":(xt={},xt[1]="M.5,.5 L.5,0",xt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",xt),"\u2549":(Mt={},Mt[1]="M.5,.5 L1,.5",Mt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Mt),"\u254A":(At={},At[1]="M.5,.5 L0,.5",At[3]="M.5,0 L.5,1 M.5,.5 L1,.5",At),"\u254C":(Wt={},Wt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Wt),"\u254D":(Ut={},Ut[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Ut),"\u2504":(qt={},qt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",qt),"\u2505":(Nt={},Nt[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Nt),"\u2508":(zt={},zt[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",zt),"\u2509":(Kt={},Kt[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",Kt),"\u254E":(Zt={},Zt[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Zt),"\u254F":(Vt={},Vt[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Vt),"\u2506":(Gt={},Gt[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Gt),"\u2507":(Xt={},Xt[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Xt),"\u250A":(Yt={},Yt[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Yt),"\u250B":(Jt={},Jt[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Jt),"\u256D":($t={},$t[1]="C.5,1,.5,.5,1,.5",$t),"\u256E":(Qt={},Qt[1]="C.5,1,.5,.5,0,.5",Qt),"\u256F":(er={},er[1]="C.5,0,.5,.5,0,.5",er),"\u2570":(tr={},tr[1]="C.5,0,.5,.5,1,.5",tr)},a.tryDrawCustomChar=function(H,P,fe,Ae,Re,ie){var _e=a.blockElementDefinitions[P];if(_e)return function(se,pe,Oe,Te,Ee,xe){for(var ce=0;ce<pe.length;ce++){var ae=pe[ce],$=Ee/8,ge=xe/8;se.fillRect(Oe+ae.x*$,Te+ae.y*ge,ae.w*$,ae.h*ge)}}(H,_e,fe,Ae,Re,ie),!0;var de=ar[P];if(de)return function(se,pe,Oe,Te,Ee,xe){var ce,ae=or.get(pe);ae||(ae=new Map,or.set(pe,ae));var $=se.fillStyle;if(typeof $!="string")throw new Error('Unexpected fillStyle type "'+$+'"');var ge=ae.get($);if(!ge){var ue=pe[0].length,Ce=pe.length,Se=document.createElement("canvas");Se.width=ue,Se.height=Ce;var Rt=(0,nr.throwIfFalsy)(Se.getContext("2d")),ye=new ImageData(ue,Ce),Me=void 0,be=void 0,rr=void 0,ir=void 0;if($.startsWith("#"))Me=parseInt($.substr(1,2),16),be=parseInt($.substr(3,2),16),rr=parseInt($.substr(5,2),16),ir=$.length>7&&parseInt($.substr(7,2),16)||1;else{if(!$.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+$+'" when drawing pattern glyph');Me=(ce=$.substring(5,$.length-1).split(",").map(function(hr){return parseFloat(hr)}))[0],be=ce[1],rr=ce[2],ir=ce[3]}for(var we=0;we<Ce;we++)for(var Le=0;Le<ue;Le++)ye.data[4*(we*ue+Le)]=Me,ye.data[4*(we*ue+Le)+1]=be,ye.data[4*(we*ue+Le)+2]=rr,ye.data[4*(we*ue+Le)+3]=pe[we][Le]*(255*ir);Rt.putImageData(ye,0,0),ge=(0,nr.throwIfFalsy)(se.createPattern(Se,null)),ae.set($,ge)}se.fillStyle=ge,se.fillRect(Oe,Te,Ee,xe)}(H,de,fe,Ae,Re,ie),!0;var ke=a.boxDrawingDefinitions[P];return!!ke&&(function(se,pe,Oe,Te,Ee,xe){se.strokeStyle=se.fillStyle;for(var ce=0,ae=Object.entries(pe);ce<ae.length;ce++){var $=ae[ce],ge=$[0],ue=$[1];se.beginPath(),se.lineWidth=window.devicePixelRatio*Number.parseInt(ge);for(var Ce=0,Se=(typeof ue=="function"?ue(.15,.15/xe*Ee):ue).split(" ");Ce<Se.length;Ce++){var Rt=Se[Ce],ye=Rt[0],Me=cr[ye];if(Me){var be=Rt.substring(1).split(",");be[0]&&be[1]&&Me(se,lr(be,Ee,xe,Oe,Te))}else console.error('Could not find drawing instructions for "'+ye+'"')}se.stroke(),se.closePath()}}(H,ke,fe,Ae,Re,ie),!0)};var or=new Map;function sr(H,P,fe){return fe===void 0&&(fe=0),Math.max(Math.min(H,P),fe)}var cr={C:function(H,P){return H.bezierCurveTo(P[0],P[1],P[2],P[3],P[4],P[5])},L:function(H,P){return H.lineTo(P[0],P[1])},M:function(H,P){return H.moveTo(P[0],P[1])}};function lr(H,P,fe,Ae,Re){var ie=H.map(function(ke){return parseFloat(ke)||parseInt(ke)});if(ie.length<2)throw new Error("Too few arguments for instruction");for(var _e=0;_e<ie.length;_e+=2)ie[_e]*=P,ie[_e]!==0&&(ie[_e]=sr(Math.round(ie[_e]+.5)-.5,P,0)),ie[_e]+=Ae;for(var de=1;de<ie.length;de+=2)ie[de]*=fe,ie[de]!==0&&(ie[de]=sr(Math.round(ie[de]+.5)-.5,fe,0)),ie[de]+=Re;return ie}},3700:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GridCache=void 0;var g=function(){function h(){this.cache=[]}return h.prototype.resize=function(_,u){for(var f=0;f<_;f++){this.cache.length<=f&&this.cache.push([]);for(var C=this.cache[f].length;C<u;C++)this.cache[f].push(void 0);this.cache[f].length=u}this.cache.length=_},h.prototype.clear=function(){for(var _=0;_<this.cache.length;_++)for(var u=0;u<this.cache[_].length;u++)this.cache[_][u]=void 0},h}();a.GridCache=g},5098:function(B,a,g){var h,_=this&&this.__extends||(h=function(n,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},h(n,t)},function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}h(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),u=this&&this.__decorate||function(n,t,e,r){var s,c=arguments.length,d=c<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,t,e,r);else for(var v=n.length-1;v>=0;v--)(s=n[v])&&(d=(c<3?s(d):c>3?s(t,e,d):s(t,e))||d);return c>3&&d&&Object.defineProperty(t,e,d),d},f=this&&this.__param||function(n,t){return function(e,r){t(e,r,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;var C=g(1546),p=g(8803),i=g(2040),o=g(2585),l=function(n){function t(e,r,s,c,d,v,b,S){var y=n.call(this,e,"link",r,!0,s,c,b,S)||this;return d.onShowLinkUnderline(function(m){return y._onShowLinkUnderline(m)}),d.onHideLinkUnderline(function(m){return y._onHideLinkUnderline(m)}),v.onShowLinkUnderline(function(m){return y._onShowLinkUnderline(m)}),v.onHideLinkUnderline(function(m){return y._onHideLinkUnderline(m)}),y}return _(t,n),t.prototype.resize=function(e){n.prototype.resize.call(this,e),this._state=void 0},t.prototype.reset=function(){this._clearCurrentLink()},t.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},t.prototype._onShowLinkUnderline=function(e){if(e.fg===p.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,i.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var r=e.y1+1;r<e.y2;r++)this._fillBottomLineAtCells(0,r,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},t.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},u([f(6,o.IBufferService),f(7,o.IOptionsService)],t)}(C.BaseRenderLayer);a.LinkRenderLayer=l},3525:function(B,a,g){var h,_=this&&this.__extends||(h=function(d,v){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var y in S)Object.prototype.hasOwnProperty.call(S,y)&&(b[y]=S[y])},h(d,v)},function(d,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function b(){this.constructor=d}h(d,v),d.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}),u=this&&this.__decorate||function(d,v,b,S){var y,m=arguments.length,A=m<3?v:S===null?S=Object.getOwnPropertyDescriptor(v,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(d,v,b,S);else for(var w=d.length-1;w>=0;w--)(y=d[w])&&(A=(m<3?y(A):m>3?y(v,b,A):y(v,b))||A);return m>3&&A&&Object.defineProperty(v,b,A),A},f=this&&this.__param||function(d,v){return function(b,S){v(b,S,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Renderer=void 0;var C=g(9596),p=g(4149),i=g(2512),o=g(5098),l=g(844),n=g(4725),t=g(2585),e=g(1420),r=g(8460),s=1,c=function(d){function v(b,S,y,m,A,w,M,x){var L=d.call(this)||this;L._colors=b,L._screenElement=S,L._bufferService=w,L._charSizeService=M,L._optionsService=x,L._id=s++,L._onRequestRedraw=new r.EventEmitter;var D=L._optionsService.options.allowTransparency;return L._renderLayers=[A.createInstance(C.TextRenderLayer,L._screenElement,0,L._colors,D,L._id),A.createInstance(p.SelectionRenderLayer,L._screenElement,1,L._colors,L._id),A.createInstance(o.LinkRenderLayer,L._screenElement,2,L._colors,L._id,y,m),A.createInstance(i.CursorRenderLayer,L._screenElement,3,L._colors,L._id,L._onRequestRedraw)],L.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},L._devicePixelRatio=window.devicePixelRatio,L._updateDimensions(),L.onOptionsChanged(),L}return _(v,d),Object.defineProperty(v.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){for(var b=0,S=this._renderLayers;b<S.length;b++)S[b].dispose();d.prototype.dispose.call(this),(0,e.removeTerminalFromCache)(this._id)},v.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},v.prototype.setColors=function(b){this._colors=b;for(var S=0,y=this._renderLayers;S<y.length;S++){var m=y[S];m.setColors(this._colors),m.reset()}},v.prototype.onResize=function(b,S){this._updateDimensions();for(var y=0,m=this._renderLayers;y<m.length;y++)m[y].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},v.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},v.prototype.onBlur=function(){this._runOperation(function(b){return b.onBlur()})},v.prototype.onFocus=function(){this._runOperation(function(b){return b.onFocus()})},v.prototype.onSelectionChanged=function(b,S,y){y===void 0&&(y=!1),this._runOperation(function(m){return m.onSelectionChanged(b,S,y)})},v.prototype.onCursorMove=function(){this._runOperation(function(b){return b.onCursorMove()})},v.prototype.onOptionsChanged=function(){this._runOperation(function(b){return b.onOptionsChanged()})},v.prototype.clear=function(){this._runOperation(function(b){return b.reset()})},v.prototype._runOperation=function(b){for(var S=0,y=this._renderLayers;S<y.length;S++)b(y[S])},v.prototype.renderRows=function(b,S){for(var y=0,m=this._renderLayers;y<m.length;y++)m[y].onGridChanged(b,S)},v.prototype.clearTextureAtlas=function(){for(var b=0,S=this._renderLayers;b<S.length;b++)S[b].clearTextureAtlas()},v.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},u([f(4,t.IInstantiationService),f(5,t.IBufferService),f(6,n.ICharSizeService),f(7,t.IOptionsService)],v)}(l.Disposable);a.Renderer=c},1752:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.throwIfFalsy=void 0,a.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g}},4149:function(B,a,g){var h,_=this&&this.__extends||(h=function(o,l){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])},h(o,l)},function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function n(){this.constructor=o}h(o,l),o.prototype=l===null?Object.create(l):(n.prototype=l.prototype,new n)}),u=this&&this.__decorate||function(o,l,n,t){var e,r=arguments.length,s=r<3?l:t===null?t=Object.getOwnPropertyDescriptor(l,n):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,l,n,t);else for(var c=o.length-1;c>=0;c--)(e=o[c])&&(s=(r<3?e(s):r>3?e(l,n,s):e(l,n))||s);return r>3&&s&&Object.defineProperty(l,n,s),s},f=this&&this.__param||function(o,l){return function(n,t){l(n,t,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;var C=g(1546),p=g(2585),i=function(o){function l(n,t,e,r,s,c){var d=o.call(this,n,"selection",t,!0,e,r,s,c)||this;return d._clearState(),d}return _(l,o),l.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},l.prototype.resize=function(n){o.prototype.resize.call(this,n),this._clearState()},l.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},l.prototype.onSelectionChanged=function(n,t,e){if(this._didStateChange(n,t,e,this._bufferService.buffer.ydisp))if(this._clearAll(),n&&t){var r=n[1]-this._bufferService.buffer.ydisp,s=t[1]-this._bufferService.buffer.ydisp,c=Math.max(r,0),d=Math.min(s,this._bufferService.rows-1);if(c>=this._bufferService.rows||d<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var v=n[0],b=t[0]-v,S=d-c+1;this._fillCells(v,c,b,S)}else{v=r===c?n[0]:0;var y=c===s?t[0]:this._bufferService.cols;this._fillCells(v,c,y-v,1);var m=Math.max(d-c-1,0);if(this._fillCells(0,c+1,this._bufferService.cols,m),c!==d){var A=s===d?t[0]:this._bufferService.cols;this._fillCells(0,d,A,1)}}this._state.start=[n[0],n[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},l.prototype._didStateChange=function(n,t,e,r){return!this._areCoordinatesEqual(n,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||e!==this._state.columnSelectMode||r!==this._state.ydisp},l.prototype._areCoordinatesEqual=function(n,t){return!(!n||!t)&&n[0]===t[0]&&n[1]===t[1]},u([f(4,p.IBufferService),f(5,p.IOptionsService)],l)}(C.BaseRenderLayer);a.SelectionRenderLayer=i},9596:function(B,a,g){var h,_=this&&this.__extends||(h=function(s,c){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,v){d.__proto__=v}||function(d,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])},h(s,c)},function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function d(){this.constructor=s}h(s,c),s.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}),u=this&&this.__decorate||function(s,c,d,v){var b,S=arguments.length,y=S<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,d):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,c,d,v);else for(var m=s.length-1;m>=0;m--)(b=s[m])&&(y=(S<3?b(y):S>3?b(c,d,y):b(c,d))||y);return S>3&&y&&Object.defineProperty(c,d,y),y},f=this&&this.__param||function(s,c){return function(d,v){c(d,v,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;var C=g(3700),p=g(1546),i=g(3734),o=g(643),l=g(511),n=g(2585),t=g(4725),e=g(4269),r=function(s){function c(d,v,b,S,y,m,A,w){var M=s.call(this,d,"text",v,S,b,y,m,A)||this;return M._characterJoinerService=w,M._characterWidth=0,M._characterFont="",M._characterOverlapCache={},M._workCell=new l.CellData,M._state=new C.GridCache,M}return _(c,s),c.prototype.resize=function(d){s.prototype.resize.call(this,d);var v=this._getFont(!1,!1);this._characterWidth===d.scaledCharWidth&&this._characterFont===v||(this._characterWidth=d.scaledCharWidth,this._characterFont=v,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},c.prototype.reset=function(){this._state.clear(),this._clearAll()},c.prototype._forEachCell=function(d,v,b){for(var S=d;S<=v;S++)for(var y=S+this._bufferService.buffer.ydisp,m=this._bufferService.buffer.lines.get(y),A=this._characterJoinerService.getJoinedCharacters(y),w=0;w<this._bufferService.cols;w++){m.loadCell(w,this._workCell);var M=this._workCell,x=!1,L=w;if(M.getWidth()!==0){if(A.length>0&&w===A[0][0]){x=!0;var D=A.shift();M=new e.JoinedCellData(this._workCell,m.translateToString(!0,D[0],D[1]),D[1]-D[0]),L=D[1]-1}!x&&this._isOverlapping(M)&&L<m.length-1&&m.getCodePoint(L+1)===o.NULL_CELL_CODE&&(M.content&=-12582913,M.content|=2<<22),b(M,w,S),w=L}}},c.prototype._drawBackground=function(d,v){var b=this,S=this._ctx,y=this._bufferService.cols,m=0,A=0,w=null;S.save(),this._forEachCell(d,v,function(M,x,L){var D=null;M.isInverse()?D=M.isFgDefault()?b._colors.foreground.css:M.isFgRGB()?"rgb("+i.AttributeData.toColorRGB(M.getFgColor()).join(",")+")":b._colors.ansi[M.getFgColor()].css:M.isBgRGB()?D="rgb("+i.AttributeData.toColorRGB(M.getBgColor()).join(",")+")":M.isBgPalette()&&(D=b._colors.ansi[M.getBgColor()].css),w===null&&(m=x,A=L),L!==A?(S.fillStyle=w||"",b._fillCells(m,A,y-m,1),m=x,A=L):w!==D&&(S.fillStyle=w||"",b._fillCells(m,A,x-m,1),m=x,A=L),w=D}),w!==null&&(S.fillStyle=w,this._fillCells(m,A,y-m,1)),S.restore()},c.prototype._drawForeground=function(d,v){var b=this;this._forEachCell(d,v,function(S,y,m){if(!S.isInvisible()&&(b._drawChars(S,y,m),S.isUnderline()||S.isStrikethrough())){if(b._ctx.save(),S.isInverse())if(S.isBgDefault())b._ctx.fillStyle=b._colors.background.css;else if(S.isBgRGB())b._ctx.fillStyle="rgb("+i.AttributeData.toColorRGB(S.getBgColor()).join(",")+")";else{var A=S.getBgColor();b._optionsService.options.drawBoldTextInBrightColors&&S.isBold()&&A<8&&(A+=8),b._ctx.fillStyle=b._colors.ansi[A].css}else if(S.isFgDefault())b._ctx.fillStyle=b._colors.foreground.css;else if(S.isFgRGB())b._ctx.fillStyle="rgb("+i.AttributeData.toColorRGB(S.getFgColor()).join(",")+")";else{var w=S.getFgColor();b._optionsService.options.drawBoldTextInBrightColors&&S.isBold()&&w<8&&(w+=8),b._ctx.fillStyle=b._colors.ansi[w].css}S.isStrikethrough()&&b._fillMiddleLineAtCells(y,m,S.getWidth()),S.isUnderline()&&b._fillBottomLineAtCells(y,m,S.getWidth()),b._ctx.restore()}})},c.prototype.onGridChanged=function(d,v){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,d,this._bufferService.cols,v-d+1),this._drawBackground(d,v),this._drawForeground(d,v))},c.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},c.prototype._isOverlapping=function(d){if(d.getWidth()!==1||d.getCode()<256)return!1;var v=d.getChars();if(this._characterOverlapCache.hasOwnProperty(v))return this._characterOverlapCache[v];this._ctx.save(),this._ctx.font=this._characterFont;var b=Math.floor(this._ctx.measureText(v).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[v]=b,b},u([f(5,n.IBufferService),f(6,n.IOptionsService),f(7,t.ICharacterJoinerService)],c)}(p.BaseRenderLayer);a.TextRenderLayer=r},9616:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseCharAtlas=void 0;var g=function(){function h(){this._didWarmUp=!1}return h.prototype.dispose=function(){},h.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},h.prototype._doWarmUp=function(){},h.prototype.clear=function(){},h.prototype.beginFrame=function(){},h}();a.BaseCharAtlas=g},1420:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireCharAtlas=void 0;var h=g(2040),_=g(1906),u=[];a.acquireCharAtlas=function(f,C,p,i,o){for(var l=(0,h.generateConfig)(i,o,f,p),n=0;n<u.length;n++){var t=(e=u[n]).ownedBy.indexOf(C);if(t>=0){if((0,h.configEquals)(e.config,l))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),u.splice(n,1)):e.ownedBy.splice(t,1);break}}for(n=0;n<u.length;n++){var e=u[n];if((0,h.configEquals)(e.config,l))return e.ownedBy.push(C),e.atlas}var r={atlas:new _.DynamicCharAtlas(document,l),config:l,ownedBy:[C]};return u.push(r),r.atlas},a.removeTerminalFromCache=function(f){for(var C=0;C<u.length;C++){var p=u[C].ownedBy.indexOf(f);if(p!==-1){u[C].ownedBy.length===1?(u[C].atlas.dispose(),u.splice(C,1)):u[C].ownedBy.splice(p,1);break}}}},2040:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;var h=g(643);a.generateConfig=function(_,u,f,C){var p={foreground:C.foreground,background:C.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:C.ansi};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:_,scaledCharHeight:u,fontFamily:f.fontFamily,fontSize:f.fontSize,fontWeight:f.fontWeight,fontWeightBold:f.fontWeightBold,allowTransparency:f.allowTransparency,colors:p}},a.configEquals=function(_,u){for(var f=0;f<_.colors.ansi.length;f++)if(_.colors.ansi[f].rgba!==u.colors.ansi[f].rgba)return!1;return _.devicePixelRatio===u.devicePixelRatio&&_.fontFamily===u.fontFamily&&_.fontSize===u.fontSize&&_.fontWeight===u.fontWeight&&_.fontWeightBold===u.fontWeightBold&&_.allowTransparency===u.allowTransparency&&_.scaledCharWidth===u.scaledCharWidth&&_.scaledCharHeight===u.scaledCharHeight&&_.colors.foreground===u.colors.foreground&&_.colors.background===u.colors.background},a.is256Color=function(_){return _<h.DEFAULT_COLOR}},8803:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CHAR_ATLAS_CELL_SPACING=a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;var h=g(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox?"bottom":"ideographic",a.CHAR_ATLAS_CELL_SPACING=1},1906:function(B,a,g){var h,_=this&&this.__extends||(h=function(v,b){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,y){S.__proto__=y}||function(S,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(S[m]=y[m])},h(v,b)},function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function S(){this.constructor=v}h(v,b),v.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)});Object.defineProperty(a,"__esModule",{value:!0}),a.NoneCharAtlas=a.DynamicCharAtlas=a.getGlyphCacheKey=void 0;var u=g(8803),f=g(9616),C=g(5680),p=g(7001),i=g(6114),o=g(1752),l=g(4774),n=1024,t=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function r(v){return v.code<<21|v.bg<<12|v.fg<<3|(v.bold?0:4)+(v.dim?0:2)+(v.italic?0:1)}a.getGlyphCacheKey=r;var s=function(v){function b(S,y){var m=v.call(this)||this;m._config=y,m._drawToCacheCount=0,m._glyphsWaitingOnBitmap=[],m._bitmapCommitTimeout=null,m._bitmap=null,m._cacheCanvas=S.createElement("canvas"),m._cacheCanvas.width=n,m._cacheCanvas.height=t,m._cacheCtx=(0,o.throwIfFalsy)(m._cacheCanvas.getContext("2d",{alpha:!0}));var A=S.createElement("canvas");A.width=m._config.scaledCharWidth,A.height=m._config.scaledCharHeight,m._tmpCtx=(0,o.throwIfFalsy)(A.getContext("2d",{alpha:m._config.allowTransparency})),m._width=Math.floor(n/m._config.scaledCharWidth),m._height=Math.floor(t/m._config.scaledCharHeight);var w=m._width*m._height;return m._cacheMap=new p.LRUMap(w),m._cacheMap.prealloc(w),m}return _(b,v),b.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},b.prototype.beginFrame=function(){this._drawToCacheCount=0},b.prototype.clear=function(){if(this._cacheMap.size>0){var S=this._width*this._height;this._cacheMap=new p.LRUMap(S),this._cacheMap.prealloc(S)}this._cacheCtx.clearRect(0,0,n,t),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},b.prototype.draw=function(S,y,m,A){if(y.code===32)return!0;if(!this._canCache(y))return!1;var w=r(y),M=this._cacheMap.get(w);if(M!=null)return this._drawFromCache(S,M,m,A),!0;if(this._drawToCacheCount<100){var x;x=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var L=this._drawToCache(y,x);return this._cacheMap.set(w,L),this._drawFromCache(S,L,m,A),!0}return!1},b.prototype._canCache=function(S){return S.code<256},b.prototype._toCoordinateX=function(S){return S%this._width*this._config.scaledCharWidth},b.prototype._toCoordinateY=function(S){return Math.floor(S/this._width)*this._config.scaledCharHeight},b.prototype._drawFromCache=function(S,y,m,A){if(!y.isEmpty){var w=this._toCoordinateX(y.index),M=this._toCoordinateY(y.index);S.drawImage(y.inBitmap?this._bitmap:this._cacheCanvas,w,M,this._config.scaledCharWidth,this._config.scaledCharHeight,m,A,this._config.scaledCharWidth,this._config.scaledCharHeight)}},b.prototype._getColorFromAnsiIndex=function(S){return S<this._config.colors.ansi.length?this._config.colors.ansi[S]:C.DEFAULT_ANSI_COLORS[S]},b.prototype._getBackgroundColor=function(S){return this._config.allowTransparency?e:S.bg===u.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:S.bg<256?this._getColorFromAnsiIndex(S.bg):this._config.colors.background},b.prototype._getForegroundColor=function(S){return S.fg===u.INVERTED_DEFAULT_COLOR?l.color.opaque(this._config.colors.background):S.fg<256?this._getColorFromAnsiIndex(S.fg):this._config.colors.foreground},b.prototype._drawToCache=function(S,y){this._drawToCacheCount++,this._tmpCtx.save();var m=this._getBackgroundColor(S);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=m.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var A=S.bold?this._config.fontWeightBold:this._config.fontWeight,w=S.italic?"italic":"";this._tmpCtx.font=w+" "+A+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=u.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(S).css,S.dim&&(this._tmpCtx.globalAlpha=u.DIM_OPACITY),this._tmpCtx.fillText(S.chars,0,this._config.scaledCharHeight);var M=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),x=!1;if(this._config.allowTransparency||(x=d(M,m)),x&&S.chars==="_"&&!this._config.allowTransparency)for(var L=1;L<=5&&(this._tmpCtx.fillText(S.chars,0,this._config.scaledCharHeight-L),x=d(M=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),m));L++);this._tmpCtx.restore();var D=this._toCoordinateX(y),O=this._toCoordinateY(y);this._cacheCtx.putImageData(M,D,O);var j={index:y,isEmpty:x,inBitmap:!1};return this._addGlyphToBitmap(j),j},b.prototype._addGlyphToBitmap=function(S){var y=this;!("createImageBitmap"in window)||i.isFirefox||i.isSafari||(this._glyphsWaitingOnBitmap.push(S),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return y._generateBitmap()},100)))},b.prototype._generateBitmap=function(){var S=this,y=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(m){S._bitmap=m;for(var A=0;A<y.length;A++)y[A].inBitmap=!0}),this._bitmapCommitTimeout=null},b}(f.BaseCharAtlas);a.DynamicCharAtlas=s;var c=function(v){function b(S,y){return v.call(this)||this}return _(b,v),b.prototype.draw=function(S,y,m,A){return!1},b}(f.BaseCharAtlas);function d(v,b){for(var S=!0,y=b.rgba>>>24,m=b.rgba>>>16&255,A=b.rgba>>>8&255,w=0;w<v.data.length;w+=4)v.data[w]===y&&v.data[w+1]===m&&v.data[w+2]===A?v.data[w+3]=0:S=!1;return S}a.NoneCharAtlas=c},7001:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LRUMap=void 0;var g=function(){function h(_){this.capacity=_,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return h.prototype._unlinkNode=function(_){var u=_.prev,f=_.next;_===this._head&&(this._head=f),_===this._tail&&(this._tail=u),u!==null&&(u.next=f),f!==null&&(f.prev=u)},h.prototype._appendNode=function(_){var u=this._tail;u!==null&&(u.next=_),_.prev=u,_.next=null,this._tail=_,this._head===null&&(this._head=_)},h.prototype.prealloc=function(_){for(var u=this._nodePool,f=0;f<_;f++)u.push({prev:null,next:null,key:null,value:null})},h.prototype.get=function(_){var u=this._map[_];return u!==void 0?(this._unlinkNode(u),this._appendNode(u),u.value):null},h.prototype.peekValue=function(_){var u=this._map[_];return u!==void 0?u.value:null},h.prototype.peek=function(){var _=this._head;return _===null?null:_.value},h.prototype.set=function(_,u){var f=this._map[_];if(f!==void 0)f=this._map[_],this._unlinkNode(f),f.value=u;else if(this.size>=this.capacity)f=this._head,this._unlinkNode(f),delete this._map[f.key],f.key=_,f.value=u,this._map[_]=f;else{var C=this._nodePool;C.length>0?((f=C.pop()).key=_,f.value=u):f={prev:null,next:null,key:_,value:u},this._map[_]=f,this.size++}this._appendNode(f)},h}();a.LRUMap=g},1296:function(B,a,g){var h,_=this&&this.__extends||(h=function(S,y){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,A){m.__proto__=A}||function(m,A){for(var w in A)Object.prototype.hasOwnProperty.call(A,w)&&(m[w]=A[w])},h(S,y)},function(S,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function m(){this.constructor=S}h(S,y),S.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}),u=this&&this.__decorate||function(S,y,m,A){var w,M=arguments.length,x=M<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,m):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(S,y,m,A);else for(var L=S.length-1;L>=0;L--)(w=S[L])&&(x=(M<3?w(x):M>3?w(y,m,x):w(y,m))||x);return M>3&&x&&Object.defineProperty(y,m,x),x},f=this&&this.__param||function(S,y){return function(m,A){y(m,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;var C=g(3787),p=g(8803),i=g(844),o=g(4725),l=g(2585),n=g(8460),t=g(4774),e=g(9631),r="xterm-dom-renderer-owner-",s="xterm-fg-",c="xterm-bg-",d="xterm-focus",v=1,b=function(S){function y(m,A,w,M,x,L,D,O,j,W){var F=S.call(this)||this;return F._colors=m,F._element=A,F._screenElement=w,F._viewportElement=M,F._linkifier=x,F._linkifier2=L,F._charSizeService=O,F._optionsService=j,F._bufferService=W,F._terminalClass=v++,F._rowElements=[],F._rowContainer=document.createElement("div"),F._rowContainer.classList.add("xterm-rows"),F._rowContainer.style.lineHeight="normal",F._rowContainer.setAttribute("aria-hidden","true"),F._refreshRowElements(F._bufferService.cols,F._bufferService.rows),F._selectionContainer=document.createElement("div"),F._selectionContainer.classList.add("xterm-selection"),F._selectionContainer.setAttribute("aria-hidden","true"),F.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},F._updateDimensions(),F._injectCss(),F._rowFactory=D.createInstance(C.DomRendererRowFactory,document,F._colors),F._element.classList.add(r+F._terminalClass),F._screenElement.appendChild(F._rowContainer),F._screenElement.appendChild(F._selectionContainer),F._linkifier.onShowLinkUnderline(function(N){return F._onLinkHover(N)}),F._linkifier.onHideLinkUnderline(function(N){return F._onLinkLeave(N)}),F._linkifier2.onShowLinkUnderline(function(N){return F._onLinkHover(N)}),F._linkifier2.onHideLinkUnderline(function(N){return F._onLinkLeave(N)}),F}return _(y,S),Object.defineProperty(y.prototype,"onRequestRedraw",{get:function(){return new n.EventEmitter().event},enumerable:!1,configurable:!0}),y.prototype.dispose=function(){this._element.classList.remove(r+this._terminalClass),(0,e.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),S.prototype.dispose.call(this)},y.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 m=0,A=this._rowElements;m<A.length;m++){var w=A[m];w.style.width=this.dimensions.canvasWidth+"px",w.style.height=this.dimensions.actualCellHeight+"px",w.style.lineHeight=this.dimensions.actualCellHeight+"px",w.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var M=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=M,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},y.prototype.setColors=function(m){this._colors=m,this._injectCss()},y.prototype._injectCss=function(){var m=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var A=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";A+=this._terminalSelector+" span:not(."+C.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+C.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+C.ITALIC_CLASS+" { font-style: italic;}",A+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",A+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",A+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+C.CURSOR_CLASS+"."+C.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+C.CURSOR_CLASS+"."+C.CURSOR_BLINK_CLASS+":not(."+C.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+C.CURSOR_CLASS+"."+C.CURSOR_BLINK_CLASS+"."+C.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+C.CURSOR_CLASS+"."+C.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+C.CURSOR_CLASS+"."+C.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+C.CURSOR_CLASS+"."+C.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",A+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(w,M){A+=m._terminalSelector+" ."+s+M+" { color: "+w.css+"; }"+m._terminalSelector+" ."+c+M+" { background-color: "+w.css+"; }"}),A+=this._terminalSelector+" ."+s+p.INVERTED_DEFAULT_COLOR+" { color: "+t.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+c+p.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=A},y.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},y.prototype._refreshRowElements=function(m,A){for(var w=this._rowElements.length;w<=A;w++){var M=document.createElement("div");this._rowContainer.appendChild(M),this._rowElements.push(M)}for(;this._rowElements.length>A;)this._rowContainer.removeChild(this._rowElements.pop())},y.prototype.onResize=function(m,A){this._refreshRowElements(m,A),this._updateDimensions()},y.prototype.onCharSizeChanged=function(){this._updateDimensions()},y.prototype.onBlur=function(){this._rowContainer.classList.remove(d)},y.prototype.onFocus=function(){this._rowContainer.classList.add(d)},y.prototype.onSelectionChanged=function(m,A,w){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(m&&A){var M=m[1]-this._bufferService.buffer.ydisp,x=A[1]-this._bufferService.buffer.ydisp,L=Math.max(M,0),D=Math.min(x,this._bufferService.rows-1);if(!(L>=this._bufferService.rows||D<0)){var O=document.createDocumentFragment();if(w)O.appendChild(this._createSelectionElement(L,m[0],A[0],D-L+1));else{var j=M===L?m[0]:0,W=L===x?A[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(L,j,W));var F=D-L-1;if(O.appendChild(this._createSelectionElement(L+1,0,this._bufferService.cols,F)),L!==D){var N=x===D?A[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(D,0,N))}}this._selectionContainer.appendChild(O)}}},y.prototype._createSelectionElement=function(m,A,w,M){M===void 0&&(M=1);var x=document.createElement("div");return x.style.height=M*this.dimensions.actualCellHeight+"px",x.style.top=m*this.dimensions.actualCellHeight+"px",x.style.left=A*this.dimensions.actualCellWidth+"px",x.style.width=this.dimensions.actualCellWidth*(w-A)+"px",x},y.prototype.onCursorMove=function(){},y.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},y.prototype.clear=function(){for(var m=0,A=this._rowElements;m<A.length;m++)A[m].innerText=""},y.prototype.renderRows=function(m,A){for(var w=this._bufferService.buffer.ybase+this._bufferService.buffer.y,M=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),x=this._optionsService.options.cursorBlink,L=m;L<=A;L++){var D=this._rowElements[L];D.innerText="";var O=L+this._bufferService.buffer.ydisp,j=this._bufferService.buffer.lines.get(O),W=this._optionsService.options.cursorStyle;D.appendChild(this._rowFactory.createRow(j,O,O===w,W,M,x,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(y.prototype,"_terminalSelector",{get:function(){return"."+r+this._terminalClass},enumerable:!1,configurable:!0}),y.prototype._onLinkHover=function(m){this._setCellUnderline(m.x1,m.x2,m.y1,m.y2,m.cols,!0)},y.prototype._onLinkLeave=function(m){this._setCellUnderline(m.x1,m.x2,m.y1,m.y2,m.cols,!1)},y.prototype._setCellUnderline=function(m,A,w,M,x,L){for(;m!==A||w!==M;){var D=this._rowElements[w];if(!D)return;var O=D.children[m];O&&(O.style.textDecoration=L?"underline":"none"),++m>=x&&(m=0,w++)}},u([f(6,l.IInstantiationService),f(7,o.ICharSizeService),f(8,l.IOptionsService),f(9,l.IBufferService)],y)}(i.Disposable);a.DomRenderer=b},3787:function(B,a,g){var h=this&&this.__decorate||function(e,r,s,c){var d,v=arguments.length,b=v<3?r:c===null?c=Object.getOwnPropertyDescriptor(r,s):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(e,r,s,c);else for(var S=e.length-1;S>=0;S--)(d=e[S])&&(b=(v<3?d(b):v>3?d(r,s,b):d(r,s))||b);return v>3&&b&&Object.defineProperty(r,s,b),b},_=this&&this.__param||function(e,r){return function(s,c){r(s,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=a.CURSOR_STYLE_UNDERLINE_CLASS=a.CURSOR_STYLE_BAR_CLASS=a.CURSOR_STYLE_BLOCK_CLASS=a.CURSOR_BLINK_CLASS=a.CURSOR_CLASS=a.STRIKETHROUGH_CLASS=a.UNDERLINE_CLASS=a.ITALIC_CLASS=a.DIM_CLASS=a.BOLD_CLASS=void 0;var u=g(8803),f=g(643),C=g(511),p=g(2585),i=g(4774),o=g(4725),l=g(4269);a.BOLD_CLASS="xterm-bold",a.DIM_CLASS="xterm-dim",a.ITALIC_CLASS="xterm-italic",a.UNDERLINE_CLASS="xterm-underline",a.STRIKETHROUGH_CLASS="xterm-strikethrough",a.CURSOR_CLASS="xterm-cursor",a.CURSOR_BLINK_CLASS="xterm-cursor-blink",a.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",a.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",a.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var n=function(){function e(r,s,c,d,v){this._document=r,this._colors=s,this._characterJoinerService=c,this._optionsService=d,this._coreService=v,this._workCell=new C.CellData}return e.prototype.setColors=function(r){this._colors=r},e.prototype.createRow=function(r,s,c,d,v,b,S,y){for(var m=this._document.createDocumentFragment(),A=this._characterJoinerService.getJoinedCharacters(s),w=0,M=Math.min(r.length,y)-1;M>=0;M--)if(r.loadCell(M,this._workCell).getCode()!==f.NULL_CELL_CODE||c&&M===v){w=M+1;break}for(M=0;M<w;M++){r.loadCell(M,this._workCell);var x=this._workCell.getWidth();if(x!==0){var L=!1,D=M,O=this._workCell;if(A.length>0&&M===A[0][0]){L=!0;var j=A.shift();O=new l.JoinedCellData(this._workCell,r.translateToString(!0,j[0],j[1]),j[1]-j[0]),D=j[1]-1,x=O.getWidth()}var W=this._document.createElement("span");if(x>1&&(W.style.width=S*x+"px"),L&&(W.style.display="inline",v>=M&&v<=D&&(v=M)),!this._coreService.isCursorHidden&&c&&M===v)switch(W.classList.add(a.CURSOR_CLASS),b&&W.classList.add(a.CURSOR_BLINK_CLASS),d){case"bar":W.classList.add(a.CURSOR_STYLE_BAR_CLASS);break;case"underline":W.classList.add(a.CURSOR_STYLE_UNDERLINE_CLASS);break;default:W.classList.add(a.CURSOR_STYLE_BLOCK_CLASS)}O.isBold()&&W.classList.add(a.BOLD_CLASS),O.isItalic()&&W.classList.add(a.ITALIC_CLASS),O.isDim()&&W.classList.add(a.DIM_CLASS),O.isUnderline()&&W.classList.add(a.UNDERLINE_CLASS),O.isInvisible()?W.textContent=f.WHITESPACE_CELL_CHAR:W.textContent=O.getChars()||f.WHITESPACE_CELL_CHAR,O.isStrikethrough()&&W.classList.add(a.STRIKETHROUGH_CLASS);var F=O.getFgColor(),N=O.getFgColorMode(),G=O.getBgColor(),E=O.getBgColorMode(),R=!!O.isInverse();if(R){var k=F;F=G,G=k;var I=N;N=E,E=I}switch(N){case 16777216:case 33554432:O.isBold()&&F<8&&this._optionsService.options.drawBoldTextInBrightColors&&(F+=8),this._applyMinimumContrast(W,this._colors.background,this._colors.ansi[F])||W.classList.add("xterm-fg-"+F);break;case 50331648:var T=i.rgba.toColor(F>>16&255,F>>8&255,255&F);this._applyMinimumContrast(W,this._colors.background,T)||this._addStyle(W,"color:#"+t(F.toString(16),"0",6));break;default:this._applyMinimumContrast(W,this._colors.background,this._colors.foreground)||R&&W.classList.add("xterm-fg-"+u.INVERTED_DEFAULT_COLOR)}switch(E){case 16777216:case 33554432:W.classList.add("xterm-bg-"+G);break;case 50331648:this._addStyle(W,"background-color:#"+t(G.toString(16),"0",6));break;default:R&&W.classList.add("xterm-bg-"+u.INVERTED_DEFAULT_COLOR)}m.appendChild(W),M=D}}return m},e.prototype._applyMinimumContrast=function(r,s,c){if(this._optionsService.options.minimumContrastRatio===1)return!1;var d=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return d===void 0&&(d=i.color.ensureContrastRatio(s,c,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,d!=null?d:null)),!!d&&(this._addStyle(r,"color:"+d.css),!0)},e.prototype._addStyle=function(r,s){r.setAttribute("style",""+(r.getAttribute("style")||"")+s+";")},h([_(2,o.ICharacterJoinerService),_(3,p.IOptionsService),_(4,p.ICoreService)],e)}();function t(e,r,s){for(;e.length<s;)e=r+e;return e}a.DomRendererRowFactory=n},456:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0;var g=function(){function h(_){this._bufferService=_,this.isSelectAllActive=!1,this.selectionStartLength=0}return h.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(h.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(h.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 _=this.selectionStart[0]+this.selectionStartLength;return _>this._bufferService.cols?[_%this._bufferService.cols,this.selectionStart[1]+Math.floor(_/this._bufferService.cols)]:[_,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}),h.prototype.areSelectionValuesReversed=function(){var _=this.selectionStart,u=this.selectionEnd;return!(!_||!u)&&(_[1]>u[1]||_[1]===u[1]&&_[0]>u[0])},h.prototype.onTrim=function(_){return this.selectionStart&&(this.selectionStart[1]-=_),this.selectionEnd&&(this.selectionEnd[1]-=_),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},h}();a.SelectionModel=g},428:function(B,a,g){var h=this&&this.__decorate||function(i,o,l,n){var t,e=arguments.length,r=e<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,l):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,l,n);else for(var s=i.length-1;s>=0;s--)(t=i[s])&&(r=(e<3?t(r):e>3?t(o,l,r):t(o,l))||r);return e>3&&r&&Object.defineProperty(o,l,r),r},_=this&&this.__param||function(i,o){return function(l,n){o(l,n,i)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;var u=g(2585),f=g(8460),C=function(){function i(o,l,n){this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=new f.EventEmitter,this._measureStrategy=new p(o,l,this._optionsService)}return Object.defineProperty(i.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),i.prototype.measure=function(){var o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())},h([_(2,u.IOptionsService)],i)}();a.CharSizeService=C;var p=function(){function i(o,l,n){this._document=o,this._parentElement=l,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 i.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var o=this._measureElement.getBoundingClientRect();return o.width!==0&&o.height!==0&&(this._result.width=o.width,this._result.height=Math.ceil(o.height)),this._result},i}()},4269:function(B,a,g){var h,_=this&&this.__extends||(h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(r[c]=s[c])},h(t,e)},function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}h(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}),u=this&&this.__decorate||function(t,e,r,s){var c,d=arguments.length,v=d<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,e,r,s);else for(var b=t.length-1;b>=0;b--)(c=t[b])&&(v=(d<3?c(v):d>3?c(e,r,v):c(e,r))||v);return d>3&&v&&Object.defineProperty(e,r,v),v},f=this&&this.__param||function(t,e){return function(r,s){e(r,s,t)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;var C=g(3734),p=g(643),i=g(511),o=g(2585),l=function(t){function e(r,s,c){var d=t.call(this)||this;return d.content=0,d.combinedData="",d.fg=r.fg,d.bg=r.bg,d.combinedData=s,d._width=c,d}return _(e,t),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(r){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(C.AttributeData);a.JoinedCellData=l;var n=function(){function t(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new i.CellData}return t.prototype.register=function(e){var r={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(r),r.id},t.prototype.deregister=function(e){for(var r=0;r<this._characterJoiners.length;r++)if(this._characterJoiners[r].id===e)return this._characterJoiners.splice(r,1),!0;return!1},t.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var r=this._bufferService.buffer.lines.get(e);if(!r||r.length===0)return[];for(var s=[],c=r.translateToString(!0),d=0,v=0,b=0,S=r.getFg(0),y=r.getBg(0),m=0;m<r.getTrimmedLength();m++)if(r.loadCell(m,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==S||this._workCell.bg!==y){if(m-d>1)for(var A=this._getJoinedRanges(c,b,v,r,d),w=0;w<A.length;w++)s.push(A[w]);d=m,b=v,S=this._workCell.fg,y=this._workCell.bg}v+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-d>1)for(A=this._getJoinedRanges(c,b,v,r,d),w=0;w<A.length;w++)s.push(A[w]);return s},t.prototype._getJoinedRanges=function(e,r,s,c,d){for(var v=e.substring(r,s),b=this._characterJoiners[0].handler(v),S=1;S<this._characterJoiners.length;S++)for(var y=this._characterJoiners[S].handler(v),m=0;m<y.length;m++)t._mergeRanges(b,y[m]);return this._stringRangesToCellRanges(b,c,d),b},t.prototype._stringRangesToCellRanges=function(e,r,s){var c=0,d=!1,v=0,b=e[c];if(b){for(var S=s;S<this._bufferService.cols;S++){var y=r.getWidth(S),m=r.getString(S).length||p.WHITESPACE_CELL_CHAR.length;if(y!==0){if(!d&&b[0]<=v&&(b[0]=S,d=!0),b[1]<=v){if(b[1]=S,!(b=e[++c]))break;b[0]<=v?(b[0]=S,d=!0):d=!1}v+=m}}b&&(b[1]=this._bufferService.cols)}},t._mergeRanges=function(e,r){for(var s=!1,c=0;c<e.length;c++){var d=e[c];if(s){if(r[1]<=d[0])return e[c-1][1]=r[1],e;if(r[1]<=d[1])return e[c-1][1]=Math.max(r[1],d[1]),e.splice(c,1),e;e.splice(c,1),c--}else{if(r[1]<=d[0])return e.splice(c,0,r),e;if(r[1]<=d[1])return d[0]=Math.min(r[0],d[0]),e;r[0]<d[1]&&(d[0]=Math.min(r[0],d[0]),s=!0)}}return s?e[e.length-1][1]=r[1]:e.push(r),e},t=u([f(0,o.IBufferService)],t)}();a.CharacterJoinerService=n},5114:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;var g=function(){function h(_){this._textarea=_}return Object.defineProperty(h.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),h}();a.CoreBrowserService=g},8934:function(B,a,g){var h=this&&this.__decorate||function(p,i,o,l){var n,t=arguments.length,e=t<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(p,i,o,l);else for(var r=p.length-1;r>=0;r--)(n=p[r])&&(e=(t<3?n(e):t>3?n(i,o,e):n(i,o))||e);return t>3&&e&&Object.defineProperty(i,o,e),e},_=this&&this.__param||function(p,i){return function(o,l){i(o,l,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;var u=g(4725),f=g(9806),C=function(){function p(i,o){this._renderService=i,this._charSizeService=o}return p.prototype.getCoords=function(i,o,l,n,t){return(0,f.getCoords)(i,o,l,n,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,t)},p.prototype.getRawByteCoords=function(i,o,l,n){var t=this.getCoords(i,o,l,n);return(0,f.getRawByteCoords)(t)},h([_(0,u.IRenderService),_(1,u.ICharSizeService)],p)}();a.MouseService=C},3230:function(B,a,g){var h,_=this&&this.__extends||(h=function(r,s){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(c[v]=d[v])},h(r,s)},function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function c(){this.constructor=r}h(r,s),r.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}),u=this&&this.__decorate||function(r,s,c,d){var v,b=arguments.length,S=b<3?s:d===null?d=Object.getOwnPropertyDescriptor(s,c):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,s,c,d);else for(var y=r.length-1;y>=0;y--)(v=r[y])&&(S=(b<3?v(S):b>3?v(s,c,S):v(s,c))||S);return b>3&&S&&Object.defineProperty(s,c,S),S},f=this&&this.__param||function(r,s){return function(c,d){s(c,d,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;var C=g(6193),p=g(8460),i=g(844),o=g(5596),l=g(3656),n=g(2585),t=g(4725),e=function(r){function s(c,d,v,b,S,y){var m=r.call(this)||this;if(m._renderer=c,m._rowCount=d,m._charSizeService=S,m._isPaused=!1,m._needsFullRefresh=!1,m._isNextRenderRedrawOnly=!0,m._needsSelectionRefresh=!1,m._canvasWidth=0,m._canvasHeight=0,m._selectionState={start:void 0,end:void 0,columnSelectMode:!1},m._onDimensionsChange=new p.EventEmitter,m._onRender=new p.EventEmitter,m._onRefreshRequest=new p.EventEmitter,m.register({dispose:function(){return m._renderer.dispose()}}),m._renderDebouncer=new C.RenderDebouncer(function(w,M){return m._renderRows(w,M)}),m.register(m._renderDebouncer),m._screenDprMonitor=new o.ScreenDprMonitor,m._screenDprMonitor.setListener(function(){return m.onDevicePixelRatioChange()}),m.register(m._screenDprMonitor),m.register(y.onResize(function(w){return m._fullRefresh()})),m.register(b.onOptionChange(function(){return m._renderer.onOptionsChanged()})),m.register(m._charSizeService.onCharSizeChange(function(){return m.onCharSizeChanged()})),m._renderer.onRequestRedraw(function(w){return m.refreshRows(w.start,w.end,!0)}),m.register((0,l.addDisposableDomListener)(window,"resize",function(){return m.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var A=new IntersectionObserver(function(w){return m._onIntersectionChange(w[w.length-1])},{threshold:0});A.observe(v),m.register({dispose:function(){return A.disconnect()}})}return m}return _(s,r),Object.defineProperty(s.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),s.prototype._onIntersectionChange=function(c){this._isPaused=c.isIntersecting===void 0?c.intersectionRatio===0:!c.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},s.prototype.refreshRows=function(c,d,v){v===void 0&&(v=!1),this._isPaused?this._needsFullRefresh=!0:(v||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(c,d,this._rowCount))},s.prototype._renderRows=function(c,d){this._renderer.renderRows(c,d),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:c,end:d}),this._isNextRenderRedrawOnly=!0},s.prototype.resize=function(c,d){this._rowCount=d,this._fireOnCanvasResize()},s.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},s.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},s.prototype.dispose=function(){r.prototype.dispose.call(this)},s.prototype.setRenderer=function(c){var d=this;this._renderer.dispose(),this._renderer=c,this._renderer.onRequestRedraw(function(v){return d.refreshRows(v.start,v.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},s.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},s.prototype.clearTextureAtlas=function(){var c,d;(d=(c=this._renderer)===null||c===void 0?void 0:c.clearTextureAtlas)===null||d===void 0||d.call(c),this._fullRefresh()},s.prototype.setColors=function(c){this._renderer.setColors(c),this._fullRefresh()},s.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},s.prototype.onResize=function(c,d){this._renderer.onResize(c,d),this._fullRefresh()},s.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},s.prototype.onBlur=function(){this._renderer.onBlur()},s.prototype.onFocus=function(){this._renderer.onFocus()},s.prototype.onSelectionChanged=function(c,d,v){this._selectionState.start=c,this._selectionState.end=d,this._selectionState.columnSelectMode=v,this._renderer.onSelectionChanged(c,d,v)},s.prototype.onCursorMove=function(){this._renderer.onCursorMove()},s.prototype.clear=function(){this._renderer.clear()},u([f(3,n.IOptionsService),f(4,t.ICharSizeService),f(5,n.IBufferService)],s)}(i.Disposable);a.RenderService=e},9312:function(B,a,g){var h,_=this&&this.__extends||(h=function(b,S){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(y[A]=m[A])},h(b,S)},function(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function y(){this.constructor=b}h(b,S),b.prototype=S===null?Object.create(S):(y.prototype=S.prototype,new y)}),u=this&&this.__decorate||function(b,S,y,m){var A,w=arguments.length,M=w<3?S:m===null?m=Object.getOwnPropertyDescriptor(S,y):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,S,y,m);else for(var x=b.length-1;x>=0;x--)(A=b[x])&&(M=(w<3?A(M):w>3?A(S,y,M):A(S,y))||M);return w>3&&M&&Object.defineProperty(S,y,M),M},f=this&&this.__param||function(b,S){return function(y,m){S(y,m,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;var C=g(6114),p=g(456),i=g(511),o=g(8460),l=g(4725),n=g(2585),t=g(9806),e=g(9504),r=g(844),s=g(4841),c=String.fromCharCode(160),d=new RegExp(c,"g"),v=function(b){function S(y,m,A,w,M,x,L,D){var O=b.call(this)||this;return O._element=y,O._screenElement=m,O._linkifier=A,O._bufferService=w,O._coreService=M,O._mouseService=x,O._optionsService=L,O._renderService=D,O._dragScrollAmount=0,O._enabled=!0,O._workCell=new i.CellData,O._mouseDownTimeStamp=0,O._oldHasSelection=!1,O._oldSelectionStart=void 0,O._oldSelectionEnd=void 0,O._onLinuxMouseSelection=O.register(new o.EventEmitter),O._onRedrawRequest=O.register(new o.EventEmitter),O._onSelectionChange=O.register(new o.EventEmitter),O._onRequestScrollLines=O.register(new o.EventEmitter),O._mouseMoveListener=function(j){return O._onMouseMove(j)},O._mouseUpListener=function(j){return O._onMouseUp(j)},O._coreService.onUserInput(function(){O.hasSelection&&O.clearSelection()}),O._trimListener=O._bufferService.buffer.lines.onTrim(function(j){return O._onTrim(j)}),O.register(O._bufferService.buffers.onBufferActivate(function(j){return O._onBufferActivate(j)})),O.enable(),O._model=new p.SelectionModel(O._bufferService),O._activeSelectionMode=0,O}return _(S,b),Object.defineProperty(S.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._removeMouseDownListeners()},S.prototype.reset=function(){this.clearSelection()},S.prototype.disable=function(){this.clearSelection(),this._enabled=!1},S.prototype.enable=function(){this._enabled=!0},Object.defineProperty(S.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"hasSelection",{get:function(){var y=this._model.finalSelectionStart,m=this._model.finalSelectionEnd;return!(!y||!m||y[0]===m[0]&&y[1]===m[1])},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionText",{get:function(){var y=this._model.finalSelectionStart,m=this._model.finalSelectionEnd;if(!y||!m)return"";var A=this._bufferService.buffer,w=[];if(this._activeSelectionMode===3){if(y[0]===m[0])return"";for(var M=y[1];M<=m[1];M++){var x=A.translateBufferLineToString(M,!0,y[0],m[0]);w.push(x)}}else{var L=y[1]===m[1]?m[0]:void 0;for(w.push(A.translateBufferLineToString(y[1],!0,y[0],L)),M=y[1]+1;M<=m[1]-1;M++){var D=A.lines.get(M);x=A.translateBufferLineToString(M,!0),D&&D.isWrapped?w[w.length-1]+=x:w.push(x)}y[1]!==m[1]&&(D=A.lines.get(m[1]),x=A.translateBufferLineToString(m[1],!0,0,m[0]),D&&D.isWrapped?w[w.length-1]+=x:w.push(x))}return w.map(function(O){return O.replace(d," ")}).join(C.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),S.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},S.prototype.refresh=function(y){var m=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return m._refresh()})),C.isLinux&&y&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},S.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},S.prototype._isClickInSelection=function(y){var m=this._getMouseBufferCoords(y),A=this._model.finalSelectionStart,w=this._model.finalSelectionEnd;return!!(A&&w&&m)&&this._areCoordsInSelection(m,A,w)},S.prototype._areCoordsInSelection=function(y,m,A){return y[1]>m[1]&&y[1]<A[1]||m[1]===A[1]&&y[1]===m[1]&&y[0]>=m[0]&&y[0]<A[0]||m[1]<A[1]&&y[1]===A[1]&&y[0]<A[0]||m[1]<A[1]&&y[1]===m[1]&&y[0]>=m[0]},S.prototype._selectWordAtCursor=function(y,m){var A,w,M=(w=(A=this._linkifier.currentLink)===null||A===void 0?void 0:A.link)===null||w===void 0?void 0:w.range;if(M)return this._model.selectionStart=[M.start.x-1,M.start.y-1],this._model.selectionStartLength=(0,s.getRangeLength)(M,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var x=this._getMouseBufferCoords(y);return!!x&&(this._selectWordAt(x,m),this._model.selectionEnd=void 0,!0)},S.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},S.prototype.selectLines=function(y,m){this._model.clearSelection(),y=Math.max(y,0),m=Math.min(m,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,m],this.refresh(),this._onSelectionChange.fire()},S.prototype._onTrim=function(y){this._model.onTrim(y)&&this.refresh()},S.prototype._getMouseBufferCoords=function(y){var m=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(m)return m[0]--,m[1]--,m[1]+=this._bufferService.buffer.ydisp,m},S.prototype._getMouseEventScrollAmount=function(y){var m=(0,t.getCoordsRelativeToElement)(y,this._screenElement)[1],A=this._renderService.dimensions.canvasHeight;return m>=0&&m<=A?0:(m>A&&(m-=A),m=Math.min(Math.max(m,-50),50),(m/=50)/Math.abs(m)+Math.round(14*m))},S.prototype.shouldForceSelection=function(y){return C.isMac?y.altKey&&this._optionsService.options.macOptionClickForcesSelection:y.shiftKey},S.prototype.onMouseDown=function(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._onIncrementalClick(y):y.detail===1?this._onSingleClick(y):y.detail===2?this._onDoubleClick(y):y.detail===3&&this._onTripleClick(y),this._addMouseDownListeners(),this.refresh(!0)}},S.prototype._addMouseDownListeners=function(){var y=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return y._dragScroll()},50)},S.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},S.prototype._onIncrementalClick=function(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))},S.prototype._onSingleClick=function(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),this._model.selectionStart){this._model.selectionEnd=void 0;var m=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);m&&m.length!==this._model.selectionStart[0]&&m.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},S.prototype._onDoubleClick=function(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)},S.prototype._onTripleClick=function(y){var m=this._getMouseBufferCoords(y);m&&(this._activeSelectionMode=2,this._selectLineAt(m[1]))},S.prototype.shouldColumnSelect=function(y){return y.altKey&&!(C.isMac&&this._optionsService.options.macOptionClickForcesSelection)},S.prototype._onMouseMove=function(y){if(y.stopImmediatePropagation(),this._model.selectionStart){var m=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(y),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var A=this._bufferService.buffer;if(this._model.selectionEnd[1]<A.lines.length){var w=A.lines.get(this._model.selectionEnd[1]);w&&w.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}m&&m[0]===this._model.selectionEnd[0]&&m[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},S.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}},S.prototype._onMouseUp=function(y){var m=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&m<500&&y.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var A=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(A&&A[0]!==void 0&&A[1]!==void 0){var w=(0,e.moveToCellSequence)(A[0]-1,A[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(w,!0)}}}else this._fireEventIfSelectionChanged()},S.prototype._fireEventIfSelectionChanged=function(){var y=this._model.finalSelectionStart,m=this._model.finalSelectionEnd,A=!(!y||!m||y[0]===m[0]&&y[1]===m[1]);A?y&&m&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&m[0]===this._oldSelectionEnd[0]&&m[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,m,A)):this._oldHasSelection&&this._fireOnSelectionChange(y,m,A)},S.prototype._fireOnSelectionChange=function(y,m,A){this._oldSelectionStart=y,this._oldSelectionEnd=m,this._oldHasSelection=A,this._onSelectionChange.fire()},S.prototype._onBufferActivate=function(y){var m=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim(function(A){return m._onTrim(A)})},S.prototype._convertViewportColToCharacterIndex=function(y,m){for(var A=m[0],w=0;m[0]>=w;w++){var M=y.loadCell(w,this._workCell).getChars().length;this._workCell.getWidth()===0?A--:M>1&&m[0]!==w&&(A+=M-1)}return A},S.prototype.setSelection=function(y,m,A){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,m],this._model.selectionStartLength=A,this.refresh()},S.prototype.rightClickSelect=function(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},S.prototype._getWordAt=function(y,m,A,w){if(A===void 0&&(A=!0),w===void 0&&(w=!0),!(y[0]>=this._bufferService.cols)){var M=this._bufferService.buffer,x=M.lines.get(y[1]);if(x){var L=M.translateBufferLineToString(y[1],!1),D=this._convertViewportColToCharacterIndex(x,y),O=D,j=y[0]-D,W=0,F=0,N=0,G=0;if(L.charAt(D)===" "){for(;D>0&&L.charAt(D-1)===" ";)D--;for(;O<L.length&&L.charAt(O+1)===" ";)O++}else{var E=y[0],R=y[0];x.getWidth(E)===0&&(W++,E--),x.getWidth(R)===2&&(F++,R++);var k=x.getString(R).length;for(k>1&&(G+=k-1,O+=k-1);E>0&&D>0&&!this._isCharWordSeparator(x.loadCell(E-1,this._workCell));){x.loadCell(E-1,this._workCell);var I=this._workCell.getChars().length;this._workCell.getWidth()===0?(W++,E--):I>1&&(N+=I-1,D-=I-1),D--,E--}for(;R<x.length&&O+1<L.length&&!this._isCharWordSeparator(x.loadCell(R+1,this._workCell));){x.loadCell(R+1,this._workCell);var T=this._workCell.getChars().length;this._workCell.getWidth()===2?(F++,R++):T>1&&(G+=T-1,O+=T-1),O++,R++}}O++;var K=D+j-W+N,Z=Math.min(this._bufferService.cols,O-D+W+F-N-G);if(m||L.slice(D,O).trim()!==""){if(A&&K===0&&x.getCodePoint(0)!==32){var Y=M.lines.get(y[1]-1);if(Y&&x.isWrapped&&Y.getCodePoint(this._bufferService.cols-1)!==32){var Q=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(Q){var re=this._bufferService.cols-Q.start;K-=re,Z+=re}}}if(w&&K+Z===this._bufferService.cols&&x.getCodePoint(this._bufferService.cols-1)!==32){var q=M.lines.get(y[1]+1);if(q&&q.isWrapped&&q.getCodePoint(0)!==32){var J=this._getWordAt([0,y[1]+1],!1,!1,!0);J&&(Z+=J.length)}}return{start:K,length:Z}}}}},S.prototype._selectWordAt=function(y,m){var A=this._getWordAt(y,m);if(A){for(;A.start<0;)A.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[A.start,y[1]],this._model.selectionStartLength=A.length}},S.prototype._selectToWordAt=function(y){var m=this._getWordAt(y,!0);if(m){for(var A=y[1];m.start<0;)m.start+=this._bufferService.cols,A--;if(!this._model.areSelectionValuesReversed())for(;m.start+m.length>this._bufferService.cols;)m.length-=this._bufferService.cols,A++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?m.start:m.start+m.length,A]}},S.prototype._isCharWordSeparator=function(y){return y.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(y.getChars())>=0},S.prototype._selectLineAt=function(y){var m=this._bufferService.buffer.getWrappedRangeForLine(y);this._model.selectionStart=[0,m.first],this._model.selectionEnd=[this._bufferService.cols,m.last],this._model.selectionStartLength=0},u([f(3,n.IBufferService),f(4,n.ICoreService),f(5,l.IMouseService),f(6,n.IOptionsService),f(7,l.IRenderService)],S)}(r.Disposable);a.SelectionService=v},4725:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ICharacterJoinerService=a.ISoundService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;var h=g(8343);a.ICharSizeService=(0,h.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),a.IMouseService=(0,h.createDecorator)("MouseService"),a.IRenderService=(0,h.createDecorator)("RenderService"),a.ISelectionService=(0,h.createDecorator)("SelectionService"),a.ISoundService=(0,h.createDecorator)("SoundService"),a.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService")},357:function(B,a,g){var h=this&&this.__decorate||function(C,p,i,o){var l,n=arguments.length,t=n<3?p:o===null?o=Object.getOwnPropertyDescriptor(p,i):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(C,p,i,o);else for(var e=C.length-1;e>=0;e--)(l=C[e])&&(t=(n<3?l(t):n>3?l(p,i,t):l(p,i))||t);return n>3&&t&&Object.defineProperty(p,i,t),t},_=this&&this.__param||function(C,p){return function(i,o){p(i,o,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SoundService=void 0;var u=g(2585),f=function(){function C(p){this._optionsService=p}return Object.defineProperty(C,"audioContext",{get:function(){if(!C._audioContext){var p=window.AudioContext||window.webkitAudioContext;if(!p)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;C._audioContext=new p}return C._audioContext},enumerable:!1,configurable:!0}),C.prototype.playBellSound=function(){var p=C.audioContext;if(p){var i=p.createBufferSource();p.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(o){i.buffer=o,i.connect(p.destination),i.start(0)})}},C.prototype._base64ToArrayBuffer=function(p){for(var i=window.atob(p),o=i.length,l=new Uint8Array(o),n=0;n<o;n++)l[n]=i.charCodeAt(n);return l.buffer},C.prototype._removeMimeType=function(p){return p.split(",")[1]},C=h([_(0,u.IOptionsService)],C)}();a.SoundService=f},6349:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;var h=g(8460),_=function(){function u(f){this._maxLength=f,this.onDeleteEmitter=new h.EventEmitter,this.onInsertEmitter=new h.EventEmitter,this.onTrimEmitter=new h.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(u.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"maxLength",{get:function(){return this._maxLength},set:function(f){if(this._maxLength!==f){for(var C=new Array(f),p=0;p<Math.min(f,this.length);p++)C[p]=this._array[this._getCyclicIndex(p)];this._array=C,this._maxLength=f,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._length},set:function(f){if(f>this._length)for(var C=this._length;C<f;C++)this._array[C]=void 0;this._length=f},enumerable:!1,configurable:!0}),u.prototype.get=function(f){return this._array[this._getCyclicIndex(f)]},u.prototype.set=function(f,C){this._array[this._getCyclicIndex(f)]=C},u.prototype.push=function(f){this._array[this._getCyclicIndex(this._length)]=f,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},u.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(u.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),u.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},u.prototype.splice=function(f,C){for(var p=[],i=2;i<arguments.length;i++)p[i-2]=arguments[i];if(C){for(var o=f;o<this._length-C;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+C)];this._length-=C,this.onDeleteEmitter.fire({index:f,amount:C})}for(o=this._length-1;o>=f;o--)this._array[this._getCyclicIndex(o+p.length)]=this._array[this._getCyclicIndex(o)];for(o=0;o<p.length;o++)this._array[this._getCyclicIndex(f+o)]=p[o];if(p.length&&this.onInsertEmitter.fire({index:f,amount:p.length}),this._length+p.length>this._maxLength){var l=this._length+p.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=p.length},u.prototype.trimStart=function(f){f>this._length&&(f=this._length),this._startIndex+=f,this._length-=f,this.onTrimEmitter.fire(f)},u.prototype.shiftElements=function(f,C,p){if(!(C<=0)){if(f<0||f>=this._length)throw new Error("start argument out of range");if(f+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(var i=C-1;i>=0;i--)this.set(f+i+p,this.get(f+i));var o=f+C+p-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<C;i++)this.set(f+i+p,this.get(f+i))}},u.prototype._getCyclicIndex=function(f){return(this._startIndex+f)%this._maxLength},u}();a.CircularList=_},1439:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function g(h,_){if(_===void 0&&(_=5),typeof h!="object")return h;var u=Array.isArray(h)?[]:{};for(var f in h)u[f]=_<=1?h[f]:h[f]&&g(h[f],_-1);return u}},8969:function(B,a,g){var h,_=this&&this.__extends||(h=function(y,m){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,w){A.__proto__=w}||function(A,w){for(var M in w)Object.prototype.hasOwnProperty.call(w,M)&&(A[M]=w[M])},h(y,m)},function(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function A(){this.constructor=y}h(y,m),y.prototype=m===null?Object.create(m):(A.prototype=m.prototype,new A)});Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;var u=g(844),f=g(2585),C=g(4348),p=g(7866),i=g(744),o=g(7302),l=g(6975),n=g(8460),t=g(1753),e=g(3730),r=g(1480),s=g(7994),c=g(9282),d=g(5435),v=g(5981),b=!1,S=function(y){function m(A){var w=y.call(this)||this;return w._onBinary=new n.EventEmitter,w._onData=new n.EventEmitter,w._onLineFeed=new n.EventEmitter,w._onResize=new n.EventEmitter,w._onScroll=new n.EventEmitter,w._instantiationService=new C.InstantiationService,w.optionsService=new o.OptionsService(A),w._instantiationService.setService(f.IOptionsService,w.optionsService),w._bufferService=w.register(w._instantiationService.createInstance(i.BufferService)),w._instantiationService.setService(f.IBufferService,w._bufferService),w._logService=w._instantiationService.createInstance(p.LogService),w._instantiationService.setService(f.ILogService,w._logService),w.coreService=w.register(w._instantiationService.createInstance(l.CoreService,function(){return w.scrollToBottom()})),w._instantiationService.setService(f.ICoreService,w.coreService),w.coreMouseService=w._instantiationService.createInstance(t.CoreMouseService),w._instantiationService.setService(f.ICoreMouseService,w.coreMouseService),w._dirtyRowService=w._instantiationService.createInstance(e.DirtyRowService),w._instantiationService.setService(f.IDirtyRowService,w._dirtyRowService),w.unicodeService=w._instantiationService.createInstance(r.UnicodeService),w._instantiationService.setService(f.IUnicodeService,w.unicodeService),w._charsetService=w._instantiationService.createInstance(s.CharsetService),w._instantiationService.setService(f.ICharsetService,w._charsetService),w._inputHandler=new d.InputHandler(w._bufferService,w._charsetService,w.coreService,w._dirtyRowService,w._logService,w.optionsService,w.coreMouseService,w.unicodeService),w.register((0,n.forwardEvent)(w._inputHandler.onLineFeed,w._onLineFeed)),w.register(w._inputHandler),w.register((0,n.forwardEvent)(w._bufferService.onResize,w._onResize)),w.register((0,n.forwardEvent)(w.coreService.onData,w._onData)),w.register((0,n.forwardEvent)(w.coreService.onBinary,w._onBinary)),w.register(w.optionsService.onOptionChange(function(M){return w._updateOptions(M)})),w.register(w._bufferService.onScroll(function(M){w._onScroll.fire({position:w._bufferService.buffer.ydisp,source:0}),w._dirtyRowService.markRangeDirty(w._bufferService.buffer.scrollTop,w._bufferService.buffer.scrollBottom)})),w.register(w._inputHandler.onScroll(function(M){w._onScroll.fire({position:w._bufferService.buffer.ydisp,source:0}),w._dirtyRowService.markRangeDirty(w._bufferService.buffer.scrollTop,w._bufferService.buffer.scrollBottom)})),w._writeBuffer=new v.WriteBuffer(function(M,x){return w._inputHandler.parse(M,x)}),w}return _(m,y),Object.defineProperty(m.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onScroll",{get:function(){var A=this;return this._onScrollApi||(this._onScrollApi=new n.EventEmitter,this.register(this._onScroll.event(function(w){var M;(M=A._onScrollApi)===null||M===void 0||M.fire(w.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"options",{get:function(){return this.optionsService.publicOptions},enumerable:!1,configurable:!0}),m.prototype.dispose=function(){var A;this._isDisposed||(y.prototype.dispose.call(this),(A=this._windowsMode)===null||A===void 0||A.dispose(),this._windowsMode=void 0)},m.prototype.write=function(A,w){this._writeBuffer.write(A,w)},m.prototype.writeSync=function(A,w){this._logService.logLevel<=f.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(A,w)},m.prototype.resize=function(A,w){isNaN(A)||isNaN(w)||(A=Math.max(A,i.MINIMUM_COLS),w=Math.max(w,i.MINIMUM_ROWS),this._bufferService.resize(A,w))},m.prototype.scroll=function(A,w){w===void 0&&(w=!1),this._bufferService.scroll(A,w)},m.prototype.scrollLines=function(A,w,M){this._bufferService.scrollLines(A,w,M)},m.prototype.scrollPages=function(A){this._bufferService.scrollPages(A)},m.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},m.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},m.prototype.scrollToLine=function(A){this._bufferService.scrollToLine(A)},m.prototype.registerEscHandler=function(A,w){return this._inputHandler.registerEscHandler(A,w)},m.prototype.registerDcsHandler=function(A,w){return this._inputHandler.registerDcsHandler(A,w)},m.prototype.registerCsiHandler=function(A,w){return this._inputHandler.registerCsiHandler(A,w)},m.prototype.registerOscHandler=function(A,w){return this._inputHandler.registerOscHandler(A,w)},m.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},m.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},m.prototype._updateOptions=function(A){var w;switch(A){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((w=this._windowsMode)===null||w===void 0||w.dispose(),this._windowsMode=void 0)}},m.prototype._enableWindowsMode=function(){var A=this;if(!this._windowsMode){var w=[];w.push(this.onLineFeed(c.updateWindowsModeWrappedState.bind(null,this._bufferService))),w.push(this.registerCsiHandler({final:"H"},function(){return(0,c.updateWindowsModeWrappedState)(A._bufferService),!1})),this._windowsMode={dispose:function(){for(var M=0,x=w;M<x.length;M++)x[M].dispose()}}}},m}(u.Disposable);a.CoreTerminal=S},8460:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.forwardEvent=a.EventEmitter=void 0;var g=function(){function h(){this._listeners=[],this._disposed=!1}return Object.defineProperty(h.prototype,"event",{get:function(){var _=this;return this._event||(this._event=function(u){return _._listeners.push(u),{dispose:function(){if(!_._disposed){for(var f=0;f<_._listeners.length;f++)if(_._listeners[f]===u)return void _._listeners.splice(f,1)}}}}),this._event},enumerable:!1,configurable:!0}),h.prototype.fire=function(_,u){for(var f=[],C=0;C<this._listeners.length;C++)f.push(this._listeners[C]);for(C=0;C<f.length;C++)f[C].call(void 0,_,u)},h.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},h}();a.EventEmitter=g,a.forwardEvent=function(h,_){return h(function(u){return _.fire(u)})}},5435:function(B,a,g){var h,_=this&&this.__extends||(h=function(w,M){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var D in L)Object.prototype.hasOwnProperty.call(L,D)&&(x[D]=L[D])},h(w,M)},function(w,M){if(typeof M!="function"&&M!==null)throw new TypeError("Class extends value "+String(M)+" is not a constructor or null");function x(){this.constructor=w}h(w,M),w.prototype=M===null?Object.create(M):(x.prototype=M.prototype,new x)});Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;var u,f=g(2584),C=g(7116),p=g(2015),i=g(844),o=g(8273),l=g(482),n=g(8437),t=g(8460),e=g(643),r=g(511),s=g(3734),c=g(2585),d=g(6242),v=g(6351),b={"(":0,")":1,"*":2,"+":3,"-":1,".":2},S=131072;function y(w,M){if(w>24)return M.setWinLines||!1;switch(w){case 1:return!!M.restoreWin;case 2:return!!M.minimizeWin;case 3:return!!M.setWinPosition;case 4:return!!M.setWinSizePixels;case 5:return!!M.raiseWin;case 6:return!!M.lowerWin;case 7:return!!M.refreshWin;case 8:return!!M.setWinSizeChars;case 9:return!!M.maximizeWin;case 10:return!!M.fullscreenWin;case 11:return!!M.getWinState;case 13:return!!M.getWinPosition;case 14:return!!M.getWinSizePixels;case 15:return!!M.getScreenSizePixels;case 16:return!!M.getCellSizePixels;case 18:return!!M.getWinSizeChars;case 19:return!!M.getScreenSizeChars;case 20:return!!M.getIconTitle;case 21:return!!M.getWinTitle;case 22:return!!M.pushTitle;case 23:return!!M.popTitle;case 24:return!!M.setWinLines}return!1}(function(w){w[w.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",w[w.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(u=a.WindowsOptionsReportType||(a.WindowsOptionsReportType={}));var m=function(){function w(M,x,L,D){this._bufferService=M,this._coreService=x,this._logService=L,this._optionsService=D,this._data=new Uint32Array(0)}return w.prototype.hook=function(M){this._data=new Uint32Array(0)},w.prototype.put=function(M,x,L){this._data=(0,o.concat)(this._data,M.subarray(x,L))},w.prototype.unhook=function(M){if(!M)return this._data=new Uint32Array(0),!0;var x=(0,l.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),x){case'"q':this._coreService.triggerDataEvent(f.C0.ESC+'P1$r0"q'+f.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(f.C0.ESC+'P1$r61;1"p'+f.C0.ESC+"\\");break;case"r":var L=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(f.C0.ESC+"P1$r"+L+f.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(f.C0.ESC+"P1$r0m"+f.C0.ESC+"\\");break;case" q":var D={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];D-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(f.C0.ESC+"P1$r"+D+" q"+f.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",x),this._coreService.triggerDataEvent(f.C0.ESC+"P0$r"+f.C0.ESC+"\\")}return!0},w}(),A=function(w){function M(x,L,D,O,j,W,F,N,G){G===void 0&&(G=new p.EscapeSequenceParser);var E=w.call(this)||this;E._bufferService=x,E._charsetService=L,E._coreService=D,E._dirtyRowService=O,E._logService=j,E._optionsService=W,E._coreMouseService=F,E._unicodeService=N,E._parser=G,E._parseBuffer=new Uint32Array(4096),E._stringDecoder=new l.StringToUtf32,E._utf8Decoder=new l.Utf8ToUtf32,E._workCell=new r.CellData,E._windowTitle="",E._iconName="",E._windowTitleStack=[],E._iconNameStack=[],E._curAttrData=n.DEFAULT_ATTR_DATA.clone(),E._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone(),E._onRequestBell=new t.EventEmitter,E._onRequestRefreshRows=new t.EventEmitter,E._onRequestReset=new t.EventEmitter,E._onRequestSendFocus=new t.EventEmitter,E._onRequestSyncScrollBar=new t.EventEmitter,E._onRequestWindowsOptionsReport=new t.EventEmitter,E._onA11yChar=new t.EventEmitter,E._onA11yTab=new t.EventEmitter,E._onCursorMove=new t.EventEmitter,E._onLineFeed=new t.EventEmitter,E._onScroll=new t.EventEmitter,E._onTitleChange=new t.EventEmitter,E._onAnsiColorChange=new t.EventEmitter,E._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},E.register(E._parser),E._activeBuffer=E._bufferService.buffer,E.register(E._bufferService.buffers.onBufferActivate(function(T){return E._activeBuffer=T.activeBuffer})),E._parser.setCsiHandlerFallback(function(T,K){E._logService.debug("Unknown CSI code: ",{identifier:E._parser.identToString(T),params:K.toArray()})}),E._parser.setEscHandlerFallback(function(T){E._logService.debug("Unknown ESC code: ",{identifier:E._parser.identToString(T)})}),E._parser.setExecuteHandlerFallback(function(T){E._logService.debug("Unknown EXECUTE code: ",{code:T})}),E._parser.setOscHandlerFallback(function(T,K,Z){E._logService.debug("Unknown OSC code: ",{identifier:T,action:K,data:Z})}),E._parser.setDcsHandlerFallback(function(T,K,Z){K==="HOOK"&&(Z=Z.toArray()),E._logService.debug("Unknown DCS code: ",{identifier:E._parser.identToString(T),action:K,payload:Z})}),E._parser.setPrintHandler(function(T,K,Z){return E.print(T,K,Z)}),E._parser.registerCsiHandler({final:"@"},function(T){return E.insertChars(T)}),E._parser.registerCsiHandler({intermediates:" ",final:"@"},function(T){return E.scrollLeft(T)}),E._parser.registerCsiHandler({final:"A"},function(T){return E.cursorUp(T)}),E._parser.registerCsiHandler({intermediates:" ",final:"A"},function(T){return E.scrollRight(T)}),E._parser.registerCsiHandler({final:"B"},function(T){return E.cursorDown(T)}),E._parser.registerCsiHandler({final:"C"},function(T){return E.cursorForward(T)}),E._parser.registerCsiHandler({final:"D"},function(T){return E.cursorBackward(T)}),E._parser.registerCsiHandler({final:"E"},function(T){return E.cursorNextLine(T)}),E._parser.registerCsiHandler({final:"F"},function(T){return E.cursorPrecedingLine(T)}),E._parser.registerCsiHandler({final:"G"},function(T){return E.cursorCharAbsolute(T)}),E._parser.registerCsiHandler({final:"H"},function(T){return E.cursorPosition(T)}),E._parser.registerCsiHandler({final:"I"},function(T){return E.cursorForwardTab(T)}),E._parser.registerCsiHandler({final:"J"},function(T){return E.eraseInDisplay(T)}),E._parser.registerCsiHandler({prefix:"?",final:"J"},function(T){return E.eraseInDisplay(T)}),E._parser.registerCsiHandler({final:"K"},function(T){return E.eraseInLine(T)}),E._parser.registerCsiHandler({prefix:"?",final:"K"},function(T){return E.eraseInLine(T)}),E._parser.registerCsiHandler({final:"L"},function(T){return E.insertLines(T)}),E._parser.registerCsiHandler({final:"M"},function(T){return E.deleteLines(T)}),E._parser.registerCsiHandler({final:"P"},function(T){return E.deleteChars(T)}),E._parser.registerCsiHandler({final:"S"},function(T){return E.scrollUp(T)}),E._parser.registerCsiHandler({final:"T"},function(T){return E.scrollDown(T)}),E._parser.registerCsiHandler({final:"X"},function(T){return E.eraseChars(T)}),E._parser.registerCsiHandler({final:"Z"},function(T){return E.cursorBackwardTab(T)}),E._parser.registerCsiHandler({final:"`"},function(T){return E.charPosAbsolute(T)}),E._parser.registerCsiHandler({final:"a"},function(T){return E.hPositionRelative(T)}),E._parser.registerCsiHandler({final:"b"},function(T){return E.repeatPrecedingCharacter(T)}),E._parser.registerCsiHandler({final:"c"},function(T){return E.sendDeviceAttributesPrimary(T)}),E._parser.registerCsiHandler({prefix:">",final:"c"},function(T){return E.sendDeviceAttributesSecondary(T)}),E._parser.registerCsiHandler({final:"d"},function(T){return E.linePosAbsolute(T)}),E._parser.registerCsiHandler({final:"e"},function(T){return E.vPositionRelative(T)}),E._parser.registerCsiHandler({final:"f"},function(T){return E.hVPosition(T)}),E._parser.registerCsiHandler({final:"g"},function(T){return E.tabClear(T)}),E._parser.registerCsiHandler({final:"h"},function(T){return E.setMode(T)}),E._parser.registerCsiHandler({prefix:"?",final:"h"},function(T){return E.setModePrivate(T)}),E._parser.registerCsiHandler({final:"l"},function(T){return E.resetMode(T)}),E._parser.registerCsiHandler({prefix:"?",final:"l"},function(T){return E.resetModePrivate(T)}),E._parser.registerCsiHandler({final:"m"},function(T){return E.charAttributes(T)}),E._parser.registerCsiHandler({final:"n"},function(T){return E.deviceStatus(T)}),E._parser.registerCsiHandler({prefix:"?",final:"n"},function(T){return E.deviceStatusPrivate(T)}),E._parser.registerCsiHandler({intermediates:"!",final:"p"},function(T){return E.softReset(T)}),E._parser.registerCsiHandler({intermediates:" ",final:"q"},function(T){return E.setCursorStyle(T)}),E._parser.registerCsiHandler({final:"r"},function(T){return E.setScrollRegion(T)}),E._parser.registerCsiHandler({final:"s"},function(T){return E.saveCursor(T)}),E._parser.registerCsiHandler({final:"t"},function(T){return E.windowOptions(T)}),E._parser.registerCsiHandler({final:"u"},function(T){return E.restoreCursor(T)}),E._parser.registerCsiHandler({intermediates:"'",final:"}"},function(T){return E.insertColumns(T)}),E._parser.registerCsiHandler({intermediates:"'",final:"~"},function(T){return E.deleteColumns(T)}),E._parser.setExecuteHandler(f.C0.BEL,function(){return E.bell()}),E._parser.setExecuteHandler(f.C0.LF,function(){return E.lineFeed()}),E._parser.setExecuteHandler(f.C0.VT,function(){return E.lineFeed()}),E._parser.setExecuteHandler(f.C0.FF,function(){return E.lineFeed()}),E._parser.setExecuteHandler(f.C0.CR,function(){return E.carriageReturn()}),E._parser.setExecuteHandler(f.C0.BS,function(){return E.backspace()}),E._parser.setExecuteHandler(f.C0.HT,function(){return E.tab()}),E._parser.setExecuteHandler(f.C0.SO,function(){return E.shiftOut()}),E._parser.setExecuteHandler(f.C0.SI,function(){return E.shiftIn()}),E._parser.setExecuteHandler(f.C1.IND,function(){return E.index()}),E._parser.setExecuteHandler(f.C1.NEL,function(){return E.nextLine()}),E._parser.setExecuteHandler(f.C1.HTS,function(){return E.tabSet()}),E._parser.registerOscHandler(0,new d.OscHandler(function(T){return E.setTitle(T),E.setIconName(T),!0})),E._parser.registerOscHandler(1,new d.OscHandler(function(T){return E.setIconName(T)})),E._parser.registerOscHandler(2,new d.OscHandler(function(T){return E.setTitle(T)})),E._parser.registerOscHandler(4,new d.OscHandler(function(T){return E.setAnsiColor(T)})),E._parser.registerEscHandler({final:"7"},function(){return E.saveCursor()}),E._parser.registerEscHandler({final:"8"},function(){return E.restoreCursor()}),E._parser.registerEscHandler({final:"D"},function(){return E.index()}),E._parser.registerEscHandler({final:"E"},function(){return E.nextLine()}),E._parser.registerEscHandler({final:"H"},function(){return E.tabSet()}),E._parser.registerEscHandler({final:"M"},function(){return E.reverseIndex()}),E._parser.registerEscHandler({final:"="},function(){return E.keypadApplicationMode()}),E._parser.registerEscHandler({final:">"},function(){return E.keypadNumericMode()}),E._parser.registerEscHandler({final:"c"},function(){return E.fullReset()}),E._parser.registerEscHandler({final:"n"},function(){return E.setgLevel(2)}),E._parser.registerEscHandler({final:"o"},function(){return E.setgLevel(3)}),E._parser.registerEscHandler({final:"|"},function(){return E.setgLevel(3)}),E._parser.registerEscHandler({final:"}"},function(){return E.setgLevel(2)}),E._parser.registerEscHandler({final:"~"},function(){return E.setgLevel(1)}),E._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return E.selectDefaultCharset()}),E._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return E.selectDefaultCharset()});var R=function(T){k._parser.registerEscHandler({intermediates:"(",final:T},function(){return E.selectCharset("("+T)}),k._parser.registerEscHandler({intermediates:")",final:T},function(){return E.selectCharset(")"+T)}),k._parser.registerEscHandler({intermediates:"*",final:T},function(){return E.selectCharset("*"+T)}),k._parser.registerEscHandler({intermediates:"+",final:T},function(){return E.selectCharset("+"+T)}),k._parser.registerEscHandler({intermediates:"-",final:T},function(){return E.selectCharset("-"+T)}),k._parser.registerEscHandler({intermediates:".",final:T},function(){return E.selectCharset("."+T)}),k._parser.registerEscHandler({intermediates:"/",final:T},function(){return E.selectCharset("/"+T)})},k=this;for(var I in C.CHARSETS)R(I);return E._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return E.screenAlignmentPattern()}),E._parser.setErrorHandler(function(T){return E._logService.error("Parsing error: ",T),T}),E._parser.registerDcsHandler({intermediates:"$",final:"q"},new m(E._bufferService,E._coreService,E._logService,E._optionsService)),E}return _(M,w),Object.defineProperty(M.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onAnsiColorChange",{get:function(){return this._onAnsiColorChange.event},enumerable:!1,configurable:!0}),M.prototype.dispose=function(){w.prototype.dispose.call(this)},M.prototype._preserveStack=function(x,L,D,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=D,this._parseStack.position=O},M.prototype._logSlowResolvingAsync=function(x){this._logService.logLevel<=c.LogLevelEnum.WARN&&Promise.race([x,new Promise(function(L,D){return setTimeout(function(){return D("#SLOW_TIMEOUT")},5e3)})]).catch(function(L){if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")})},M.prototype.parse=function(x,L){var D,O=this._activeBuffer.x,j=this._activeBuffer.y,W=0,F=this._parseStack.paused;if(F){if(D=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(D),D;O=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>S&&(W=this._parseStack.position+S)}if(this._logService.debug("parsing data",x),this._parseBuffer.length<x.length&&this._parseBuffer.length<S&&(this._parseBuffer=new Uint32Array(Math.min(x.length,S))),F||this._dirtyRowService.clearRange(),x.length>S)for(var N=W;N<x.length;N+=S){var G=N+S<x.length?N+S:x.length,E=typeof x=="string"?this._stringDecoder.decode(x.substring(N,G),this._parseBuffer):this._utf8Decoder.decode(x.subarray(N,G),this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,E))return this._preserveStack(O,j,E,N),this._logSlowResolvingAsync(D),D}else if(!F&&(E=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer),D=this._parser.parse(this._parseBuffer,E)))return this._preserveStack(O,j,E,0),this._logSlowResolvingAsync(D),D;this._activeBuffer.x===O&&this._activeBuffer.y===j||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},M.prototype.print=function(x,L,D){var O,j,W=this._charsetService.charset,F=this._optionsService.options.screenReaderMode,N=this._bufferService.cols,G=this._coreService.decPrivateModes.wraparound,E=this._coreService.modes.insertMode,R=this._curAttrData,k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&D-L>0&&k.getWidth(this._activeBuffer.x-1)===2&&k.setCellFromCodePoint(this._activeBuffer.x-1,0,1,R.fg,R.bg,R.extended);for(var I=L;I<D;++I){if(O=x[I],j=this._unicodeService.wcwidth(O),O<127&&W){var T=W[String.fromCharCode(O)];T&&(O=T.charCodeAt(0))}if(F&&this._onA11yChar.fire((0,l.stringFromCodePoint)(O)),j||!this._activeBuffer.x){if(this._activeBuffer.x+j-1>=N){if(G){for(;this._activeBuffer.x<N;)k.setCellFromCodePoint(this._activeBuffer.x++,0,1,R.fg,R.bg,R.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=N-1,j===2)continue}if(E&&(k.insertCells(this._activeBuffer.x,j,this._activeBuffer.getNullCell(R),R),k.getWidth(N-1)===2&&k.setCellFromCodePoint(N-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,R.fg,R.bg,R.extended)),k.setCellFromCodePoint(this._activeBuffer.x++,O,j,R.fg,R.bg,R.extended),j>0)for(;--j;)k.setCellFromCodePoint(this._activeBuffer.x++,0,0,R.fg,R.bg,R.extended)}else k.getWidth(this._activeBuffer.x-1)?k.addCodepointToCell(this._activeBuffer.x-1,O):k.addCodepointToCell(this._activeBuffer.x-2,O)}D-L>0&&(k.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<N&&D-L>0&&k.getWidth(this._activeBuffer.x)===0&&!k.hasContent(this._activeBuffer.x)&&k.setCellFromCodePoint(this._activeBuffer.x,0,1,R.fg,R.bg,R.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},M.prototype.registerCsiHandler=function(x,L){var D=this;return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,L):this._parser.registerCsiHandler(x,function(O){return!y(O.params[0],D._optionsService.options.windowOptions)||L(O)})},M.prototype.registerDcsHandler=function(x,L){return this._parser.registerDcsHandler(x,new v.DcsHandler(L))},M.prototype.registerEscHandler=function(x,L){return this._parser.registerEscHandler(x,L)},M.prototype.registerOscHandler=function(x,L){return this._parser.registerOscHandler(x,new d.OscHandler(L))},M.prototype.bell=function(){return this._onRequestBell.fire(),!0},M.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.options.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},M.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},M.prototype.backspace=function(){var x;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||x===void 0?void 0:x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},M.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0},M.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},M.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},M.prototype._restrictCursor=function(x){x===void 0&&(x=this._bufferService.cols-1),this._activeBuffer.x=Math.min(x,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},M.prototype._setCursor=function(x,L){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=x,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},M.prototype._moveCursor=function(x,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+L)},M.prototype.cursorUp=function(x){var L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0},M.prototype.cursorDown=function(x){var L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0},M.prototype.cursorForward=function(x){return this._moveCursor(x.params[0]||1,0),!0},M.prototype.cursorBackward=function(x){return this._moveCursor(-(x.params[0]||1),0),!0},M.prototype.cursorNextLine=function(x){return this.cursorDown(x),this._activeBuffer.x=0,!0},M.prototype.cursorPrecedingLine=function(x){return this.cursorUp(x),this._activeBuffer.x=0,!0},M.prototype.cursorCharAbsolute=function(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0},M.prototype.cursorPosition=function(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0},M.prototype.charPosAbsolute=function(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0},M.prototype.hPositionRelative=function(x){return this._moveCursor(x.params[0]||1,0),!0},M.prototype.linePosAbsolute=function(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0},M.prototype.vPositionRelative=function(x){return this._moveCursor(0,x.params[0]||1),!0},M.prototype.hVPosition=function(x){return this.cursorPosition(x),!0},M.prototype.tabClear=function(x){var L=x.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0},M.prototype.cursorForwardTab=function(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var L=x.params[0]||1;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},M.prototype.cursorBackwardTab=function(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var L=x.params[0]||1;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},M.prototype._eraseInBufferLine=function(x,L,D,O){O===void 0&&(O=!1);var j=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);j.replaceCells(L,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O&&(j.isWrapped=!1)},M.prototype._resetBufferLine=function(x){var L=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);L.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1},M.prototype.eraseInDisplay=function(x){var L;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(L=this._activeBuffer.y,this._dirtyRowService.markDirty(L),this._eraseInBufferLine(L++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);L<this._bufferService.rows;L++)this._resetBufferLine(L);this._dirtyRowService.markDirty(L);break;case 1:for(L=this._activeBuffer.y,this._dirtyRowService.markDirty(L),this._eraseInBufferLine(L,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(L+1).isWrapped=!1);L--;)this._resetBufferLine(L);this._dirtyRowService.markDirty(0);break;case 2:for(L=this._bufferService.rows,this._dirtyRowService.markDirty(L-1);L--;)this._resetBufferLine(L);this._dirtyRowService.markDirty(0);break;case 3:var D=this._activeBuffer.lines.length-this._bufferService.rows;D>0&&(this._activeBuffer.lines.trimStart(D),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-D,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-D,0),this._onScroll.fire(0))}return!0},M.prototype.eraseInLine=function(x){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},M.prototype.insertLines=function(x){this._restrictCursor();var L=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var D=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;L--;)this._activeBuffer.lines.splice(j-1,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},M.prototype.deleteLines=function(x){this._restrictCursor();var L=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var D,O=this._activeBuffer.ybase+this._activeBuffer.y;for(D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,D=this._bufferService.rows-1+this._activeBuffer.ybase-D;L--;)this._activeBuffer.lines.splice(O,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},M.prototype.insertChars=function(x){this._restrictCursor();var L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},M.prototype.deleteChars=function(x){this._restrictCursor();var L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},M.prototype.scrollUp=function(x){for(var L=x.params[0]||1;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},M.prototype.scrollDown=function(x){for(var L=x.params[0]||1;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(n.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},M.prototype.scrollLeft=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var L=x.params[0]||1,D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},M.prototype.scrollRight=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var L=x.params[0]||1,D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},M.prototype.insertColumns=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var L=x.params[0]||1,D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},M.prototype.deleteColumns=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var L=x.params[0]||1,D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},M.prototype.eraseChars=function(x){this._restrictCursor();var L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},M.prototype.repeatPrecedingCharacter=function(x){if(!this._parser.precedingCodepoint)return!0;for(var L=x.params[0]||1,D=new Uint32Array(L),O=0;O<L;++O)D[O]=this._parser.precedingCodepoint;return this.print(D,0,D.length),!0},M.prototype.sendDeviceAttributesPrimary=function(x){return x.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0},M.prototype.sendDeviceAttributesSecondary=function(x){return x.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0},M.prototype._is=function(x){return(this._optionsService.options.termName+"").indexOf(x)===0},M.prototype.setMode=function(x){for(var L=0;L<x.length;L++)x.params[L]===4&&(this._coreService.modes.insertMode=!0);return!0},M.prototype.setModePrivate=function(x){for(var L=0;L<x.length;L++)switch(x.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),this._charsetService.setgCharset(1,C.DEFAULT_CHARSET),this._charsetService.setgCharset(2,C.DEFAULT_CHARSET),this._charsetService.setgCharset(3,C.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},M.prototype.resetMode=function(x){for(var L=0;L<x.length;L++)x.params[L]===4&&(this._coreService.modes.insertMode=!1);return!0},M.prototype.resetModePrivate=function(x){for(var L=0;L<x.length;L++)switch(x.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},M.prototype._updateAttrColor=function(x,L,D,O,j){return L===2?(x|=50331648,x&=-16777216,x|=s.AttributeData.fromColorRGB([D,O,j])):L===5&&(x&=-50331904,x|=33554432|255&D),x},M.prototype._extractColor=function(x,L,D){var O=[0,0,-1,0,0,0],j=0,W=0;do{if(O[W+j]=x.params[L+W],x.hasSubParams(L+W)){var F=x.getSubParams(L+W),N=0;do O[1]===5&&(j=1),O[W+N+1+j]=F[N];while(++N<F.length&&N+W+1+j<O.length);break}if(O[1]===5&&W+j>=2||O[1]===2&&W+j>=5)break;O[1]&&(j=1)}while(++W+L<x.length&&W+j<O.length);for(N=2;N<O.length;++N)O[N]===-1&&(O[N]=0);switch(O[0]){case 38:D.fg=this._updateAttrColor(D.fg,O[1],O[3],O[4],O[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,O[1],O[3],O[4],O[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,O[1],O[3],O[4],O[5])}return W},M.prototype._processUnderline=function(x,L){L.extended=L.extended.clone(),(!~x||x>5)&&(x=1),L.extended.underlineStyle=x,L.fg|=268435456,x===0&&(L.fg&=-268435457),L.updateExtended()},M.prototype.charAttributes=function(x){if(x.length===1&&x.params[0]===0)return this._curAttrData.fg=n.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=n.DEFAULT_ATTR_DATA.bg,!0;for(var L,D=x.length,O=this._curAttrData,j=0;j<D;j++)(L=x.params[j])>=30&&L<=37?(O.fg&=-50331904,O.fg|=16777216|L-30):L>=40&&L<=47?(O.bg&=-50331904,O.bg|=16777216|L-40):L>=90&&L<=97?(O.fg&=-50331904,O.fg|=16777224|L-90):L>=100&&L<=107?(O.bg&=-50331904,O.bg|=16777224|L-100):L===0?(O.fg=n.DEFAULT_ATTR_DATA.fg,O.bg=n.DEFAULT_ATTR_DATA.bg):L===1?O.fg|=134217728:L===3?O.bg|=67108864:L===4?(O.fg|=268435456,this._processUnderline(x.hasSubParams(j)?x.getSubParams(j)[0]:1,O)):L===5?O.fg|=536870912:L===7?O.fg|=67108864:L===8?O.fg|=1073741824:L===9?O.fg|=2147483648:L===2?O.bg|=134217728:L===21?this._processUnderline(2,O):L===22?(O.fg&=-134217729,O.bg&=-134217729):L===23?O.bg&=-67108865:L===24?O.fg&=-268435457:L===25?O.fg&=-536870913:L===27?O.fg&=-67108865:L===28?O.fg&=-1073741825:L===29?O.fg&=2147483647:L===39?(O.fg&=-67108864,O.fg|=16777215&n.DEFAULT_ATTR_DATA.fg):L===49?(O.bg&=-67108864,O.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):L===38||L===48||L===58?j+=this._extractColor(x,j,O):L===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):L===100?(O.fg&=-67108864,O.fg|=16777215&n.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",L);return!0},M.prototype.deviceStatus=function(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(f.C0.ESC+"[0n");break;case 6:var L=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(f.C0.ESC+"["+L+";"+D+"R")}return!0},M.prototype.deviceStatusPrivate=function(x){if(x.params[0]===6){var L=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(f.C0.ESC+"[?"+L+";"+D+"R")}return!0},M.prototype.softReset=function(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},M.prototype.setCursorStyle=function(x){var L=x.params[0]||1;switch(L){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"}var D=L%2==1;return this._optionsService.options.cursorBlink=D,!0},M.prototype.setScrollRegion=function(x){var L,D=x.params[0]||1;return(x.length<2||(L=x.params[1])>this._bufferService.rows||L===0)&&(L=this._bufferService.rows),L>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=L-1,this._setCursor(0,0)),!0},M.prototype.windowOptions=function(x){if(!y(x.params[0],this._optionsService.options.windowOptions))return!0;var L=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(u.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(u.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(f.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},M.prototype.saveCursor=function(x){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},M.prototype.restoreCursor=function(x){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},M.prototype.setTitle=function(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0},M.prototype.setIconName=function(x){return this._iconName=x,!0},M.prototype._parseAnsiColorChange=function(x){for(var L,D={colors:[]},O=/(\d+);rgb:([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})/gi;(L=O.exec(x))!==null;)D.colors.push({colorIndex:parseInt(L[1]),red:parseInt(L[2],16),green:parseInt(L[3],16),blue:parseInt(L[4],16)});return D.colors.length===0?null:D},M.prototype.setAnsiColor=function(x){var L=this._parseAnsiColorChange(x);return L?this._onAnsiColorChange.fire(L):this._logService.warn("Expected format <num>;rgb:<rr>/<gg>/<bb> but got data: "+x),!0},M.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},M.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},M.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},M.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),!0},M.prototype.selectCharset=function(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(b[x[0]],C.CHARSETS[x[1]]||C.DEFAULT_CHARSET),!0)},M.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},M.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},M.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},M.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},M.prototype.reset=function(){this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone()},M.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},M.prototype.setgLevel=function(x){return this._charsetService.setgLevel(x),!0},M.prototype.screenAlignmentPattern=function(){var x=new r.CellData;x.content=1<<22|"E".charCodeAt(0),x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(var L=0;L<this._bufferService.rows;++L){var D=this._activeBuffer.ybase+this._activeBuffer.y+L,O=this._activeBuffer.lines.get(D);O&&(O.fill(x),O.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},M}(i.Disposable);a.InputHandler=A},844:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.Disposable=void 0;var g=function(){function _(){this._disposables=[],this._isDisposed=!1}return _.prototype.dispose=function(){this._isDisposed=!0;for(var u=0,f=this._disposables;u<f.length;u++)f[u].dispose();this._disposables.length=0},_.prototype.register=function(u){return this._disposables.push(u),u},_.prototype.unregister=function(u){var f=this._disposables.indexOf(u);f!==-1&&this._disposables.splice(f,1)},_}();function h(_){for(var u=0,f=_;u<f.length;u++)f[u].dispose();_.length=0}a.Disposable=g,a.disposeArray=h,a.getDisposeArrayDisposable=function(_){return{dispose:function(){return h(_)}}}},6114:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.isSafari=a.isFirefox=void 0;var g=typeof navigator=="undefined",h=g?"node":navigator.userAgent,_=g?"node":navigator.platform;a.isFirefox=h.includes("Firefox"),a.isSafari=/^((?!chrome|android).)*safari/i.test(h),a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),a.isIpad=_==="iPad",a.isIphone=_==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),a.isLinux=_.indexOf("Linux")>=0},8273:(B,a)=>{function g(h,_,u,f){if(u===void 0&&(u=0),f===void 0&&(f=h.length),u>=h.length)return h;u=(h.length+u)%h.length,f=f>=h.length?h.length:(h.length+f)%h.length;for(var C=u;C<f;++C)h[C]=_;return h}Object.defineProperty(a,"__esModule",{value:!0}),a.concat=a.fillFallback=a.fill=void 0,a.fill=function(h,_,u,f){return h.fill?h.fill(_,u,f):g(h,_,u,f)},a.fillFallback=g,a.concat=function(h,_){var u=new h.constructor(h.length+_.length);return u.set(h),u.set(_,h.length),u}},9282:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;var h=g(643);a.updateWindowsModeWrappedState=function(_){var u=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),f=u==null?void 0:u.get(_.cols-1),C=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);C&&f&&(C.isWrapped=f[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&f[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;var g=function(){function _(){this.fg=0,this.bg=0,this.extended=new h}return _.toColorRGB=function(u){return[u>>>16&255,u>>>8&255,255&u]},_.fromColorRGB=function(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]},_.prototype.clone=function(){var u=new _;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u},_.prototype.isInverse=function(){return 67108864&this.fg},_.prototype.isBold=function(){return 134217728&this.fg},_.prototype.isUnderline=function(){return 268435456&this.fg},_.prototype.isBlink=function(){return 536870912&this.fg},_.prototype.isInvisible=function(){return 1073741824&this.fg},_.prototype.isItalic=function(){return 67108864&this.bg},_.prototype.isDim=function(){return 134217728&this.bg},_.prototype.isStrikethrough=function(){return 2147483648&this.fg},_.prototype.getFgColorMode=function(){return 50331648&this.fg},_.prototype.getBgColorMode=function(){return 50331648&this.bg},_.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},_.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},_.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},_.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},_.prototype.isFgDefault=function(){return(50331648&this.fg)==0},_.prototype.isBgDefault=function(){return(50331648&this.bg)==0},_.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},_.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},_.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},_.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},_.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},_.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()},_.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},_.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},_.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},_.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},_.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},_}();a.AttributeData=g;var h=function(){function _(u,f){u===void 0&&(u=0),f===void 0&&(f=-1),this.underlineStyle=u,this.underlineColor=f}return _.prototype.clone=function(){return new _(this.underlineStyle,this.underlineColor)},_.prototype.isEmpty=function(){return this.underlineStyle===0},_}();a.ExtendedAttrs=h},9092:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferStringIterator=a.Buffer=a.MAX_BUFFER_SIZE=void 0;var h=g(6349),_=g(8437),u=g(511),f=g(643),C=g(4634),p=g(4863),i=g(7116),o=g(3734);a.MAX_BUFFER_SIZE=4294967295;var l=function(){function t(e,r,s){this._hasScrollback=e,this._optionsService=r,this._bufferService=s,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=i.DEFAULT_CHARSET,this.markers=[],this._nullCell=u.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=u.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return t.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell},t.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell},t.prototype.getBlankLine=function(e,r){return new _.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},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 e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),t.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:r},t.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=_.DEFAULT_ATTR_DATA);for(var r=this._rows;r--;)this.lines.push(this.getBlankLine(e))}},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(e,r){var s=this.getNullCell(_.DEFAULT_ATTR_DATA),c=this._getCorrectBufferLength(r);if(c>this.lines.maxLength&&(this.lines.maxLength=c),this.lines.length>0){if(this._cols<e)for(var d=0;d<this.lines.length;d++)this.lines.get(d).resize(e,s);var v=0;if(this._rows<r)for(var b=this._rows;b<r;b++)this.lines.length<r+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new _.BufferLine(e,s)):this.ybase>0&&this.lines.length<=this.ybase+this.y+v+1?(this.ybase--,v++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(e,s)));else for(b=this._rows;b>r;b--)this.lines.length>r+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(c<this.lines.maxLength){var S=this.lines.length-c;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=c}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,r-1),v&&(this.y+=v),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=r-1,this._isReflowEnabled&&(this._reflow(e,r),this._cols>e))for(d=0;d<this.lines.length;d++)this.lines.get(d).resize(e,s);this._cols=e,this._rows=r},Object.defineProperty(t.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),t.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},t.prototype._reflowLarger=function(e,r){var s=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(s.length>0){var c=(0,C.reflowLargerCreateNewLayout)(this.lines,s);(0,C.reflowLargerApplyNewLayout)(this.lines,c.layout),this._reflowLargerAdjustViewport(e,r,c.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(e,r,s){for(var c=this.getNullCell(_.DEFAULT_ATTR_DATA),d=s;d-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<r&&this.lines.push(new _.BufferLine(e,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-s,0)},t.prototype._reflowSmaller=function(e,r){for(var s=this.getNullCell(_.DEFAULT_ATTR_DATA),c=[],d=0,v=this.lines.length-1;v>=0;v--){var b=this.lines.get(v);if(!(!b||!b.isWrapped&&b.getTrimmedLength()<=e)){for(var S=[b];b.isWrapped&&v>0;)b=this.lines.get(--v),S.unshift(b);var y=this.ybase+this.y;if(!(y>=v&&y<v+S.length)){var m,A=S[S.length-1].getTrimmedLength(),w=(0,C.reflowSmallerGetNewLineLengths)(S,this._cols,e),M=w.length-S.length;m=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);for(var x=[],L=0;L<M;L++){var D=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);x.push(D)}x.length>0&&(c.push({start:v+S.length+d,newLines:x}),d+=x.length),S.push.apply(S,x);var O=w.length-1,j=w[O];j===0&&(j=w[--O]);for(var W=S.length-M-1,F=A;W>=0;){var N=Math.min(F,j);if(S[O].copyCellsFrom(S[W],F-N,j-N,N,!0),(j-=N)==0&&(j=w[--O]),(F-=N)==0){W--;var G=Math.max(W,0);F=(0,C.getWrappedLineTrimmedLength)(S,G,this._cols)}}for(L=0;L<S.length;L++)w[L]<e&&S[L].setCell(w[L],s);for(var E=M-m;E-- >0;)this.ybase===0?this.y<r-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+d)-r&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+r-1)}}}if(c.length>0){var R=[],k=[];for(L=0;L<this.lines.length;L++)k.push(this.lines.get(L));var I=this.lines.length,T=I-1,K=0,Z=c[K];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+d);var Y=0;for(L=Math.min(this.lines.maxLength-1,I+d-1);L>=0;L--)if(Z&&Z.start>T+Y){for(var Q=Z.newLines.length-1;Q>=0;Q--)this.lines.set(L--,Z.newLines[Q]);L++,R.push({index:T+1,amount:Z.newLines.length}),Y+=Z.newLines.length,Z=c[++K]}else this.lines.set(L,k[T--]);var re=0;for(L=R.length-1;L>=0;L--)R[L].index+=re,this.lines.onInsertEmitter.fire(R[L]),re+=R[L].amount;var q=Math.max(0,I+d-this.lines.maxLength);q>0&&this.lines.onTrimEmitter.fire(q)}},t.prototype.stringIndexToBufferIndex=function(e,r,s){for(s===void 0&&(s=!1);r;){var c=this.lines.get(e);if(!c)return[-1,-1];for(var d=s?c.getTrimmedLength():c.length,v=0;v<d;++v)if(c.get(v)[f.CHAR_DATA_WIDTH_INDEX]&&(r-=c.get(v)[f.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,v];e++}return[e,0]},t.prototype.translateBufferLineToString=function(e,r,s,c){s===void 0&&(s=0);var d=this.lines.get(e);return d?d.translateToString(r,s,c):""},t.prototype.getWrappedRangeForLine=function(e){for(var r=e,s=e;r>0&&this.lines.get(r).isWrapped;)r--;for(;s+1<this.lines.length&&this.lines.get(s+1).isWrapped;)s++;return{first:r,last:s}},t.prototype.setupTabStops=function(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},t.prototype.prevStop=function(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},t.prototype.nextStop=function(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},t.prototype.addMarker=function(e){var r=this,s=new p.Marker(e);return this.markers.push(s),s.register(this.lines.onTrim(function(c){s.line-=c,s.line<0&&s.dispose()})),s.register(this.lines.onInsert(function(c){s.line>=c.index&&(s.line+=c.amount)})),s.register(this.lines.onDelete(function(c){s.line>=c.index&&s.line<c.index+c.amount&&s.dispose(),s.line>c.index&&(s.line-=c.amount)})),s.register(s.onDispose(function(){return r._removeMarker(s)})),s},t.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},t.prototype.iterator=function(e,r,s,c,d){return new n(this,e,r,s,c,d)},t}();a.Buffer=l;var n=function(){function t(e,r,s,c,d,v){s===void 0&&(s=0),c===void 0&&(c=e.lines.length),d===void 0&&(d=0),v===void 0&&(v=0),this._buffer=e,this._trimRight=r,this._startIndex=s,this._endIndex=c,this._startOverscan=d,this._endOverscan=v,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return t.prototype.hasNext=function(){return this._current<this._endIndex},t.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var r="",s=e.first;s<=e.last;++s)r+=this._buffer.translateBufferLineToString(s,this._trimRight);return this._current=e.last+1,{range:e,content:r}},t}();a.BufferStringIterator=n},8437:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;var h=g(482),_=g(643),u=g(511),f=g(3734);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);var C=function(){function p(i,o,l){l===void 0&&(l=!1),this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*i);for(var n=o||u.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),t=0;t<i;++t)this.setCell(t,n);this.length=i}return p.prototype.get=function(i){var o=this._data[3*i+0],l=2097151&o;return[this._data[3*i+1],2097152&o?this._combined[i]:l?(0,h.stringFromCodePoint)(l):"",o>>22,2097152&o?this._combined[i].charCodeAt(this._combined[i].length-1):l]},p.prototype.set=function(i,o){this._data[3*i+1]=o[_.CHAR_DATA_ATTR_INDEX],o[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[i]=o[1],this._data[3*i+0]=2097152|i|o[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*i+0]=o[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[_.CHAR_DATA_WIDTH_INDEX]<<22},p.prototype.getWidth=function(i){return this._data[3*i+0]>>22},p.prototype.hasWidth=function(i){return 12582912&this._data[3*i+0]},p.prototype.getFg=function(i){return this._data[3*i+1]},p.prototype.getBg=function(i){return this._data[3*i+2]},p.prototype.hasContent=function(i){return 4194303&this._data[3*i+0]},p.prototype.getCodePoint=function(i){var o=this._data[3*i+0];return 2097152&o?this._combined[i].charCodeAt(this._combined[i].length-1):2097151&o},p.prototype.isCombined=function(i){return 2097152&this._data[3*i+0]},p.prototype.getString=function(i){var o=this._data[3*i+0];return 2097152&o?this._combined[i]:2097151&o?(0,h.stringFromCodePoint)(2097151&o):""},p.prototype.loadCell=function(i,o){var l=3*i;return o.content=this._data[l+0],o.fg=this._data[l+1],o.bg=this._data[l+2],2097152&o.content&&(o.combinedData=this._combined[i]),268435456&o.bg&&(o.extended=this._extendedAttrs[i]),o},p.prototype.setCell=function(i,o){2097152&o.content&&(this._combined[i]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[i]=o.extended),this._data[3*i+0]=o.content,this._data[3*i+1]=o.fg,this._data[3*i+2]=o.bg},p.prototype.setCellFromCodePoint=function(i,o,l,n,t,e){268435456&t&&(this._extendedAttrs[i]=e),this._data[3*i+0]=o|l<<22,this._data[3*i+1]=n,this._data[3*i+2]=t},p.prototype.addCodepointToCell=function(i,o){var l=this._data[3*i+0];2097152&l?this._combined[i]+=(0,h.stringFromCodePoint)(o):(2097151&l?(this._combined[i]=(0,h.stringFromCodePoint)(2097151&l)+(0,h.stringFromCodePoint)(o),l&=-2097152,l|=2097152):l=o|1<<22,this._data[3*i+0]=l)},p.prototype.insertCells=function(i,o,l,n){if((i%=this.length)&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(n==null?void 0:n.fg)||0,(n==null?void 0:n.bg)||0,(n==null?void 0:n.extended)||new f.ExtendedAttrs),o<this.length-i){for(var t=new u.CellData,e=this.length-i-o-1;e>=0;--e)this.setCell(i+o+e,this.loadCell(i+e,t));for(e=0;e<o;++e)this.setCell(i+e,l)}else for(e=i;e<this.length;++e)this.setCell(e,l);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(n==null?void 0:n.fg)||0,(n==null?void 0:n.bg)||0,(n==null?void 0:n.extended)||new f.ExtendedAttrs)},p.prototype.deleteCells=function(i,o,l,n){if(i%=this.length,o<this.length-i){for(var t=new u.CellData,e=0;e<this.length-i-o;++e)this.setCell(i+e,this.loadCell(i+o+e,t));for(e=this.length-o;e<this.length;++e)this.setCell(e,l)}else for(e=i;e<this.length;++e)this.setCell(e,l);i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(n==null?void 0:n.fg)||0,(n==null?void 0:n.bg)||0,(n==null?void 0:n.extended)||new f.ExtendedAttrs),this.getWidth(i)!==0||this.hasContent(i)||this.setCellFromCodePoint(i,0,1,(n==null?void 0:n.fg)||0,(n==null?void 0:n.bg)||0,(n==null?void 0:n.extended)||new f.ExtendedAttrs)},p.prototype.replaceCells=function(i,o,l,n){for(i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(n==null?void 0:n.fg)||0,(n==null?void 0:n.bg)||0,(n==null?void 0:n.extended)||new f.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,(n==null?void 0:n.fg)||0,(n==null?void 0:n.bg)||0,(n==null?void 0:n.extended)||new f.ExtendedAttrs);i<o&&i<this.length;)this.setCell(i++,l)},p.prototype.resize=function(i,o){if(i!==this.length){if(i>this.length){var l=new Uint32Array(3*i);this.length&&(3*i<this._data.length?l.set(this._data.subarray(0,3*i)):l.set(this._data)),this._data=l;for(var n=this.length;n<i;++n)this.setCell(n,o)}else if(i){(l=new Uint32Array(3*i)).set(this._data.subarray(0,3*i)),this._data=l;var t=Object.keys(this._combined);for(n=0;n<t.length;n++){var e=parseInt(t[n],10);e>=i&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=i}},p.prototype.fill=function(i){this._combined={},this._extendedAttrs={};for(var o=0;o<this.length;++o)this.setCell(o,i)},p.prototype.copyFrom=function(i){for(var o in this.length!==i.length?this._data=new Uint32Array(i._data):this._data.set(i._data),this.length=i.length,this._combined={},i._combined)this._combined[o]=i._combined[o];for(var o in this._extendedAttrs={},i._extendedAttrs)this._extendedAttrs[o]=i._extendedAttrs[o];this.isWrapped=i.isWrapped},p.prototype.clone=function(){var i=new p(0);for(var o in i._data=new Uint32Array(this._data),i.length=this.length,this._combined)i._combined[o]=this._combined[o];for(var o in this._extendedAttrs)i._extendedAttrs[o]=this._extendedAttrs[o];return i.isWrapped=this.isWrapped,i},p.prototype.getTrimmedLength=function(){for(var i=this.length-1;i>=0;--i)if(4194303&this._data[3*i+0])return i+(this._data[3*i+0]>>22);return 0},p.prototype.copyCellsFrom=function(i,o,l,n,t){var e=i._data;if(t)for(var r=n-1;r>=0;r--)for(var s=0;s<3;s++)this._data[3*(l+r)+s]=e[3*(o+r)+s];else for(r=0;r<n;r++)for(s=0;s<3;s++)this._data[3*(l+r)+s]=e[3*(o+r)+s];var c=Object.keys(i._combined);for(s=0;s<c.length;s++){var d=parseInt(c[s],10);d>=o&&(this._combined[d-o+l]=i._combined[d])}},p.prototype.translateToString=function(i,o,l){i===void 0&&(i=!1),o===void 0&&(o=0),l===void 0&&(l=this.length),i&&(l=Math.min(l,this.getTrimmedLength()));for(var n="";o<l;){var t=this._data[3*o+0],e=2097151&t;n+=2097152&t?this._combined[o]:e?(0,h.stringFromCodePoint)(e):_.WHITESPACE_CELL_CHAR,o+=t>>22||1}return n},p}();a.BufferLine=C},4841:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(g,h){if(g.start.y>g.end.y)throw new Error("Buffer range end ("+g.end.x+", "+g.end.y+") cannot be before start ("+g.start.x+", "+g.start.y+")");return h*(g.end.y-g.start.y)+(g.end.x-g.start.x+1)}},4634:(B,a)=>{function g(h,_,u){if(_===h.length-1)return h[_].getTrimmedLength();var f=!h[_].hasContent(u-1)&&h[_].getWidth(u-1)===1,C=h[_+1].getWidth(0)===2;return f&&C?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,_,u,f,C){for(var p=[],i=0;i<h.length-1;i++){var o=i,l=h.get(++o);if(l.isWrapped){for(var n=[h.get(i)];o<h.length&&l.isWrapped;)n.push(l),l=h.get(++o);if(f>=i&&f<o)i+=n.length-1;else{for(var t=0,e=g(n,t,_),r=1,s=0;r<n.length;){var c=g(n,r,_),d=c-s,v=u-e,b=Math.min(d,v);n[t].copyCellsFrom(n[r],s,e,b,!1),(e+=b)===u&&(t++,e=0),(s+=b)===c&&(r++,s=0),e===0&&t!==0&&n[t-1].getWidth(u-1)===2&&(n[t].copyCellsFrom(n[t-1],u-1,e++,1,!1),n[t-1].setCell(u-1,C))}n[t].replaceCells(e,u,C);for(var S=0,y=n.length-1;y>0&&(y>t||n[y].getTrimmedLength()===0);y--)S++;S>0&&(p.push(i+n.length-S),p.push(S)),i+=n.length-1}}}return p},a.reflowLargerCreateNewLayout=function(h,_){for(var u=[],f=0,C=_[f],p=0,i=0;i<h.length;i++)if(C===i){var o=_[++f];h.onDeleteEmitter.fire({index:i-p,amount:o}),i+=o-1,p+=o,C=_[++f]}else u.push(i);return{layout:u,countRemoved:p}},a.reflowLargerApplyNewLayout=function(h,_){for(var u=[],f=0;f<_.length;f++)u.push(h.get(_[f]));for(f=0;f<u.length;f++)h.set(f,u[f]);h.length=_.length},a.reflowSmallerGetNewLineLengths=function(h,_,u){for(var f=[],C=h.map(function(e,r){return g(h,r,_)}).reduce(function(e,r){return e+r}),p=0,i=0,o=0;o<C;){if(C-o<u){f.push(C-o);break}p+=u;var l=g(h,i,_);p>l&&(p-=l,i++);var n=h[i].getWidth(p-1)===2;n&&p--;var t=n?u-1:u;f.push(t),o+=t}return f},a.getWrappedLineTrimmedLength=g},5295:function(B,a,g){var h,_=this&&this.__extends||(h=function(p,i){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,l){o.__proto__=l}||function(o,l){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(o[n]=l[n])},h(p,i)},function(p,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=p}h(p,i),p.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)});Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;var u=g(9092),f=g(8460),C=function(p){function i(o,l){var n=p.call(this)||this;return n._optionsService=o,n._bufferService=l,n._onBufferActivate=n.register(new f.EventEmitter),n.reset(),n}return _(i,p),Object.defineProperty(i.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),i.prototype.reset=function(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(i.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),i.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}))},i.prototype.activateAltBuffer=function(o){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(o),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}))},i.prototype.resize=function(o,l){this._normal.resize(o,l),this._alt.resize(o,l)},i.prototype.setupTabStops=function(o){this._normal.setupTabStops(o),this._alt.setupTabStops(o)},i}(g(844).Disposable);a.BufferSet=C},511:function(B,a,g){var h,_=this&&this.__extends||(h=function(i,o){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(l[t]=n[t])},h(i,o)},function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function l(){this.constructor=i}h(i,o),i.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)});Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;var u=g(482),f=g(643),C=g(3734),p=function(i){function o(){var l=i!==null&&i.apply(this,arguments)||this;return l.content=0,l.fg=0,l.bg=0,l.extended=new C.ExtendedAttrs,l.combinedData="",l}return _(o,i),o.fromCharData=function(l){var n=new o;return n.setFromCharData(l),n},o.prototype.isCombined=function(){return 2097152&this.content},o.prototype.getWidth=function(){return this.content>>22},o.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""},o.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},o.prototype.setFromCharData=function(l){this.fg=l[f.CHAR_DATA_ATTR_INDEX],this.bg=0;var n=!1;if(l[f.CHAR_DATA_CHAR_INDEX].length>2)n=!0;else if(l[f.CHAR_DATA_CHAR_INDEX].length===2){var t=l[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){var e=l[f.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(t-55296)+e-56320+65536|l[f.CHAR_DATA_WIDTH_INDEX]<<22:n=!0}else n=!0}else this.content=l[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[f.CHAR_DATA_WIDTH_INDEX]<<22;n&&(this.combinedData=l[f.CHAR_DATA_CHAR_INDEX],this.content=2097152|l[f.CHAR_DATA_WIDTH_INDEX]<<22)},o.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},o}(C.AttributeData);a.CellData=p},643:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=256,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:function(B,a,g){var h,_=this&&this.__extends||(h=function(C,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(i[l]=o[l])},h(C,p)},function(C,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function i(){this.constructor=C}h(C,p),C.prototype=p===null?Object.create(p):(i.prototype=p.prototype,new i)});Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;var u=g(8460),f=function(C){function p(i){var o=C.call(this)||this;return o.line=i,o._id=p._nextId++,o.isDisposed=!1,o._onDispose=new u.EventEmitter,o}return _(p,C),Object.defineProperty(p.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),C.prototype.dispose.call(this))},p._nextId=1,p}(g(844).Disposable);a.Marker=f},7116:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},a.CHARSETS.A={"#":"\xA3"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},a.CHARSETS.C=a.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},a.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},a.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},a.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},a.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},a.CHARSETS.E=a.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},a.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},a.CHARSETS.H=a.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},a.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(B,a)=>{var g,h;Object.defineProperty(a,"__esModule",{value:!0}),a.C1=a.C0=void 0,(h=a.C0||(a.C0={})).NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL="\x7F",(g=a.C1||(a.C1={})).PAD="\x80",g.HOP="\x81",g.BPH="\x82",g.NBH="\x83",g.IND="\x84",g.NEL="\x85",g.SSA="\x86",g.ESA="\x87",g.HTS="\x88",g.HTJ="\x89",g.VTS="\x8A",g.PLD="\x8B",g.PLU="\x8C",g.RI="\x8D",g.SS2="\x8E",g.SS3="\x8F",g.DCS="\x90",g.PU1="\x91",g.PU2="\x92",g.STS="\x93",g.CCH="\x94",g.MW="\x95",g.SPA="\x96",g.EPA="\x97",g.SOS="\x98",g.SGCI="\x99",g.SCI="\x9A",g.CSI="\x9B",g.ST="\x9C",g.OSC="\x9D",g.PM="\x9E",g.APC="\x9F"},7399:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;var h=g(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(u,f,C,p){var i={type:0,cancel:!1,key:void 0},o=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?i.key=f?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?i.key=f?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?i.key=f?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(i.key=f?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:if(u.shiftKey){i.key=h.C0.BS;break}if(u.altKey){i.key=h.C0.ESC+h.C0.DEL;break}i.key=h.C0.DEL;break;case 9:if(u.shiftKey){i.key=h.C0.ESC+"[Z";break}i.key=h.C0.HT,i.cancel=!0;break;case 13:i.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,i.cancel=!0;break;case 27:i.key=h.C0.ESC,u.altKey&&(i.key=h.C0.ESC+h.C0.ESC),i.cancel=!0;break;case 37:if(u.metaKey)break;o?(i.key=h.C0.ESC+"[1;"+(o+1)+"D",i.key===h.C0.ESC+"[1;3D"&&(i.key=h.C0.ESC+(C?"b":"[1;5D"))):i.key=f?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;o?(i.key=h.C0.ESC+"[1;"+(o+1)+"C",i.key===h.C0.ESC+"[1;3C"&&(i.key=h.C0.ESC+(C?"f":"[1;5C"))):i.key=f?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;o?(i.key=h.C0.ESC+"[1;"+(o+1)+"A",C||i.key!==h.C0.ESC+"[1;3A"||(i.key=h.C0.ESC+"[1;5A")):i.key=f?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;o?(i.key=h.C0.ESC+"[1;"+(o+1)+"B",C||i.key!==h.C0.ESC+"[1;3B"||(i.key=h.C0.ESC+"[1;5B")):i.key=f?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(i.key=h.C0.ESC+"[2~");break;case 46:i.key=o?h.C0.ESC+"[3;"+(o+1)+"~":h.C0.ESC+"[3~";break;case 36:i.key=o?h.C0.ESC+"[1;"+(o+1)+"H":f?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:i.key=o?h.C0.ESC+"[1;"+(o+1)+"F":f?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?i.type=2:i.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?i.type=3:i.key=h.C0.ESC+"[6~";break;case 112:i.key=o?h.C0.ESC+"[1;"+(o+1)+"P":h.C0.ESC+"OP";break;case 113:i.key=o?h.C0.ESC+"[1;"+(o+1)+"Q":h.C0.ESC+"OQ";break;case 114:i.key=o?h.C0.ESC+"[1;"+(o+1)+"R":h.C0.ESC+"OR";break;case 115:i.key=o?h.C0.ESC+"[1;"+(o+1)+"S":h.C0.ESC+"OS";break;case 116:i.key=o?h.C0.ESC+"[15;"+(o+1)+"~":h.C0.ESC+"[15~";break;case 117:i.key=o?h.C0.ESC+"[17;"+(o+1)+"~":h.C0.ESC+"[17~";break;case 118:i.key=o?h.C0.ESC+"[18;"+(o+1)+"~":h.C0.ESC+"[18~";break;case 119:i.key=o?h.C0.ESC+"[19;"+(o+1)+"~":h.C0.ESC+"[19~";break;case 120:i.key=o?h.C0.ESC+"[20;"+(o+1)+"~":h.C0.ESC+"[20~";break;case 121:i.key=o?h.C0.ESC+"[21;"+(o+1)+"~":h.C0.ESC+"[21~";break;case 122:i.key=o?h.C0.ESC+"[23;"+(o+1)+"~":h.C0.ESC+"[23~";break;case 123:i.key=o?h.C0.ESC+"[24;"+(o+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(C&&!p||!u.altKey||u.metaKey)!C||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?i.key=u.key:u.key&&u.ctrlKey&&u.key==="_"&&(i.key=h.C0.US):u.keyCode===65&&(i.type=1);else{var l=_[u.keyCode],n=l&&l[u.shiftKey?1:0];if(n)i.key=h.C0.ESC+n;else if(u.keyCode>=65&&u.keyCode<=90){var t=u.ctrlKey?u.keyCode-64:u.keyCode+32;i.key=h.C0.ESC+String.fromCharCode(t)}}else u.keyCode>=65&&u.keyCode<=90?i.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?i.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?i.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?i.key=h.C0.DEL:u.keyCode===219?i.key=h.C0.ESC:u.keyCode===220?i.key=h.C0.FS:u.keyCode===221&&(i.key=h.C0.GS)}return i}},482:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(_){return _>65535?(_-=65536,String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):String.fromCharCode(_)},a.utf32ToString=function(_,u,f){u===void 0&&(u=0),f===void 0&&(f=_.length);for(var C="",p=u;p<f;++p){var i=_[p];i>65535?(i-=65536,C+=String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):C+=String.fromCharCode(i)}return C};var g=function(){function _(){this._interim=0}return _.prototype.clear=function(){this._interim=0},_.prototype.decode=function(u,f){var C=u.length;if(!C)return 0;var p=0,i=0;this._interim&&(56320<=(n=u.charCodeAt(i++))&&n<=57343?f[p++]=1024*(this._interim-55296)+n-56320+65536:(f[p++]=this._interim,f[p++]=n),this._interim=0);for(var o=i;o<C;++o){var l=u.charCodeAt(o);if(55296<=l&&l<=56319){if(++o>=C)return this._interim=l,p;var n;56320<=(n=u.charCodeAt(o))&&n<=57343?f[p++]=1024*(l-55296)+n-56320+65536:(f[p++]=l,f[p++]=n)}else l!==65279&&(f[p++]=l)}return p},_}();a.StringToUtf32=g;var h=function(){function _(){this.interim=new Uint8Array(3)}return _.prototype.clear=function(){this.interim.fill(0)},_.prototype.decode=function(u,f){var C=u.length;if(!C)return 0;var p,i,o,l,n=0,t=0,e=0;if(this.interim[0]){var r=!1,s=this.interim[0];s&=(224&s)==192?31:(240&s)==224?15:7;for(var c=0,d=void 0;(d=63&this.interim[++c])&&c<4;)s<<=6,s|=d;for(var v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,b=v-c;e<b;){if(e>=C)return 0;if((192&(d=u[e++]))!=128){e--,r=!0;break}this.interim[c++]=d,s<<=6,s|=63&d}r||(v===2?s<128?e--:f[n++]=s:v===3?s<2048||s>=55296&&s<=57343||s===65279||(f[n++]=s):s<65536||s>1114111||(f[n++]=s)),this.interim.fill(0)}for(var S=C-4,y=e;y<C;){for(;!(!(y<S)||128&(p=u[y])||128&(i=u[y+1])||128&(o=u[y+2])||128&(l=u[y+3]));)f[n++]=p,f[n++]=i,f[n++]=o,f[n++]=l,y+=4;if((p=u[y++])<128)f[n++]=p;else if((224&p)==192){if(y>=C)return this.interim[0]=p,n;if((192&(i=u[y++]))!=128){y--;continue}if((t=(31&p)<<6|63&i)<128){y--;continue}f[n++]=t}else if((240&p)==224){if(y>=C)return this.interim[0]=p,n;if((192&(i=u[y++]))!=128){y--;continue}if(y>=C)return this.interim[0]=p,this.interim[1]=i,n;if((192&(o=u[y++]))!=128){y--;continue}if((t=(15&p)<<12|(63&i)<<6|63&o)<2048||t>=55296&&t<=57343||t===65279)continue;f[n++]=t}else if((248&p)==240){if(y>=C)return this.interim[0]=p,n;if((192&(i=u[y++]))!=128){y--;continue}if(y>=C)return this.interim[0]=p,this.interim[1]=i,n;if((192&(o=u[y++]))!=128){y--;continue}if(y>=C)return this.interim[0]=p,this.interim[1]=i,this.interim[2]=o,n;if((192&(l=u[y++]))!=128){y--;continue}if((t=(7&p)<<18|(63&i)<<12|(63&o)<<6|63&l)<65536||t>1114111)continue;f[n++]=t}}return n},_}();a.Utf8ToUtf32=h},225:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;var h,_=g(8273),u=[[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]],f=[[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]],C=function(){function p(){if(this.version="6",!h){h=new Uint8Array(65536),(0,_.fill)(h,1),h[0]=0,(0,_.fill)(h,0,1,32),(0,_.fill)(h,0,127,160),(0,_.fill)(h,2,4352,4448),h[9001]=2,h[9002]=2,(0,_.fill)(h,2,11904,42192),h[12351]=1,(0,_.fill)(h,2,44032,55204),(0,_.fill)(h,2,63744,64256),(0,_.fill)(h,2,65040,65050),(0,_.fill)(h,2,65072,65136),(0,_.fill)(h,2,65280,65377),(0,_.fill)(h,2,65504,65511);for(var i=0;i<u.length;++i)(0,_.fill)(h,0,u[i][0],u[i][1]+1)}}return p.prototype.wcwidth=function(i){return i<32?0:i<127?1:i<65536?h[i]:function(o,l){var n,t=0,e=l.length-1;if(o<l[0][0]||o>l[e][1])return!1;for(;e>=t;)if(o>l[n=t+e>>1][1])t=n+1;else{if(!(o<l[n][0]))return!0;e=n-1}return!1}(i,f)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1},p}();a.UnicodeV6=C},5981:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;var g=typeof queueMicrotask=="undefined"?function(_){Promise.resolve().then(_)}:queueMicrotask,h=function(){function _(u){this._action=u,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return _.prototype.writeSync=function(u,f){if(f!==void 0&&this._syncCalls>f)this._syncCalls=0;else if(this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var C;for(this._isSyncWriting=!0;C=this._writeBuffer.shift();){this._action(C);var p=this._callbacks.shift();p&&p()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},_.prototype.write=function(u,f){var C=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return C._innerWrite()})),this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(f)},_.prototype._innerWrite=function(u,f){var C=this;u===void 0&&(u=0),f===void 0&&(f=!0);for(var p=u||Date.now();this._writeBuffer.length>this._bufferOffset;){var i=this._writeBuffer[this._bufferOffset],o=this._action(i,f);if(o)return void o.catch(function(n){return g(function(){throw n}),Promise.resolve(!1)}).then(function(n){return Date.now()-p>=12?setTimeout(function(){return C._innerWrite(0,n)}):C._innerWrite(p,n)});var l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=i.length,Date.now()-p>=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 C._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0)},_}();a.WriteBuffer=h},5770:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;var h=g(482),_=g(8742),u=g(5770),f=[],C=function(){function o(){this._handlers=Object.create(null),this._active=f,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return o.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=f},o.prototype.registerHandler=function(l,n){this._handlers[l]===void 0&&(this._handlers[l]=[]);var t=this._handlers[l];return t.push(n),{dispose:function(){var e=t.indexOf(n);e!==-1&&t.splice(e,1)}}},o.prototype.clearHandler=function(l){this._handlers[l]&&delete this._handlers[l]},o.prototype.setHandlerFallback=function(l){this._handlerFb=l},o.prototype.reset=function(){if(this._active.length)for(var l=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;l>=0;--l)this._active[l].unhook(!1);this._stack.paused=!1,this._active=f,this._ident=0},o.prototype.hook=function(l,n){if(this.reset(),this._ident=l,this._active=this._handlers[l]||f,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(n);else this._handlerFb(this._ident,"HOOK",n)},o.prototype.put=function(l,n,t){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(l,n,t);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(l,n,t))},o.prototype.unhook=function(l,n){if(n===void 0&&(n=!0),this._active.length){var t=!1,e=this._active.length-1,r=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,t=n,r=this._stack.fallThrough,this._stack.paused=!1),!r&&t===!1){for(;e>=0&&(t=this._active[e].unhook(l))!==!0;e--)if(t instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!1,t;e--}for(;e>=0;e--)if((t=this._active[e].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!0,t}else this._handlerFb(this._ident,"UNHOOK",l);this._active=f,this._ident=0},o}();a.DcsParser=C;var p=new _.Params;p.addParam(0);var i=function(){function o(l){this._handler=l,this._data="",this._params=p,this._hitLimit=!1}return o.prototype.hook=function(l){this._params=l.length>1||l.params[0]?l.clone():p,this._data="",this._hitLimit=!1},o.prototype.put=function(l,n,t){this._hitLimit||(this._data+=(0,h.utf32ToString)(l,n,t),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},o.prototype.unhook=function(l){var n=this,t=!1;if(this._hitLimit)t=!1;else if(l&&(t=this._handler(this._data,this._params))instanceof Promise)return t.then(function(e){return n._params=p,n._data="",n._hitLimit=!1,e});return this._params=p,this._data="",this._hitLimit=!1,t},o}();a.DcsHandler=i},2015:function(B,a,g){var h,_=this&&this.__extends||(h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(r[c]=s[c])},h(t,e)},function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}h(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;var u=g(844),f=g(8273),C=g(8742),p=g(6242),i=g(6351),o=function(){function t(e){this.table=new Uint8Array(e)}return t.prototype.setDefault=function(e,r){(0,f.fill)(this.table,e<<4|r)},t.prototype.add=function(e,r,s,c){this.table[r<<8|e]=s<<4|c},t.prototype.addMany=function(e,r,s,c){for(var d=0;d<e.length;d++)this.table[r<<8|e[d]]=s<<4|c},t}();a.TransitionTable=o;var l=160;a.VT500_TRANSITION_TABLE=function(){var t=new o(4095),e=Array.apply(null,Array(256)).map(function(b,S){return S}),r=function(b,S){return e.slice(b,S)},s=r(32,127),c=r(0,24);c.push(25),c.push.apply(c,r(28,32));var d,v=r(0,14);for(d in t.setDefault(1,0),t.addMany(s,0,2,0),v)t.addMany([24,26,153,154],d,3,0),t.addMany(r(128,144),d,3,0),t.addMany(r(144,152),d,3,0),t.add(156,d,0,0),t.add(27,d,11,1),t.add(157,d,4,8),t.addMany([152,158,159],d,0,7),t.add(155,d,11,3),t.add(144,d,11,9);return t.addMany(c,0,3,0),t.addMany(c,1,3,1),t.add(127,1,0,1),t.addMany(c,8,0,8),t.addMany(c,3,3,3),t.add(127,3,0,3),t.addMany(c,4,3,4),t.add(127,4,0,4),t.addMany(c,6,3,6),t.addMany(c,5,3,5),t.add(127,5,0,5),t.addMany(c,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(s,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(r(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(s,7,0,7),t.addMany(c,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(r(64,127),3,7,0),t.addMany(r(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(r(48,60),4,8,4),t.addMany(r(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(r(32,64),6,0,6),t.add(127,6,0,6),t.addMany(r(64,127),6,0,0),t.addMany(r(32,48),3,9,5),t.addMany(r(32,48),5,9,5),t.addMany(r(48,64),5,0,6),t.addMany(r(64,127),5,7,0),t.addMany(r(32,48),4,9,5),t.addMany(r(32,48),1,9,2),t.addMany(r(32,48),2,9,2),t.addMany(r(48,127),2,10,0),t.addMany(r(48,80),1,10,0),t.addMany(r(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(r(96,127),1,10,0),t.add(80,1,11,9),t.addMany(c,9,0,9),t.add(127,9,0,9),t.addMany(r(28,32),9,0,9),t.addMany(r(32,48),9,9,12),t.addMany(r(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(c,11,0,11),t.addMany(r(32,128),11,0,11),t.addMany(r(28,32),11,0,11),t.addMany(c,10,0,10),t.add(127,10,0,10),t.addMany(r(28,32),10,0,10),t.addMany(r(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(r(32,48),10,9,12),t.addMany(c,12,0,12),t.add(127,12,0,12),t.addMany(r(28,32),12,0,12),t.addMany(r(32,48),12,9,12),t.addMany(r(48,64),12,0,11),t.addMany(r(64,127),12,12,13),t.addMany(r(64,127),10,12,13),t.addMany(r(64,127),9,12,13),t.addMany(c,13,13,13),t.addMany(s,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(l,0,2,0),t.add(l,8,5,8),t.add(l,6,0,6),t.add(l,11,0,11),t.add(l,13,13,13),t}();var n=function(t){function e(r){r===void 0&&(r=a.VT500_TRANSITION_TABLE);var s=t.call(this)||this;return s._transitions=r,s._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},s.initialState=0,s.currentState=s.initialState,s._params=new C.Params,s._params.addParam(0),s._collect=0,s.precedingCodepoint=0,s._printHandlerFb=function(c,d,v){},s._executeHandlerFb=function(c){},s._csiHandlerFb=function(c,d){},s._escHandlerFb=function(c){},s._errorHandlerFb=function(c){return c},s._printHandler=s._printHandlerFb,s._executeHandlers=Object.create(null),s._csiHandlers=Object.create(null),s._escHandlers=Object.create(null),s._oscParser=new p.OscParser,s._dcsParser=new i.DcsParser,s._errorHandler=s._errorHandlerFb,s.registerEscHandler({final:"\\"},function(){return!0}),s}return _(e,t),e.prototype._identifier=function(r,s){s===void 0&&(s=[64,126]);var c=0;if(r.prefix){if(r.prefix.length>1)throw new Error("only one byte as prefix supported");if((c=r.prefix.charCodeAt(0))&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(r.intermediates){if(r.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var d=0;d<r.intermediates.length;++d){var v=r.intermediates.charCodeAt(d);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=v}}if(r.final.length!==1)throw new Error("final must be a single byte");var b=r.final.charCodeAt(0);if(s[0]>b||b>s[1])throw new Error("final must be in range "+s[0]+" .. "+s[1]);return(c<<=8)|b},e.prototype.identToString=function(r){for(var s=[];r;)s.push(String.fromCharCode(255&r)),r>>=8;return s.reverse().join("")},e.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},e.prototype.setPrintHandler=function(r){this._printHandler=r},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(r,s){var c=this._identifier(r,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);var d=this._escHandlers[c];return d.push(s),{dispose:function(){var v=d.indexOf(s);v!==-1&&d.splice(v,1)}}},e.prototype.clearEscHandler=function(r){this._escHandlers[this._identifier(r,[48,126])]&&delete this._escHandlers[this._identifier(r,[48,126])]},e.prototype.setEscHandlerFallback=function(r){this._escHandlerFb=r},e.prototype.setExecuteHandler=function(r,s){this._executeHandlers[r.charCodeAt(0)]=s},e.prototype.clearExecuteHandler=function(r){this._executeHandlers[r.charCodeAt(0)]&&delete this._executeHandlers[r.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(r){this._executeHandlerFb=r},e.prototype.registerCsiHandler=function(r,s){var c=this._identifier(r);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);var d=this._csiHandlers[c];return d.push(s),{dispose:function(){var v=d.indexOf(s);v!==-1&&d.splice(v,1)}}},e.prototype.clearCsiHandler=function(r){this._csiHandlers[this._identifier(r)]&&delete this._csiHandlers[this._identifier(r)]},e.prototype.setCsiHandlerFallback=function(r){this._csiHandlerFb=r},e.prototype.registerDcsHandler=function(r,s){return this._dcsParser.registerHandler(this._identifier(r),s)},e.prototype.clearDcsHandler=function(r){this._dcsParser.clearHandler(this._identifier(r))},e.prototype.setDcsHandlerFallback=function(r){this._dcsParser.setHandlerFallback(r)},e.prototype.registerOscHandler=function(r,s){return this._oscParser.registerHandler(r,s)},e.prototype.clearOscHandler=function(r){this._oscParser.clearHandler(r)},e.prototype.setOscHandlerFallback=function(r){this._oscParser.setHandlerFallback(r)},e.prototype.setErrorHandler=function(r){this._errorHandler=r},e.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},e.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,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},e.prototype._preserveStack=function(r,s,c,d,v){this._parseStack.state=r,this._parseStack.handlers=s,this._parseStack.handlerPos=c,this._parseStack.transition=d,this._parseStack.chunkPos=v},e.prototype.parse=function(r,s,c){var d,v=0,b=0,S=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,S=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var y=this._parseStack.handlers,m=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&m>-1){for(;m>=0&&(d=y[m](this._params))!==!0;m--)if(d instanceof Promise)return this._parseStack.handlerPos=m,d}this._parseStack.handlers=[];break;case 4:if(c===!1&&m>-1){for(;m>=0&&(d=y[m]())!==!0;m--)if(d instanceof Promise)return this._parseStack.handlerPos=m,d}this._parseStack.handlers=[];break;case 6:if(v=r[this._parseStack.chunkPos],d=this._dcsParser.unhook(v!==24&&v!==26,c))return d;v===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(v=r[this._parseStack.chunkPos],d=this._oscParser.end(v!==24&&v!==26,c))return d;v===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,S=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var A=S;A<s;++A){switch(v=r[A],(b=this._transitions.table[this.currentState<<8|(v<160?v:l)])>>4){case 2:for(var w=A+1;;++w){if(w>=s||(v=r[w])<32||v>126&&v<l){this._printHandler(r,A,w),A=w-1;break}if(++w>=s||(v=r[w])<32||v>126&&v<l){this._printHandler(r,A,w),A=w-1;break}if(++w>=s||(v=r[w])<32||v>126&&v<l){this._printHandler(r,A,w),A=w-1;break}if(++w>=s||(v=r[w])<32||v>126&&v<l){this._printHandler(r,A,w),A=w-1;break}}break;case 3:this._executeHandlers[v]?this._executeHandlers[v]():this._executeHandlerFb(v),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:A,code:v,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var M=(y=this._csiHandlers[this._collect<<8|v])?y.length-1:-1;M>=0&&(d=y[M](this._params))!==!0;M--)if(d instanceof Promise)return this._preserveStack(3,y,M,b,A),d;M<0&&this._csiHandlerFb(this._collect<<8|v,this._params),this.precedingCodepoint=0;break;case 8:do switch(v){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(v-48)}while(++A<s&&(v=r[A])>47&&v<60);A--;break;case 9:this._collect<<=8,this._collect|=v;break;case 10:for(var x=this._escHandlers[this._collect<<8|v],L=x?x.length-1:-1;L>=0&&(d=x[L]())!==!0;L--)if(d instanceof Promise)return this._preserveStack(4,x,L,b,A),d;L<0&&this._escHandlerFb(this._collect<<8|v),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|v,this._params);break;case 13:for(var D=A+1;;++D)if(D>=s||(v=r[D])===24||v===26||v===27||v>127&&v<l){this._dcsParser.put(r,A,D),A=D-1;break}break;case 14:if(d=this._dcsParser.unhook(v!==24&&v!==26))return this._preserveStack(6,[],0,b,A),d;v===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var O=A+1;;O++)if(O>=s||(v=r[O])<32||v>127&&v<l){this._oscParser.put(r,A,O),A=O-1;break}break;case 6:if(d=this._oscParser.end(v!==24&&v!==26))return this._preserveStack(5,[],0,b,A),d;v===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&b}},e}(u.Disposable);a.EscapeSequenceParser=n},6242:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;var h=g(5770),_=g(482),u=[],f=function(){function p(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return p.prototype.registerHandler=function(i,o){this._handlers[i]===void 0&&(this._handlers[i]=[]);var l=this._handlers[i];return l.push(o),{dispose:function(){var n=l.indexOf(o);n!==-1&&l.splice(n,1)}}},p.prototype.clearHandler=function(i){this._handlers[i]&&delete this._handlers[i]},p.prototype.setHandlerFallback=function(i){this._handlerFb=i},p.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=u},p.prototype.reset=function(){if(this._state===2)for(var i=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;i>=0;--i)this._active[i].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0},p.prototype._start=function(){if(this._active=this._handlers[this._id]||u,this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].start();else this._handlerFb(this._id,"START")},p.prototype._put=function(i,o,l){if(this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].put(i,o,l);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(i,o,l))},p.prototype.start=function(){this.reset(),this._state=1},p.prototype.put=function(i,o,l){if(this._state!==3){if(this._state===1)for(;o<l;){var n=i[o++];if(n===59){this._state=2,this._start();break}if(n<48||57<n)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+n-48}this._state===2&&l-o>0&&this._put(i,o,l)}},p.prototype.end=function(i,o){if(o===void 0&&(o=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var l=!1,n=this._active.length-1,t=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,l=o,t=this._stack.fallThrough,this._stack.paused=!1),!t&&l===!1){for(;n>=0&&(l=this._active[n].end(i))!==!0;n--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,l;n--}for(;n>=0;n--)if((l=this._active[n].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,l}else this._handlerFb(this._id,"END",i);this._active=u,this._id=-1,this._state=0}},p}();a.OscParser=f;var C=function(){function p(i){this._handler=i,this._data="",this._hitLimit=!1}return p.prototype.start=function(){this._data="",this._hitLimit=!1},p.prototype.put=function(i,o,l){this._hitLimit||(this._data+=(0,_.utf32ToString)(i,o,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},p.prototype.end=function(i){var o=this,l=!1;if(this._hitLimit)l=!1;else if(i&&(l=this._handler(this._data))instanceof Promise)return l.then(function(n){return o._data="",o._hitLimit=!1,n});return this._data="",this._hitLimit=!1,l},p}();a.OscHandler=C},8742:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;var g=2147483647,h=function(){function _(u,f){if(u===void 0&&(u=32),f===void 0&&(f=32),this.maxLength=u,this.maxSubParamsLength=f,f>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(f),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return _.fromArray=function(u){var f=new _;if(!u.length)return f;for(var C=u[0]instanceof Array?1:0;C<u.length;++C){var p=u[C];if(p instanceof Array)for(var i=0;i<p.length;++i)f.addSubParam(p[i]);else f.addParam(p)}return f},_.prototype.clone=function(){var u=new _(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u},_.prototype.toArray=function(){for(var u=[],f=0;f<this.length;++f){u.push(this.params[f]);var C=this._subParamsIdx[f]>>8,p=255&this._subParamsIdx[f];p-C>0&&u.push(Array.prototype.slice.call(this._subParams,C,p))}return u},_.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},_.prototype.addParam=function(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>g?g:u}},_.prototype.addSubParam=function(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>g?g:u,this._subParamsIdx[this.length-1]++}},_.prototype.hasSubParams=function(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0},_.prototype.getSubParams=function(u){var f=this._subParamsIdx[u]>>8,C=255&this._subParamsIdx[u];return C-f>0?this._subParams.subarray(f,C):null},_.prototype.getSubParamsAll=function(){for(var u={},f=0;f<this.length;++f){var C=this._subParamsIdx[f]>>8,p=255&this._subParamsIdx[f];p-C>0&&(u[f]=this._subParams.slice(C,p))}return u},_.prototype.addDigit=function(u){var f;if(!(this._rejectDigits||!(f=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var C=this._digitIsSub?this._subParams:this.params,p=C[f-1];C[f-1]=~p?Math.min(10*p+u,g):u}},_}();a.Params=h},5741:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0;var g=function(){function h(){this._addons=[]}return h.prototype.dispose=function(){for(var _=this._addons.length-1;_>=0;_--)this._addons[_].instance.dispose()},h.prototype.loadAddon=function(_,u){var f=this,C={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(C),u.dispose=function(){return f._wrappedAddonDispose(C)},u.activate(_)},h.prototype._wrappedAddonDispose=function(_){if(!_.isDisposed){for(var u=-1,f=0;f<this._addons.length;f++)if(this._addons[f]===_){u=f;break}if(u===-1)throw new Error("Could not dispose an addon that has not been loaded");_.isDisposed=!0,_.dispose.apply(_.instance),this._addons.splice(u,1)}},h}();a.AddonManager=g},8771:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;var h=g(3785),_=g(511),u=function(){function f(C,p){this._buffer=C,this.type=p}return f.prototype.init=function(C){return this._buffer=C,this},Object.defineProperty(f.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),f.prototype.getLine=function(C){var p=this._buffer.lines.get(C);if(p)return new h.BufferLineApiView(p)},f.prototype.getNullCell=function(){return new _.CellData},f}();a.BufferApiView=u},3785:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;var h=g(511),_=function(){function u(f){this._line=f}return Object.defineProperty(u.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),u.prototype.getCell=function(f,C){if(!(f<0||f>=this._line.length))return C?(this._line.loadCell(f,C),C):this._line.loadCell(f,new h.CellData)},u.prototype.translateToString=function(f,C,p){return this._line.translateToString(f,C,p)},u}();a.BufferLineApiView=_},8285:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;var h=g(8771),_=g(8460),u=function(){function f(C){var p=this;this._core=C,this._onBufferChange=new _.EventEmitter,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return p._onBufferChange.fire(p.active)})}return Object.defineProperty(f.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),f}();a.BufferNamespaceApi=u},7975:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0;var g=function(){function h(_){this._core=_}return h.prototype.registerCsiHandler=function(_,u){return this._core.registerCsiHandler(_,function(f){return u(f.toArray())})},h.prototype.addCsiHandler=function(_,u){return this.registerCsiHandler(_,u)},h.prototype.registerDcsHandler=function(_,u){return this._core.registerDcsHandler(_,function(f,C){return u(f,C.toArray())})},h.prototype.addDcsHandler=function(_,u){return this.registerDcsHandler(_,u)},h.prototype.registerEscHandler=function(_,u){return this._core.registerEscHandler(_,u)},h.prototype.addEscHandler=function(_,u){return this.registerEscHandler(_,u)},h.prototype.registerOscHandler=function(_,u){return this._core.registerOscHandler(_,u)},h.prototype.addOscHandler=function(_,u){return this.registerOscHandler(_,u)},h}();a.ParserApi=g},7090:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0;var g=function(){function h(_){this._core=_}return h.prototype.register=function(_){this._core.unicodeService.register(_)},Object.defineProperty(h.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(_){this._core.unicodeService.activeVersion=_},enumerable:!1,configurable:!0}),h}();a.UnicodeApi=g},744:function(B,a,g){var h,_=this&&this.__extends||(h=function(n,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},h(n,t)},function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}h(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),u=this&&this.__decorate||function(n,t,e,r){var s,c=arguments.length,d=c<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,t,e,r);else for(var v=n.length-1;v>=0;v--)(s=n[v])&&(d=(c<3?s(d):c>3?s(t,e,d):s(t,e))||d);return c>3&&d&&Object.defineProperty(t,e,d),d},f=this&&this.__param||function(n,t){return function(e,r){t(e,r,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;var C=g(2585),p=g(5295),i=g(8460),o=g(844);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;var l=function(n){function t(e){var r=n.call(this)||this;return r._optionsService=e,r.isUserScrolling=!1,r._onResize=new i.EventEmitter,r._onScroll=new i.EventEmitter,r.cols=Math.max(e.options.cols||0,a.MINIMUM_COLS),r.rows=Math.max(e.options.rows||0,a.MINIMUM_ROWS),r.buffers=new p.BufferSet(e,r),r}return _(t,n),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){n.prototype.dispose.call(this),this.buffers.dispose()},t.prototype.resize=function(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:r})},t.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},t.prototype.scroll=function(e,r){r===void 0&&(r=!1);var s,c=this.buffer;(s=this._cachedBlankLine)&&s.length===this.cols&&s.getFg(0)===e.fg&&s.getBg(0)===e.bg||(s=c.getBlankLine(e,r),this._cachedBlankLine=s),s.isWrapped=r;var d=c.ybase+c.scrollTop,v=c.ybase+c.scrollBottom;if(c.scrollTop===0){var b=c.lines.isFull;v===c.lines.length-1?b?c.lines.recycle().copyFrom(s):c.lines.push(s.clone()):c.lines.splice(v+1,0,s.clone()),b?this.isUserScrolling&&(c.ydisp=Math.max(c.ydisp-1,0)):(c.ybase++,this.isUserScrolling||c.ydisp++)}else{var S=v-d+1;c.lines.shiftElements(d+1,S-1,-1),c.lines.set(v,s.clone())}this.isUserScrolling||(c.ydisp=c.ybase),this._onScroll.fire(c.ydisp)},t.prototype.scrollLines=function(e,r,s){var c=this.buffer;if(e<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else e+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);var d=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+e,c.ybase),0),d!==c.ydisp&&(r||this._onScroll.fire(c.ydisp))},t.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},t.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},t.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},t.prototype.scrollToLine=function(e){var r=e-this.buffer.ydisp;r!==0&&this.scrollLines(r)},u([f(0,C.IOptionsService)],t)}(o.Disposable);a.BufferService=l},7994:(B,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0;var g=function(){function h(){this.glevel=0,this._charsets=[]}return h.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},h.prototype.setgLevel=function(_){this.glevel=_,this.charset=this._charsets[_]},h.prototype.setgCharset=function(_,u){this._charsets[_]=u,this.glevel===_&&(this.charset=u)},h}();a.CharsetService=g},1753:function(B,a,g){var h=this&&this.__decorate||function(n,t,e,r){var s,c=arguments.length,d=c<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,t,e,r);else for(var v=n.length-1;v>=0;v--)(s=n[v])&&(d=(c<3?s(d):c>3?s(t,e,d):s(t,e))||d);return c>3&&d&&Object.defineProperty(t,e,d),d},_=this&&this.__param||function(n,t){return function(e,r){t(e,r,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;var u=g(2585),f=g(8460),C={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(n){return n.button!==4&&n.action===1&&(n.ctrl=!1,n.alt=!1,n.shift=!1,!0)}},VT200:{events:19,restrict:function(n){return n.action!==32}},DRAG:{events:23,restrict:function(n){return n.action!==32||n.button!==3}},ANY:{events:31,restrict:function(n){return!0}}};function p(n,t){var e=(n.ctrl?16:0)|(n.shift?4:0)|(n.alt?8:0);return n.button===4?(e|=64,e|=n.action):(e|=3&n.button,4&n.button&&(e|=64),8&n.button&&(e|=128),n.action===32?e|=32:n.action!==0||t||(e|=3)),e}var i=String.fromCharCode,o={DEFAULT:function(n){var t=[p(n,!1)+32,n.col+32,n.row+32];return t[0]>255||t[1]>255||t[2]>255?"":""+i(t[0])+i(t[1])+i(t[2])},SGR:function(n){var t=n.action===0&&n.button!==4?"m":"M";return"[<"+p(n,!0)+";"+n.col+";"+n.row+t}},l=function(){function n(t,e){this._bufferService=t,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new f.EventEmitter,this._lastEvent=null;for(var r=0,s=Object.keys(C);r<s.length;r++){var c=s[r];this.addProtocol(c,C[c])}for(var d=0,v=Object.keys(o);d<v.length;d++){var b=v[d];this.addEncoding(b,o[b])}this.reset()}return n.prototype.addProtocol=function(t,e){this._protocols[t]=e},n.prototype.addEncoding=function(t,e){this._encodings[t]=e},Object.defineProperty(n.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(t){if(!this._protocols[t])throw new Error('unknown protocol "'+t+'"');this._activeProtocol=t,this._onProtocolChange.fire(this._protocols[t].events)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(t){if(!this._encodings[t])throw new Error('unknown encoding "'+t+'"');this._activeEncoding=t},enumerable:!1,configurable:!0}),n.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(n.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),n.prototype.triggerMouseEvent=function(t){if(t.col<0||t.col>=this._bufferService.cols||t.row<0||t.row>=this._bufferService.rows||t.button===4&&t.action===32||t.button===3&&t.action!==32||t.button!==4&&(t.action===2||t.action===3)||(t.col++,t.row++,t.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,t))||!this._protocols[this._activeProtocol].restrict(t))return!1;var e=this._encodings[this._activeEncoding](t);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=t,!0},n.prototype.explainEvents=function(t){return{down:!!(1&t),up:!!(2&t),drag:!!(4&t),move:!!(8&t),wheel:!!(16&t)}},n.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},h([_(0,u.IBufferService),_(1,u.ICoreService)],n)}();a.CoreMouseService=l},6975:function(B,a,g){var h,_=this&&this.__extends||(h=function(e,r){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(s[d]=c[d])},h(e,r)},function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}h(e,r),e.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}),u=this&&this.__decorate||function(e,r,s,c){var d,v=arguments.length,b=v<3?r:c===null?c=Object.getOwnPropertyDescriptor(r,s):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(e,r,s,c);else for(var S=e.length-1;S>=0;S--)(d=e[S])&&(b=(v<3?d(b):v>3?d(r,s,b):d(r,s))||b);return v>3&&b&&Object.defineProperty(r,s,b),b},f=this&&this.__param||function(e,r){return function(s,c){r(s,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;var C=g(2585),p=g(8460),i=g(1439),o=g(844),l=Object.freeze({insertMode:!1}),n=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),t=function(e){function r(s,c,d,v){var b=e.call(this)||this;return b._bufferService=c,b._logService=d,b._optionsService=v,b.isCursorInitialized=!1,b.isCursorHidden=!1,b._onData=b.register(new p.EventEmitter),b._onUserInput=b.register(new p.EventEmitter),b._onBinary=b.register(new p.EventEmitter),b._scrollToBottom=s,b.register({dispose:function(){return b._scrollToBottom=void 0}}),b.modes=(0,i.clone)(l),b.decPrivateModes=(0,i.clone)(n),b}return _(r,e),Object.defineProperty(r.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.modes=(0,i.clone)(l),this.decPrivateModes=(0,i.clone)(n)},r.prototype.triggerDataEvent=function(s,c){if(c===void 0&&(c=!1),!this._optionsService.options.disableStdin){var d=this._bufferService.buffer;d.ybase!==d.ydisp&&this._scrollToBottom(),c&&this._onUserInput.fire(),this._logService.debug('sending data "'+s+'"',function(){return s.split("").map(function(v){return v.charCodeAt(0)})}),this._onData.fire(s)}},r.prototype.triggerBinaryEvent=function(s){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+s+'"',function(){return s.split("").map(function(c){return c.charCodeAt(0)})}),this._onBinary.fire(s))},u([f(1,C.IBufferService),f(2,C.ILogService),f(3,C.IOptionsService)],r)}(o.Disposable);a.CoreService=t},3730:function(B,a,g){var h=this&&this.__decorate||function(C,p,i,o){var l,n=arguments.length,t=n<3?p:o===null?o=Object.getOwnPropertyDescriptor(p,i):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(C,p,i,o);else for(var e=C.length-1;e>=0;e--)(l=C[e])&&(t=(n<3?l(t):n>3?l(p,i,t):l(p,i))||t);return n>3&&t&&Object.defineProperty(p,i,t),t},_=this&&this.__param||function(C,p){return function(i,o){p(i,o,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DirtyRowService=void 0;var u=g(2585),f=function(){function C(p){this._bufferService=p,this.clearRange()}return Object.defineProperty(C.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),C.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},C.prototype.markDirty=function(p){p<this._start?this._start=p:p>this._end&&(this._end=p)},C.prototype.markRangeDirty=function(p,i){if(p>i){var o=p;p=i,i=o}p<this._start&&(this._start=p),i>this._end&&(this._end=i)},C.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},h([_(0,u.IBufferService)],C)}();a.DirtyRowService=f},4348:function(B,a,g){var h=this&&this.__spreadArray||function(p,i,o){if(o||arguments.length===2)for(var l,n=0,t=i.length;n<t;n++)!l&&n in i||(l||(l=Array.prototype.slice.call(i,0,n)),l[n]=i[n]);return p.concat(l||Array.prototype.slice.call(i))};Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;var _=g(2585),u=g(8343),f=function(){function p(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];this._entries=new Map;for(var l=0,n=i;l<n.length;l++){var t=n[l],e=t[0],r=t[1];this.set(e,r)}}return p.prototype.set=function(i,o){var l=this._entries.get(i);return this._entries.set(i,o),l},p.prototype.forEach=function(i){this._entries.forEach(function(o,l){return i(l,o)})},p.prototype.has=function(i){return this._entries.has(i)},p.prototype.get=function(i){return this._entries.get(i)},p}();a.ServiceCollection=f;var C=function(){function p(){this._services=new f,this._services.set(_.IInstantiationService,this)}return p.prototype.setService=function(i,o){this._services.set(i,o)},p.prototype.getService=function(i){return this._services.get(i)},p.prototype.createInstance=function(i){for(var o=[],l=1;l<arguments.length;l++)o[l-1]=arguments[l];for(var n=(0,u.getServiceDependencies)(i).sort(function(v,b){return v.index-b.index}),t=[],e=0,r=n;e<r.length;e++){var s=r[e],c=this._services.get(s.id);if(!c)throw new Error("[createInstance] "+i.name+" depends on UNKNOWN service "+s.id+".");t.push(c)}var d=n.length>0?n[0].index:o.length;if(o.length!==d)throw new Error("[createInstance] First service dependency of "+i.name+" at position "+(d+1)+" conflicts with "+o.length+" static arguments");return new(i.bind.apply(i,h([void 0],h(h([],o,!0),t,!0),!1)))},p}();a.InstantiationService=C},7866:function(B,a,g){var h=this&&this.__decorate||function(i,o,l,n){var t,e=arguments.length,r=e<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,l):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,l,n);else for(var s=i.length-1;s>=0;s--)(t=i[s])&&(r=(e<3?t(r):e>3?t(o,l,r):t(o,l))||r);return e>3&&r&&Object.defineProperty(o,l,r),r},_=this&&this.__param||function(i,o){return function(l,n){o(l,n,i)}},u=this&&this.__spreadArray||function(i,o,l){if(l||arguments.length===2)for(var n,t=0,e=o.length;t<e;t++)!n&&t in o||(n||(n=Array.prototype.slice.call(o,0,t)),n[t]=o[t]);return i.concat(n||Array.prototype.slice.call(o))};Object.defineProperty(a,"__esModule",{value:!0}),a.LogService=void 0;var f=g(2585),C={debug:f.LogLevelEnum.DEBUG,info:f.LogLevelEnum.INFO,warn:f.LogLevelEnum.WARN,error:f.LogLevelEnum.ERROR,off:f.LogLevelEnum.OFF},p=function(){function i(o){var l=this;this._optionsService=o,this.logLevel=f.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(n){n==="logLevel"&&l._updateLogLevel()})}return i.prototype._updateLogLevel=function(){this.logLevel=C[this._optionsService.options.logLevel]},i.prototype._evalLazyOptionalParams=function(o){for(var l=0;l<o.length;l++)typeof o[l]=="function"&&(o[l]=o[l]())},i.prototype._log=function(o,l,n){this._evalLazyOptionalParams(n),o.call.apply(o,u([console,"xterm.js: "+l],n,!1))},i.prototype.debug=function(o){for(var l=[],n=1;n<arguments.length;n++)l[n-1]=arguments[n];this.logLevel<=f.LogLevelEnum.DEBUG&&this._log(console.log,o,l)},i.prototype.info=function(o){for(var l=[],n=1;n<arguments.length;n++)l[n-1]=arguments[n];this.logLevel<=f.LogLevelEnum.INFO&&this._log(console.info,o,l)},i.prototype.warn=function(o){for(var l=[],n=1;n<arguments.length;n++)l[n-1]=arguments[n];this.logLevel<=f.LogLevelEnum.WARN&&this._log(console.warn,o,l)},i.prototype.error=function(o){for(var l=[],n=1;n<arguments.length;n++)l[n-1]=arguments[n];this.logLevel<=f.LogLevelEnum.ERROR&&this._log(console.error,o,l)},h([_(0,f.IOptionsService)],i)}();a.LogService=p},7302:function(B,a,g){var h=this&&this.__assign||function(){return h=Object.assign||function(i){for(var o,l=1,n=arguments.length;l<n;l++)for(var t in o=arguments[l])Object.prototype.hasOwnProperty.call(o,t)&&(i[t]=o[t]);return i},h.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=a.DEFAULT_BELL_SOUND=void 0;var _=g(8460),u=g(6114);a.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:a.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:u.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1};var f=["normal","bold","100","200","300","400","500","600","700","800","900"],C=["cols","rows"],p=function(){function i(o){for(var l in this._onOptionChange=new _.EventEmitter,this._options=h({},a.DEFAULT_OPTIONS),o)if(l in this._options)try{var n=o[l];this._options[l]=this._sanitizeAndValidateOption(l,n)}catch(t){console.error(t)}this.options=this._setupOptions(this._options,!1),this.publicOptions=this._setupOptions(this._options,!0)}return Object.defineProperty(i.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),i.prototype._setupOptions=function(o,l){var n=this,t=h({},o),e=function(s){Object.defineProperty(t,s,{get:function(){if(!(s in a.DEFAULT_OPTIONS))throw new Error('No option with key "'+s+'"');return n._options[s]},set:function(c){if(!(s in a.DEFAULT_OPTIONS))throw new Error('No option with key "'+s+'"');if(l&&C.includes(s))throw new Error('Option "'+s+'" can only be set in the constructor');c=n._sanitizeAndValidateOption(s,c),n._options[s]!==c&&(n._options[s]=c,n._onOptionChange.fire(s))}})};for(var r in t)e(r);return t},i.prototype.setOption=function(o,l){this.publicOptions[o]=l},i.prototype._sanitizeAndValidateOption=function(o,l){switch(o){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":l||(l=a.DEFAULT_OPTIONS[o]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=f.includes(l)?l:a.DEFAULT_OPTIONS[o];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(o+" cannot be less than 1, value: "+l);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(o+" cannot be less than 0, value: "+l);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(o+" cannot be less than or equal to 0, value: "+l);case"rows":case"cols":if(!l&&l!==0)throw new Error(o+" must be numeric, value: "+l)}return l},i.prototype.getOption=function(o){return this.publicOptions[o]},i}();a.OptionsService=p},8343:(B,a)=>{function g(h,_,u){_.di$target===_?_.di$dependencies.push({id:h,index:u}):(_.di$dependencies=[{id:h,index:u}],_.di$target=_)}Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0,a.serviceRegistry=new Map,a.getServiceDependencies=function(h){return h.di$dependencies||[]},a.createDecorator=function(h){if(a.serviceRegistry.has(h))return a.serviceRegistry.get(h);var _=function(u,f,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");g(_,u,C)};return _.toString=function(){return h},a.serviceRegistry.set(h,_),_}},2585:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IUnicodeService=a.LogLevelEnum=a.IOptionsService=a.ILogService=a.IInstantiationService=a.IDirtyRowService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;var h,_=g(8343);a.IBufferService=(0,_.createDecorator)("BufferService"),a.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),a.ICoreService=(0,_.createDecorator)("CoreService"),a.ICharsetService=(0,_.createDecorator)("CharsetService"),a.IDirtyRowService=(0,_.createDecorator)("DirtyRowService"),a.IInstantiationService=(0,_.createDecorator)("InstantiationService"),a.ILogService=(0,_.createDecorator)("LogService"),a.IOptionsService=(0,_.createDecorator)("OptionsService"),(h=a.LogLevelEnum||(a.LogLevelEnum={}))[h.DEBUG=0]="DEBUG",h[h.INFO=1]="INFO",h[h.WARN=2]="WARN",h[h.ERROR=3]="ERROR",h[h.OFF=4]="OFF",a.IUnicodeService=(0,_.createDecorator)("UnicodeService")},1480:(B,a,g)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;var h=g(8460),_=g(225),u=function(){function f(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter;var C=new _.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}return Object.defineProperty(f.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._active},set:function(C){if(!this._providers[C])throw new Error('unknown Unicode version "'+C+'"');this._active=C,this._activeProvider=this._providers[C],this._onChange.fire(C)},enumerable:!1,configurable:!0}),f.prototype.register=function(C){this._providers[C.version]=C},f.prototype.wcwidth=function(C){return this._activeProvider.wcwidth(C)},f.prototype.getStringCellWidth=function(C){for(var p=0,i=C.length,o=0;o<i;++o){var l=C.charCodeAt(o);if(55296<=l&&l<=56319){if(++o>=i)return p+this.wcwidth(l);var n=C.charCodeAt(o);56320<=n&&n<=57343?l=1024*(l-55296)+n-56320+65536:p+=this.wcwidth(n)}p+=this.wcwidth(l)}return p},f}();a.UnicodeService=u}},U={};function z(B){var a=U[B];if(a!==void 0)return a.exports;var g=U[B]={exports:{}};return X[B].call(g.exports,g,g.exports,z),g.exports}var V={};return(()=>{var B=V;Object.defineProperty(B,"__esModule",{value:!0}),B.Terminal=void 0;var a=z(3236),g=z(9042),h=z(7975),_=z(7090),u=z(5741),f=z(8285),C=function(){function p(i){this._core=new a.Terminal(i),this._addonManager=new u.AddonManager}return p.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(p.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new h.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"unicode",{get:function(){return this._checkProposedApi(),new _.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new f.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"modes",{get:function(){var i=this._core.coreService.decPrivateModes,o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:i.applicationCursorKeys,applicationKeypadMode:i.applicationKeypad,bracketedPasteMode:i.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:i.origin,reverseWraparoundMode:i.reverseWraparound,sendFocusMode:i.sendFocus,wraparoundMode:i.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"options",{get:function(){return this._core.options},enumerable:!1,configurable:!0}),p.prototype.blur=function(){this._core.blur()},p.prototype.focus=function(){this._core.focus()},p.prototype.resize=function(i,o){this._verifyIntegers(i,o),this._core.resize(i,o)},p.prototype.open=function(i){this._core.open(i)},p.prototype.attachCustomKeyEventHandler=function(i){this._core.attachCustomKeyEventHandler(i)},p.prototype.registerLinkMatcher=function(i,o,l){return this._checkProposedApi(),this._core.registerLinkMatcher(i,o,l)},p.prototype.deregisterLinkMatcher=function(i){this._checkProposedApi(),this._core.deregisterLinkMatcher(i)},p.prototype.registerLinkProvider=function(i){return this._checkProposedApi(),this._core.registerLinkProvider(i)},p.prototype.registerCharacterJoiner=function(i){return this._checkProposedApi(),this._core.registerCharacterJoiner(i)},p.prototype.deregisterCharacterJoiner=function(i){this._checkProposedApi(),this._core.deregisterCharacterJoiner(i)},p.prototype.registerMarker=function(i){return this._checkProposedApi(),this._verifyIntegers(i),this._core.addMarker(i)},p.prototype.addMarker=function(i){return this.registerMarker(i)},p.prototype.hasSelection=function(){return this._core.hasSelection()},p.prototype.select=function(i,o,l){this._verifyIntegers(i,o,l),this._core.select(i,o,l)},p.prototype.getSelection=function(){return this._core.getSelection()},p.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},p.prototype.clearSelection=function(){this._core.clearSelection()},p.prototype.selectAll=function(){this._core.selectAll()},p.prototype.selectLines=function(i,o){this._verifyIntegers(i,o),this._core.selectLines(i,o)},p.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},p.prototype.scrollLines=function(i){this._verifyIntegers(i),this._core.scrollLines(i)},p.prototype.scrollPages=function(i){this._verifyIntegers(i),this._core.scrollPages(i)},p.prototype.scrollToTop=function(){this._core.scrollToTop()},p.prototype.scrollToBottom=function(){this._core.scrollToBottom()},p.prototype.scrollToLine=function(i){this._verifyIntegers(i),this._core.scrollToLine(i)},p.prototype.clear=function(){this._core.clear()},p.prototype.write=function(i,o){this._core.write(i,o)},p.prototype.writeUtf8=function(i,o){this._core.write(i,o)},p.prototype.writeln=function(i,o){this._core.write(i),this._core.write(`\r
`,o)},p.prototype.paste=function(i){this._core.paste(i)},p.prototype.getOption=function(i){return this._core.optionsService.getOption(i)},p.prototype.setOption=function(i,o){this._core.optionsService.setOption(i,o)},p.prototype.refresh=function(i,o){this._verifyIntegers(i,o),this._core.refresh(i,o)},p.prototype.reset=function(){this._core.reset()},p.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},p.prototype.loadAddon=function(i){return this._addonManager.loadAddon(this,i)},Object.defineProperty(p,"strings",{get:function(){return g},enumerable:!1,configurable:!0}),p.prototype._verifyIntegers=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var l=0,n=i;l<n.length;l++){var t=n[l];if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}},p}();B.Terminal=C})(),V})()})}}]);