(()=>{var wo=Object.create,Mr=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Eo=Object.getOwnPropertyNames;var Ao=Object.getPrototypeOf,xo=Object.prototype.hasOwnProperty;var ko=Q=>Mr(Q,"__esModule",{value:!0});var Tr=(Q,J)=>()=>(J||Q((J={exports:{}}).exports,J),J.exports);var Mo=(Q,J,ne)=>{if(J&&typeof J=="object"||typeof J=="function")for(let ie of Eo(J))!xo.call(Q,ie)&&ie!=="default"&&Mr(Q,ie,{get:()=>J[ie],enumerable:!(ne=Lo(J,ie))||ne.enumerable});return Q},Or=Q=>Mo(ko(Mr(Q!=null?wo(Ao(Q)):{},"default",Q&&Q.__esModule&&"default"in Q?{get:()=>Q.default,enumerable:!0}:{value:Q,enumerable:!0})),Q);var Fn=Tr((gr,Dr)=>{(function(Q,J){if(typeof gr=="object"&&typeof Dr=="object")Dr.exports=J();else if(typeof define=="function"&&define.amd)define([],J);else{var ne=J();for(var ie in ne)(typeof gr=="object"?gr:Q)[ie]=ne[ie]}})(self,function(){return(()=>{"use strict";var Q={4567:function(z,c,y){var f,p=this&&this.__extends||(f=function(t,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(i[l]=a[l])},f(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 i(){this.constructor=t}f(t,e),t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;var _=y(9042),u=y(6114),C=y(9924),g=y(3656),n=y(844),o=y(5596),h=y(9631),s=function(t){function e(i,a){var l=t.call(this)||this;l._terminal=i,l._renderService=a,l._liveRegionLineCount=0,l._charsToConsume=[],l._charsToAnnounce="",l._accessibilityTreeRoot=document.createElement("div"),l._accessibilityTreeRoot.setAttribute("role","document"),l._accessibilityTreeRoot.classList.add("xterm-accessibility"),l._accessibilityTreeRoot.tabIndex=0,l._rowContainer=document.createElement("div"),l._rowContainer.setAttribute("role","list"),l._rowContainer.classList.add("xterm-accessibility-tree"),l._rowElements=[];for(var v=0;v<l._terminal.rows;v++)l._rowElements[v]=l._createAccessibilityTreeNode(),l._rowContainer.appendChild(l._rowElements[v]);if(l._topBoundaryFocusListener=function(m){return l._onBoundaryFocus(m,0)},l._bottomBoundaryFocusListener=function(m){return l._onBoundaryFocus(m,1)},l._rowElements[0].addEventListener("focus",l._topBoundaryFocusListener),l._rowElements[l._rowElements.length-1].addEventListener("focus",l._bottomBoundaryFocusListener),l._refreshRowsDimensions(),l._accessibilityTreeRoot.appendChild(l._rowContainer),l._renderRowsDebouncer=new C.TimeBasedDebouncer(l._renderRows.bind(l)),l._refreshRows(),l._liveRegion=document.createElement("div"),l._liveRegion.classList.add("live-region"),l._liveRegion.setAttribute("aria-live","assertive"),l._accessibilityTreeRoot.appendChild(l._liveRegion),!l._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return l._terminal.element.insertAdjacentElement("afterbegin",l._accessibilityTreeRoot),l.register(l._renderRowsDebouncer),l.register(l._terminal.onResize(function(m){return l._onResize(m.rows)})),l.register(l._terminal.onRender(function(m){return l._refreshRows(m.start,m.end)})),l.register(l._terminal.onScroll(function(){return l._refreshRows()})),l.register(l._terminal.onA11yChar(function(m){return l._onChar(m)})),l.register(l._terminal.onLineFeed(function(){return l._onChar(`
`)})),l.register(l._terminal.onA11yTab(function(m){return l._onTab(m)})),l.register(l._terminal.onKey(function(m){return l._onKey(m.key)})),l.register(l._terminal.onBlur(function(){return l._clearLiveRegion()})),l.register(l._renderService.onDimensionsChange(function(){return l._refreshRowsDimensions()})),l._screenDprMonitor=new o.ScreenDprMonitor,l.register(l._screenDprMonitor),l._screenDprMonitor.setListener(function(){return l._refreshRowsDimensions()}),l.register((0,g.addDisposableDomListener)(window,"resize",function(){return l._refreshRowsDimensions()})),l}return p(e,t),e.prototype.dispose=function(){t.prototype.dispose.call(this),(0,h.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(i,a){var l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")!==(a===0?"1":""+this._terminal.buffer.lines.length)&&i.relatedTarget===v){var m,E;if(a===0?(m=l,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(m=this._rowElements.shift(),E=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){var L=this._createAccessibilityTreeNode();this._rowElements.unshift(L),this._rowContainer.insertAdjacentElement("afterbegin",L)}else L=this._createAccessibilityTreeNode(),this._rowElements.push(L),this._rowContainer.appendChild(L);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}},e.prototype._onResize=function(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i},e.prototype._onTab=function(i){for(var a=0;a<i;a++)this._onChar(" ")},e.prototype._onChar=function(i){var a=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)),u.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){a._accessibilityTreeRoot.appendChild(a._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,u.isMac&&(0,h.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(i){this._clearLiveRegion(),this._charsToConsume.push(i)},e.prototype._refreshRows=function(i,a){this._renderRowsDebouncer.refresh(i,a,this._terminal.rows)},e.prototype._renderRows=function(i,a){for(var l=this._terminal.buffer,v=l.lines.length.toString(),m=i;m<=a;m++){var E=l.translateBufferLineToString(l.ydisp+m,!0),L=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(E.length===0?b.innerText="\xA0":b.textContent=E,b.setAttribute("aria-posinset",L),b.setAttribute("aria-setsize",v))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}},e.prototype._refreshRowDimensions=function(i){i.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(n.Disposable);c.AccessibilityManager=s},3614:(z,c)=>{function y(u){return u.replace(/\r?\n/g,"\r")}function f(u,C){return C?"[200~"+u+"[201~":u}function p(u,C,g){u=f(u=y(u),g.decPrivateModes.bracketedPasteMode),g.triggerDataEvent(u,!0),C.value=""}function _(u,C,g){var n=g.getBoundingClientRect(),o=u.clientX-n.left-10,h=u.clientY-n.top-10;C.style.width="20px",C.style.height="20px",C.style.left=o+"px",C.style.top=h+"px",C.style.zIndex="1000",C.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=y,c.bracketTextForPaste=f,c.copyHandler=function(u,C){u.clipboardData&&u.clipboardData.setData("text/plain",C.selectionText),u.preventDefault()},c.handlePasteEvent=function(u,C,g){u.stopPropagation(),u.clipboardData&&p(u.clipboardData.getData("text/plain"),C,g)},c.paste=p,c.moveTextAreaUnderMouseCursor=_,c.rightClickHandler=function(u,C,g,n,o){_(u,C,g),o&&n.rightClickSelect(u),C.value=n.selectionText,C.select()}},4774:(z,c)=>{var y,f,p,_;function u(g){var n=g.toString(16);return n.length<2?"0"+n:n}function C(g,n){return g<n?(n+.05)/(g+.05):(g+.05)/(n+.05)}Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=void 0,function(g){g.toCss=function(n,o,h,s){return s!==void 0?"#"+u(n)+u(o)+u(h)+u(s):"#"+u(n)+u(o)+u(h)},g.toRgba=function(n,o,h,s){return s===void 0&&(s=255),(n<<24|o<<16|h<<8|s)>>>0}}(y=c.channels||(c.channels={})),(f=c.color||(c.color={})).blend=function(g,n){var o=(255&n.rgba)/255;if(o===1)return{css:n.css,rgba:n.rgba};var h=n.rgba>>24&255,s=n.rgba>>16&255,t=n.rgba>>8&255,e=g.rgba>>24&255,i=g.rgba>>16&255,a=g.rgba>>8&255,l=e+Math.round((h-e)*o),v=i+Math.round((s-i)*o),m=a+Math.round((t-a)*o);return{css:y.toCss(l,v,m),rgba:y.toRgba(l,v,m)}},f.isOpaque=function(g){return(255&g.rgba)==255},f.ensureContrastRatio=function(g,n,o){var h=_.ensureContrastRatio(g.rgba,n.rgba,o);if(h)return _.toColor(h>>24&255,h>>16&255,h>>8&255)},f.opaque=function(g){var n=(255|g.rgba)>>>0,o=_.toChannels(n),h=o[0],s=o[1],t=o[2];return{css:y.toCss(h,s,t),rgba:n}},f.opacity=function(g,n){var o=Math.round(255*n),h=_.toChannels(g.rgba),s=h[0],t=h[1],e=h[2];return{css:y.toCss(s,t,e,o),rgba:y.toRgba(s,t,e,o)}},f.toColorRGB=function(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]},(c.css||(c.css={})).toColor=function(g){switch(g.length){case 7:return{css:g,rgba:(parseInt(g.slice(1),16)<<8|255)>>>0};case 9:return{css:g,rgba:parseInt(g.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(g){function n(o,h,s){var t=o/255,e=h/255,i=s/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*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))}g.relativeLuminance=function(o){return n(o>>16&255,o>>8&255,255&o)},g.relativeLuminance2=n}(p=c.rgb||(c.rgb={})),function(g){function n(h,s,t){for(var e=h>>24&255,i=h>>16&255,a=h>>8&255,l=s>>24&255,v=s>>16&255,m=s>>8&255,E=C(p.relativeLuminance2(l,m,v),p.relativeLuminance2(e,i,a));E<t&&(l>0||v>0||m>0);)l-=Math.max(0,Math.ceil(.1*l)),v-=Math.max(0,Math.ceil(.1*v)),m-=Math.max(0,Math.ceil(.1*m)),E=C(p.relativeLuminance2(l,m,v),p.relativeLuminance2(e,i,a));return(l<<24|v<<16|m<<8|255)>>>0}function o(h,s,t){for(var e=h>>24&255,i=h>>16&255,a=h>>8&255,l=s>>24&255,v=s>>16&255,m=s>>8&255,E=C(p.relativeLuminance2(l,m,v),p.relativeLuminance2(e,i,a));E<t&&(l<255||v<255||m<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),v=Math.min(255,v+Math.ceil(.1*(255-v))),m=Math.min(255,m+Math.ceil(.1*(255-m))),E=C(p.relativeLuminance2(l,m,v),p.relativeLuminance2(e,i,a));return(l<<24|v<<16|m<<8|255)>>>0}g.ensureContrastRatio=function(h,s,t){var e=p.relativeLuminance(h>>8),i=p.relativeLuminance(s>>8);if(C(e,i)<t)return i<e?n(h,s,t):o(h,s,t)},g.reduceLuminance=n,g.increaseLuminance=o,g.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},g.toColor=function(h,s,t){return{css:y.toCss(h,s,t),rgba:y.toRgba(h,s,t)}}}(_=c.rgba||(c.rgba={})),c.toPaddedHex=u,c.contrastRatio=C},7239:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;var y=function(){function f(){this._color={},this._rgba={}}return f.prototype.clear=function(){this._color={},this._rgba={}},f.prototype.setCss=function(p,_,u){this._rgba[p]||(this._rgba[p]={}),this._rgba[p][_]=u},f.prototype.getCss=function(p,_){return this._rgba[p]?this._rgba[p][_]:void 0},f.prototype.setColor=function(p,_,u){this._color[p]||(this._color[p]={}),this._color[p][_]=u},f.prototype.getColor=function(p,_){return this._color[p]?this._color[p][_]:void 0},f}();c.ColorContrastCache=y},5680:function(z,c,y){var f=this&&this.__spreadArray||function(s,t,e){if(e||arguments.length===2)for(var i,a=0,l=t.length;a<l;a++)!i&&a in t||(i||(i=Array.prototype.slice.call(t,0,a)),i[a]=t[a]);return s.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(c,"__esModule",{value:!0}),c.ColorManager=c.DEFAULT_ANSI_COLORS=void 0;var p=y(4774),_=y(7239),u=p.css.toColor("#ffffff"),C=p.css.toColor("#000000"),g=p.css.toColor("#ffffff"),n=p.css.toColor("#000000"),o={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var s=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],e=0;e<216;e++){var i=t[e/36%6|0],a=t[e/6%6|0],l=t[e%6];s.push({css:p.channels.toCss(i,a,l),rgba:p.channels.toRgba(i,a,l)})}for(e=0;e<24;e++){var v=8+10*e;s.push({css:p.channels.toCss(v,v,v),rgba:p.channels.toRgba(v,v,v)})}return s}());var h=function(){function s(t,e){this.allowTransparency=e;var i=t.createElement("canvas");i.width=1,i.height=1;var a=i.getContext("2d");if(!a)throw new Error("Could not get rendering context");this._ctx=a,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new _.ColorContrastCache,this.colors={foreground:u,background:C,cursor:g,cursorAccent:n,selectionTransparent:o,selectionOpaque:p.color.blend(C,o),ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return s.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},s.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,u),this.colors.background=this._parseColor(t.background,C),this.colors.cursor=this._parseColor(t.cursor,g,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,n,!0),this.colors.selectionTransparent=this._parseColor(t.selection,o,!0),this.colors.selectionOpaque=p.color.blend(this.colors.background,this.colors.selectionTransparent),p.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=p.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,c.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,c.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,c.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,c.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,c.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,c.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,c.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,c.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,c.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,c.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,c.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,c.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,c.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,c.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,c.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},s.prototype.restoreColor=function(t){if(t!==void 0)switch(t){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[t]=this._restoreColors.ansi[t]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},s.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:f([],this.colors.ansi,!0)}},s.prototype._parseColor=function(t,e,i){if(i===void 0&&(i=this.allowTransparency),t===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var a=this._ctx.getImageData(0,0,1,1).data;if(a[3]!==255){if(!i)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var l=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),v=l[0],m=l[1],E=l[2],L=l[3],b=Math.round(255*L);return{rgba:p.channels.toRgba(v,m,E,b),css:t}}return{css:this._ctx.fillStyle,rgba:p.channels.toRgba(a[0],a[1],a[2],a[3])}},s}();c.ColorManager=h},9631:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.removeElementFromParent=void 0,c.removeElementFromParent=function(){for(var y,f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];for(var _=0,u=f;_<u.length;_++){var C=u[_];(y=C==null?void 0:C.parentElement)===null||y===void 0||y.removeChild(C)}}},3656:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(y,f,p,_){y.addEventListener(f,p,_);var u=!1;return{dispose:function(){u||(u=!0,y.removeEventListener(f,p,_))}}}},3551:function(z,c,y){var f=this&&this.__decorate||function(n,o,h,s){var t,e=arguments.length,i=e<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,h):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,o,h,s);else for(var a=n.length-1;a>=0;a--)(t=n[a])&&(i=(e<3?t(i):e>3?t(o,h,i):t(o,h))||i);return e>3&&i&&Object.defineProperty(o,h,i),i},p=this&&this.__param||function(n,o){return function(h,s){o(h,s,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZone=c.Linkifier=void 0;var _=y(8460),u=y(2585),C=function(){function n(o,h,s){this._bufferService=o,this._logService=h,this._unicodeService=s,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new _.EventEmitter,this._onHideLinkUnderline=new _.EventEmitter,this._onLinkTooltip=new _.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(n.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),n.prototype.attachToDom=function(o,h){this._element=o,this._mouseZoneManager=h},n.prototype.linkifyRows=function(o,h){var s=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=o,this._rowsToLinkify.end=h):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,o),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,h)),this._mouseZoneManager.clearAll(o,h),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return s._linkifyRows()},n._timeBeforeLatency))},n.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var o=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var h=o.ydisp+this._rowsToLinkify.start;if(!(h>=o.lines.length)){for(var s=o.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,t=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,h,s,t,t);e.hasNext();)for(var i=e.next(),a=0;a<this._linkMatchers.length;a++)this._doLinkifyRow(i.range.first,i.content,this._linkMatchers[a]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},n.prototype.registerLinkMatcher=function(o,h,s){if(s===void 0&&(s={}),!h)throw new Error("handler must be defined");var t={id:this._nextLinkMatcherId++,regex:o,handler:h,matchIndex:s.matchIndex,validationCallback:s.validationCallback,hoverTooltipCallback:s.tooltipCallback,hoverLeaveCallback:s.leaveCallback,willLinkActivate:s.willLinkActivate,priority:s.priority||0};return this._addLinkMatcherToList(t),t.id},n.prototype._addLinkMatcherToList=function(o){if(this._linkMatchers.length!==0){for(var h=this._linkMatchers.length-1;h>=0;h--)if(o.priority<=this._linkMatchers[h].priority)return void this._linkMatchers.splice(h+1,0,o);this._linkMatchers.splice(0,0,o)}else this._linkMatchers.push(o)},n.prototype.deregisterLinkMatcher=function(o){for(var h=0;h<this._linkMatchers.length;h++)if(this._linkMatchers[h].id===o)return this._linkMatchers.splice(h,1),!0;return!1},n.prototype._doLinkifyRow=function(o,h,s){for(var t,e=this,i=new RegExp(s.regex.source,(s.regex.flags||"")+"g"),a=-1,l=function(){var m=t[typeof s.matchIndex!="number"?0:s.matchIndex];if(!m)return v._logService.debug("match found without corresponding matchIndex",t,s),"break";if(a=h.indexOf(m,a+1),i.lastIndex=a+m.length,a<0)return"break";var E=v._bufferService.buffer.stringIndexToBufferIndex(o,a);if(E[0]<0)return"break";var L=v._bufferService.buffer.lines.get(E[0]);if(!L)return"break";var b=L.getFg(E[1]),S=b?b>>9&511:void 0;s.validationCallback?s.validationCallback(m,function(T){e._rowsTimeoutId||T&&e._addLink(E[1],E[0]-e._bufferService.buffer.ydisp,m,s,S)}):v._addLink(E[1],E[0]-v._bufferService.buffer.ydisp,m,s,S)},v=this;(t=i.exec(h))!==null&&l()!=="break";);},n.prototype._addLink=function(o,h,s,t,e){var i=this;if(this._mouseZoneManager&&this._element){var a=this._unicodeService.getStringCellWidth(s),l=o%this._bufferService.cols,v=h+Math.floor(o/this._bufferService.cols),m=(l+a)%this._bufferService.cols,E=v+Math.floor((l+a)/this._bufferService.cols);m===0&&(m=this._bufferService.cols,E--),this._mouseZoneManager.add(new g(l+1,v+1,m+1,E+1,function(L){if(t.handler)return t.handler(L,s);var b=window.open();b?(b.opener=null,b.location.href=s):console.warn("Opening link blocked as opener could not be cleared")},function(){i._onShowLinkUnderline.fire(i._createLinkHoverEvent(l,v,m,E,e)),i._element.classList.add("xterm-cursor-pointer")},function(L){i._onLinkTooltip.fire(i._createLinkHoverEvent(l,v,m,E,e)),t.hoverTooltipCallback&&t.hoverTooltipCallback(L,s,{start:{x:l,y:v},end:{x:m,y:E}})},function(){i._onHideLinkUnderline.fire(i._createLinkHoverEvent(l,v,m,E,e)),i._element.classList.remove("xterm-cursor-pointer"),t.hoverLeaveCallback&&t.hoverLeaveCallback()},function(L){return!t.willLinkActivate||t.willLinkActivate(L,s)}))}},n.prototype._createLinkHoverEvent=function(o,h,s,t,e){return{x1:o,y1:h,x2:s,y2:t,cols:this._bufferService.cols,fg:e}},n._timeBeforeLatency=200,n=f([p(0,u.IBufferService),p(1,u.ILogService),p(2,u.IUnicodeService)],n)}();c.Linkifier=C;var g=function(n,o,h,s,t,e,i,a,l){this.x1=n,this.y1=o,this.x2=h,this.y2=s,this.clickCallback=t,this.hoverCallback=e,this.tooltipCallback=i,this.leaveCallback=a,this.willLinkActivate=l};c.MouseZone=g},6465:function(z,c,y){var f,p=this&&this.__extends||(f=function(s,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},f(s,t)},function(s,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=s}f(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),_=this&&this.__decorate||function(s,t,e,i){var a,l=arguments.length,v=l<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,t,e,i);else for(var m=s.length-1;m>=0;m--)(a=s[m])&&(v=(l<3?a(v):l>3?a(t,e,v):a(t,e))||v);return l>3&&v&&Object.defineProperty(t,e,v),v},u=this&&this.__param||function(s,t){return function(e,i){t(e,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier2=void 0;var C=y(2585),g=y(8460),n=y(844),o=y(3656),h=function(s){function t(e){var i=s.call(this)||this;return i._bufferService=e,i._linkProviders=[],i._linkCacheDisposables=[],i._isMouseOut=!0,i._activeLine=-1,i._onShowLinkUnderline=i.register(new g.EventEmitter),i._onHideLinkUnderline=i.register(new g.EventEmitter),i.register((0,n.getDisposeArrayDisposable)(i._linkCacheDisposables)),i}return p(t,s),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 i=this;return this._linkProviders.push(e),{dispose:function(){var a=i._linkProviders.indexOf(e);a!==-1&&i._linkProviders.splice(a,1)}}},t.prototype.attachToDom=function(e,i,a){var l=this;this._element=e,this._mouseService=i,this._renderService=a,this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",function(){l._isMouseOut=!0,l._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 i=this._positionFromMouseEvent(e,this._element,this._mouseService);if(i){this._isMouseOut=!1;for(var a=e.composedPath(),l=0;l<a.length;l++){var v=a[l];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&i.x===this._lastBufferCell.x&&i.y===this._lastBufferCell.y||(this._onHover(i),this._lastBufferCell=i)}}},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,i){var a,l=this;this._activeProviderReplies&&i||((a=this._activeProviderReplies)===null||a===void 0||a.forEach(function(m){m==null||m.forEach(function(E){E.link.dispose&&E.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);var v=!1;this._linkProviders.forEach(function(m,E){var L;i?((L=l._activeProviderReplies)===null||L===void 0?void 0:L.get(E))&&(v=l._checkLinkProviderResult(E,e,v)):m.provideLinks(e.y,function(b){var S,T;if(!l._isMouseOut){var k=b==null?void 0:b.map(function(W){return{link:W}});(S=l._activeProviderReplies)===null||S===void 0||S.set(E,k),v=l._checkLinkProviderResult(E,e,v),((T=l._activeProviderReplies)===null||T===void 0?void 0:T.size)===l._linkProviders.length&&l._removeIntersectingLinks(e.y,l._activeProviderReplies)}})})},t.prototype._removeIntersectingLinks=function(e,i){for(var a=new Set,l=0;l<i.size;l++){var v=i.get(l);if(v)for(var m=0;m<v.length;m++)for(var E=v[m],L=E.link.range.start.y<e?0:E.link.range.start.x,b=E.link.range.end.y>e?this._bufferService.cols:E.link.range.end.x,S=L;S<=b;S++){if(a.has(S)){v.splice(m--,1);break}a.add(S)}}},t.prototype._checkLinkProviderResult=function(e,i,a){var l,v=this;if(!this._activeProviderReplies)return a;for(var m=this._activeProviderReplies.get(e),E=!1,L=0;L<e;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(E=!0);if(!E&&m){var b=m.find(function(T){return v._linkAtPosition(T.link,i)});b&&(a=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviders.length&&!a)for(L=0;L<this._activeProviderReplies.size;L++){var S=(l=this._activeProviderReplies.get(L))===null||l===void 0?void 0:l.find(function(T){return v._linkAtPosition(T.link,i)});if(S){a=!0,this._handleNewLink(S);break}}return a},t.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var i=this._positionFromMouseEvent(e,this._element,this._mouseService);i&&this._linkAtPosition(this._currentLink.link,i)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(e,i){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!i||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=i)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,n.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(e){var i=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(e.link,a)&&(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 l,v;return(v=(l=i._currentLink)===null||l===void 0?void 0:l.state)===null||v===void 0?void 0:v.decorations.pointerCursor},set:function(l){var v,m;((v=i._currentLink)===null||v===void 0?void 0:v.state)&&i._currentLink.state.decorations.pointerCursor!==l&&(i._currentLink.state.decorations.pointerCursor=l,i._currentLink.state.isHovered&&((m=i._element)===null||m===void 0||m.classList.toggle("xterm-cursor-pointer",l)))}},underline:{get:function(){var l,v;return(v=(l=i._currentLink)===null||l===void 0?void 0:l.state)===null||v===void 0?void 0:v.decorations.underline},set:function(l){var v,m,E;((v=i._currentLink)===null||v===void 0?void 0:v.state)&&((E=(m=i._currentLink)===null||m===void 0?void 0:m.state)===null||E===void 0?void 0:E.decorations.underline)!==l&&(i._currentLink.state.decorations.underline=l,i._currentLink.state.isHovered&&i._fireUnderlineEvent(e.link,l))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(l){var v=l.start===0?0:l.start+1+i._bufferService.buffer.ydisp;i._clearCurrentLink(v,l.end+1+i._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(e,i,a){var l;((l=this._currentLink)===null||l===void 0?void 0:l.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),i.hover&&i.hover(a,i.text)},t.prototype._fireUnderlineEvent=function(e,i){var a=e.range,l=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-l-1,a.end.x,a.end.y-l-1,void 0);(i?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)},t.prototype._linkLeave=function(e,i,a){var l;((l=this._currentLink)===null||l===void 0?void 0:l.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),i.leave&&i.leave(a,i.text)},t.prototype._linkAtPosition=function(e,i){var a=e.range.start.y===e.range.end.y,l=e.range.start.y<i.y,v=e.range.end.y>i.y;return(a&&e.range.start.x<=i.x&&e.range.end.x>=i.x||l&&e.range.end.x>=i.x||v&&e.range.start.x<=i.x||l&&v)&&e.range.start.y<=i.y&&e.range.end.y>=i.y},t.prototype._positionFromMouseEvent=function(e,i,a){var l=a.getCoords(e,i,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(e,i,a,l,v){return{x1:e,y1:i,x2:a,y2:l,cols:this._bufferService.cols,fg:v}},_([u(0,C.IBufferService)],t)}(n.Disposable);c.Linkifier2=h},9042:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(z,c,y){var f,p=this&&this.__extends||(f=function(s,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},f(s,t)},function(s,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=s}f(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),_=this&&this.__decorate||function(s,t,e,i){var a,l=arguments.length,v=l<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,t,e,i);else for(var m=s.length-1;m>=0;m--)(a=s[m])&&(v=(l<3?a(v):l>3?a(t,e,v):a(t,e))||v);return l>3&&v&&Object.defineProperty(t,e,v),v},u=this&&this.__param||function(s,t){return function(e,i){t(e,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZoneManager=void 0;var C=y(844),g=y(3656),n=y(4725),o=y(2585),h=function(s){function t(e,i,a,l,v,m){var E=s.call(this)||this;return E._element=e,E._screenElement=i,E._bufferService=a,E._mouseService=l,E._selectionService=v,E._optionsService=m,E._zones=[],E._areZonesActive=!1,E._lastHoverCoords=[void 0,void 0],E._initialSelectionLength=0,E.register((0,g.addDisposableDomListener)(E._element,"mousedown",function(L){return E._onMouseDown(L)})),E._mouseMoveListener=function(L){return E._onMouseMove(L)},E._mouseLeaveListener=function(L){return E._onMouseLeave(L)},E._clickListener=function(L){return E._onClick(L)},E}return p(t,s),t.prototype.dispose=function(){s.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,i){if(this._zones.length!==0){e&&i||(e=0,i=this._bufferService.rows-1);for(var a=0;a<this._zones.length;a++){var l=this._zones[a];(l.y1>e&&l.y1<=i+1||l.y2>e&&l.y2<=i+1||l.y1<e&&l.y2>i+1)&&(this._currentZone&&this._currentZone===l&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(a--,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 i=this,a=this._findZoneEventAt(e);a!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),a&&(this._currentZone=a,a.hoverCallback&&a.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return i._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},t.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var i=this._findZoneEventAt(e);i==null||i.tooltipCallback(e)},t.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var i=this._findZoneEventAt(e);(i==null?void 0:i.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 i=this._findZoneEventAt(e),a=this._getSelectionLength();i&&a===this._initialSelectionLength&&(i.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 i=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(i)for(var a=i[0],l=i[1],v=0;v<this._zones.length;v++){var m=this._zones[v];if(m.y1===m.y2){if(l===m.y1&&a>=m.x1&&a<m.x2)return m}else if(l===m.y1&&a>=m.x1||l===m.y2&&a<m.x2||l>m.y1&&l<m.y2)return m}},_([u(2,o.IBufferService),u(3,n.IMouseService),u(4,n.ISelectionService),u(5,o.IOptionsService)],t)}(C.Disposable);c.MouseZoneManager=h},6193:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0;var y=function(){function f(p){this._renderCallback=p}return f.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},f.prototype.refresh=function(p,_,u){var C=this;this._rowCount=u,p=p!==void 0?p:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,p):p,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return C._innerRefresh()}))},f.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var p=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(p,_)}},f}();c.RenderDebouncer=y},5596:function(z,c,y){var f,p=this&&this.__extends||(f=function(u,C){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,n){g.__proto__=n}||function(g,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(g[o]=n[o])},f(u,C)},function(u,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function g(){this.constructor=u}f(u,C),u.prototype=C===null?Object.create(C):(g.prototype=C.prototype,new g)});Object.defineProperty(c,"__esModule",{value:!0}),c.ScreenDprMonitor=void 0;var _=function(u){function C(){var g=u!==null&&u.apply(this,arguments)||this;return g._currentDevicePixelRatio=window.devicePixelRatio,g}return p(C,u),C.prototype.setListener=function(g){var n=this;this._listener&&this.clearListener(),this._listener=g,this._outerListener=function(){n._listener&&(n._listener(window.devicePixelRatio,n._currentDevicePixelRatio),n._updateDpr())},this._updateDpr()},C.prototype.dispose=function(){u.prototype.dispose.call(this),this.clearListener()},C.prototype._updateDpr=function(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)===null||g===void 0||g.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}(y(844).Disposable);c.ScreenDprMonitor=_},3236:function(z,c,y){var f,p=this&&this.__extends||(f=function(he,x){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,I){B.__proto__=I}||function(B,I){for(var K in I)Object.prototype.hasOwnProperty.call(I,K)&&(B[K]=I[K])},f(he,x)},function(he,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function B(){this.constructor=he}f(he,x),he.prototype=x===null?Object.create(x):(B.prototype=x.prototype,new B)});Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var _=y(2950),u=y(1680),C=y(3614),g=y(2584),n=y(5435),o=y(3525),h=y(3551),s=y(9312),t=y(6114),e=y(3656),i=y(9042),a=y(357),l=y(6954),v=y(4567),m=y(1296),E=y(7399),L=y(8460),b=y(8437),S=y(5680),T=y(3230),k=y(4725),W=y(428),D=y(8934),A=y(6465),O=y(5114),H=y(8969),R=y(4774),G=y(4269),Y=y(5941),oe=typeof window!="undefined"?window.document:null,le=function(he){function x(B){B===void 0&&(B={});var I=he.call(this,B)||this;return I.browser=t,I._keyDownHandled=!1,I._keyPressHandled=!1,I._unprocessedDeadKey=!1,I._onCursorMove=new L.EventEmitter,I._onKey=new L.EventEmitter,I._onRender=new L.EventEmitter,I._onSelectionChange=new L.EventEmitter,I._onTitleChange=new L.EventEmitter,I._onBell=new L.EventEmitter,I._onFocus=new L.EventEmitter,I._onBlur=new L.EventEmitter,I._onA11yCharEmitter=new L.EventEmitter,I._onA11yTabEmitter=new L.EventEmitter,I._setup(),I.linkifier=I._instantiationService.createInstance(h.Linkifier),I.linkifier2=I.register(I._instantiationService.createInstance(A.Linkifier2)),I.register(I._inputHandler.onRequestBell(function(){return I.bell()})),I.register(I._inputHandler.onRequestRefreshRows(function(K,j){return I.refresh(K,j)})),I.register(I._inputHandler.onRequestSendFocus(function(){return I._reportFocus()})),I.register(I._inputHandler.onRequestReset(function(){return I.reset()})),I.register(I._inputHandler.onRequestWindowsOptionsReport(function(K){return I._reportWindowsOptions(K)})),I.register(I._inputHandler.onColor(function(K){return I._handleColorEvent(K)})),I.register((0,L.forwardEvent)(I._inputHandler.onCursorMove,I._onCursorMove)),I.register((0,L.forwardEvent)(I._inputHandler.onTitleChange,I._onTitleChange)),I.register((0,L.forwardEvent)(I._inputHandler.onA11yChar,I._onA11yCharEmitter)),I.register((0,L.forwardEvent)(I._inputHandler.onA11yTab,I._onA11yTabEmitter)),I.register(I._bufferService.onResize(function(K){return I._afterResize(K.cols,K.rows)})),I}return p(x,he),Object.defineProperty(x.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),x.prototype._handleColorEvent=function(B){var I,K;if(this._colorManager){for(var j=0,V=B;j<V.length;j++){var se=V[j],Ce=void 0,ke="";switch(se.index){case 256:Ce="foreground",ke="10";break;case 257:Ce="background",ke="11";break;case 258:Ce="cursor",ke="12";break;default:Ce="ansi",ke="4;"+se.index}if(Ce)switch(se.type){case 0:var Ee=R.color.toColorRGB(Ce==="ansi"?this._colorManager.colors.ansi[se.index]:this._colorManager.colors[Ce]);this.coreService.triggerDataEvent(g.C0.ESC+"]"+ke+";"+(0,Y.toRgbString)(Ee)+g.C0.BEL);break;case 1:Ce==="ansi"?this._colorManager.colors.ansi[se.index]=R.rgba.toColor.apply(R.rgba,se.color):this._colorManager.colors[Ce]=R.rgba.toColor.apply(R.rgba,se.color);break;case 2:this._colorManager.restoreColor(se.index)}}(I=this._renderService)===null||I===void 0||I.setColors(this._colorManager.colors),(K=this.viewport)===null||K===void 0||K.onThemeChange(this._colorManager.colors)}},x.prototype.dispose=function(){var B,I,K;this._isDisposed||(he.prototype.dispose.call(this),(B=this._renderService)===null||B===void 0||B.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(K=(I=this.element)===null||I===void 0?void 0:I.parentNode)===null||K===void 0||K.removeChild(this.element))},x.prototype._setup=function(){he.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(x.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),x.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},x.prototype._updateOptions=function(B){var I,K,j,V;switch(he.prototype._updateOptions.call(this,B),B){case"fontFamily":case"fontSize":(I=this._renderService)===null||I===void 0||I.clear(),(K=this._charSizeService)===null||K===void 0||K.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":(j=this.viewport)===null||j===void 0||j.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new v.AccessibilityManager(this,this._renderService)):((V=this._accessibilityManager)===null||V===void 0||V.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},x.prototype._onTextAreaFocus=function(B){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(g.C0.ESC+"[I"),this.updateCursorStyle(B),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},x.prototype.blur=function(){var B;return(B=this.textarea)===null||B===void 0?void 0:B.blur()},x.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(g.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},x.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var B=this.buffer.ybase+this.buffer.y,I=this.buffer.lines.get(B);if(I){var K=Math.min(this.buffer.x,this.cols-1),j=this._renderService.dimensions.actualCellHeight,V=I.getWidth(K),se=this._renderService.dimensions.actualCellWidth*V,Ce=this.buffer.y*this._renderService.dimensions.actualCellHeight,ke=K*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=ke+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=se+"px",this.textarea.style.height=j+"px",this.textarea.style.lineHeight=j+"px",this.textarea.style.zIndex="-5"}}},x.prototype._initGlobal=function(){var B=this;this._bindKeys(),this.register((0,e.addDisposableDomListener)(this.element,"copy",function(K){B.hasSelection()&&(0,C.copyHandler)(K,B._selectionService)}));var I=function(K){return(0,C.handlePasteEvent)(K,B.textarea,B.coreService)};this.register((0,e.addDisposableDomListener)(this.textarea,"paste",I)),this.register((0,e.addDisposableDomListener)(this.element,"paste",I)),t.isFirefox?this.register((0,e.addDisposableDomListener)(this.element,"mousedown",function(K){K.button===2&&(0,C.rightClickHandler)(K,B.textarea,B.screenElement,B._selectionService,B.options.rightClickSelectsWord)})):this.register((0,e.addDisposableDomListener)(this.element,"contextmenu",function(K){(0,C.rightClickHandler)(K,B.textarea,B.screenElement,B._selectionService,B.options.rightClickSelectsWord)})),t.isLinux&&this.register((0,e.addDisposableDomListener)(this.element,"auxclick",function(K){K.button===1&&(0,C.moveTextAreaUnderMouseCursor)(K,B.textarea,B.screenElement)}))},x.prototype._bindKeys=function(){var B=this;this.register((0,e.addDisposableDomListener)(this.textarea,"keyup",function(I){return B._keyUp(I)},!0)),this.register((0,e.addDisposableDomListener)(this.textarea,"keydown",function(I){return B._keyDown(I)},!0)),this.register((0,e.addDisposableDomListener)(this.textarea,"keypress",function(I){return B._keyPress(I)},!0)),this.register((0,e.addDisposableDomListener)(this.textarea,"compositionstart",function(){return B._compositionHelper.compositionstart()})),this.register((0,e.addDisposableDomListener)(this.textarea,"compositionupdate",function(I){return B._compositionHelper.compositionupdate(I)})),this.register((0,e.addDisposableDomListener)(this.textarea,"compositionend",function(){return B._compositionHelper.compositionend()})),this.register((0,e.addDisposableDomListener)(this.textarea,"input",function(I){return B._inputEvent(I)},!0)),this.register(this.onRender(function(){return B._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(I){return B._queueLinkification(I.start,I.end)}))},x.prototype.open=function(B){var I=this;if(!B)throw new Error("Terminal requires a parent element.");B.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=B.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"),B.appendChild(this.element);var K=oe.createDocumentFragment();this._viewportElement=oe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),K.appendChild(this._viewportElement),this._viewportScrollArea=oe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=oe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=oe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),K.appendChild(this.screenElement),this.textarea=oe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",i.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(se){return I._onTextAreaFocus(se)})),this.register((0,e.addDisposableDomListener)(this.textarea,"blur",function(){return I._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var j=this._instantiationService.createInstance(O.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,j),this._charSizeService=this._instantiationService.createInstance(W.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new S.ColorManager(oe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(se){return I._colorManager.onOptionsChange(se)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(G.CharacterJoinerService),this._instantiationService.setService(k.ICharacterJoinerService,this._characterJoinerService);var V=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,V,this.rows,this.screenElement)),this._instantiationService.setService(k.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(se){return I._onRender.fire(se)})),this.onResize(function(se){return I._renderService.resize(se.cols,se.rows)}),this._compositionView=oe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(K),this._soundService=this._instantiationService.createInstance(a.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(u.Viewport,function(se){return I.scrollLines(se,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return I.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){I._renderService.onCursorMove(),I._syncTextArea()})),this.register(this.onResize(function(){return I._renderService.onResize(I.cols,I.rows)})),this.register(this.onBlur(function(){return I._renderService.onBlur()})),this.register(this.onFocus(function(){return I._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return I.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(s.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(se){return I.scrollLines(se.amount,se.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return I._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(se){return I._renderService.onSelectionChanged(se.start,se.end,se.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(se){I.textarea.value=se,I.textarea.focus(),I.textarea.select()})),this.register(this._onScroll.event(function(se){I.viewport.syncScrollArea(),I._selectionService.refresh()})),this.register((0,e.addDisposableDomListener)(this._viewportElement,"scroll",function(){return I._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(l.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return I._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register((0,e.addDisposableDomListener)(this.element,"mousedown",function(se){return I._selectionService.onMouseDown(se)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new v.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},x.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(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},x.prototype._setTheme=function(B){var I,K,j;this._theme=B,(I=this._colorManager)===null||I===void 0||I.setTheme(B),(K=this._renderService)===null||K===void 0||K.setColors(this._colorManager.colors),(j=this.viewport)===null||j===void 0||j.onThemeChange(this._colorManager.colors)},x.prototype.bindMouse=function(){var B=this,I=this,K=this.element;function j(ee){var Le,Be,at=I._mouseService.getRawByteCoords(ee,I.screenElement,I.cols,I.rows);if(!at)return!1;switch(ee.overrideType||ee.type){case"mousemove":Be=32,ee.buttons===void 0?(Le=3,ee.button!==void 0&&(Le=ee.button<3?ee.button:3)):Le=1&ee.buttons?0:4&ee.buttons?1:2&ee.buttons?2:3;break;case"mouseup":Be=0,Le=ee.button<3?ee.button:3;break;case"mousedown":Be=1,Le=ee.button<3?ee.button:3;break;case"wheel":ee.deltaY!==0&&(Be=ee.deltaY<0?0:1),Le=4;break;default:return!1}return!(Be===void 0||Le===void 0||Le>4)&&I.coreMouseService.triggerMouseEvent({col:at.x-33,row:at.y-33,button:Le,action:Be,ctrl:ee.ctrlKey,alt:ee.altKey,shift:ee.shiftKey})}var V={mouseup:null,wheel:null,mousedrag:null,mousemove:null},se=function(ee){return j(ee),ee.buttons||(B._document.removeEventListener("mouseup",V.mouseup),V.mousedrag&&B._document.removeEventListener("mousemove",V.mousedrag)),B.cancel(ee)},Ce=function(ee){return j(ee),B.cancel(ee,!0)},ke=function(ee){ee.buttons&&j(ee)},Ee=function(ee){ee.buttons||j(ee)};this.register(this.coreMouseService.onProtocolChange(function(ee){ee?(B.optionsService.options.logLevel==="debug"&&B._logService.debug("Binding to mouse events:",B.coreMouseService.explainEvents(ee)),B.element.classList.add("enable-mouse-events"),B._selectionService.disable()):(B._logService.debug("Unbinding from mouse events."),B.element.classList.remove("enable-mouse-events"),B._selectionService.enable()),8&ee?V.mousemove||(K.addEventListener("mousemove",Ee),V.mousemove=Ee):(K.removeEventListener("mousemove",V.mousemove),V.mousemove=null),16&ee?V.wheel||(K.addEventListener("wheel",Ce,{passive:!1}),V.wheel=Ce):(K.removeEventListener("wheel",V.wheel),V.wheel=null),2&ee?V.mouseup||(V.mouseup=se):(B._document.removeEventListener("mouseup",V.mouseup),V.mouseup=null),4&ee?V.mousedrag||(V.mousedrag=ke):(B._document.removeEventListener("mousemove",V.mousedrag),V.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,e.addDisposableDomListener)(K,"mousedown",function(ee){if(ee.preventDefault(),B.focus(),B.coreMouseService.areMouseEventsActive&&!B._selectionService.shouldForceSelection(ee))return j(ee),V.mouseup&&B._document.addEventListener("mouseup",V.mouseup),V.mousedrag&&B._document.addEventListener("mousemove",V.mousedrag),B.cancel(ee)})),this.register((0,e.addDisposableDomListener)(K,"wheel",function(ee){if(!V.wheel){if(!B.buffer.hasScrollback){var Le=B.viewport.getLinesScrolled(ee);if(Le===0)return;for(var Be=g.C0.ESC+(B.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ee.deltaY<0?"A":"B"),at="",Lt=0;Lt<Math.abs(Le);Lt++)at+=Be;return B.coreService.triggerDataEvent(at,!0),B.cancel(ee,!0)}return B.viewport.onWheel(ee)?B.cancel(ee):void 0}},{passive:!1})),this.register((0,e.addDisposableDomListener)(K,"touchstart",function(ee){if(!B.coreMouseService.areMouseEventsActive)return B.viewport.onTouchStart(ee),B.cancel(ee)},{passive:!0})),this.register((0,e.addDisposableDomListener)(K,"touchmove",function(ee){if(!B.coreMouseService.areMouseEventsActive)return B.viewport.onTouchMove(ee)?void 0:B.cancel(ee)},{passive:!1}))},x.prototype.refresh=function(B,I){var K;(K=this._renderService)===null||K===void 0||K.refreshRows(B,I)},x.prototype._queueLinkification=function(B,I){var K;(K=this.linkifier)===null||K===void 0||K.linkifyRows(B,I)},x.prototype.updateCursorStyle=function(B){var I;((I=this._selectionService)===null||I===void 0?void 0:I.shouldColumnSelect(B))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},x.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},x.prototype.scrollLines=function(B,I,K){K===void 0&&(K=0),he.prototype.scrollLines.call(this,B,I,K),this.refresh(0,this.rows-1)},x.prototype.paste=function(B){(0,C.paste)(B,this.textarea,this.coreService)},x.prototype.attachCustomKeyEventHandler=function(B){this._customKeyEventHandler=B},x.prototype.registerLinkMatcher=function(B,I,K){var j=this.linkifier.registerLinkMatcher(B,I,K);return this.refresh(0,this.rows-1),j},x.prototype.deregisterLinkMatcher=function(B){this.linkifier.deregisterLinkMatcher(B)&&this.refresh(0,this.rows-1)},x.prototype.registerLinkProvider=function(B){return this.linkifier2.registerLinkProvider(B)},x.prototype.registerCharacterJoiner=function(B){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var I=this._characterJoinerService.register(B);return this.refresh(0,this.rows-1),I},x.prototype.deregisterCharacterJoiner=function(B){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(B)&&this.refresh(0,this.rows-1)},Object.defineProperty(x.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),x.prototype.addMarker=function(B){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+B)},x.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},x.prototype.select=function(B,I,K){this._selectionService.setSelection(B,I,K)},x.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},x.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]}},x.prototype.clearSelection=function(){var B;(B=this._selectionService)===null||B===void 0||B.clearSelection()},x.prototype.selectAll=function(){var B;(B=this._selectionService)===null||B===void 0||B.selectAll()},x.prototype.selectLines=function(B,I){var K;(K=this._selectionService)===null||K===void 0||K.selectLines(B,I)},x.prototype._keyDown=function(B){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(B)===!1)return!1;if(!this._compositionHelper.keydown(B))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;B.key!=="Dead"&&B.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var I=(0,E.evaluateKeyboardEvent)(B,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(B),I.type===3||I.type===2){var K=this.rows-1;return this.scrollLines(I.type===2?-K:K),this.cancel(B,!0)}return I.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,B)||(I.cancel&&this.cancel(B,!0),!I.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(I.key!==g.C0.ETX&&I.key!==g.C0.CR||(this.textarea.value=""),this._onKey.fire({key:I.key,domEvent:B}),this._showCursor(),this.coreService.triggerDataEvent(I.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(B,!0))))},x.prototype._isThirdLevelShift=function(B,I){var K=B.isMac&&!this.options.macOptionIsMeta&&I.altKey&&!I.ctrlKey&&!I.metaKey||B.isWindows&&I.altKey&&I.ctrlKey&&!I.metaKey||B.isWindows&&I.getModifierState("AltGraph");return I.type==="keypress"?K:K&&(!I.keyCode||I.keyCode>47)},x.prototype._keyUp=function(B){this._customKeyEventHandler&&this._customKeyEventHandler(B)===!1||(function(I){return I.keyCode===16||I.keyCode===17||I.keyCode===18}(B)||this.focus(),this.updateCursorStyle(B),this._keyPressHandled=!1)},x.prototype._keyPress=function(B){var I;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(B)===!1)return!1;if(this.cancel(B),B.charCode)I=B.charCode;else if(B.which===null||B.which===void 0)I=B.keyCode;else{if(B.which===0||B.charCode===0)return!1;I=B.which}return!(!I||(B.altKey||B.ctrlKey||B.metaKey)&&!this._isThirdLevelShift(this.browser,B)||(I=String.fromCharCode(I),this._onKey.fire({key:I,domEvent:B}),this._showCursor(),this.coreService.triggerDataEvent(I,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},x.prototype._inputEvent=function(B){if(B.data&&B.inputType==="insertText"&&!B.composed&&!this.optionsService.options.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var I=B.data;return this.coreService.triggerDataEvent(I,!0),this.cancel(B),!0}return!1},x.prototype.bell=function(){var B;this._soundBell()&&((B=this._soundService)===null||B===void 0||B.playBellSound()),this._onBell.fire()},x.prototype.resize=function(B,I){B!==this.cols||I!==this.rows?he.prototype.resize.call(this,B,I):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},x.prototype._afterResize=function(B,I){var K,j;(K=this._charSizeService)===null||K===void 0||K.measure(),(j=this.viewport)===null||j===void 0||j.syncScrollArea(!0)},x.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 B=1;B<this.rows;B++)this.buffer.lines.push(this.buffer.getBlankLine(b.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},x.prototype.reset=function(){var B,I;this.options.rows=this.rows,this.options.cols=this.cols;var K=this._customKeyEventHandler;this._setup(),he.prototype.reset.call(this),(B=this._selectionService)===null||B===void 0||B.reset(),this._customKeyEventHandler=K,this.refresh(0,this.rows-1),(I=this.viewport)===null||I===void 0||I.syncScrollArea()},x.prototype.clearTextureAtlas=function(){var B;(B=this._renderService)===null||B===void 0||B.clearTextureAtlas()},x.prototype._reportFocus=function(){var B;((B=this.element)===null||B===void 0?void 0:B.classList.contains("focus"))?this.coreService.triggerDataEvent(g.C0.ESC+"[I"):this.coreService.triggerDataEvent(g.C0.ESC+"[O")},x.prototype._reportWindowsOptions=function(B){if(this._renderService)switch(B){case n.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var I=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),K=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(g.C0.ESC+"[4;"+K+";"+I+"t");break;case n.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var j=this._renderService.dimensions.scaledCellWidth.toFixed(0),V=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(g.C0.ESC+"[6;"+V+";"+j+"t")}},x.prototype.cancel=function(B,I){if(this.options.cancelEvents||I)return B.preventDefault(),B.stopPropagation(),!1},x.prototype._visualBell=function(){return!1},x.prototype._soundBell=function(){return this.options.bellStyle==="sound"},x}(H.CoreTerminal);c.Terminal=le},9924:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0;var y=function(){function f(p,_){_===void 0&&(_=1e3),this._renderCallback=p,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return f.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},f.prototype.refresh=function(p,_,u){var C=this;this._rowCount=u,p=p!==void 0?p:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,p):p,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;var g=Date.now();if(g-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=g,this._innerRefresh();else if(!this._additionalRefreshRequested){var n=g-this._lastRefreshMs,o=this._debounceThresholdMS-n;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){C._lastRefreshMs=Date.now(),C._innerRefresh(),C._additionalRefreshRequested=!1,C._refreshTimeoutID=void 0},o)}},f.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var p=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(p,_)}},f}();c.TimeBasedDebouncer=y},1680:function(z,c,y){var f,p=this&&this.__extends||(f=function(s,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},f(s,t)},function(s,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=s}f(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),_=this&&this.__decorate||function(s,t,e,i){var a,l=arguments.length,v=l<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,t,e,i);else for(var m=s.length-1;m>=0;m--)(a=s[m])&&(v=(l<3?a(v):l>3?a(t,e,v):a(t,e))||v);return l>3&&v&&Object.defineProperty(t,e,v),v},u=this&&this.__param||function(s,t){return function(e,i){t(e,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;var C=y(844),g=y(3656),n=y(4725),o=y(2585),h=function(s){function t(e,i,a,l,v,m,E,L){var b=s.call(this)||this;return b._scrollLines=e,b._viewportElement=i,b._scrollArea=a,b._element=l,b._bufferService=v,b._optionsService=m,b._charSizeService=E,b._renderService=L,b.scrollBarWidth=0,b._currentRowHeight=0,b._currentScaledCellHeight=0,b._lastRecordedBufferLength=0,b._lastRecordedViewportHeight=0,b._lastRecordedBufferHeight=0,b._lastTouchY=0,b._lastScrollTop=0,b._lastHadScrollBar=!1,b._wheelPartialScroll=0,b._refreshAnimationFrame=null,b._ignoreNextScrollEvent=!1,b.scrollBarWidth=b._viewportElement.offsetWidth-b._scrollArea.offsetWidth||15,b._lastHadScrollBar=!0,b.register((0,g.addDisposableDomListener)(b._viewportElement,"scroll",b._onScroll.bind(b))),b._activeBuffer=b._bufferService.buffer,b.register(b._bufferService.buffers.onBufferActivate(function(S){return b._activeBuffer=S.activeBuffer})),b._renderDimensions=b._renderService.dimensions,b.register(b._renderService.onDimensionsChange(function(S){return b._renderDimensions=S})),setTimeout(function(){return b.syncScrollArea()},0),b}return p(t,s),t.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},t.prototype._refresh=function(e){var i=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return i._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 i=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==i&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=i),this._optionsService.options.scrollback===0?this.scrollBarWidth=0:this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var a=window.getComputedStyle(this._element),l=parseInt(a.paddingLeft)+parseInt(a.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?l: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 i=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(i)}},t.prototype._bubbleScroll=function(e,i){var a=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(i<0&&this._viewportElement.scrollTop!==0||i>0&&a<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},t.prototype.onWheel=function(e){var i=this._getPixelsScrolled(e);return i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(e,i))},t.prototype._getPixelsScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?i*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._currentRowHeight*this._bufferService.rows),i},t.prototype.getLinesScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=this._currentRowHeight+0,this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i},t.prototype._applyScrollModifier=function(e,i){var a=this._optionsService.options.fastScrollModifier;return a==="alt"&&i.altKey||a==="ctrl"&&i.ctrlKey||a==="shift"&&i.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 i=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(e,i))},_([u(4,o.IBufferService),u(5,o.IOptionsService),u(6,n.ICharSizeService),u(7,n.IRenderService)],t)}(C.Disposable);c.Viewport=h},2950:function(z,c,y){var f=this&&this.__decorate||function(g,n,o,h){var s,t=arguments.length,e=t<3?n:h===null?h=Object.getOwnPropertyDescriptor(n,o):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(g,n,o,h);else for(var i=g.length-1;i>=0;i--)(s=g[i])&&(e=(t<3?s(e):t>3?s(n,o,e):s(n,o))||e);return t>3&&e&&Object.defineProperty(n,o,e),e},p=this&&this.__param||function(g,n){return function(o,h){n(o,h,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;var _=y(4725),u=y(2585),C=function(){function g(n,o,h,s,t,e){this._textarea=n,this._compositionView=o,this._bufferService=h,this._optionsService=s,this._coreService=t,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(g.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),g.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},g.prototype.compositionupdate=function(n){var o=this;this._compositionView.textContent=n.data,this.updateCompositionElements(),setTimeout(function(){o._compositionPosition.end=o._textarea.value.length},0)},g.prototype.compositionend=function(){this._finalizeComposition(!0)},g.prototype.keydown=function(n){if(this._isComposing||this._isSendingComposition){if(n.keyCode===229||n.keyCode===16||n.keyCode===17||n.keyCode===18)return!1;this._finalizeComposition(!1)}return n.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},g.prototype._finalizeComposition=function(n){var o=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,n){var h={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(o._isSendingComposition){o._isSendingComposition=!1;var t;h.start+=o._dataAlreadySent.length,(t=o._isComposing?o._textarea.value.substring(h.start,h.end):o._textarea.value.substring(h.start)).length>0&&o._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;var s=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(s,!0)}},g.prototype._handleAnyTextareaChanges=function(){var n=this,o=this._textarea.value;setTimeout(function(){if(!n._isComposing){var h=n._textarea.value.replace(o,"");h.length>0&&(n._dataAlreadySent=h,n._coreService.triggerDataEvent(h,!0))}},0)},g.prototype.updateCompositionElements=function(n){var o=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var h=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),s=this._renderService.dimensions.actualCellHeight,t=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=h*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=s+"px",this._compositionView.style.lineHeight=s+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var i=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=t+"px",this._textarea.style.width=Math.max(i.width,1)+"px",this._textarea.style.height=Math.max(i.height,1)+"px",this._textarea.style.lineHeight=i.height+"px"}n||setTimeout(function(){return o.updateCompositionElements(!0)},0)}},f([p(2,u.IBufferService),p(3,u.IOptionsService),p(4,u.ICoreService),p(5,_.IRenderService)],g)}();c.CompositionHelper=C},9806:(z,c)=>{function y(f,p){var _=p.getBoundingClientRect();return[f.clientX-_.left,f.clientY-_.top]}Object.defineProperty(c,"__esModule",{value:!0}),c.getRawByteCoords=c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=y,c.getCoords=function(f,p,_,u,C,g,n,o){if(C){var h=y(f,p);if(h)return h[0]=Math.ceil((h[0]+(o?g/2:0))/g),h[1]=Math.ceil(h[1]/n),h[0]=Math.min(Math.max(h[0],1),_+(o?1:0)),h[1]=Math.min(Math.max(h[1],1),u),h}},c.getRawByteCoords=function(f){if(f)return{x:f[0]+32,y:f[1]+32}}},9504:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;var f=y(2584);function p(o,h,s,t){var e=o-_(s,o),i=h-_(s,h),a=Math.abs(e-i)-function(l,v,m){for(var E=0,L=l-_(m,l),b=v-_(m,v),S=0;S<Math.abs(L-b);S++){var T=u(l,v)==="A"?-1:1,k=m.buffer.lines.get(L+T*S);(k==null?void 0:k.isWrapped)&&E++}return E}(o,h,s);return n(a,g(u(o,h),t))}function _(o,h){for(var s=0,t=o.buffer.lines.get(h),e=t==null?void 0:t.isWrapped;e&&h>=0&&h<o.rows;)s++,e=(t=o.buffer.lines.get(--h))==null?void 0:t.isWrapped;return s}function u(o,h){return o>h?"A":"B"}function C(o,h,s,t,e,i){for(var a=o,l=h,v="";a!==s||l!==t;)a+=e?1:-1,e&&a>i.cols-1?(v+=i.buffer.translateBufferLineToString(l,!1,o,a),a=0,o=0,l++):!e&&a<0&&(v+=i.buffer.translateBufferLineToString(l,!1,0,o+1),o=a=i.cols-1,l--);return v+i.buffer.translateBufferLineToString(l,!1,o,a)}function g(o,h){var s=h?"O":"[";return f.C0.ESC+s+o}function n(o,h){o=Math.floor(o);for(var s="",t=0;t<o;t++)s+=h;return s}c.moveToCellSequence=function(o,h,s,t){var e,i=s.buffer.x,a=s.buffer.y;if(!s.buffer.hasScrollback)return function(v,m,E,L,b,S){return p(m,L,b,S).length===0?"":n(C(v,m,v,m-_(b,m),!1,b).length,g("D",S))}(i,a,0,h,s,t)+p(a,h,s,t)+function(v,m,E,L,b,S){var T;T=p(m,L,b,S).length>0?L-_(b,L):m;var k=L,W=function(D,A,O,H,R,G){var Y;return Y=p(O,H,R,G).length>0?H-_(R,H):A,D<O&&Y<=H||D>=O&&Y<H?"C":"D"}(v,m,E,L,b,S);return n(C(v,T,E,k,W==="C",b).length,g(W,S))}(i,a,o,h,s,t);if(a===h)return e=i>o?"D":"C",n(Math.abs(i-o),g(e,t));e=a>h?"D":"C";var l=Math.abs(a-h);return n(function(v,m){return m.cols-v}(a>h?o:i,s)+(l-1)*s.cols+1+((a>h?i:o)-1),g(e,t))}},1546:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BaseRenderLayer=void 0;var f=y(643),p=y(8803),_=y(1420),u=y(3734),C=y(1752),g=y(4774),n=y(9631),o=y(8978),h=function(){function s(t,e,i,a,l,v,m,E){this._container=t,this._alpha=a,this._colors=l,this._rendererId=v,this._bufferService=m,this._optionsService=E,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=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return s.prototype.dispose=function(){var t;(0,n.removeElementFromParent)(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},s.prototype._initCanvas=function(){this._ctx=(0,C.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},s.prototype.onOptionsChanged=function(){},s.prototype.onBlur=function(){},s.prototype.onFocus=function(){},s.prototype.onCursorMove=function(){},s.prototype.onGridChanged=function(t,e){},s.prototype.onSelectionChanged=function(t,e,i){i===void 0&&(i=!1)},s.prototype.setColors=function(t){this._refreshCharAtlas(t)},s.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)}},s.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,_.acquireCharAtlas)(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},s.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)},s.prototype.clearTextureAtlas=function(){var t;(t=this._charAtlas)===null||t===void 0||t.clear()},s.prototype._fillCells=function(t,e,i,a){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,a*this._scaledCellHeight)},s.prototype._fillMiddleLineAtCells=function(t,e,i){i===void 0&&(i=1);var a=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-a-window.devicePixelRatio,i*this._scaledCellWidth,window.devicePixelRatio)},s.prototype._fillBottomLineAtCells=function(t,e,i){i===void 0&&(i=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},s.prototype._fillLeftLineAtCell=function(t,e,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},s.prototype._strokeRectAtCell=function(t,e,i,a){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,a*this._scaledCellHeight-window.devicePixelRatio)},s.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))},s.prototype._clearCells=function(t,e,i,a){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,a*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,a*this._scaledCellHeight))},s.prototype._fillCharTrueColor=function(t,e,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=p.TEXT_BASELINE,this._clipRow(i);var a=!1;this._optionsService.options.customGlyphs!==!1&&(a=(0,o.tryDrawCustomChar)(this._ctx,t.getChars(),e*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),a||this._ctx.fillText(t.getChars(),e*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},s.prototype._drawChars=function(t,e,i){var a,l,v,m=this._getContrastColor(t);m||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,e,i,m):(t.isInverse()?(l=t.isBgDefault()?p.INVERTED_DEFAULT_COLOR:t.getBgColor(),v=t.isFgDefault()?p.INVERTED_DEFAULT_COLOR:t.getFgColor()):(v=t.isBgDefault()?f.DEFAULT_COLOR:t.getBgColor(),l=t.isFgDefault()?f.DEFAULT_COLOR:t.getFgColor()),l+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&l<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||f.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||f.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=v,this._currentGlyphIdentifier.fg=l,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),((a=this._charAtlas)===null||a===void 0?void 0:a.draw(this._ctx,this._currentGlyphIdentifier,e*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(t,e,i))},s.prototype._drawUncachedChars=function(t,e,i,a){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline=p.TEXT_BASELINE,t.isInverse())if(a)this._ctx.fillStyle=a.css;else if(t.isBgDefault())this._ctx.fillStyle=g.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var l=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(a)this._ctx.fillStyle=a.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var v=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&v<8&&(v+=8),this._ctx.fillStyle=this._colors.ansi[v].css}this._clipRow(i),t.isDim()&&(this._ctx.globalAlpha=p.DIM_OPACITY);var m=!1;this._optionsService.options.customGlyphs!==!1&&(m=(0,o.tryDrawCustomChar)(this._ctx,t.getChars(),e*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),m||this._ctx.fillText(t.getChars(),e*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},s.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},s.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},s.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 i=t.getFgColor(),a=t.getFgColorMode(),l=t.getBgColor(),v=t.getBgColorMode(),m=!!t.isInverse(),E=!!t.isInverse();if(m){var L=i;i=l,l=L;var b=a;a=v,v=b}var S=this._resolveBackgroundRgba(v,l,m),T=this._resolveForegroundRgba(a,i,m,E),k=g.rgba.ensureContrastRatio(S,T,this._optionsService.options.minimumContrastRatio);if(k){var W={css:g.channels.toCss(k>>24&255,k>>16&255,k>>8&255),rgba:k};return this._colors.contrastCache.setColor(t.bg,t.fg,W),W}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},s.prototype._resolveBackgroundRgba=function(t,e,i){switch(t){case 16777216:case 33554432:return this._colors.ansi[e].rgba;case 50331648:return e<<8;default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},s.prototype._resolveForegroundRgba=function(t,e,i,a){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&a&&e<8&&(e+=8),this._colors.ansi[e].rgba;case 50331648:return e<<8;default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},s}();c.BaseRenderLayer=h},2512:function(z,c,y){var f,p=this&&this.__extends||(f=function(e,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(a[v]=l[v])},f(e,i)},function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function a(){this.constructor=e}f(e,i),e.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}),_=this&&this.__decorate||function(e,i,a,l){var v,m=arguments.length,E=m<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(e,i,a,l);else for(var L=e.length-1;L>=0;L--)(v=e[L])&&(E=(m<3?v(E):m>3?v(i,a,E):v(i,a))||E);return m>3&&E&&Object.defineProperty(i,a,E),E},u=this&&this.__param||function(e,i){return function(a,l){i(a,l,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CursorRenderLayer=void 0;var C=y(1546),g=y(511),n=y(2585),o=y(4725),h=600,s=function(e){function i(a,l,v,m,E,L,b,S,T){var k=e.call(this,a,"cursor",l,!0,v,m,L,b)||this;return k._onRequestRedraw=E,k._coreService=S,k._coreBrowserService=T,k._cell=new g.CellData,k._state={x:0,y:0,isFocused:!1,style:"",width:0},k._cursorRenderers={bar:k._renderBarCursor.bind(k),block:k._renderBlockCursor.bind(k),underline:k._renderUnderlineCursor.bind(k)},k}return p(i,e),i.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},i.prototype.resize=function(a){e.prototype.resize.call(this,a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},i.prototype.reset=function(){var a;this._clearCursor(),(a=this._cursorBlinkStateManager)===null||a===void 0||a.restartBlinkAnimation(),this.onOptionsChanged()},i.prototype.onBlur=function(){var a;(a=this._cursorBlinkStateManager)===null||a===void 0||a.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onFocus=function(){var a;(a=this._cursorBlinkStateManager)===null||a===void 0||a.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onOptionsChanged=function(){var a,l=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new t(this._coreBrowserService.isFocused,function(){l._render(!0)})):((a=this._cursorBlinkStateManager)===null||a===void 0||a.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onCursorMove=function(){var a;(a=this._cursorBlinkStateManager)===null||a===void 0||a.restartBlinkAnimation()},i.prototype.onGridChanged=function(a,l){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype._render=function(a){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var l=this._bufferService.buffer.ybase+this._bufferService.buffer.y,v=l-this._bufferService.buffer.ydisp;if(v<0||v>=this._bufferService.rows)this._clearCursor();else{var m=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(l).loadCell(m,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var E=this._optionsService.options.cursorStyle;return E&&E!=="block"?this._cursorRenderers[E](m,v,this._cell):this._renderBlurCursor(m,v,this._cell),this._ctx.restore(),this._state.x=m,this._state.y=v,this._state.isFocused=!1,this._state.style=E,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===m&&this._state.y===v&&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"](m,v,this._cell),this._ctx.restore(),this._state.x=m,this._state.y=v,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},i.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})},i.prototype._renderBarCursor=function(a,l,v){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(a,l,this._optionsService.options.cursorWidth),this._ctx.restore()},i.prototype._renderBlockCursor=function(a,l,v){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(a,l,v.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(v,a,l),this._ctx.restore()},i.prototype._renderUnderlineCursor=function(a,l,v){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(a,l),this._ctx.restore()},i.prototype._renderBlurCursor=function(a,l,v){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(a,l,v.getWidth(),1),this._ctx.restore()},_([u(5,n.IBufferService),u(6,n.IOptionsService),u(7,n.ICoreService),u(8,o.ICoreBrowserService)],i)}(C.BaseRenderLayer);c.CursorRenderLayer=s;var t=function(){function e(i,a){this._renderCallback=a,this.isCursorVisible=!0,i&&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 i=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})))},e.prototype._restartInterval=function(i){var a=this;i===void 0&&(i=h),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(a._animationTimeRestarted){var l=h-(Date.now()-a._animationTimeRestarted);if(a._animationTimeRestarted=void 0,l>0)return void a._restartInterval(l)}a.isCursorVisible=!1,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0}),a._blinkInterval=window.setInterval(function(){if(a._animationTimeRestarted){var v=h-(Date.now()-a._animationTimeRestarted);return a._animationTimeRestarted=void 0,void a._restartInterval(v)}a.isCursorVisible=!a.isCursorVisible,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0})},h)},i)},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:(z,c,y)=>{var f,p,_,u,C,g,n,o,h,s,t,e,i,a,l,v,m,E,L,b,S,T,k,W,D,A,O,H,R,G,Y,oe,le,he,x,B,I,K,j,V,se,Ce,ke,Ee,ee,Le,Be,at,Lt,ft,jt,Ye,Bi,Pi,Xi,ei,Ft,Wt,Ii,Hi,ti,dt,Re,Pe,Ie,De,Et,_t,ct,pt,ii,Nt,vt,ri,qt,Ut,ni,oi,si,ai,ci,li,hi,ui,fi,di,Ue,Fe,yt,He,_i,zt,ze,gt,Kt,pi,$e,ji,tt,At,vi,bt,Vt,it,Ct,xt,kt,gi,mi,yi,mt,Fi,Wi,bi,Gt,Ci,Yi,Xt,$i,Ni,Si,wi,Li,qi,Mt,Ei,Ui,zi;Object.defineProperty(c,"__esModule",{value:!0}),c.tryDrawCustomChar=c.boxDrawingDefinitions=c.blockElementDefinitions=void 0;var Tt=y(1752);c.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 Sr={"\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]]};c.boxDrawingDefinitions={"\u2500":(f={},f[1]="M0,.5 L1,.5",f),"\u2501":(p={},p[3]="M0,.5 L1,.5",p),"\u2502":(_={},_[1]="M.5,0 L.5,1",_),"\u2503":(u={},u[3]="M.5,0 L.5,1",u),"\u250C":(C={},C[1]="M0.5,1 L.5,.5 L1,.5",C),"\u250F":(g={},g[3]="M0.5,1 L.5,.5 L1,.5",g),"\u2510":(n={},n[1]="M0,.5 L.5,.5 L.5,1",n),"\u2513":(o={},o[3]="M0,.5 L.5,.5 L.5,1",o),"\u2514":(h={},h[1]="M.5,0 L.5,.5 L1,.5",h),"\u2517":(s={},s[3]="M.5,0 L.5,.5 L1,.5",s),"\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":(i={},i[1]="M.5,0 L.5,1 M.5,.5 L1,.5",i),"\u2523":(a={},a[3]="M.5,0 L.5,1 M.5,.5 L1,.5",a),"\u2524":(l={},l[1]="M.5,0 L.5,1 M.5,.5 L0,.5",l),"\u252B":(v={},v[3]="M.5,0 L.5,1 M.5,.5 L0,.5",v),"\u252C":(m={},m[1]="M0,.5 L1,.5 M.5,.5 L.5,1",m),"\u2533":(E={},E[3]="M0,.5 L1,.5 M.5,.5 L.5,1",E),"\u2534":(L={},L[1]="M0,.5 L1,.5 M.5,.5 L.5,0",L),"\u253B":(b={},b[3]="M0,.5 L1,.5 M.5,.5 L.5,0",b),"\u253C":(S={},S[1]="M0,.5 L1,.5 M.5,0 L.5,1",S),"\u254B":(T={},T[3]="M0,.5 L1,.5 M.5,0 L.5,1",T),"\u2574":(k={},k[1]="M.5,.5 L0,.5",k),"\u2578":(W={},W[3]="M.5,.5 L0,.5",W),"\u2575":(D={},D[1]="M.5,.5 L.5,0",D),"\u2579":(A={},A[3]="M.5,.5 L.5,0",A),"\u2576":(O={},O[1]="M.5,.5 L1,.5",O),"\u257A":(H={},H[3]="M.5,.5 L1,.5",H),"\u2577":(R={},R[1]="M.5,.5 L.5,1",R),"\u257B":(G={},G[3]="M.5,.5 L.5,1",G),"\u2550":(Y={},Y[1]=function(U,q){return"M0,"+(.5-q)+" L1,"+(.5-q)+" M0,"+(.5+q)+" L1,"+(.5+q)},Y),"\u2551":(oe={},oe[1]=function(U,q){return"M"+(.5-U)+",0 L"+(.5-U)+",1 M"+(.5+U)+",0 L"+(.5+U)+",1"},oe),"\u2552":(le={},le[1]=function(U,q){return"M.5,1 L.5,"+(.5-q)+" L1,"+(.5-q)+" M.5,"+(.5+q)+" L1,"+(.5+q)},le),"\u2553":(he={},he[1]=function(U,q){return"M"+(.5-U)+",1 L"+(.5-U)+",.5 L1,.5 M"+(.5+U)+",.5 L"+(.5+U)+",1"},he),"\u2554":(x={},x[1]=function(U,q){return"M1,"+(.5-q)+" L"+(.5-U)+","+(.5-q)+" L"+(.5-U)+",1 M1,"+(.5+q)+" L"+(.5+U)+","+(.5+q)+" L"+(.5+U)+",1"},x),"\u2555":(B={},B[1]=function(U,q){return"M0,"+(.5-q)+" L.5,"+(.5-q)+" L.5,1 M0,"+(.5+q)+" L.5,"+(.5+q)},B),"\u2556":(I={},I[1]=function(U,q){return"M"+(.5+U)+",1 L"+(.5+U)+",.5 L0,.5 M"+(.5-U)+",.5 L"+(.5-U)+",1"},I),"\u2557":(K={},K[1]=function(U,q){return"M0,"+(.5+q)+" L"+(.5-U)+","+(.5+q)+" L"+(.5-U)+",1 M0,"+(.5-q)+" L"+(.5+U)+","+(.5-q)+" L"+(.5+U)+",1"},K),"\u2558":(j={},j[1]=function(U,q){return"M.5,0 L.5,"+(.5+q)+" L1,"+(.5+q)+" M.5,"+(.5-q)+" L1,"+(.5-q)},j),"\u2559":(V={},V[1]=function(U,q){return"M1,.5 L"+(.5-U)+",.5 L"+(.5-U)+",0 M"+(.5+U)+",.5 L"+(.5+U)+",0"},V),"\u255A":(se={},se[1]=function(U,q){return"M1,"+(.5-q)+" L"+(.5+U)+","+(.5-q)+" L"+(.5+U)+",0 M1,"+(.5+q)+" L"+(.5-U)+","+(.5+q)+" L"+(.5-U)+",0"},se),"\u255B":(Ce={},Ce[1]=function(U,q){return"M0,"+(.5+q)+" L.5,"+(.5+q)+" L.5,0 M0,"+(.5-q)+" L.5,"+(.5-q)},Ce),"\u255C":(ke={},ke[1]=function(U,q){return"M0,.5 L"+(.5+U)+",.5 L"+(.5+U)+",0 M"+(.5-U)+",.5 L"+(.5-U)+",0"},ke),"\u255D":(Ee={},Ee[1]=function(U,q){return"M0,"+(.5-q)+" L"+(.5-U)+","+(.5-q)+" L"+(.5-U)+",0 M0,"+(.5+q)+" L"+(.5+U)+","+(.5+q)+" L"+(.5+U)+",0"},Ee),"\u255E":(ee={},ee[1]=function(U,q){return"M.5,0 L.5,1 M.5,"+(.5-q)+" L1,"+(.5-q)+" M.5,"+(.5+q)+" L1,"+(.5+q)},ee),"\u255F":(Le={},Le[1]=function(U,q){return"M"+(.5-U)+",0 L"+(.5-U)+",1 M"+(.5+U)+",0 L"+(.5+U)+",1 M"+(.5+U)+",.5 L1,.5"},Le),"\u2560":(Be={},Be[1]=function(U,q){return"M"+(.5-U)+",0 L"+(.5-U)+",1 M1,"+(.5+q)+" L"+(.5+U)+","+(.5+q)+" L"+(.5+U)+",1 M1,"+(.5-q)+" L"+(.5+U)+","+(.5-q)+" L"+(.5+U)+",0"},Be),"\u2561":(at={},at[1]=function(U,q){return"M.5,0 L.5,1 M0,"+(.5-q)+" L.5,"+(.5-q)+" M0,"+(.5+q)+" L.5,"+(.5+q)},at),"\u2562":(Lt={},Lt[1]=function(U,q){return"M0,.5 L"+(.5-U)+",.5 M"+(.5-U)+",0 L"+(.5-U)+",1 M"+(.5+U)+",0 L"+(.5+U)+",1"},Lt),"\u2563":(ft={},ft[1]=function(U,q){return"M"+(.5+U)+",0 L"+(.5+U)+",1 M0,"+(.5+q)+" L"+(.5-U)+","+(.5+q)+" L"+(.5-U)+",1 M0,"+(.5-q)+" L"+(.5-U)+","+(.5-q)+" L"+(.5-U)+",0"},ft),"\u2564":(jt={},jt[1]=function(U,q){return"M0,"+(.5-q)+" L1,"+(.5-q)+" M0,"+(.5+q)+" L1,"+(.5+q)+" M.5,"+(.5+q)+" L.5,1"},jt),"\u2565":(Ye={},Ye[1]=function(U,q){return"M0,.5 L1,.5 M"+(.5-U)+",.5 L"+(.5-U)+",1 M"+(.5+U)+",.5 L"+(.5+U)+",1"},Ye),"\u2566":(Bi={},Bi[1]=function(U,q){return"M0,"+(.5-q)+" L1,"+(.5-q)+" M0,"+(.5+q)+" L"+(.5-U)+","+(.5+q)+" L"+(.5-U)+",1 M1,"+(.5+q)+" L"+(.5+U)+","+(.5+q)+" L"+(.5+U)+",1"},Bi),"\u2567":(Pi={},Pi[1]=function(U,q){return"M.5,0 L.5,"+(.5-q)+" M0,"+(.5-q)+" L1,"+(.5-q)+" M0,"+(.5+q)+" L1,"+(.5+q)},Pi),"\u2568":(Xi={},Xi[1]=function(U,q){return"M0,.5 L1,.5 M"+(.5-U)+",.5 L"+(.5-U)+",0 M"+(.5+U)+",.5 L"+(.5+U)+",0"},Xi),"\u2569":(ei={},ei[1]=function(U,q){return"M0,"+(.5+q)+" L1,"+(.5+q)+" M0,"+(.5-q)+" L"+(.5-U)+","+(.5-q)+" L"+(.5-U)+",0 M1,"+(.5-q)+" L"+(.5+U)+","+(.5-q)+" L"+(.5+U)+",0"},ei),"\u256A":(Ft={},Ft[1]=function(U,q){return"M.5,0 L.5,1 M0,"+(.5-q)+" L1,"+(.5-q)+" M0,"+(.5+q)+" L1,"+(.5+q)},Ft),"\u256B":(Wt={},Wt[1]=function(U,q){return"M0,.5 L1,.5 M"+(.5-U)+",0 L"+(.5-U)+",1 M"+(.5+U)+",0 L"+(.5+U)+",1"},Wt),"\u256C":(Ii={},Ii[1]=function(U,q){return"M0,"+(.5+q)+" L"+(.5-U)+","+(.5+q)+" L"+(.5-U)+",1 M1,"+(.5+q)+" L"+(.5+U)+","+(.5+q)+" L"+(.5+U)+",1 M0,"+(.5-q)+" L"+(.5-U)+","+(.5-q)+" L"+(.5-U)+",0 M1,"+(.5-q)+" L"+(.5+U)+","+(.5-q)+" L"+(.5+U)+",0"},Ii),"\u2571":(Hi={},Hi[1]="M1,0 L0,1",Hi),"\u2572":(ti={},ti[1]="M0,0 L1,1",ti),"\u2573":(dt={},dt[1]="M1,0 L0,1 M0,0 L1,1",dt),"\u257C":(Re={},Re[1]="M.5,.5 L0,.5",Re[3]="M.5,.5 L1,.5",Re),"\u257D":(Pe={},Pe[1]="M.5,.5 L.5,0",Pe[3]="M.5,.5 L.5,1",Pe),"\u257E":(Ie={},Ie[1]="M.5,.5 L1,.5",Ie[3]="M.5,.5 L0,.5",Ie),"\u257F":(De={},De[1]="M.5,.5 L.5,1",De[3]="M.5,.5 L.5,0",De),"\u250D":(Et={},Et[1]="M.5,.5 L.5,1",Et[3]="M.5,.5 L1,.5",Et),"\u250E":(_t={},_t[1]="M.5,.5 L1,.5",_t[3]="M.5,.5 L.5,1",_t),"\u2511":(ct={},ct[1]="M.5,.5 L.5,1",ct[3]="M.5,.5 L0,.5",ct),"\u2512":(pt={},pt[1]="M.5,.5 L0,.5",pt[3]="M.5,.5 L.5,1",pt),"\u2515":(ii={},ii[1]="M.5,.5 L.5,0",ii[3]="M.5,.5 L1,.5",ii),"\u2516":(Nt={},Nt[1]="M.5,.5 L1,.5",Nt[3]="M.5,.5 L.5,0",Nt),"\u2519":(vt={},vt[1]="M.5,.5 L.5,0",vt[3]="M.5,.5 L0,.5",vt),"\u251A":(ri={},ri[1]="M.5,.5 L0,.5",ri[3]="M.5,.5 L.5,0",ri),"\u251D":(qt={},qt[1]="M.5,0 L.5,1",qt[3]="M.5,.5 L1,.5",qt),"\u251E":(Ut={},Ut[1]="M0.5,1 L.5,.5 L1,.5",Ut[3]="M.5,.5 L.5,0",Ut),"\u251F":(ni={},ni[1]="M.5,0 L.5,.5 L1,.5",ni[3]="M.5,.5 L.5,1",ni),"\u2520":(oi={},oi[1]="M.5,.5 L1,.5",oi[3]="M.5,0 L.5,1",oi),"\u2521":(si={},si[1]="M.5,.5 L.5,1",si[3]="M.5,0 L.5,.5 L1,.5",si),"\u2522":(ai={},ai[1]="M.5,.5 L.5,0",ai[3]="M0.5,1 L.5,.5 L1,.5",ai),"\u2525":(ci={},ci[1]="M.5,0 L.5,1",ci[3]="M.5,.5 L0,.5",ci),"\u2526":(li={},li[1]="M0,.5 L.5,.5 L.5,1",li[3]="M.5,.5 L.5,0",li),"\u2527":(hi={},hi[1]="M.5,0 L.5,.5 L0,.5",hi[3]="M.5,.5 L.5,1",hi),"\u2528":(ui={},ui[1]="M.5,.5 L0,.5",ui[3]="M.5,0 L.5,1",ui),"\u2529":(fi={},fi[1]="M.5,.5 L.5,1",fi[3]="M.5,0 L.5,.5 L0,.5",fi),"\u252A":(di={},di[1]="M.5,.5 L.5,0",di[3]="M0,.5 L.5,.5 L.5,1",di),"\u252D":(Ue={},Ue[1]="M0.5,1 L.5,.5 L1,.5",Ue[3]="M.5,.5 L0,.5",Ue),"\u252E":(Fe={},Fe[1]="M0,.5 L.5,.5 L.5,1",Fe[3]="M.5,.5 L1,.5",Fe),"\u252F":(yt={},yt[1]="M.5,.5 L.5,1",yt[3]="M0,.5 L1,.5",yt),"\u2530":(He={},He[1]="M0,.5 L1,.5",He[3]="M.5,.5 L.5,1",He),"\u2531":(_i={},_i[1]="M.5,.5 L1,.5",_i[3]="M0,.5 L.5,.5 L.5,1",_i),"\u2532":(zt={},zt[1]="M.5,.5 L0,.5",zt[3]="M0.5,1 L.5,.5 L1,.5",zt),"\u2535":(ze={},ze[1]="M.5,0 L.5,.5 L1,.5",ze[3]="M.5,.5 L0,.5",ze),"\u2536":(gt={},gt[1]="M.5,0 L.5,.5 L0,.5",gt[3]="M.5,.5 L1,.5",gt),"\u2537":(Kt={},Kt[1]="M.5,.5 L.5,0",Kt[3]="M0,.5 L1,.5",Kt),"\u2538":(pi={},pi[1]="M0,.5 L1,.5",pi[3]="M.5,.5 L.5,0",pi),"\u2539":($e={},$e[1]="M.5,.5 L1,.5",$e[3]="M.5,0 L.5,.5 L0,.5",$e),"\u253A":(ji={},ji[1]="M.5,.5 L0,.5",ji[3]="M.5,0 L.5,.5 L1,.5",ji),"\u253D":(tt={},tt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",tt[3]="M.5,.5 L0,.5",tt),"\u253E":(At={},At[1]="M.5,0 L.5,1 M.5,.5 L0,.5",At[3]="M.5,.5 L1,.5",At),"\u253F":(vi={},vi[1]="M.5,0 L.5,1",vi[3]="M0,.5 L1,.5",vi),"\u2540":(bt={},bt[1]="M0,.5 L1,.5 M.5,.5 L.5,1",bt[3]="M.5,.5 L.5,0",bt),"\u2541":(Vt={},Vt[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Vt[3]="M.5,.5 L.5,1",Vt),"\u2542":(it={},it[1]="M0,.5 L1,.5",it[3]="M.5,0 L.5,1",it),"\u2543":(Ct={},Ct[1]="M0.5,1 L.5,.5 L1,.5",Ct[3]="M.5,0 L.5,.5 L0,.5",Ct),"\u2544":(xt={},xt[1]="M0,.5 L.5,.5 L.5,1",xt[3]="M.5,0 L.5,.5 L1,.5",xt),"\u2545":(kt={},kt[1]="M.5,0 L.5,.5 L1,.5",kt[3]="M0,.5 L.5,.5 L.5,1",kt),"\u2546":(gi={},gi[1]="M.5,0 L.5,.5 L0,.5",gi[3]="M0.5,1 L.5,.5 L1,.5",gi),"\u2547":(mi={},mi[1]="M.5,.5 L.5,1",mi[3]="M.5,.5 L.5,0 M0,.5 L1,.5",mi),"\u2548":(yi={},yi[1]="M.5,.5 L.5,0",yi[3]="M0,.5 L1,.5 M.5,.5 L.5,1",yi),"\u2549":(mt={},mt[1]="M.5,.5 L1,.5",mt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",mt),"\u254A":(Fi={},Fi[1]="M.5,.5 L0,.5",Fi[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Fi),"\u254C":(Wi={},Wi[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Wi),"\u254D":(bi={},bi[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",bi),"\u2504":(Gt={},Gt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Gt),"\u2505":(Ci={},Ci[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Ci),"\u2508":(Yi={},Yi[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",Yi),"\u2509":(Xt={},Xt[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",Xt),"\u254E":($i={},$i[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",$i),"\u254F":(Ni={},Ni[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Ni),"\u2506":(Si={},Si[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Si),"\u2507":(wi={},wi[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",wi),"\u250A":(Li={},Li[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Li),"\u250B":(qi={},qi[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",qi),"\u256D":(Mt={},Mt[1]="C.5,1,.5,.5,1,.5",Mt),"\u256E":(Ei={},Ei[1]="C.5,1,.5,.5,0,.5",Ei),"\u256F":(Ui={},Ui[1]="C.5,0,.5,.5,0,.5",Ui),"\u2570":(zi={},zi[1]="C.5,0,.5,.5,1,.5",zi)},c.tryDrawCustomChar=function(U,q,rt,Ai,xi,Me){var nt=c.blockElementDefinitions[q];if(nt)return function(We,Ze,Yt,Ot,St,Rt){for(var Ve=0;Ve<Ze.length;Ve++){var je=Ze[Ve],Ae=St/8,lt=Rt/8;We.fillRect(Yt+je.x*Ae,Ot+je.y*lt,je.w*Ae,je.h*lt)}}(U,nt,rt,Ai,xi,Me),!0;var Ke=Sr[q];if(Ke)return function(We,Ze,Yt,Ot,St,Rt){var Ve,je=Zi.get(Ze);je||(je=new Map,Zi.set(Ze,je));var Ae=We.fillStyle;if(typeof Ae!="string")throw new Error('Unexpected fillStyle type "'+Ae+'"');var lt=je.get(Ae);if(!lt){var Je=Ze[0].length,Qe=Ze.length,ot=document.createElement("canvas");ot.width=Je,ot.height=Qe;var $t=(0,Tt.throwIfFalsy)(ot.getContext("2d")),wt=new ImageData(Je,Qe),Zt=void 0,Dt=void 0,Qi=void 0,er=void 0;if(Ae.startsWith("#"))Zt=parseInt(Ae.substr(1,2),16),Dt=parseInt(Ae.substr(3,2),16),Qi=parseInt(Ae.substr(5,2),16),er=Ae.length>7&&parseInt(Ae.substr(7,2),16)||1;else{if(!Ae.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+Ae+'" when drawing pattern glyph');Zt=(Ve=Ae.substring(5,Ae.length-1).split(",").map(function(wr){return parseFloat(wr)}))[0],Dt=Ve[1],Qi=Ve[2],er=Ve[3]}for(var Bt=0;Bt<Qe;Bt++)for(var Pt=0;Pt<Je;Pt++)wt.data[4*(Bt*Je+Pt)]=Zt,wt.data[4*(Bt*Je+Pt)+1]=Dt,wt.data[4*(Bt*Je+Pt)+2]=Qi,wt.data[4*(Bt*Je+Pt)+3]=Ze[Bt][Pt]*(255*er);$t.putImageData(wt,0,0),lt=(0,Tt.throwIfFalsy)(We.createPattern(ot,null)),je.set(Ae,lt)}We.fillStyle=lt,We.fillRect(Yt,Ot,St,Rt)}(U,Ke,rt,Ai,xi,Me),!0;var ki=c.boxDrawingDefinitions[q];return!!ki&&(function(We,Ze,Yt,Ot,St,Rt){We.strokeStyle=We.fillStyle;for(var Ve=0,je=Object.entries(Ze);Ve<je.length;Ve++){var Ae=je[Ve],lt=Ae[0],Je=Ae[1];We.beginPath(),We.lineWidth=window.devicePixelRatio*Number.parseInt(lt);for(var Qe=0,ot=(typeof Je=="function"?Je(.15,.15/Rt*St):Je).split(" ");Qe<ot.length;Qe++){var $t=ot[Qe],wt=$t[0],Zt=lr[wt];if(Zt){var Dt=$t.substring(1).split(",");Dt[0]&&Dt[1]&&Zt(We,hr(Dt,St,Rt,Yt,Ot))}else console.error('Could not find drawing instructions for "'+wt+'"')}We.stroke(),We.closePath()}}(U,ki,rt,Ai,xi,Me),!0)};var Zi=new Map;function Ji(U,q,rt){return rt===void 0&&(rt=0),Math.max(Math.min(U,q),rt)}var lr={C:function(U,q){return U.bezierCurveTo(q[0],q[1],q[2],q[3],q[4],q[5])},L:function(U,q){return U.lineTo(q[0],q[1])},M:function(U,q){return U.moveTo(q[0],q[1])}};function hr(U,q,rt,Ai,xi){var Me=U.map(function(ki){return parseFloat(ki)||parseInt(ki)});if(Me.length<2)throw new Error("Too few arguments for instruction");for(var nt=0;nt<Me.length;nt+=2)Me[nt]*=q,Me[nt]!==0&&(Me[nt]=Ji(Math.round(Me[nt]+.5)-.5,q,0)),Me[nt]+=Ai;for(var Ke=1;Ke<Me.length;Ke+=2)Me[Ke]*=rt,Me[Ke]!==0&&(Me[Ke]=Ji(Math.round(Me[Ke]+.5)-.5,rt,0)),Me[Ke]+=xi;return Me}},3700:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.GridCache=void 0;var y=function(){function f(){this.cache=[]}return f.prototype.resize=function(p,_){for(var u=0;u<p;u++){this.cache.length<=u&&this.cache.push([]);for(var C=this.cache[u].length;C<_;C++)this.cache[u].push(void 0);this.cache[u].length=_}this.cache.length=p},f.prototype.clear=function(){for(var p=0;p<this.cache.length;p++)for(var _=0;_<this.cache[p].length;_++)this.cache[p][_]=void 0},f}();c.GridCache=y},5098:function(z,c,y){var f,p=this&&this.__extends||(f=function(s,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},f(s,t)},function(s,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=s}f(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),_=this&&this.__decorate||function(s,t,e,i){var a,l=arguments.length,v=l<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,t,e,i);else for(var m=s.length-1;m>=0;m--)(a=s[m])&&(v=(l<3?a(v):l>3?a(t,e,v):a(t,e))||v);return l>3&&v&&Object.defineProperty(t,e,v),v},u=this&&this.__param||function(s,t){return function(e,i){t(e,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.LinkRenderLayer=void 0;var C=y(1546),g=y(8803),n=y(2040),o=y(2585),h=function(s){function t(e,i,a,l,v,m,E,L){var b=s.call(this,e,"link",i,!0,a,l,E,L)||this;return v.onShowLinkUnderline(function(S){return b._onShowLinkUnderline(S)}),v.onHideLinkUnderline(function(S){return b._onHideLinkUnderline(S)}),m.onShowLinkUnderline(function(S){return b._onShowLinkUnderline(S)}),m.onHideLinkUnderline(function(S){return b._onHideLinkUnderline(S)}),b}return p(t,s),t.prototype.resize=function(e){s.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===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,n.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 i=e.y1+1;i<e.y2;i++)this._fillBottomLineAtCells(0,i,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},t.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},_([u(6,o.IBufferService),u(7,o.IOptionsService)],t)}(C.BaseRenderLayer);c.LinkRenderLayer=h},3525:function(z,c,y){var f,p=this&&this.__extends||(f=function(v,m){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,L){E.__proto__=L}||function(E,L){for(var b in L)Object.prototype.hasOwnProperty.call(L,b)&&(E[b]=L[b])},f(v,m)},function(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function E(){this.constructor=v}f(v,m),v.prototype=m===null?Object.create(m):(E.prototype=m.prototype,new E)}),_=this&&this.__decorate||function(v,m,E,L){var b,S=arguments.length,T=S<3?m:L===null?L=Object.getOwnPropertyDescriptor(m,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,m,E,L);else for(var k=v.length-1;k>=0;k--)(b=v[k])&&(T=(S<3?b(T):S>3?b(m,E,T):b(m,E))||T);return S>3&&T&&Object.defineProperty(m,E,T),T},u=this&&this.__param||function(v,m){return function(E,L){m(E,L,v)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Renderer=void 0;var C=y(9596),g=y(4149),n=y(2512),o=y(5098),h=y(844),s=y(4725),t=y(2585),e=y(1420),i=y(8460),a=1,l=function(v){function m(E,L,b,S,T,k,W,D){var A=v.call(this)||this;A._colors=E,A._screenElement=L,A._bufferService=k,A._charSizeService=W,A._optionsService=D,A._id=a++,A._onRequestRedraw=new i.EventEmitter;var O=A._optionsService.options.allowTransparency;return A._renderLayers=[T.createInstance(C.TextRenderLayer,A._screenElement,0,A._colors,O,A._id),T.createInstance(g.SelectionRenderLayer,A._screenElement,1,A._colors,A._id),T.createInstance(o.LinkRenderLayer,A._screenElement,2,A._colors,A._id,b,S),T.createInstance(n.CursorRenderLayer,A._screenElement,3,A._colors,A._id,A._onRequestRedraw)],A.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},A._devicePixelRatio=window.devicePixelRatio,A._updateDimensions(),A.onOptionsChanged(),A}return p(m,v),Object.defineProperty(m.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),m.prototype.dispose=function(){for(var E=0,L=this._renderLayers;E<L.length;E++)L[E].dispose();v.prototype.dispose.call(this),(0,e.removeTerminalFromCache)(this._id)},m.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},m.prototype.setColors=function(E){this._colors=E;for(var L=0,b=this._renderLayers;L<b.length;L++){var S=b[L];S.setColors(this._colors),S.reset()}},m.prototype.onResize=function(E,L){this._updateDimensions();for(var b=0,S=this._renderLayers;b<S.length;b++)S[b].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},m.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},m.prototype.onBlur=function(){this._runOperation(function(E){return E.onBlur()})},m.prototype.onFocus=function(){this._runOperation(function(E){return E.onFocus()})},m.prototype.onSelectionChanged=function(E,L,b){b===void 0&&(b=!1),this._runOperation(function(S){return S.onSelectionChanged(E,L,b)})},m.prototype.onCursorMove=function(){this._runOperation(function(E){return E.onCursorMove()})},m.prototype.onOptionsChanged=function(){this._runOperation(function(E){return E.onOptionsChanged()})},m.prototype.clear=function(){this._runOperation(function(E){return E.reset()})},m.prototype._runOperation=function(E){for(var L=0,b=this._renderLayers;L<b.length;L++)E(b[L])},m.prototype.renderRows=function(E,L){for(var b=0,S=this._renderLayers;b<S.length;b++)S[b].onGridChanged(E,L)},m.prototype.clearTextureAtlas=function(){for(var E=0,L=this._renderLayers;E<L.length;E++)L[E].clearTextureAtlas()},m.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(4,t.IInstantiationService),u(5,t.IBufferService),u(6,s.ICharSizeService),u(7,t.IOptionsService)],m)}(h.Disposable);c.Renderer=l},1752:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.throwIfFalsy=void 0,c.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y}},4149:function(z,c,y){var f,p=this&&this.__extends||(f=function(o,h){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,t){s.__proto__=t}||function(s,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e])},f(o,h)},function(o,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function s(){this.constructor=o}f(o,h),o.prototype=h===null?Object.create(h):(s.prototype=h.prototype,new s)}),_=this&&this.__decorate||function(o,h,s,t){var e,i=arguments.length,a=i<3?h:t===null?t=Object.getOwnPropertyDescriptor(h,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,h,s,t);else for(var l=o.length-1;l>=0;l--)(e=o[l])&&(a=(i<3?e(a):i>3?e(h,s,a):e(h,s))||a);return i>3&&a&&Object.defineProperty(h,s,a),a},u=this&&this.__param||function(o,h){return function(s,t){h(s,t,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionRenderLayer=void 0;var C=y(1546),g=y(2585),n=function(o){function h(s,t,e,i,a,l){var v=o.call(this,s,"selection",t,!0,e,i,a,l)||this;return v._clearState(),v}return p(h,o),h.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},h.prototype.resize=function(s){o.prototype.resize.call(this,s),this._clearState()},h.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},h.prototype.onSelectionChanged=function(s,t,e){if(this._didStateChange(s,t,e,this._bufferService.buffer.ydisp))if(this._clearAll(),s&&t){var i=s[1]-this._bufferService.buffer.ydisp,a=t[1]-this._bufferService.buffer.ydisp,l=Math.max(i,0),v=Math.min(a,this._bufferService.rows-1);if(l>=this._bufferService.rows||v<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var m=s[0],E=t[0]-m,L=v-l+1;this._fillCells(m,l,E,L)}else{m=i===l?s[0]:0;var b=l===a?t[0]:this._bufferService.cols;this._fillCells(m,l,b-m,1);var S=Math.max(v-l-1,0);if(this._fillCells(0,l+1,this._bufferService.cols,S),l!==v){var T=a===v?t[0]:this._bufferService.cols;this._fillCells(0,v,T,1)}}this._state.start=[s[0],s[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},h.prototype._didStateChange=function(s,t,e,i){return!this._areCoordinatesEqual(s,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||e!==this._state.columnSelectMode||i!==this._state.ydisp},h.prototype._areCoordinatesEqual=function(s,t){return!(!s||!t)&&s[0]===t[0]&&s[1]===t[1]},_([u(4,g.IBufferService),u(5,g.IOptionsService)],h)}(C.BaseRenderLayer);c.SelectionRenderLayer=n},9596:function(z,c,y){var f,p=this&&this.__extends||(f=function(a,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,m){v.__proto__=m}||function(v,m){for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(v[E]=m[E])},f(a,l)},function(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function v(){this.constructor=a}f(a,l),a.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)}),_=this&&this.__decorate||function(a,l,v,m){var E,L=arguments.length,b=L<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(a,l,v,m);else for(var S=a.length-1;S>=0;S--)(E=a[S])&&(b=(L<3?E(b):L>3?E(l,v,b):E(l,v))||b);return L>3&&b&&Object.defineProperty(l,v,b),b},u=this&&this.__param||function(a,l){return function(v,m){l(v,m,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.TextRenderLayer=void 0;var C=y(3700),g=y(1546),n=y(3734),o=y(643),h=y(511),s=y(2585),t=y(4725),e=y(4269),i=function(a){function l(v,m,E,L,b,S,T,k){var W=a.call(this,v,"text",m,L,E,b,S,T)||this;return W._characterJoinerService=k,W._characterWidth=0,W._characterFont="",W._characterOverlapCache={},W._workCell=new h.CellData,W._state=new C.GridCache,W}return p(l,a),l.prototype.resize=function(v){a.prototype.resize.call(this,v);var m=this._getFont(!1,!1);this._characterWidth===v.scaledCharWidth&&this._characterFont===m||(this._characterWidth=v.scaledCharWidth,this._characterFont=m,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},l.prototype.reset=function(){this._state.clear(),this._clearAll()},l.prototype._forEachCell=function(v,m,E){for(var L=v;L<=m;L++)for(var b=L+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.lines.get(b),T=this._characterJoinerService.getJoinedCharacters(b),k=0;k<this._bufferService.cols;k++){S.loadCell(k,this._workCell);var W=this._workCell,D=!1,A=k;if(W.getWidth()!==0){if(T.length>0&&k===T[0][0]){D=!0;var O=T.shift();W=new e.JoinedCellData(this._workCell,S.translateToString(!0,O[0],O[1]),O[1]-O[0]),A=O[1]-1}!D&&this._isOverlapping(W)&&A<S.length-1&&S.getCodePoint(A+1)===o.NULL_CELL_CODE&&(W.content&=-12582913,W.content|=2<<22),E(W,k,L),k=A}}},l.prototype._drawBackground=function(v,m){var E=this,L=this._ctx,b=this._bufferService.cols,S=0,T=0,k=null;L.save(),this._forEachCell(v,m,function(W,D,A){var O=null;W.isInverse()?O=W.isFgDefault()?E._colors.foreground.css:W.isFgRGB()?"rgb("+n.AttributeData.toColorRGB(W.getFgColor()).join(",")+")":E._colors.ansi[W.getFgColor()].css:W.isBgRGB()?O="rgb("+n.AttributeData.toColorRGB(W.getBgColor()).join(",")+")":W.isBgPalette()&&(O=E._colors.ansi[W.getBgColor()].css),k===null&&(S=D,T=A),A!==T?(L.fillStyle=k||"",E._fillCells(S,T,b-S,1),S=D,T=A):k!==O&&(L.fillStyle=k||"",E._fillCells(S,T,D-S,1),S=D,T=A),k=O}),k!==null&&(L.fillStyle=k,this._fillCells(S,T,b-S,1)),L.restore()},l.prototype._drawForeground=function(v,m){var E=this;this._forEachCell(v,m,function(L,b,S){if(!L.isInvisible()&&(E._drawChars(L,b,S),L.isUnderline()||L.isStrikethrough())){if(E._ctx.save(),L.isInverse())if(L.isBgDefault())E._ctx.fillStyle=E._colors.background.css;else if(L.isBgRGB())E._ctx.fillStyle="rgb("+n.AttributeData.toColorRGB(L.getBgColor()).join(",")+")";else{var T=L.getBgColor();E._optionsService.options.drawBoldTextInBrightColors&&L.isBold()&&T<8&&(T+=8),E._ctx.fillStyle=E._colors.ansi[T].css}else if(L.isFgDefault())E._ctx.fillStyle=E._colors.foreground.css;else if(L.isFgRGB())E._ctx.fillStyle="rgb("+n.AttributeData.toColorRGB(L.getFgColor()).join(",")+")";else{var k=L.getFgColor();E._optionsService.options.drawBoldTextInBrightColors&&L.isBold()&&k<8&&(k+=8),E._ctx.fillStyle=E._colors.ansi[k].css}L.isStrikethrough()&&E._fillMiddleLineAtCells(b,S,L.getWidth()),L.isUnderline()&&E._fillBottomLineAtCells(b,S,L.getWidth()),E._ctx.restore()}})},l.prototype.onGridChanged=function(v,m){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,v,this._bufferService.cols,m-v+1),this._drawBackground(v,m),this._drawForeground(v,m))},l.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},l.prototype._isOverlapping=function(v){if(v.getWidth()!==1||v.getCode()<256)return!1;var m=v.getChars();if(this._characterOverlapCache.hasOwnProperty(m))return this._characterOverlapCache[m];this._ctx.save(),this._ctx.font=this._characterFont;var E=Math.floor(this._ctx.measureText(m).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[m]=E,E},_([u(5,s.IBufferService),u(6,s.IOptionsService),u(7,t.ICharacterJoinerService)],l)}(g.BaseRenderLayer);c.TextRenderLayer=i},9616:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BaseCharAtlas=void 0;var y=function(){function f(){this._didWarmUp=!1}return f.prototype.dispose=function(){},f.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},f.prototype._doWarmUp=function(){},f.prototype.clear=function(){},f.prototype.beginFrame=function(){},f}();c.BaseCharAtlas=y},1420:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.removeTerminalFromCache=c.acquireCharAtlas=void 0;var f=y(2040),p=y(1906),_=[];c.acquireCharAtlas=function(u,C,g,n,o){for(var h=(0,f.generateConfig)(n,o,u,g),s=0;s<_.length;s++){var t=(e=_[s]).ownedBy.indexOf(C);if(t>=0){if((0,f.configEquals)(e.config,h))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),_.splice(s,1)):e.ownedBy.splice(t,1);break}}for(s=0;s<_.length;s++){var e=_[s];if((0,f.configEquals)(e.config,h))return e.ownedBy.push(C),e.atlas}var i={atlas:new p.DynamicCharAtlas(document,h),config:h,ownedBy:[C]};return _.push(i),i.atlas},c.removeTerminalFromCache=function(u){for(var C=0;C<_.length;C++){var g=_[C].ownedBy.indexOf(u);if(g!==-1){_[C].ownedBy.length===1?(_[C].atlas.dispose(),_.splice(C,1)):_[C].ownedBy.splice(g,1);break}}}},2040:function(z,c,y){var f=this&&this.__spreadArray||function(_,u,C){if(C||arguments.length===2)for(var g,n=0,o=u.length;n<o;n++)!g&&n in u||(g||(g=Array.prototype.slice.call(u,0,n)),g[n]=u[n]);return _.concat(g||Array.prototype.slice.call(u))};Object.defineProperty(c,"__esModule",{value:!0}),c.is256Color=c.configEquals=c.generateConfig=void 0;var p=y(643);c.generateConfig=function(_,u,C,g){var n={foreground:g.foreground,background:g.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:f([],g.ansi,!0)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:_,scaledCharHeight:u,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,colors:n}},c.configEquals=function(_,u){for(var C=0;C<_.colors.ansi.length;C++)if(_.colors.ansi[C].rgba!==u.colors.ansi[C].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},c.is256Color=function(_){return _<p.DEFAULT_COLOR}},8803:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR_ATLAS_CELL_SPACING=c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;var f=y(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=f.isFirefox?"bottom":"ideographic",c.CHAR_ATLAS_CELL_SPACING=1},1906:function(z,c,y){var f,p=this&&this.__extends||(f=function(m,E){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,b){L.__proto__=b}||function(L,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(L[S]=b[S])},f(m,E)},function(m,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function L(){this.constructor=m}f(m,E),m.prototype=E===null?Object.create(E):(L.prototype=E.prototype,new L)});Object.defineProperty(c,"__esModule",{value:!0}),c.NoneCharAtlas=c.DynamicCharAtlas=c.getGlyphCacheKey=void 0;var _=y(8803),u=y(9616),C=y(5680),g=y(7001),n=y(6114),o=y(1752),h=y(4774),s=1024,t=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function i(m){return m.code<<21|m.bg<<12|m.fg<<3|(m.bold?0:4)+(m.dim?0:2)+(m.italic?0:1)}c.getGlyphCacheKey=i;var a=function(m){function E(L,b){var S=m.call(this)||this;S._config=b,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=L.createElement("canvas"),S._cacheCanvas.width=s,S._cacheCanvas.height=t,S._cacheCtx=(0,o.throwIfFalsy)(S._cacheCanvas.getContext("2d",{alpha:!0}));var T=L.createElement("canvas");T.width=S._config.scaledCharWidth,T.height=S._config.scaledCharHeight,S._tmpCtx=(0,o.throwIfFalsy)(T.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(s/S._config.scaledCharWidth),S._height=Math.floor(t/S._config.scaledCharHeight);var k=S._width*S._height;return S._cacheMap=new g.LRUMap(k),S._cacheMap.prealloc(k),S}return p(E,m),E.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},E.prototype.beginFrame=function(){this._drawToCacheCount=0},E.prototype.clear=function(){if(this._cacheMap.size>0){var L=this._width*this._height;this._cacheMap=new g.LRUMap(L),this._cacheMap.prealloc(L)}this._cacheCtx.clearRect(0,0,s,t),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},E.prototype.draw=function(L,b,S,T){if(b.code===32)return!0;if(!this._canCache(b))return!1;var k=i(b),W=this._cacheMap.get(k);if(W!=null)return this._drawFromCache(L,W,S,T),!0;if(this._drawToCacheCount<100){var D;D=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var A=this._drawToCache(b,D);return this._cacheMap.set(k,A),this._drawFromCache(L,A,S,T),!0}return!1},E.prototype._canCache=function(L){return L.code<256},E.prototype._toCoordinateX=function(L){return L%this._width*this._config.scaledCharWidth},E.prototype._toCoordinateY=function(L){return Math.floor(L/this._width)*this._config.scaledCharHeight},E.prototype._drawFromCache=function(L,b,S,T){if(!b.isEmpty){var k=this._toCoordinateX(b.index),W=this._toCoordinateY(b.index);L.drawImage(b.inBitmap?this._bitmap:this._cacheCanvas,k,W,this._config.scaledCharWidth,this._config.scaledCharHeight,S,T,this._config.scaledCharWidth,this._config.scaledCharHeight)}},E.prototype._getColorFromAnsiIndex=function(L){return L<this._config.colors.ansi.length?this._config.colors.ansi[L]:C.DEFAULT_ANSI_COLORS[L]},E.prototype._getBackgroundColor=function(L){return this._config.allowTransparency?e:L.bg===_.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:L.bg<256?this._getColorFromAnsiIndex(L.bg):this._config.colors.background},E.prototype._getForegroundColor=function(L){return L.fg===_.INVERTED_DEFAULT_COLOR?h.color.opaque(this._config.colors.background):L.fg<256?this._getColorFromAnsiIndex(L.fg):this._config.colors.foreground},E.prototype._drawToCache=function(L,b){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(L);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var T=L.bold?this._config.fontWeightBold:this._config.fontWeight,k=L.italic?"italic":"";this._tmpCtx.font=k+" "+T+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=_.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(L).css,L.dim&&(this._tmpCtx.globalAlpha=_.DIM_OPACITY),this._tmpCtx.fillText(L.chars,0,this._config.scaledCharHeight);var W=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),D=!1;if(this._config.allowTransparency||(D=v(W,S)),D&&L.chars==="_"&&!this._config.allowTransparency)for(var A=1;A<=5&&(this._tmpCtx.fillText(L.chars,0,this._config.scaledCharHeight-A),D=v(W=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),S));A++);this._tmpCtx.restore();var O=this._toCoordinateX(b),H=this._toCoordinateY(b);this._cacheCtx.putImageData(W,O,H);var R={index:b,isEmpty:D,inBitmap:!1};return this._addGlyphToBitmap(R),R},E.prototype._addGlyphToBitmap=function(L){var b=this;!("createImageBitmap"in window)||n.isFirefox||n.isSafari||(this._glyphsWaitingOnBitmap.push(L),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return b._generateBitmap()},100)))},E.prototype._generateBitmap=function(){var L=this,b=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){L._bitmap=S;for(var T=0;T<b.length;T++)b[T].inBitmap=!0}),this._bitmapCommitTimeout=null},E}(u.BaseCharAtlas);c.DynamicCharAtlas=a;var l=function(m){function E(L,b){return m.call(this)||this}return p(E,m),E.prototype.draw=function(L,b,S,T){return!1},E}(u.BaseCharAtlas);function v(m,E){for(var L=!0,b=E.rgba>>>24,S=E.rgba>>>16&255,T=E.rgba>>>8&255,k=0;k<m.data.length;k+=4)m.data[k]===b&&m.data[k+1]===S&&m.data[k+2]===T?m.data[k+3]=0:L=!1;return L}c.NoneCharAtlas=l},7001:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LRUMap=void 0;var y=function(){function f(p){this.capacity=p,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return f.prototype._unlinkNode=function(p){var _=p.prev,u=p.next;p===this._head&&(this._head=u),p===this._tail&&(this._tail=_),_!==null&&(_.next=u),u!==null&&(u.prev=_)},f.prototype._appendNode=function(p){var _=this._tail;_!==null&&(_.next=p),p.prev=_,p.next=null,this._tail=p,this._head===null&&(this._head=p)},f.prototype.prealloc=function(p){for(var _=this._nodePool,u=0;u<p;u++)_.push({prev:null,next:null,key:null,value:null})},f.prototype.get=function(p){var _=this._map[p];return _!==void 0?(this._unlinkNode(_),this._appendNode(_),_.value):null},f.prototype.peekValue=function(p){var _=this._map[p];return _!==void 0?_.value:null},f.prototype.peek=function(){var p=this._head;return p===null?null:p.value},f.prototype.set=function(p,_){var u=this._map[p];if(u!==void 0)u=this._map[p],this._unlinkNode(u),u.value=_;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=p,u.value=_,this._map[p]=u;else{var C=this._nodePool;C.length>0?((u=C.pop()).key=p,u.value=_):u={prev:null,next:null,key:p,value:_},this._map[p]=u,this.size++}this._appendNode(u)},f}();c.LRUMap=y},1296:function(z,c,y){var f,p=this&&this.__extends||(f=function(L,b){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,T){S.__proto__=T}||function(S,T){for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(S[k]=T[k])},f(L,b)},function(L,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=L}f(L,b),L.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}),_=this&&this.__decorate||function(L,b,S,T){var k,W=arguments.length,D=W<3?b:T===null?T=Object.getOwnPropertyDescriptor(b,S):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(L,b,S,T);else for(var A=L.length-1;A>=0;A--)(k=L[A])&&(D=(W<3?k(D):W>3?k(b,S,D):k(b,S))||D);return W>3&&D&&Object.defineProperty(b,S,D),D},u=this&&this.__param||function(L,b){return function(S,T){b(S,T,L)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;var C=y(3787),g=y(8803),n=y(844),o=y(4725),h=y(2585),s=y(8460),t=y(4774),e=y(9631),i="xterm-dom-renderer-owner-",a="xterm-fg-",l="xterm-bg-",v="xterm-focus",m=1,E=function(L){function b(S,T,k,W,D,A,O,H,R,G){var Y=L.call(this)||this;return Y._colors=S,Y._element=T,Y._screenElement=k,Y._viewportElement=W,Y._linkifier=D,Y._linkifier2=A,Y._charSizeService=H,Y._optionsService=R,Y._bufferService=G,Y._terminalClass=m++,Y._rowElements=[],Y._rowContainer=document.createElement("div"),Y._rowContainer.classList.add("xterm-rows"),Y._rowContainer.style.lineHeight="normal",Y._rowContainer.setAttribute("aria-hidden","true"),Y._refreshRowElements(Y._bufferService.cols,Y._bufferService.rows),Y._selectionContainer=document.createElement("div"),Y._selectionContainer.classList.add("xterm-selection"),Y._selectionContainer.setAttribute("aria-hidden","true"),Y.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},Y._updateDimensions(),Y._injectCss(),Y._rowFactory=O.createInstance(C.DomRendererRowFactory,document,Y._colors),Y._element.classList.add(i+Y._terminalClass),Y._screenElement.appendChild(Y._rowContainer),Y._screenElement.appendChild(Y._selectionContainer),Y._linkifier.onShowLinkUnderline(function(oe){return Y._onLinkHover(oe)}),Y._linkifier.onHideLinkUnderline(function(oe){return Y._onLinkLeave(oe)}),Y._linkifier2.onShowLinkUnderline(function(oe){return Y._onLinkHover(oe)}),Y._linkifier2.onHideLinkUnderline(function(oe){return Y._onLinkLeave(oe)}),Y}return p(b,L),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return new s.EventEmitter().event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._element.classList.remove(i+this._terminalClass),(0,e.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),L.prototype.dispose.call(this)},b.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 S=0,T=this._rowElements;S<T.length;S++){var k=T[S];k.style.width=this.dimensions.canvasWidth+"px",k.style.height=this.dimensions.actualCellHeight+"px",k.style.lineHeight=this.dimensions.actualCellHeight+"px",k.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var W=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=W,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},b.prototype.setColors=function(S){this._colors=S,this._injectCss()},b.prototype._injectCss=function(){var S=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var T=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";T+=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;}",T+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",T+="@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+"; }}",T+=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;}",T+=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(k,W){T+=S._terminalSelector+" ."+a+W+" { color: "+k.css+"; }"+S._terminalSelector+" ."+l+W+" { background-color: "+k.css+"; }"}),T+=this._terminalSelector+" ."+a+g.INVERTED_DEFAULT_COLOR+" { color: "+t.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+l+g.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=T},b.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},b.prototype._refreshRowElements=function(S,T){for(var k=this._rowElements.length;k<=T;k++){var W=document.createElement("div");this._rowContainer.appendChild(W),this._rowElements.push(W)}for(;this._rowElements.length>T;)this._rowContainer.removeChild(this._rowElements.pop())},b.prototype.onResize=function(S,T){this._refreshRowElements(S,T),this._updateDimensions()},b.prototype.onCharSizeChanged=function(){this._updateDimensions()},b.prototype.onBlur=function(){this._rowContainer.classList.remove(v)},b.prototype.onFocus=function(){this._rowContainer.classList.add(v)},b.prototype.onSelectionChanged=function(S,T,k){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(S&&T){var W=S[1]-this._bufferService.buffer.ydisp,D=T[1]-this._bufferService.buffer.ydisp,A=Math.max(W,0),O=Math.min(D,this._bufferService.rows-1);if(!(A>=this._bufferService.rows||O<0)){var H=document.createDocumentFragment();if(k)H.appendChild(this._createSelectionElement(A,S[0],T[0],O-A+1));else{var R=W===A?S[0]:0,G=A===D?T[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(A,R,G));var Y=O-A-1;if(H.appendChild(this._createSelectionElement(A+1,0,this._bufferService.cols,Y)),A!==O){var oe=D===O?T[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(O,0,oe))}}this._selectionContainer.appendChild(H)}}},b.prototype._createSelectionElement=function(S,T,k,W){W===void 0&&(W=1);var D=document.createElement("div");return D.style.height=W*this.dimensions.actualCellHeight+"px",D.style.top=S*this.dimensions.actualCellHeight+"px",D.style.left=T*this.dimensions.actualCellWidth+"px",D.style.width=this.dimensions.actualCellWidth*(k-T)+"px",D},b.prototype.onCursorMove=function(){},b.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},b.prototype.clear=function(){for(var S=0,T=this._rowElements;S<T.length;S++)T[S].innerText=""},b.prototype.renderRows=function(S,T){for(var k=this._bufferService.buffer.ybase+this._bufferService.buffer.y,W=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),D=this._optionsService.options.cursorBlink,A=S;A<=T;A++){var O=this._rowElements[A];O.innerText="";var H=A+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.lines.get(H),G=this._optionsService.options.cursorStyle;O.appendChild(this._rowFactory.createRow(R,H,H===k,G,W,D,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(b.prototype,"_terminalSelector",{get:function(){return"."+i+this._terminalClass},enumerable:!1,configurable:!0}),b.prototype._onLinkHover=function(S){this._setCellUnderline(S.x1,S.x2,S.y1,S.y2,S.cols,!0)},b.prototype._onLinkLeave=function(S){this._setCellUnderline(S.x1,S.x2,S.y1,S.y2,S.cols,!1)},b.prototype._setCellUnderline=function(S,T,k,W,D,A){for(;S!==T||k!==W;){var O=this._rowElements[k];if(!O)return;var H=O.children[S];H&&(H.style.textDecoration=A?"underline":"none"),++S>=D&&(S=0,k++)}},_([u(6,h.IInstantiationService),u(7,o.ICharSizeService),u(8,h.IOptionsService),u(9,h.IBufferService)],b)}(n.Disposable);c.DomRenderer=E},3787:function(z,c,y){var f=this&&this.__decorate||function(e,i,a,l){var v,m=arguments.length,E=m<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(e,i,a,l);else for(var L=e.length-1;L>=0;L--)(v=e[L])&&(E=(m<3?v(E):m>3?v(i,a,E):v(i,a))||E);return m>3&&E&&Object.defineProperty(i,a,E),E},p=this&&this.__param||function(e,i){return function(a,l){i(a,l,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=c.CURSOR_STYLE_UNDERLINE_CLASS=c.CURSOR_STYLE_BAR_CLASS=c.CURSOR_STYLE_BLOCK_CLASS=c.CURSOR_BLINK_CLASS=c.CURSOR_CLASS=c.STRIKETHROUGH_CLASS=c.UNDERLINE_CLASS=c.ITALIC_CLASS=c.DIM_CLASS=c.BOLD_CLASS=void 0;var _=y(8803),u=y(643),C=y(511),g=y(2585),n=y(4774),o=y(4725),h=y(4269);c.BOLD_CLASS="xterm-bold",c.DIM_CLASS="xterm-dim",c.ITALIC_CLASS="xterm-italic",c.UNDERLINE_CLASS="xterm-underline",c.STRIKETHROUGH_CLASS="xterm-strikethrough",c.CURSOR_CLASS="xterm-cursor",c.CURSOR_BLINK_CLASS="xterm-cursor-blink",c.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",c.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",c.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var s=function(){function e(i,a,l,v,m){this._document=i,this._colors=a,this._characterJoinerService=l,this._optionsService=v,this._coreService=m,this._workCell=new C.CellData}return e.prototype.setColors=function(i){this._colors=i},e.prototype.createRow=function(i,a,l,v,m,E,L,b){for(var S=this._document.createDocumentFragment(),T=this._characterJoinerService.getJoinedCharacters(a),k=0,W=Math.min(i.length,b)-1;W>=0;W--)if(i.loadCell(W,this._workCell).getCode()!==u.NULL_CELL_CODE||l&&W===m){k=W+1;break}for(W=0;W<k;W++){i.loadCell(W,this._workCell);var D=this._workCell.getWidth();if(D!==0){var A=!1,O=W,H=this._workCell;if(T.length>0&&W===T[0][0]){A=!0;var R=T.shift();H=new h.JoinedCellData(this._workCell,i.translateToString(!0,R[0],R[1]),R[1]-R[0]),O=R[1]-1,D=H.getWidth()}var G=this._document.createElement("span");if(D>1&&(G.style.width=L*D+"px"),A&&(G.style.display="inline",m>=W&&m<=O&&(m=W)),!this._coreService.isCursorHidden&&l&&W===m)switch(G.classList.add(c.CURSOR_CLASS),E&&G.classList.add(c.CURSOR_BLINK_CLASS),v){case"bar":G.classList.add(c.CURSOR_STYLE_BAR_CLASS);break;case"underline":G.classList.add(c.CURSOR_STYLE_UNDERLINE_CLASS);break;default:G.classList.add(c.CURSOR_STYLE_BLOCK_CLASS)}H.isBold()&&G.classList.add(c.BOLD_CLASS),H.isItalic()&&G.classList.add(c.ITALIC_CLASS),H.isDim()&&G.classList.add(c.DIM_CLASS),H.isUnderline()&&G.classList.add(c.UNDERLINE_CLASS),H.isInvisible()?G.textContent=u.WHITESPACE_CELL_CHAR:G.textContent=H.getChars()||u.WHITESPACE_CELL_CHAR,H.isStrikethrough()&&G.classList.add(c.STRIKETHROUGH_CLASS);var Y=H.getFgColor(),oe=H.getFgColorMode(),le=H.getBgColor(),he=H.getBgColorMode(),x=!!H.isInverse();if(x){var B=Y;Y=le,le=B;var I=oe;oe=he,he=I}switch(oe){case 16777216:case 33554432:H.isBold()&&Y<8&&this._optionsService.options.drawBoldTextInBrightColors&&(Y+=8),this._applyMinimumContrast(G,this._colors.background,this._colors.ansi[Y])||G.classList.add("xterm-fg-"+Y);break;case 50331648:var K=n.rgba.toColor(Y>>16&255,Y>>8&255,255&Y);this._applyMinimumContrast(G,this._colors.background,K)||this._addStyle(G,"color:#"+t(Y.toString(16),"0",6));break;default:this._applyMinimumContrast(G,this._colors.background,this._colors.foreground)||x&&G.classList.add("xterm-fg-"+_.INVERTED_DEFAULT_COLOR)}switch(he){case 16777216:case 33554432:G.classList.add("xterm-bg-"+le);break;case 50331648:this._addStyle(G,"background-color:#"+t(le.toString(16),"0",6));break;default:x&&G.classList.add("xterm-bg-"+_.INVERTED_DEFAULT_COLOR)}S.appendChild(G),W=O}}return S},e.prototype._applyMinimumContrast=function(i,a,l){if(this._optionsService.options.minimumContrastRatio===1)return!1;var v=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return v===void 0&&(v=n.color.ensureContrastRatio(a,l,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,v??null)),!!v&&(this._addStyle(i,"color:"+v.css),!0)},e.prototype._addStyle=function(i,a){i.setAttribute("style",""+(i.getAttribute("style")||"")+a+";")},f([p(2,o.ICharacterJoinerService),p(3,g.IOptionsService),p(4,g.ICoreService)],e)}();function t(e,i,a){for(;e.length<a;)e=i+e;return e}c.DomRendererRowFactory=s},456:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0;var y=function(){function f(p){this._bufferService=p,this.isSelectAllActive=!1,this.selectionStartLength=0}return f.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(f.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(f.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 p=this.selectionStart[0]+this.selectionStartLength;return p>this._bufferService.cols?p%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(p/this._bufferService.cols)-1]:[p%this._bufferService.cols,this.selectionStart[1]+Math.floor(p/this._bufferService.cols)]:[p,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}),f.prototype.areSelectionValuesReversed=function(){var p=this.selectionStart,_=this.selectionEnd;return!(!p||!_)&&(p[1]>_[1]||p[1]===_[1]&&p[0]>_[0])},f.prototype.onTrim=function(p){return this.selectionStart&&(this.selectionStart[1]-=p),this.selectionEnd&&(this.selectionEnd[1]-=p),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},f}();c.SelectionModel=y},428:function(z,c,y){var f=this&&this.__decorate||function(n,o,h,s){var t,e=arguments.length,i=e<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,h):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,o,h,s);else for(var a=n.length-1;a>=0;a--)(t=n[a])&&(i=(e<3?t(i):e>3?t(o,h,i):t(o,h))||i);return e>3&&i&&Object.defineProperty(o,h,i),i},p=this&&this.__param||function(n,o){return function(h,s){o(h,s,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;var _=y(2585),u=y(8460),C=function(){function n(o,h,s){this._optionsService=s,this.width=0,this.height=0,this._onCharSizeChange=new u.EventEmitter,this._measureStrategy=new g(o,h,this._optionsService)}return Object.defineProperty(n.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),n.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())},f([p(2,_.IOptionsService)],n)}();c.CharSizeService=C;var g=function(){function n(o,h,s){this._document=o,this._parentElement=h,this._optionsService=s,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 n.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},n}()},4269:function(z,c,y){var f,p=this&&this.__extends||(f=function(t,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(i[l]=a[l])},f(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 i(){this.constructor=t}f(t,e),t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}),_=this&&this.__decorate||function(t,e,i,a){var l,v=arguments.length,m=v<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(t,e,i,a);else for(var E=t.length-1;E>=0;E--)(l=t[E])&&(m=(v<3?l(m):v>3?l(e,i,m):l(e,i))||m);return v>3&&m&&Object.defineProperty(e,i,m),m},u=this&&this.__param||function(t,e){return function(i,a){e(i,a,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;var C=y(3734),g=y(643),n=y(511),o=y(2585),h=function(t){function e(i,a,l){var v=t.call(this)||this;return v.content=0,v.combinedData="",v.fg=i.fg,v.bg=i.bg,v.combinedData=a,v._width=l,v}return p(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(i){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(C.AttributeData);c.JoinedCellData=h;var s=function(){function t(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new n.CellData}return t.prototype.register=function(e){var i={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(i),i.id},t.prototype.deregister=function(e){for(var i=0;i<this._characterJoiners.length;i++)if(this._characterJoiners[i].id===e)return this._characterJoiners.splice(i,1),!0;return!1},t.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var i=this._bufferService.buffer.lines.get(e);if(!i||i.length===0)return[];for(var a=[],l=i.translateToString(!0),v=0,m=0,E=0,L=i.getFg(0),b=i.getBg(0),S=0;S<i.getTrimmedLength();S++)if(i.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==b){if(S-v>1)for(var T=this._getJoinedRanges(l,E,m,i,v),k=0;k<T.length;k++)a.push(T[k]);v=S,E=m,L=this._workCell.fg,b=this._workCell.bg}m+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1)for(T=this._getJoinedRanges(l,E,m,i,v),k=0;k<T.length;k++)a.push(T[k]);return a},t.prototype._getJoinedRanges=function(e,i,a,l,v){var m=e.substring(i,a),E=[];try{E=this._characterJoiners[0].handler(m)}catch(T){console.error(T)}for(var L=1;L<this._characterJoiners.length;L++)try{for(var b=this._characterJoiners[L].handler(m),S=0;S<b.length;S++)t._mergeRanges(E,b[S])}catch(T){console.error(T)}return this._stringRangesToCellRanges(E,l,v),E},t.prototype._stringRangesToCellRanges=function(e,i,a){var l=0,v=!1,m=0,E=e[l];if(E){for(var L=a;L<this._bufferService.cols;L++){var b=i.getWidth(L),S=i.getString(L).length||g.WHITESPACE_CELL_CHAR.length;if(b!==0){if(!v&&E[0]<=m&&(E[0]=L,v=!0),E[1]<=m){if(E[1]=L,!(E=e[++l]))break;E[0]<=m?(E[0]=L,v=!0):v=!1}m+=S}}E&&(E[1]=this._bufferService.cols)}},t._mergeRanges=function(e,i){for(var a=!1,l=0;l<e.length;l++){var v=e[l];if(a){if(i[1]<=v[0])return e[l-1][1]=i[1],e;if(i[1]<=v[1])return e[l-1][1]=Math.max(i[1],v[1]),e.splice(l,1),e;e.splice(l,1),l--}else{if(i[1]<=v[0])return e.splice(l,0,i),e;if(i[1]<=v[1])return v[0]=Math.min(i[0],v[0]),e;i[0]<v[1]&&(v[0]=Math.min(i[0],v[0]),a=!0)}}return a?e[e.length-1][1]=i[1]:e.push(i),e},t=_([u(0,o.IBufferService)],t)}();c.CharacterJoinerService=s},5114:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;var y=function(){function f(p){this._textarea=p}return Object.defineProperty(f.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),f}();c.CoreBrowserService=y},8934:function(z,c,y){var f=this&&this.__decorate||function(g,n,o,h){var s,t=arguments.length,e=t<3?n:h===null?h=Object.getOwnPropertyDescriptor(n,o):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(g,n,o,h);else for(var i=g.length-1;i>=0;i--)(s=g[i])&&(e=(t<3?s(e):t>3?s(n,o,e):s(n,o))||e);return t>3&&e&&Object.defineProperty(n,o,e),e},p=this&&this.__param||function(g,n){return function(o,h){n(o,h,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;var _=y(4725),u=y(9806),C=function(){function g(n,o){this._renderService=n,this._charSizeService=o}return g.prototype.getCoords=function(n,o,h,s,t){return(0,u.getCoords)(n,o,h,s,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,t)},g.prototype.getRawByteCoords=function(n,o,h,s){var t=this.getCoords(n,o,h,s);return(0,u.getRawByteCoords)(t)},f([p(0,_.IRenderService),p(1,_.ICharSizeService)],g)}();c.MouseService=C},3230:function(z,c,y){var f,p=this&&this.__extends||(f=function(i,a){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var m in v)Object.prototype.hasOwnProperty.call(v,m)&&(l[m]=v[m])},f(i,a)},function(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function l(){this.constructor=i}f(i,a),i.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}),_=this&&this.__decorate||function(i,a,l,v){var m,E=arguments.length,L=E<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(L=(E<3?m(L):E>3?m(a,l,L):m(a,l))||L);return E>3&&L&&Object.defineProperty(a,l,L),L},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;var C=y(6193),g=y(8460),n=y(844),o=y(5596),h=y(3656),s=y(2585),t=y(4725),e=function(i){function a(l,v,m,E,L,b){var S=i.call(this)||this;if(S._renderer=l,S._rowCount=v,S._charSizeService=L,S._isPaused=!1,S._needsFullRefresh=!1,S._isNextRenderRedrawOnly=!0,S._needsSelectionRefresh=!1,S._canvasWidth=0,S._canvasHeight=0,S._selectionState={start:void 0,end:void 0,columnSelectMode:!1},S._onDimensionsChange=new g.EventEmitter,S._onRender=new g.EventEmitter,S._onRefreshRequest=new g.EventEmitter,S.register({dispose:function(){return S._renderer.dispose()}}),S._renderDebouncer=new C.RenderDebouncer(function(k,W){return S._renderRows(k,W)}),S.register(S._renderDebouncer),S._screenDprMonitor=new o.ScreenDprMonitor,S._screenDprMonitor.setListener(function(){return S.onDevicePixelRatioChange()}),S.register(S._screenDprMonitor),S.register(b.onResize(function(k){return S._fullRefresh()})),S.register(E.onOptionChange(function(){return S._renderer.onOptionsChanged()})),S.register(S._charSizeService.onCharSizeChange(function(){return S.onCharSizeChanged()})),S._renderer.onRequestRedraw(function(k){return S.refreshRows(k.start,k.end,!0)}),S.register((0,h.addDisposableDomListener)(window,"resize",function(){return S.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var T=new IntersectionObserver(function(k){return S._onIntersectionChange(k[k.length-1])},{threshold:0});T.observe(m),S.register({dispose:function(){return T.disconnect()}})}return S}return p(a,i),Object.defineProperty(a.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),a.prototype._onIntersectionChange=function(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},a.prototype.refreshRows=function(l,v,m){m===void 0&&(m=!1),this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,v,this._rowCount))},a.prototype._renderRows=function(l,v){this._renderer.renderRows(l,v),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:l,end:v}),this._isNextRenderRedrawOnly=!0},a.prototype.resize=function(l,v){this._rowCount=v,this._fireOnCanvasResize()},a.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},a.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},a.prototype.dispose=function(){i.prototype.dispose.call(this)},a.prototype.setRenderer=function(l){var v=this;this._renderer.dispose(),this._renderer=l,this._renderer.onRequestRedraw(function(m){return v.refreshRows(m.start,m.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},a.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},a.prototype.clearTextureAtlas=function(){var l,v;(v=(l=this._renderer)===null||l===void 0?void 0:l.clearTextureAtlas)===null||v===void 0||v.call(l),this._fullRefresh()},a.prototype.setColors=function(l){this._renderer.setColors(l),this._fullRefresh()},a.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},a.prototype.onResize=function(l,v){this._renderer.onResize(l,v),this._fullRefresh()},a.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},a.prototype.onBlur=function(){this._renderer.onBlur()},a.prototype.onFocus=function(){this._renderer.onFocus()},a.prototype.onSelectionChanged=function(l,v,m){this._selectionState.start=l,this._selectionState.end=v,this._selectionState.columnSelectMode=m,this._renderer.onSelectionChanged(l,v,m)},a.prototype.onCursorMove=function(){this._renderer.onCursorMove()},a.prototype.clear=function(){this._renderer.clear()},_([u(3,s.IOptionsService),u(4,t.ICharSizeService),u(5,s.IBufferService)],a)}(n.Disposable);c.RenderService=e},9312:function(z,c,y){var f,p=this&&this.__extends||(f=function(E,L){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(b[T]=S[T])},f(E,L)},function(E,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function b(){this.constructor=E}f(E,L),E.prototype=L===null?Object.create(L):(b.prototype=L.prototype,new b)}),_=this&&this.__decorate||function(E,L,b,S){var T,k=arguments.length,W=k<3?L:S===null?S=Object.getOwnPropertyDescriptor(L,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(E,L,b,S);else for(var D=E.length-1;D>=0;D--)(T=E[D])&&(W=(k<3?T(W):k>3?T(L,b,W):T(L,b))||W);return k>3&&W&&Object.defineProperty(L,b,W),W},u=this&&this.__param||function(E,L){return function(b,S){L(b,S,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;var C=y(6114),g=y(456),n=y(511),o=y(8460),h=y(4725),s=y(2585),t=y(9806),e=y(9504),i=y(844),a=y(4841),l=String.fromCharCode(160),v=new RegExp(l,"g"),m=function(E){function L(b,S,T,k,W,D,A,O){var H=E.call(this)||this;return H._element=b,H._screenElement=S,H._linkifier=T,H._bufferService=k,H._coreService=W,H._mouseService=D,H._optionsService=A,H._renderService=O,H._dragScrollAmount=0,H._enabled=!0,H._workCell=new n.CellData,H._mouseDownTimeStamp=0,H._oldHasSelection=!1,H._oldSelectionStart=void 0,H._oldSelectionEnd=void 0,H._onLinuxMouseSelection=H.register(new o.EventEmitter),H._onRedrawRequest=H.register(new o.EventEmitter),H._onSelectionChange=H.register(new o.EventEmitter),H._onRequestScrollLines=H.register(new o.EventEmitter),H._mouseMoveListener=function(R){return H._onMouseMove(R)},H._mouseUpListener=function(R){return H._onMouseUp(R)},H._coreService.onUserInput(function(){H.hasSelection&&H.clearSelection()}),H._trimListener=H._bufferService.buffer.lines.onTrim(function(R){return H._onTrim(R)}),H.register(H._bufferService.buffers.onBufferActivate(function(R){return H._onBufferActivate(R)})),H.enable(),H._model=new g.SelectionModel(H._bufferService),H._activeSelectionMode=0,H}return p(L,E),Object.defineProperty(L.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),L.prototype.dispose=function(){this._removeMouseDownListeners()},L.prototype.reset=function(){this.clearSelection()},L.prototype.disable=function(){this.clearSelection(),this._enabled=!1},L.prototype.enable=function(){this._enabled=!0},Object.defineProperty(L.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"hasSelection",{get:function(){var b=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!b||!S||b[0]===S[0]&&b[1]===S[1])},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"selectionText",{get:function(){var b=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!b||!S)return"";var T=this._bufferService.buffer,k=[];if(this._activeSelectionMode===3){if(b[0]===S[0])return"";for(var W=b[1];W<=S[1];W++){var D=T.translateBufferLineToString(W,!0,b[0],S[0]);k.push(D)}}else{var A=b[1]===S[1]?S[0]:void 0;for(k.push(T.translateBufferLineToString(b[1],!0,b[0],A)),W=b[1]+1;W<=S[1]-1;W++){var O=T.lines.get(W);D=T.translateBufferLineToString(W,!0),(O==null?void 0:O.isWrapped)?k[k.length-1]+=D:k.push(D)}b[1]!==S[1]&&(O=T.lines.get(S[1]),D=T.translateBufferLineToString(S[1],!0,0,S[0]),O&&O.isWrapped?k[k.length-1]+=D:k.push(D))}return k.map(function(H){return H.replace(v," ")}).join(C.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),L.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},L.prototype.refresh=function(b){var S=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return S._refresh()})),C.isLinux&&b&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},L.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},L.prototype._isClickInSelection=function(b){var S=this._getMouseBufferCoords(b),T=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!!(T&&k&&S)&&this._areCoordsInSelection(S,T,k)},L.prototype._areCoordsInSelection=function(b,S,T){return b[1]>S[1]&&b[1]<T[1]||S[1]===T[1]&&b[1]===S[1]&&b[0]>=S[0]&&b[0]<T[0]||S[1]<T[1]&&b[1]===T[1]&&b[0]<T[0]||S[1]<T[1]&&b[1]===S[1]&&b[0]>=S[0]},L.prototype._selectWordAtCursor=function(b,S){var T,k,W=(k=(T=this._linkifier.currentLink)===null||T===void 0?void 0:T.link)===null||k===void 0?void 0:k.range;if(W)return this._model.selectionStart=[W.start.x-1,W.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(W,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var D=this._getMouseBufferCoords(b);return!!D&&(this._selectWordAt(D,S),this._model.selectionEnd=void 0,!0)},L.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},L.prototype.selectLines=function(b,S){this._model.clearSelection(),b=Math.max(b,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,b],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()},L.prototype._onTrim=function(b){this._model.onTrim(b)&&this.refresh()},L.prototype._getMouseBufferCoords=function(b){var S=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S},L.prototype._getMouseEventScrollAmount=function(b){var S=(0,t.getCoordsRelativeToElement)(b,this._screenElement)[1],T=this._renderService.dimensions.canvasHeight;return S>=0&&S<=T?0:(S>T&&(S-=T),S=Math.min(Math.max(S,-50),50),(S/=50)/Math.abs(S)+Math.round(14*S))},L.prototype.shouldForceSelection=function(b){return C.isMac?b.altKey&&this._optionsService.options.macOptionClickForcesSelection:b.shiftKey},L.prototype.onMouseDown=function(b){if(this._mouseDownTimeStamp=b.timeStamp,(b.button!==2||!this.hasSelection)&&b.button===0){if(!this._enabled){if(!this.shouldForceSelection(b))return;b.stopPropagation()}b.preventDefault(),this._dragScrollAmount=0,this._enabled&&b.shiftKey?this._onIncrementalClick(b):b.detail===1?this._onSingleClick(b):b.detail===2?this._onDoubleClick(b):b.detail===3&&this._onTripleClick(b),this._addMouseDownListeners(),this.refresh(!0)}},L.prototype._addMouseDownListeners=function(){var b=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return b._dragScroll()},50)},L.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},L.prototype._onIncrementalClick=function(b){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(b))},L.prototype._onSingleClick=function(b){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(b)?3:0,this._model.selectionStart=this._getMouseBufferCoords(b),this._model.selectionStart){this._model.selectionEnd=void 0;var S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},L.prototype._onDoubleClick=function(b){this._selectWordAtCursor(b,!0)&&(this._activeSelectionMode=1)},L.prototype._onTripleClick=function(b){var S=this._getMouseBufferCoords(b);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))},L.prototype.shouldColumnSelect=function(b){return b.altKey&&!(C.isMac&&this._optionsService.options.macOptionClickForcesSelection)},L.prototype._onMouseMove=function(b){if(b.stopImmediatePropagation(),this._model.selectionStart){var S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(b),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(b),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var T=this._bufferService.buffer;if(this._model.selectionEnd[1]<T.lines.length){var k=T.lines.get(this._model.selectionEnd[1]);k&&k.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},L.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var b=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(b.ydisp+this._bufferService.rows,b.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=b.ydisp),this.refresh()}},L.prototype._onMouseUp=function(b){var S=b.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&b.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var T=this._mouseService.getCoords(b,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){var k=(0,e.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(k,!0)}}}else this._fireEventIfSelectionChanged()},L.prototype._fireEventIfSelectionChanged=function(){var b=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,T=!(!b||!S||b[0]===S[0]&&b[1]===S[1]);T?b&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&b[0]===this._oldSelectionStart[0]&&b[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(b,S,T)):this._oldHasSelection&&this._fireOnSelectionChange(b,S,T)},L.prototype._fireOnSelectionChange=function(b,S,T){this._oldSelectionStart=b,this._oldSelectionEnd=S,this._oldHasSelection=T,this._onSelectionChange.fire()},L.prototype._onBufferActivate=function(b){var S=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=b.activeBuffer.lines.onTrim(function(T){return S._onTrim(T)})},L.prototype._convertViewportColToCharacterIndex=function(b,S){for(var T=S[0],k=0;S[0]>=k;k++){var W=b.loadCell(k,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:W>1&&S[0]!==k&&(T+=W-1)}return T},L.prototype.setSelection=function(b,S,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[b,S],this._model.selectionStartLength=T,this.refresh()},L.prototype.rightClickSelect=function(b){this._isClickInSelection(b)||(this._selectWordAtCursor(b,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},L.prototype._getWordAt=function(b,S,T,k){if(T===void 0&&(T=!0),k===void 0&&(k=!0),!(b[0]>=this._bufferService.cols)){var W=this._bufferService.buffer,D=W.lines.get(b[1]);if(D){var A=W.translateBufferLineToString(b[1],!1),O=this._convertViewportColToCharacterIndex(D,b),H=O,R=b[0]-O,G=0,Y=0,oe=0,le=0;if(A.charAt(O)===" "){for(;O>0&&A.charAt(O-1)===" ";)O--;for(;H<A.length&&A.charAt(H+1)===" ";)H++}else{var he=b[0],x=b[0];D.getWidth(he)===0&&(G++,he--),D.getWidth(x)===2&&(Y++,x++);var B=D.getString(x).length;for(B>1&&(le+=B-1,H+=B-1);he>0&&O>0&&!this._isCharWordSeparator(D.loadCell(he-1,this._workCell));){D.loadCell(he-1,this._workCell);var I=this._workCell.getChars().length;this._workCell.getWidth()===0?(G++,he--):I>1&&(oe+=I-1,O-=I-1),O--,he--}for(;x<D.length&&H+1<A.length&&!this._isCharWordSeparator(D.loadCell(x+1,this._workCell));){D.loadCell(x+1,this._workCell);var K=this._workCell.getChars().length;this._workCell.getWidth()===2?(Y++,x++):K>1&&(le+=K-1,H+=K-1),H++,x++}}H++;var j=O+R-G+oe,V=Math.min(this._bufferService.cols,H-O+G+Y-oe-le);if(S||A.slice(O,H).trim()!==""){if(T&&j===0&&D.getCodePoint(0)!==32){var se=W.lines.get(b[1]-1);if(se&&D.isWrapped&&se.getCodePoint(this._bufferService.cols-1)!==32){var Ce=this._getWordAt([this._bufferService.cols-1,b[1]-1],!1,!0,!1);if(Ce){var ke=this._bufferService.cols-Ce.start;j-=ke,V+=ke}}}if(k&&j+V===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){var Ee=W.lines.get(b[1]+1);if((Ee==null?void 0:Ee.isWrapped)&&Ee.getCodePoint(0)!==32){var ee=this._getWordAt([0,b[1]+1],!1,!1,!0);ee&&(V+=ee.length)}}return{start:j,length:V}}}}},L.prototype._selectWordAt=function(b,S){var T=this._getWordAt(b,S);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,b[1]--;this._model.selectionStart=[T.start,b[1]],this._model.selectionStartLength=T.length}},L.prototype._selectToWordAt=function(b){var S=this._getWordAt(b,!0);if(S){for(var T=b[1];S.start<0;)S.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,T]}},L.prototype._isCharWordSeparator=function(b){return b.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(b.getChars())>=0},L.prototype._selectLineAt=function(b){var S=this._bufferService.buffer.getWrappedRangeForLine(b);this._model.selectionStart=[0,S.first],this._model.selectionEnd=[this._bufferService.cols,S.last],this._model.selectionStartLength=0},_([u(3,s.IBufferService),u(4,s.ICoreService),u(5,h.IMouseService),u(6,s.IOptionsService),u(7,h.IRenderService)],L)}(i.Disposable);c.SelectionService=m},4725:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ICharacterJoinerService=c.ISoundService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;var f=y(8343);c.ICharSizeService=(0,f.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),c.IMouseService=(0,f.createDecorator)("MouseService"),c.IRenderService=(0,f.createDecorator)("RenderService"),c.ISelectionService=(0,f.createDecorator)("SelectionService"),c.ISoundService=(0,f.createDecorator)("SoundService"),c.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService")},357:function(z,c,y){var f=this&&this.__decorate||function(C,g,n,o){var h,s=arguments.length,t=s<3?g:o===null?o=Object.getOwnPropertyDescriptor(g,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(C,g,n,o);else for(var e=C.length-1;e>=0;e--)(h=C[e])&&(t=(s<3?h(t):s>3?h(g,n,t):h(g,n))||t);return s>3&&t&&Object.defineProperty(g,n,t),t},p=this&&this.__param||function(C,g){return function(n,o){g(n,o,C)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SoundService=void 0;var _=y(2585),u=function(){function C(g){this._optionsService=g}return Object.defineProperty(C,"audioContext",{get:function(){if(!C._audioContext){var g=window.AudioContext||window.webkitAudioContext;if(!g)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;C._audioContext=new g}return C._audioContext},enumerable:!1,configurable:!0}),C.prototype.playBellSound=function(){var g=C.audioContext;if(g){var n=g.createBufferSource();g.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(o){n.buffer=o,n.connect(g.destination),n.start(0)})}},C.prototype._base64ToArrayBuffer=function(g){for(var n=window.atob(g),o=n.length,h=new Uint8Array(o),s=0;s<o;s++)h[s]=n.charCodeAt(s);return h.buffer},C.prototype._removeMimeType=function(g){return g.split(",")[1]},C=f([p(0,_.IOptionsService)],C)}();c.SoundService=u},6349:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;var f=y(8460),p=function(){function _(u){this._maxLength=u,this.onDeleteEmitter=new f.EventEmitter,this.onInsertEmitter=new f.EventEmitter,this.onTrimEmitter=new f.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(_.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"maxLength",{get:function(){return this._maxLength},set:function(u){if(this._maxLength!==u){for(var C=new Array(u),g=0;g<Math.min(u,this.length);g++)C[g]=this._array[this._getCyclicIndex(g)];this._array=C,this._maxLength=u,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._length},set:function(u){if(u>this._length)for(var C=this._length;C<u;C++)this._array[C]=void 0;this._length=u},enumerable:!1,configurable:!0}),_.prototype.get=function(u){return this._array[this._getCyclicIndex(u)]},_.prototype.set=function(u,C){this._array[this._getCyclicIndex(u)]=C},_.prototype.push=function(u){this._array[this._getCyclicIndex(this._length)]=u,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},_.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(_.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),_.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},_.prototype.splice=function(u,C){for(var g=[],n=2;n<arguments.length;n++)g[n-2]=arguments[n];if(C){for(var o=u;o<this._length-C;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+C)];this._length-=C,this.onDeleteEmitter.fire({index:u,amount:C})}for(o=this._length-1;o>=u;o--)this._array[this._getCyclicIndex(o+g.length)]=this._array[this._getCyclicIndex(o)];for(o=0;o<g.length;o++)this._array[this._getCyclicIndex(u+o)]=g[o];if(g.length&&this.onInsertEmitter.fire({index:u,amount:g.length}),this._length+g.length>this._maxLength){var h=this._length+g.length-this._maxLength;this._startIndex+=h,this._length=this._maxLength,this.onTrimEmitter.fire(h)}else this._length+=g.length},_.prototype.trimStart=function(u){u>this._length&&(u=this._length),this._startIndex+=u,this._length-=u,this.onTrimEmitter.fire(u)},_.prototype.shiftElements=function(u,C,g){if(!(C<=0)){if(u<0||u>=this._length)throw new Error("start argument out of range");if(u+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(var n=C-1;n>=0;n--)this.set(u+n+g,this.get(u+n));var o=u+C+g-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(n=0;n<C;n++)this.set(u+n+g,this.get(u+n))}},_.prototype._getCyclicIndex=function(u){return(this._startIndex+u)%this._maxLength},_}();c.CircularList=p},1439:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function y(f,p){if(p===void 0&&(p=5),typeof f!="object")return f;var _=Array.isArray(f)?[]:{};for(var u in f)_[u]=p<=1?f[u]:f[u]&&y(f[u],p-1);return _}},8969:function(z,c,y){var f,p=this&&this.__extends||(f=function(b,S){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,k){T.__proto__=k}||function(T,k){for(var W in k)Object.prototype.hasOwnProperty.call(k,W)&&(T[W]=k[W])},f(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 T(){this.constructor=b}f(b,S),b.prototype=S===null?Object.create(S):(T.prototype=S.prototype,new T)});Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;var _=y(844),u=y(2585),C=y(4348),g=y(7866),n=y(744),o=y(7302),h=y(6975),s=y(8460),t=y(1753),e=y(3730),i=y(1480),a=y(7994),l=y(9282),v=y(5435),m=y(5981),E=!1,L=function(b){function S(T){var k=b.call(this)||this;return k._onBinary=new s.EventEmitter,k._onData=new s.EventEmitter,k._onLineFeed=new s.EventEmitter,k._onResize=new s.EventEmitter,k._onScroll=new s.EventEmitter,k._instantiationService=new C.InstantiationService,k.optionsService=new o.OptionsService(T),k._instantiationService.setService(u.IOptionsService,k.optionsService),k._bufferService=k.register(k._instantiationService.createInstance(n.BufferService)),k._instantiationService.setService(u.IBufferService,k._bufferService),k._logService=k._instantiationService.createInstance(g.LogService),k._instantiationService.setService(u.ILogService,k._logService),k.coreService=k.register(k._instantiationService.createInstance(h.CoreService,function(){return k.scrollToBottom()})),k._instantiationService.setService(u.ICoreService,k.coreService),k.coreMouseService=k._instantiationService.createInstance(t.CoreMouseService),k._instantiationService.setService(u.ICoreMouseService,k.coreMouseService),k._dirtyRowService=k._instantiationService.createInstance(e.DirtyRowService),k._instantiationService.setService(u.IDirtyRowService,k._dirtyRowService),k.unicodeService=k._instantiationService.createInstance(i.UnicodeService),k._instantiationService.setService(u.IUnicodeService,k.unicodeService),k._charsetService=k._instantiationService.createInstance(a.CharsetService),k._instantiationService.setService(u.ICharsetService,k._charsetService),k._inputHandler=new v.InputHandler(k._bufferService,k._charsetService,k.coreService,k._dirtyRowService,k._logService,k.optionsService,k.coreMouseService,k.unicodeService),k.register((0,s.forwardEvent)(k._inputHandler.onLineFeed,k._onLineFeed)),k.register(k._inputHandler),k.register((0,s.forwardEvent)(k._bufferService.onResize,k._onResize)),k.register((0,s.forwardEvent)(k.coreService.onData,k._onData)),k.register((0,s.forwardEvent)(k.coreService.onBinary,k._onBinary)),k.register(k.optionsService.onOptionChange(function(W){return k._updateOptions(W)})),k.register(k._bufferService.onScroll(function(W){k._onScroll.fire({position:k._bufferService.buffer.ydisp,source:0}),k._dirtyRowService.markRangeDirty(k._bufferService.buffer.scrollTop,k._bufferService.buffer.scrollBottom)})),k.register(k._inputHandler.onScroll(function(W){k._onScroll.fire({position:k._bufferService.buffer.ydisp,source:0}),k._dirtyRowService.markRangeDirty(k._bufferService.buffer.scrollTop,k._bufferService.buffer.scrollBottom)})),k._writeBuffer=new m.WriteBuffer(function(W,D){return k._inputHandler.parse(W,D)}),k}return p(S,b),Object.defineProperty(S.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onScroll",{get:function(){var T=this;return this._onScrollApi||(this._onScrollApi=new s.EventEmitter,this.register(this._onScroll.event(function(k){var W;(W=T._onScrollApi)===null||W===void 0||W.fire(k.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"options",{get:function(){return this.optionsService.options},set:function(T){for(var k in T)this.optionsService.options[k]=T[k]},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){var T;this._isDisposed||(b.prototype.dispose.call(this),(T=this._windowsMode)===null||T===void 0||T.dispose(),this._windowsMode=void 0)},S.prototype.write=function(T,k){this._writeBuffer.write(T,k)},S.prototype.writeSync=function(T,k){this._logService.logLevel<=u.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(T,k)},S.prototype.resize=function(T,k){isNaN(T)||isNaN(k)||(T=Math.max(T,n.MINIMUM_COLS),k=Math.max(k,n.MINIMUM_ROWS),this._bufferService.resize(T,k))},S.prototype.scroll=function(T,k){k===void 0&&(k=!1),this._bufferService.scroll(T,k)},S.prototype.scrollLines=function(T,k,W){this._bufferService.scrollLines(T,k,W)},S.prototype.scrollPages=function(T){this._bufferService.scrollPages(T)},S.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},S.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},S.prototype.scrollToLine=function(T){this._bufferService.scrollToLine(T)},S.prototype.registerEscHandler=function(T,k){return this._inputHandler.registerEscHandler(T,k)},S.prototype.registerDcsHandler=function(T,k){return this._inputHandler.registerDcsHandler(T,k)},S.prototype.registerCsiHandler=function(T,k){return this._inputHandler.registerCsiHandler(T,k)},S.prototype.registerOscHandler=function(T,k){return this._inputHandler.registerOscHandler(T,k)},S.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},S.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},S.prototype._updateOptions=function(T){var k;switch(T){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((k=this._windowsMode)===null||k===void 0||k.dispose(),this._windowsMode=void 0)}},S.prototype._enableWindowsMode=function(){var T=this;if(!this._windowsMode){var k=[];k.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),k.push(this.registerCsiHandler({final:"H"},function(){return(0,l.updateWindowsModeWrappedState)(T._bufferService),!1})),this._windowsMode={dispose:function(){for(var W=0,D=k;W<D.length;W++)D[W].dispose()}}}},S}(_.Disposable);c.CoreTerminal=L},8460:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.forwardEvent=c.EventEmitter=void 0;var y=function(){function f(){this._listeners=[],this._disposed=!1}return Object.defineProperty(f.prototype,"event",{get:function(){var p=this;return this._event||(this._event=function(_){return p._listeners.push(_),{dispose:function(){if(!p._disposed){for(var u=0;u<p._listeners.length;u++)if(p._listeners[u]===_)return void p._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),f.prototype.fire=function(p,_){for(var u=[],C=0;C<this._listeners.length;C++)u.push(this._listeners[C]);for(C=0;C<u.length;C++)u[C].call(void 0,p,_)},f.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},f}();c.EventEmitter=y,c.forwardEvent=function(f,p){return f(function(_){return p.fire(_)})}},5435:function(z,c,y){var f,p=this&&this.__extends||(f=function(W,D){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,O){A.__proto__=O}||function(A,O){for(var H in O)Object.prototype.hasOwnProperty.call(O,H)&&(A[H]=O[H])},f(W,D)},function(W,D){if(typeof D!="function"&&D!==null)throw new TypeError("Class extends value "+String(D)+" is not a constructor or null");function A(){this.constructor=W}f(W,D),W.prototype=D===null?Object.create(D):(A.prototype=D.prototype,new A)});Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;var _,u=y(2584),C=y(7116),g=y(2015),n=y(844),o=y(8273),h=y(482),s=y(8437),t=y(8460),e=y(643),i=y(511),a=y(3734),l=y(2585),v=y(6242),m=y(6351),E=y(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},b=131072;function S(W,D){if(W>24)return D.setWinLines||!1;switch(W){case 1:return!!D.restoreWin;case 2:return!!D.minimizeWin;case 3:return!!D.setWinPosition;case 4:return!!D.setWinSizePixels;case 5:return!!D.raiseWin;case 6:return!!D.lowerWin;case 7:return!!D.refreshWin;case 8:return!!D.setWinSizeChars;case 9:return!!D.maximizeWin;case 10:return!!D.fullscreenWin;case 11:return!!D.getWinState;case 13:return!!D.getWinPosition;case 14:return!!D.getWinSizePixels;case 15:return!!D.getScreenSizePixels;case 16:return!!D.getCellSizePixels;case 18:return!!D.getWinSizeChars;case 19:return!!D.getScreenSizeChars;case 20:return!!D.getIconTitle;case 21:return!!D.getWinTitle;case 22:return!!D.pushTitle;case 23:return!!D.popTitle;case 24:return!!D.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"})(_=c.WindowsOptionsReportType||(c.WindowsOptionsReportType={}));var T=function(){function W(D,A,O,H){this._bufferService=D,this._coreService=A,this._logService=O,this._optionsService=H,this._data=new Uint32Array(0)}return W.prototype.hook=function(D){this._data=new Uint32Array(0)},W.prototype.put=function(D,A,O){this._data=(0,o.concat)(this._data,D.subarray(A,O))},W.prototype.unhook=function(D){if(!D)return this._data=new Uint32Array(0),!0;var A=(0,h.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),A){case'"q':this._coreService.triggerDataEvent(u.C0.ESC+'P1$r0"q'+u.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(u.C0.ESC+'P1$r61;1"p'+u.C0.ESC+"\\");break;case"r":var O=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(u.C0.ESC+"P1$r"+O+u.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(u.C0.ESC+"P1$r0m"+u.C0.ESC+"\\");break;case" q":var H={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];H-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(u.C0.ESC+"P1$r"+H+" q"+u.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",A),this._coreService.triggerDataEvent(u.C0.ESC+"P0$r"+u.C0.ESC+"\\")}return!0},W}(),k=function(W){function D(A,O,H,R,G,Y,oe,le,he){he===void 0&&(he=new g.EscapeSequenceParser);var x=W.call(this)||this;x._bufferService=A,x._charsetService=O,x._coreService=H,x._dirtyRowService=R,x._logService=G,x._optionsService=Y,x._coreMouseService=oe,x._unicodeService=le,x._parser=he,x._parseBuffer=new Uint32Array(4096),x._stringDecoder=new h.StringToUtf32,x._utf8Decoder=new h.Utf8ToUtf32,x._workCell=new i.CellData,x._windowTitle="",x._iconName="",x._windowTitleStack=[],x._iconNameStack=[],x._curAttrData=s.DEFAULT_ATTR_DATA.clone(),x._eraseAttrDataInternal=s.DEFAULT_ATTR_DATA.clone(),x._onRequestBell=new t.EventEmitter,x._onRequestRefreshRows=new t.EventEmitter,x._onRequestReset=new t.EventEmitter,x._onRequestSendFocus=new t.EventEmitter,x._onRequestSyncScrollBar=new t.EventEmitter,x._onRequestWindowsOptionsReport=new t.EventEmitter,x._onA11yChar=new t.EventEmitter,x._onA11yTab=new t.EventEmitter,x._onCursorMove=new t.EventEmitter,x._onLineFeed=new t.EventEmitter,x._onScroll=new t.EventEmitter,x._onTitleChange=new t.EventEmitter,x._onColor=new t.EventEmitter,x._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},x._specialColors=[256,257,258],x.register(x._parser),x._activeBuffer=x._bufferService.buffer,x.register(x._bufferService.buffers.onBufferActivate(function(j){return x._activeBuffer=j.activeBuffer})),x._parser.setCsiHandlerFallback(function(j,V){x._logService.debug("Unknown CSI code: ",{identifier:x._parser.identToString(j),params:V.toArray()})}),x._parser.setEscHandlerFallback(function(j){x._logService.debug("Unknown ESC code: ",{identifier:x._parser.identToString(j)})}),x._parser.setExecuteHandlerFallback(function(j){x._logService.debug("Unknown EXECUTE code: ",{code:j})}),x._parser.setOscHandlerFallback(function(j,V,se){x._logService.debug("Unknown OSC code: ",{identifier:j,action:V,data:se})}),x._parser.setDcsHandlerFallback(function(j,V,se){V==="HOOK"&&(se=se.toArray()),x._logService.debug("Unknown DCS code: ",{identifier:x._parser.identToString(j),action:V,payload:se})}),x._parser.setPrintHandler(function(j,V,se){return x.print(j,V,se)}),x._parser.registerCsiHandler({final:"@"},function(j){return x.insertChars(j)}),x._parser.registerCsiHandler({intermediates:" ",final:"@"},function(j){return x.scrollLeft(j)}),x._parser.registerCsiHandler({final:"A"},function(j){return x.cursorUp(j)}),x._parser.registerCsiHandler({intermediates:" ",final:"A"},function(j){return x.scrollRight(j)}),x._parser.registerCsiHandler({final:"B"},function(j){return x.cursorDown(j)}),x._parser.registerCsiHandler({final:"C"},function(j){return x.cursorForward(j)}),x._parser.registerCsiHandler({final:"D"},function(j){return x.cursorBackward(j)}),x._parser.registerCsiHandler({final:"E"},function(j){return x.cursorNextLine(j)}),x._parser.registerCsiHandler({final:"F"},function(j){return x.cursorPrecedingLine(j)}),x._parser.registerCsiHandler({final:"G"},function(j){return x.cursorCharAbsolute(j)}),x._parser.registerCsiHandler({final:"H"},function(j){return x.cursorPosition(j)}),x._parser.registerCsiHandler({final:"I"},function(j){return x.cursorForwardTab(j)}),x._parser.registerCsiHandler({final:"J"},function(j){return x.eraseInDisplay(j)}),x._parser.registerCsiHandler({prefix:"?",final:"J"},function(j){return x.eraseInDisplay(j)}),x._parser.registerCsiHandler({final:"K"},function(j){return x.eraseInLine(j)}),x._parser.registerCsiHandler({prefix:"?",final:"K"},function(j){return x.eraseInLine(j)}),x._parser.registerCsiHandler({final:"L"},function(j){return x.insertLines(j)}),x._parser.registerCsiHandler({final:"M"},function(j){return x.deleteLines(j)}),x._parser.registerCsiHandler({final:"P"},function(j){return x.deleteChars(j)}),x._parser.registerCsiHandler({final:"S"},function(j){return x.scrollUp(j)}),x._parser.registerCsiHandler({final:"T"},function(j){return x.scrollDown(j)}),x._parser.registerCsiHandler({final:"X"},function(j){return x.eraseChars(j)}),x._parser.registerCsiHandler({final:"Z"},function(j){return x.cursorBackwardTab(j)}),x._parser.registerCsiHandler({final:"`"},function(j){return x.charPosAbsolute(j)}),x._parser.registerCsiHandler({final:"a"},function(j){return x.hPositionRelative(j)}),x._parser.registerCsiHandler({final:"b"},function(j){return x.repeatPrecedingCharacter(j)}),x._parser.registerCsiHandler({final:"c"},function(j){return x.sendDeviceAttributesPrimary(j)}),x._parser.registerCsiHandler({prefix:">",final:"c"},function(j){return x.sendDeviceAttributesSecondary(j)}),x._parser.registerCsiHandler({final:"d"},function(j){return x.linePosAbsolute(j)}),x._parser.registerCsiHandler({final:"e"},function(j){return x.vPositionRelative(j)}),x._parser.registerCsiHandler({final:"f"},function(j){return x.hVPosition(j)}),x._parser.registerCsiHandler({final:"g"},function(j){return x.tabClear(j)}),x._parser.registerCsiHandler({final:"h"},function(j){return x.setMode(j)}),x._parser.registerCsiHandler({prefix:"?",final:"h"},function(j){return x.setModePrivate(j)}),x._parser.registerCsiHandler({final:"l"},function(j){return x.resetMode(j)}),x._parser.registerCsiHandler({prefix:"?",final:"l"},function(j){return x.resetModePrivate(j)}),x._parser.registerCsiHandler({final:"m"},function(j){return x.charAttributes(j)}),x._parser.registerCsiHandler({final:"n"},function(j){return x.deviceStatus(j)}),x._parser.registerCsiHandler({prefix:"?",final:"n"},function(j){return x.deviceStatusPrivate(j)}),x._parser.registerCsiHandler({intermediates:"!",final:"p"},function(j){return x.softReset(j)}),x._parser.registerCsiHandler({intermediates:" ",final:"q"},function(j){return x.setCursorStyle(j)}),x._parser.registerCsiHandler({final:"r"},function(j){return x.setScrollRegion(j)}),x._parser.registerCsiHandler({final:"s"},function(j){return x.saveCursor(j)}),x._parser.registerCsiHandler({final:"t"},function(j){return x.windowOptions(j)}),x._parser.registerCsiHandler({final:"u"},function(j){return x.restoreCursor(j)}),x._parser.registerCsiHandler({intermediates:"'",final:"}"},function(j){return x.insertColumns(j)}),x._parser.registerCsiHandler({intermediates:"'",final:"~"},function(j){return x.deleteColumns(j)}),x._parser.setExecuteHandler(u.C0.BEL,function(){return x.bell()}),x._parser.setExecuteHandler(u.C0.LF,function(){return x.lineFeed()}),x._parser.setExecuteHandler(u.C0.VT,function(){return x.lineFeed()}),x._parser.setExecuteHandler(u.C0.FF,function(){return x.lineFeed()}),x._parser.setExecuteHandler(u.C0.CR,function(){return x.carriageReturn()}),x._parser.setExecuteHandler(u.C0.BS,function(){return x.backspace()}),x._parser.setExecuteHandler(u.C0.HT,function(){return x.tab()}),x._parser.setExecuteHandler(u.C0.SO,function(){return x.shiftOut()}),x._parser.setExecuteHandler(u.C0.SI,function(){return x.shiftIn()}),x._parser.setExecuteHandler(u.C1.IND,function(){return x.index()}),x._parser.setExecuteHandler(u.C1.NEL,function(){return x.nextLine()}),x._parser.setExecuteHandler(u.C1.HTS,function(){return x.tabSet()}),x._parser.registerOscHandler(0,new v.OscHandler(function(j){return x.setTitle(j),x.setIconName(j),!0})),x._parser.registerOscHandler(1,new v.OscHandler(function(j){return x.setIconName(j)})),x._parser.registerOscHandler(2,new v.OscHandler(function(j){return x.setTitle(j)})),x._parser.registerOscHandler(4,new v.OscHandler(function(j){return x.setOrReportIndexedColor(j)})),x._parser.registerOscHandler(10,new v.OscHandler(function(j){return x.setOrReportFgColor(j)})),x._parser.registerOscHandler(11,new v.OscHandler(function(j){return x.setOrReportBgColor(j)})),x._parser.registerOscHandler(12,new v.OscHandler(function(j){return x.setOrReportCursorColor(j)})),x._parser.registerOscHandler(104,new v.OscHandler(function(j){return x.restoreIndexedColor(j)})),x._parser.registerOscHandler(110,new v.OscHandler(function(j){return x.restoreFgColor(j)})),x._parser.registerOscHandler(111,new v.OscHandler(function(j){return x.restoreBgColor(j)})),x._parser.registerOscHandler(112,new v.OscHandler(function(j){return x.restoreCursorColor(j)})),x._parser.registerEscHandler({final:"7"},function(){return x.saveCursor()}),x._parser.registerEscHandler({final:"8"},function(){return x.restoreCursor()}),x._parser.registerEscHandler({final:"D"},function(){return x.index()}),x._parser.registerEscHandler({final:"E"},function(){return x.nextLine()}),x._parser.registerEscHandler({final:"H"},function(){return x.tabSet()}),x._parser.registerEscHandler({final:"M"},function(){return x.reverseIndex()}),x._parser.registerEscHandler({final:"="},function(){return x.keypadApplicationMode()}),x._parser.registerEscHandler({final:">"},function(){return x.keypadNumericMode()}),x._parser.registerEscHandler({final:"c"},function(){return x.fullReset()}),x._parser.registerEscHandler({final:"n"},function(){return x.setgLevel(2)}),x._parser.registerEscHandler({final:"o"},function(){return x.setgLevel(3)}),x._parser.registerEscHandler({final:"|"},function(){return x.setgLevel(3)}),x._parser.registerEscHandler({final:"}"},function(){return x.setgLevel(2)}),x._parser.registerEscHandler({final:"~"},function(){return x.setgLevel(1)}),x._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return x.selectDefaultCharset()}),x._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return x.selectDefaultCharset()});var B=function(j){I._parser.registerEscHandler({intermediates:"(",final:j},function(){return x.selectCharset("("+j)}),I._parser.registerEscHandler({intermediates:")",final:j},function(){return x.selectCharset(")"+j)}),I._parser.registerEscHandler({intermediates:"*",final:j},function(){return x.selectCharset("*"+j)}),I._parser.registerEscHandler({intermediates:"+",final:j},function(){return x.selectCharset("+"+j)}),I._parser.registerEscHandler({intermediates:"-",final:j},function(){return x.selectCharset("-"+j)}),I._parser.registerEscHandler({intermediates:".",final:j},function(){return x.selectCharset("."+j)}),I._parser.registerEscHandler({intermediates:"/",final:j},function(){return x.selectCharset("/"+j)})},I=this;for(var K in C.CHARSETS)B(K);return x._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return x.screenAlignmentPattern()}),x._parser.setErrorHandler(function(j){return x._logService.error("Parsing error: ",j),j}),x._parser.registerDcsHandler({intermediates:"$",final:"q"},new T(x._bufferService,x._coreService,x._logService,x._optionsService)),x}return p(D,W),Object.defineProperty(D.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),D.prototype.dispose=function(){W.prototype.dispose.call(this)},D.prototype._preserveStack=function(A,O,H,R){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=H,this._parseStack.position=R},D.prototype._logSlowResolvingAsync=function(A){this._logService.logLevel<=l.LogLevelEnum.WARN&&Promise.race([A,new Promise(function(O,H){return setTimeout(function(){return H("#SLOW_TIMEOUT")},5e3)})]).catch(function(O){if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")})},D.prototype.parse=function(A,O){var H,R=this._activeBuffer.x,G=this._activeBuffer.y,Y=0,oe=this._parseStack.paused;if(oe){if(H=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(H),H;R=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>b&&(Y=this._parseStack.position+b)}if(this._logService.logLevel<=l.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?' "'+A+'"':""),typeof A=="string"?A.split("").map(function(B){return B.charCodeAt(0)}):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<b&&(this._parseBuffer=new Uint32Array(Math.min(A.length,b))),oe||this._dirtyRowService.clearRange(),A.length>b)for(var le=Y;le<A.length;le+=b){var he=le+b<A.length?le+b:A.length,x=typeof A=="string"?this._stringDecoder.decode(A.substring(le,he),this._parseBuffer):this._utf8Decoder.decode(A.subarray(le,he),this._parseBuffer);if(H=this._parser.parse(this._parseBuffer,x))return this._preserveStack(R,G,x,le),this._logSlowResolvingAsync(H),H}else if(!oe&&(x=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer),H=this._parser.parse(this._parseBuffer,x)))return this._preserveStack(R,G,x,0),this._logSlowResolvingAsync(H),H;this._activeBuffer.x===R&&this._activeBuffer.y===G||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},D.prototype.print=function(A,O,H){var R,G,Y=this._charsetService.charset,oe=this._optionsService.options.screenReaderMode,le=this._bufferService.cols,he=this._coreService.decPrivateModes.wraparound,x=this._coreService.modes.insertMode,B=this._curAttrData,I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&H-O>0&&I.getWidth(this._activeBuffer.x-1)===2&&I.setCellFromCodePoint(this._activeBuffer.x-1,0,1,B.fg,B.bg,B.extended);for(var K=O;K<H;++K){if(R=A[K],G=this._unicodeService.wcwidth(R),R<127&&Y){var j=Y[String.fromCharCode(R)];j&&(R=j.charCodeAt(0))}if(oe&&this._onA11yChar.fire((0,h.stringFromCodePoint)(R)),G||!this._activeBuffer.x){if(this._activeBuffer.x+G-1>=le){if(he){for(;this._activeBuffer.x<le;)I.setCellFromCodePoint(this._activeBuffer.x++,0,1,B.fg,B.bg,B.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),I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=le-1,G===2)continue}if(x&&(I.insertCells(this._activeBuffer.x,G,this._activeBuffer.getNullCell(B),B),I.getWidth(le-1)===2&&I.setCellFromCodePoint(le-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,B.fg,B.bg,B.extended)),I.setCellFromCodePoint(this._activeBuffer.x++,R,G,B.fg,B.bg,B.extended),G>0)for(;--G;)I.setCellFromCodePoint(this._activeBuffer.x++,0,0,B.fg,B.bg,B.extended)}else I.getWidth(this._activeBuffer.x-1)?I.addCodepointToCell(this._activeBuffer.x-1,R):I.addCodepointToCell(this._activeBuffer.x-2,R)}H-O>0&&(I.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<le&&H-O>0&&I.getWidth(this._activeBuffer.x)===0&&!I.hasContent(this._activeBuffer.x)&&I.setCellFromCodePoint(this._activeBuffer.x,0,1,B.fg,B.bg,B.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},D.prototype.registerCsiHandler=function(A,O){var H=this;return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,O):this._parser.registerCsiHandler(A,function(R){return!S(R.params[0],H._optionsService.options.windowOptions)||O(R)})},D.prototype.registerDcsHandler=function(A,O){return this._parser.registerDcsHandler(A,new m.DcsHandler(O))},D.prototype.registerEscHandler=function(A,O){return this._parser.registerEscHandler(A,O)},D.prototype.registerOscHandler=function(A,O){return this._parser.registerOscHandler(A,new v.OscHandler(O))},D.prototype.bell=function(){return this._onRequestBell.fire(),!0},D.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},D.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},D.prototype.backspace=function(){var A;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&&((A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||A===void 0?void 0:A.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},D.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var A=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-A),!0},D.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},D.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},D.prototype._restrictCursor=function(A){A===void 0&&(A=this._bufferService.cols-1),this._activeBuffer.x=Math.min(A,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)},D.prototype._setCursor=function(A,O){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=A,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},D.prototype._moveCursor=function(A,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+O)},D.prototype.cursorUp=function(A){var O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0},D.prototype.cursorDown=function(A){var O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,A.params[0]||1)):this._moveCursor(0,A.params[0]||1),!0},D.prototype.cursorForward=function(A){return this._moveCursor(A.params[0]||1,0),!0},D.prototype.cursorBackward=function(A){return this._moveCursor(-(A.params[0]||1),0),!0},D.prototype.cursorNextLine=function(A){return this.cursorDown(A),this._activeBuffer.x=0,!0},D.prototype.cursorPrecedingLine=function(A){return this.cursorUp(A),this._activeBuffer.x=0,!0},D.prototype.cursorCharAbsolute=function(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0},D.prototype.cursorPosition=function(A){return this._setCursor(A.length>=2?(A.params[1]||1)-1:0,(A.params[0]||1)-1),!0},D.prototype.charPosAbsolute=function(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0},D.prototype.hPositionRelative=function(A){return this._moveCursor(A.params[0]||1,0),!0},D.prototype.linePosAbsolute=function(A){return this._setCursor(this._activeBuffer.x,(A.params[0]||1)-1),!0},D.prototype.vPositionRelative=function(A){return this._moveCursor(0,A.params[0]||1),!0},D.prototype.hVPosition=function(A){return this.cursorPosition(A),!0},D.prototype.tabClear=function(A){var O=A.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0},D.prototype.cursorForwardTab=function(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var O=A.params[0]||1;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},D.prototype.cursorBackwardTab=function(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var O=A.params[0]||1;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},D.prototype._eraseInBufferLine=function(A,O,H,R){R===void 0&&(R=!1);var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);G.replaceCells(O,H,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R&&(G.isWrapped=!1)},D.prototype._resetBufferLine=function(A){var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1},D.prototype.eraseInDisplay=function(A){var O;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(O=this._activeBuffer.y,this._dirtyRowService.markDirty(O),this._eraseInBufferLine(O++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);O<this._bufferService.rows;O++)this._resetBufferLine(O);this._dirtyRowService.markDirty(O);break;case 1:for(O=this._activeBuffer.y,this._dirtyRowService.markDirty(O),this._eraseInBufferLine(O,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(O+1).isWrapped=!1);O--;)this._resetBufferLine(O);this._dirtyRowService.markDirty(0);break;case 2:for(O=this._bufferService.rows,this._dirtyRowService.markDirty(O-1);O--;)this._resetBufferLine(O);this._dirtyRowService.markDirty(0);break;case 3:var H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0},D.prototype.eraseInLine=function(A){switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},D.prototype.insertLines=function(A){this._restrictCursor();var O=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var H=this._activeBuffer.ybase+this._activeBuffer.y,R=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-R+1;O--;)this._activeBuffer.lines.splice(G-1,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},D.prototype.deleteLines=function(A){this._restrictCursor();var O=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var H,R=this._activeBuffer.ybase+this._activeBuffer.y;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;O--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},D.prototype.insertChars=function(A){this._restrictCursor();var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},D.prototype.deleteChars=function(A){this._restrictCursor();var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},D.prototype.scrollUp=function(A){for(var O=A.params[0]||1;O--;)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},D.prototype.scrollDown=function(A){for(var O=A.params[0]||1;O--;)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(s.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},D.prototype.scrollLeft=function(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var O=A.params[0]||1,H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){var R=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);R.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},D.prototype.scrollRight=function(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var O=A.params[0]||1,H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){var R=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);R.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},D.prototype.insertColumns=function(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var O=A.params[0]||1,H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){var R=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);R.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},D.prototype.deleteColumns=function(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var O=A.params[0]||1,H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){var R=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);R.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},D.prototype.eraseChars=function(A){this._restrictCursor();var O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},D.prototype.repeatPrecedingCharacter=function(A){if(!this._parser.precedingCodepoint)return!0;for(var O=A.params[0]||1,H=new Uint32Array(O),R=0;R<O;++R)H[R]=this._parser.precedingCodepoint;return this.print(H,0,H.length),!0},D.prototype.sendDeviceAttributesPrimary=function(A){return A.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0},D.prototype.sendDeviceAttributesSecondary=function(A){return A.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0},D.prototype._is=function(A){return(this._optionsService.options.termName+"").indexOf(A)===0},D.prototype.setMode=function(A){for(var O=0;O<A.length;O++)A.params[O]===4&&(this._coreService.modes.insertMode=!0);return!0},D.prototype.setModePrivate=function(A){for(var O=0;O<A.length;O++)switch(A.params[O]){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},D.prototype.resetMode=function(A){for(var O=0;O<A.length;O++)A.params[O]===4&&(this._coreService.modes.insertMode=!1);return!0},D.prototype.resetModePrivate=function(A){for(var O=0;O<A.length;O++)switch(A.params[O]){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(),A.params[O]===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},D.prototype._updateAttrColor=function(A,O,H,R,G){return O===2?(A|=50331648,A&=-16777216,A|=a.AttributeData.fromColorRGB([H,R,G])):O===5&&(A&=-50331904,A|=33554432|255&H),A},D.prototype._extractColor=function(A,O,H){var R=[0,0,-1,0,0,0],G=0,Y=0;do{if(R[Y+G]=A.params[O+Y],A.hasSubParams(O+Y)){var oe=A.getSubParams(O+Y),le=0;do R[1]===5&&(G=1),R[Y+le+1+G]=oe[le];while(++le<oe.length&&le+Y+1+G<R.length);break}if(R[1]===5&&Y+G>=2||R[1]===2&&Y+G>=5)break;R[1]&&(G=1)}while(++Y+O<A.length&&Y+G<R.length);for(le=2;le<R.length;++le)R[le]===-1&&(R[le]=0);switch(R[0]){case 38:H.fg=this._updateAttrColor(H.fg,R[1],R[3],R[4],R[5]);break;case 48:H.bg=this._updateAttrColor(H.bg,R[1],R[3],R[4],R[5]);break;case 58:H.extended=H.extended.clone(),H.extended.underlineColor=this._updateAttrColor(H.extended.underlineColor,R[1],R[3],R[4],R[5])}return Y},D.prototype._processUnderline=function(A,O){O.extended=O.extended.clone(),(!~A||A>5)&&(A=1),O.extended.underlineStyle=A,O.fg|=268435456,A===0&&(O.fg&=-268435457),O.updateExtended()},D.prototype.charAttributes=function(A){if(A.length===1&&A.params[0]===0)return this._curAttrData.fg=s.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=s.DEFAULT_ATTR_DATA.bg,!0;for(var O,H=A.length,R=this._curAttrData,G=0;G<H;G++)(O=A.params[G])>=30&&O<=37?(R.fg&=-50331904,R.fg|=16777216|O-30):O>=40&&O<=47?(R.bg&=-50331904,R.bg|=16777216|O-40):O>=90&&O<=97?(R.fg&=-50331904,R.fg|=16777224|O-90):O>=100&&O<=107?(R.bg&=-50331904,R.bg|=16777224|O-100):O===0?(R.fg=s.DEFAULT_ATTR_DATA.fg,R.bg=s.DEFAULT_ATTR_DATA.bg):O===1?R.fg|=134217728:O===3?R.bg|=67108864:O===4?(R.fg|=268435456,this._processUnderline(A.hasSubParams(G)?A.getSubParams(G)[0]:1,R)):O===5?R.fg|=536870912:O===7?R.fg|=67108864:O===8?R.fg|=1073741824:O===9?R.fg|=2147483648:O===2?R.bg|=134217728:O===21?this._processUnderline(2,R):O===22?(R.fg&=-134217729,R.bg&=-134217729):O===23?R.bg&=-67108865:O===24?R.fg&=-268435457:O===25?R.fg&=-536870913:O===27?R.fg&=-67108865:O===28?R.fg&=-1073741825:O===29?R.fg&=2147483647:O===39?(R.fg&=-67108864,R.fg|=16777215&s.DEFAULT_ATTR_DATA.fg):O===49?(R.bg&=-67108864,R.bg|=16777215&s.DEFAULT_ATTR_DATA.bg):O===38||O===48||O===58?G+=this._extractColor(A,G,R):O===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):O===100?(R.fg&=-67108864,R.fg|=16777215&s.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&s.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",O);return!0},D.prototype.deviceStatus=function(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(u.C0.ESC+"[0n");break;case 6:var O=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(u.C0.ESC+"["+O+";"+H+"R")}return!0},D.prototype.deviceStatusPrivate=function(A){if(A.params[0]===6){var O=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(u.C0.ESC+"[?"+O+";"+H+"R")}return!0},D.prototype.softReset=function(A){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=s.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},D.prototype.setCursorStyle=function(A){var O=A.params[0]||1;switch(O){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 H=O%2==1;return this._optionsService.options.cursorBlink=H,!0},D.prototype.setScrollRegion=function(A){var O,H=A.params[0]||1;return(A.length<2||(O=A.params[1])>this._bufferService.rows||O===0)&&(O=this._bufferService.rows),O>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=O-1,this._setCursor(0,0)),!0},D.prototype.windowOptions=function(A){if(!S(A.params[0],this._optionsService.options.windowOptions))return!0;var O=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(_.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(_.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(u.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},D.prototype.saveCursor=function(A){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},D.prototype.restoreCursor=function(A){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},D.prototype.setTitle=function(A){return this._windowTitle=A,this._onTitleChange.fire(A),!0},D.prototype.setIconName=function(A){return this._iconName=A,!0},D.prototype.setOrReportIndexedColor=function(A){for(var O=[],H=A.split(";");H.length>1;){var R=H.shift(),G=H.shift();if(/^\d+$/.exec(R)){var Y=parseInt(R);if(0<=Y&&Y<256)if(G==="?")O.push({type:0,index:Y});else{var oe=(0,E.parseColor)(G);oe&&O.push({type:1,index:Y,color:oe})}}}return O.length&&this._onColor.fire(O),!0},D.prototype._setOrReportSpecialColor=function(A,O){for(var H=A.split(";"),R=0;R<H.length&&!(O>=this._specialColors.length);++R,++O)if(H[R]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{var G=(0,E.parseColor)(H[R]);G&&this._onColor.fire([{type:1,index:this._specialColors[O],color:G}])}return!0},D.prototype.setOrReportFgColor=function(A){return this._setOrReportSpecialColor(A,0)},D.prototype.setOrReportBgColor=function(A){return this._setOrReportSpecialColor(A,1)},D.prototype.setOrReportCursorColor=function(A){return this._setOrReportSpecialColor(A,2)},D.prototype.restoreIndexedColor=function(A){if(!A)return this._onColor.fire([{type:2}]),!0;for(var O=[],H=A.split(";"),R=0;R<H.length;++R)if(/^\d+$/.exec(H[R])){var G=parseInt(H[R]);0<=G&&G<256&&O.push({type:2,index:G})}return O.length&&this._onColor.fire(O),!0},D.prototype.restoreFgColor=function(A){return this._onColor.fire([{type:2,index:256}]),!0},D.prototype.restoreBgColor=function(A){return this._onColor.fire([{type:2,index:257}]),!0},D.prototype.restoreCursorColor=function(A){return this._onColor.fire([{type:2,index:258}]),!0},D.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},D.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},D.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},D.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),!0},D.prototype.selectCharset=function(A){return A.length!==2?(this.selectDefaultCharset(),!0):(A[0]==="/"||this._charsetService.setgCharset(L[A[0]],C.CHARSETS[A[1]]||C.DEFAULT_CHARSET),!0)},D.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},D.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},D.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var A=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,A,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},D.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},D.prototype.reset=function(){this._curAttrData=s.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=s.DEFAULT_ATTR_DATA.clone()},D.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},D.prototype.setgLevel=function(A){return this._charsetService.setgLevel(A),!0},D.prototype.screenAlignmentPattern=function(){var A=new i.CellData;A.content=1<<22|"E".charCodeAt(0),A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(var O=0;O<this._bufferService.rows;++O){var H=this._activeBuffer.ybase+this._activeBuffer.y+O,R=this._activeBuffer.lines.get(H);R&&(R.fill(A),R.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},D}(n.Disposable);c.InputHandler=k},844:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.Disposable=void 0;var y=function(){function p(){this._disposables=[],this._isDisposed=!1}return p.prototype.dispose=function(){this._isDisposed=!0;for(var _=0,u=this._disposables;_<u.length;_++)u[_].dispose();this._disposables.length=0},p.prototype.register=function(_){return this._disposables.push(_),_},p.prototype.unregister=function(_){var u=this._disposables.indexOf(_);u!==-1&&this._disposables.splice(u,1)},p}();function f(p){for(var _=0,u=p;_<u.length;_++)u[_].dispose();p.length=0}c.Disposable=y,c.disposeArray=f,c.getDisposeArrayDisposable=function(p){return{dispose:function(){return f(p)}}}},6114:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.isSafari=c.isFirefox=void 0;var y=typeof navigator=="undefined",f=y?"node":navigator.userAgent,p=y?"node":navigator.platform;c.isFirefox=f.includes("Firefox"),c.isSafari=/^((?!chrome|android).)*safari/i.test(f),c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(p),c.isIpad=p==="iPad",c.isIphone=p==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(p),c.isLinux=p.indexOf("Linux")>=0},8273:(z,c)=>{function y(f,p,_,u){if(_===void 0&&(_=0),u===void 0&&(u=f.length),_>=f.length)return f;_=(f.length+_)%f.length,u=u>=f.length?f.length:(f.length+u)%f.length;for(var C=_;C<u;++C)f[C]=p;return f}Object.defineProperty(c,"__esModule",{value:!0}),c.concat=c.fillFallback=c.fill=void 0,c.fill=function(f,p,_,u){return f.fill?f.fill(p,_,u):y(f,p,_,u)},c.fillFallback=y,c.concat=function(f,p){var _=new f.constructor(f.length+p.length);return _.set(f),_.set(p,f.length),_}},9282:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;var f=y(643);c.updateWindowsModeWrappedState=function(p){var _=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),u=_==null?void 0:_.get(p.cols-1),C=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);C&&u&&(C.isWrapped=u[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&u[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;var y=function(){function p(){this.fg=0,this.bg=0,this.extended=new f}return p.toColorRGB=function(_){return[_>>>16&255,_>>>8&255,255&_]},p.fromColorRGB=function(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]},p.prototype.clone=function(){var _=new p;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_},p.prototype.isInverse=function(){return 67108864&this.fg},p.prototype.isBold=function(){return 134217728&this.fg},p.prototype.isUnderline=function(){return 268435456&this.fg},p.prototype.isBlink=function(){return 536870912&this.fg},p.prototype.isInvisible=function(){return 1073741824&this.fg},p.prototype.isItalic=function(){return 67108864&this.bg},p.prototype.isDim=function(){return 134217728&this.bg},p.prototype.isStrikethrough=function(){return 2147483648&this.fg},p.prototype.getFgColorMode=function(){return 50331648&this.fg},p.prototype.getBgColorMode=function(){return 50331648&this.bg},p.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},p.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},p.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},p.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},p.prototype.isFgDefault=function(){return(50331648&this.fg)==0},p.prototype.isBgDefault=function(){return(50331648&this.bg)==0},p.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},p.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},p.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},p.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},p.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},p.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()},p.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},p.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},p.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},p.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},p.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},p}();c.AttributeData=y;var f=function(){function p(_,u){_===void 0&&(_=0),u===void 0&&(u=-1),this.underlineStyle=_,this.underlineColor=u}return p.prototype.clone=function(){return new p(this.underlineStyle,this.underlineColor)},p.prototype.isEmpty=function(){return this.underlineStyle===0},p}();c.ExtendedAttrs=f},9092:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferStringIterator=c.Buffer=c.MAX_BUFFER_SIZE=void 0;var f=y(6349),p=y(8437),_=y(511),u=y(643),C=y(4634),g=y(4863),n=y(7116),o=y(3734);c.MAX_BUFFER_SIZE=4294967295;var h=function(){function t(e,i,a){this._hasScrollback=e,this._optionsService=i,this._bufferService=a,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=n.DEFAULT_CHARSET,this.markers=[],this._nullCell=_.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=_.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.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,i){return new p.BufferLine(this._bufferService.cols,this.getNullCell(e),i)},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 i=e+this._optionsService.options.scrollback;return i>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:i},t.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=p.DEFAULT_ATTR_DATA);for(var i=this._rows;i--;)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 f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(e,i){var a=this.getNullCell(p.DEFAULT_ATTR_DATA),l=this._getCorrectBufferLength(i);if(l>this.lines.maxLength&&(this.lines.maxLength=l),this.lines.length>0){if(this._cols<e)for(var v=0;v<this.lines.length;v++)this.lines.get(v).resize(e,a);var m=0;if(this._rows<i)for(var E=this._rows;E<i;E++)this.lines.length<i+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new p.BufferLine(e,a)):this.ybase>0&&this.lines.length<=this.ybase+this.y+m+1?(this.ybase--,m++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(e,a)));else for(E=this._rows;E>i;E--)this.lines.length>i+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(l<this.lines.maxLength){var L=this.lines.length-l;L>0&&(this.lines.trimStart(L),this.ybase=Math.max(this.ybase-L,0),this.ydisp=Math.max(this.ydisp-L,0),this.savedY=Math.max(this.savedY-L,0)),this.lines.maxLength=l}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,i-1),m&&(this.y+=m),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=i-1,this._isReflowEnabled&&(this._reflow(e,i),this._cols>e))for(v=0;v<this.lines.length;v++)this.lines.get(v).resize(e,a);this._cols=e,this._rows=i},Object.defineProperty(t.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),t.prototype._reflow=function(e,i){this._cols!==e&&(e>this._cols?this._reflowLarger(e,i):this._reflowSmaller(e,i))},t.prototype._reflowLarger=function(e,i){var a=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(a.length>0){var l=(0,C.reflowLargerCreateNewLayout)(this.lines,a);(0,C.reflowLargerApplyNewLayout)(this.lines,l.layout),this._reflowLargerAdjustViewport(e,i,l.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(e,i,a){for(var l=this.getNullCell(p.DEFAULT_ATTR_DATA),v=a;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<i&&this.lines.push(new p.BufferLine(e,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-a,0)},t.prototype._reflowSmaller=function(e,i){for(var a=this.getNullCell(p.DEFAULT_ATTR_DATA),l=[],v=0,m=this.lines.length-1;m>=0;m--){var E=this.lines.get(m);if(!(!E||!E.isWrapped&&E.getTrimmedLength()<=e)){for(var L=[E];E.isWrapped&&m>0;)E=this.lines.get(--m),L.unshift(E);var b=this.ybase+this.y;if(!(b>=m&&b<m+L.length)){var S,T=L[L.length-1].getTrimmedLength(),k=(0,C.reflowSmallerGetNewLineLengths)(L,this._cols,e),W=k.length-L.length;S=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+W):Math.max(0,this.lines.length-this.lines.maxLength+W);for(var D=[],A=0;A<W;A++){var O=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);D.push(O)}D.length>0&&(l.push({start:m+L.length+v,newLines:D}),v+=D.length),L.push.apply(L,D);var H=k.length-1,R=k[H];R===0&&(R=k[--H]);for(var G=L.length-W-1,Y=T;G>=0;){var oe=Math.min(Y,R);if(L[H].copyCellsFrom(L[G],Y-oe,R-oe,oe,!0),(R-=oe)==0&&(R=k[--H]),(Y-=oe)==0){G--;var le=Math.max(G,0);Y=(0,C.getWrappedLineTrimmedLength)(L,le,this._cols)}}for(A=0;A<L.length;A++)k[A]<e&&L[A].setCell(k[A],a);for(var he=W-S;he-- >0;)this.ybase===0?this.y<i-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-i&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+W,this.ybase+i-1)}}}if(l.length>0){var x=[],B=[];for(A=0;A<this.lines.length;A++)B.push(this.lines.get(A));var I=this.lines.length,K=I-1,j=0,V=l[j];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);var se=0;for(A=Math.min(this.lines.maxLength-1,I+v-1);A>=0;A--)if(V&&V.start>K+se){for(var Ce=V.newLines.length-1;Ce>=0;Ce--)this.lines.set(A--,V.newLines[Ce]);A++,x.push({index:K+1,amount:V.newLines.length}),se+=V.newLines.length,V=l[++j]}else this.lines.set(A,B[K--]);var ke=0;for(A=x.length-1;A>=0;A--)x[A].index+=ke,this.lines.onInsertEmitter.fire(x[A]),ke+=x[A].amount;var Ee=Math.max(0,I+v-this.lines.maxLength);Ee>0&&this.lines.onTrimEmitter.fire(Ee)}},t.prototype.stringIndexToBufferIndex=function(e,i,a){for(a===void 0&&(a=!1);i;){var l=this.lines.get(e);if(!l)return[-1,-1];for(var v=a?l.getTrimmedLength():l.length,m=0;m<v;++m)if(l.get(m)[u.CHAR_DATA_WIDTH_INDEX]&&(i-=l.get(m)[u.CHAR_DATA_CHAR_INDEX].length||1),i<0)return[e,m];e++}return[e,0]},t.prototype.translateBufferLineToString=function(e,i,a,l){a===void 0&&(a=0);var v=this.lines.get(e);return v?v.translateToString(i,a,l):""},t.prototype.getWrappedRangeForLine=function(e){for(var i=e,a=e;i>0&&this.lines.get(i).isWrapped;)i--;for(;a+1<this.lines.length&&this.lines.get(a+1).isWrapped;)a++;return{first:i,last:a}},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 i=this,a=new g.Marker(e);return this.markers.push(a),a.register(this.lines.onTrim(function(l){a.line-=l,a.line<0&&a.dispose()})),a.register(this.lines.onInsert(function(l){a.line>=l.index&&(a.line+=l.amount)})),a.register(this.lines.onDelete(function(l){a.line>=l.index&&a.line<l.index+l.amount&&a.dispose(),a.line>l.index&&(a.line-=l.amount)})),a.register(a.onDispose(function(){return i._removeMarker(a)})),a},t.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},t.prototype.iterator=function(e,i,a,l,v){return new s(this,e,i,a,l,v)},t}();c.Buffer=h;var s=function(){function t(e,i,a,l,v,m){a===void 0&&(a=0),l===void 0&&(l=e.lines.length),v===void 0&&(v=0),m===void 0&&(m=0),this._buffer=e,this._trimRight=i,this._startIndex=a,this._endIndex=l,this._startOverscan=v,this._endOverscan=m,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 i="",a=e.first;a<=e.last;++a)i+=this._buffer.translateBufferLineToString(a,this._trimRight);return this._current=e.last+1,{range:e,content:i}},t}();c.BufferStringIterator=s},8437:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;var f=y(482),p=y(643),_=y(511),u=y(3734);c.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);var C=function(){function g(n,o,h){h===void 0&&(h=!1),this.isWrapped=h,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*n);for(var s=o||_.CellData.fromCharData([0,p.NULL_CELL_CHAR,p.NULL_CELL_WIDTH,p.NULL_CELL_CODE]),t=0;t<n;++t)this.setCell(t,s);this.length=n}return g.prototype.get=function(n){var o=this._data[3*n+0],h=2097151&o;return[this._data[3*n+1],2097152&o?this._combined[n]:h?(0,f.stringFromCodePoint)(h):"",o>>22,2097152&o?this._combined[n].charCodeAt(this._combined[n].length-1):h]},g.prototype.set=function(n,o){this._data[3*n+1]=o[p.CHAR_DATA_ATTR_INDEX],o[p.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[n]=o[1],this._data[3*n+0]=2097152|n|o[p.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*n+0]=o[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[p.CHAR_DATA_WIDTH_INDEX]<<22},g.prototype.getWidth=function(n){return this._data[3*n+0]>>22},g.prototype.hasWidth=function(n){return 12582912&this._data[3*n+0]},g.prototype.getFg=function(n){return this._data[3*n+1]},g.prototype.getBg=function(n){return this._data[3*n+2]},g.prototype.hasContent=function(n){return 4194303&this._data[3*n+0]},g.prototype.getCodePoint=function(n){var o=this._data[3*n+0];return 2097152&o?this._combined[n].charCodeAt(this._combined[n].length-1):2097151&o},g.prototype.isCombined=function(n){return 2097152&this._data[3*n+0]},g.prototype.getString=function(n){var o=this._data[3*n+0];return 2097152&o?this._combined[n]:2097151&o?(0,f.stringFromCodePoint)(2097151&o):""},g.prototype.loadCell=function(n,o){var h=3*n;return o.content=this._data[h+0],o.fg=this._data[h+1],o.bg=this._data[h+2],2097152&o.content&&(o.combinedData=this._combined[n]),268435456&o.bg&&(o.extended=this._extendedAttrs[n]),o},g.prototype.setCell=function(n,o){2097152&o.content&&(this._combined[n]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[n]=o.extended),this._data[3*n+0]=o.content,this._data[3*n+1]=o.fg,this._data[3*n+2]=o.bg},g.prototype.setCellFromCodePoint=function(n,o,h,s,t,e){268435456&t&&(this._extendedAttrs[n]=e),this._data[3*n+0]=o|h<<22,this._data[3*n+1]=s,this._data[3*n+2]=t},g.prototype.addCodepointToCell=function(n,o){var h=this._data[3*n+0];2097152&h?this._combined[n]+=(0,f.stringFromCodePoint)(o):(2097151&h?(this._combined[n]=(0,f.stringFromCodePoint)(2097151&h)+(0,f.stringFromCodePoint)(o),h&=-2097152,h|=2097152):h=o|1<<22,this._data[3*n+0]=h)},g.prototype.insertCells=function(n,o,h,s){if((n%=this.length)&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,(s==null?void 0:s.fg)||0,(s==null?void 0:s.bg)||0,(s==null?void 0:s.extended)||new u.ExtendedAttrs),o<this.length-n){for(var t=new _.CellData,e=this.length-n-o-1;e>=0;--e)this.setCell(n+o+e,this.loadCell(n+e,t));for(e=0;e<o;++e)this.setCell(n+e,h)}else for(e=n;e<this.length;++e)this.setCell(e,h);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(s==null?void 0:s.fg)||0,(s==null?void 0:s.bg)||0,(s==null?void 0:s.extended)||new u.ExtendedAttrs)},g.prototype.deleteCells=function(n,o,h,s){if(n%=this.length,o<this.length-n){for(var t=new _.CellData,e=0;e<this.length-n-o;++e)this.setCell(n+e,this.loadCell(n+o+e,t));for(e=this.length-o;e<this.length;++e)this.setCell(e,h)}else for(e=n;e<this.length;++e)this.setCell(e,h);n&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,(s==null?void 0:s.fg)||0,(s==null?void 0:s.bg)||0,(s==null?void 0:s.extended)||new u.ExtendedAttrs),this.getWidth(n)!==0||this.hasContent(n)||this.setCellFromCodePoint(n,0,1,(s==null?void 0:s.fg)||0,(s==null?void 0:s.bg)||0,(s==null?void 0:s.extended)||new u.ExtendedAttrs)},g.prototype.replaceCells=function(n,o,h,s){for(n&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,(s==null?void 0:s.fg)||0,(s==null?void 0:s.bg)||0,(s==null?void 0:s.extended)||new u.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,(s==null?void 0:s.fg)||0,(s==null?void 0:s.bg)||0,(s==null?void 0:s.extended)||new u.ExtendedAttrs);n<o&&n<this.length;)this.setCell(n++,h)},g.prototype.resize=function(n,o){if(n!==this.length){if(n>this.length){var h=new Uint32Array(3*n);this.length&&(3*n<this._data.length?h.set(this._data.subarray(0,3*n)):h.set(this._data)),this._data=h;for(var s=this.length;s<n;++s)this.setCell(s,o)}else if(n){(h=new Uint32Array(3*n)).set(this._data.subarray(0,3*n)),this._data=h;var t=Object.keys(this._combined);for(s=0;s<t.length;s++){var e=parseInt(t[s],10);e>=n&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=n}},g.prototype.fill=function(n){this._combined={},this._extendedAttrs={};for(var o=0;o<this.length;++o)this.setCell(o,n)},g.prototype.copyFrom=function(n){for(var o in this.length!==n.length?this._data=new Uint32Array(n._data):this._data.set(n._data),this.length=n.length,this._combined={},n._combined)this._combined[o]=n._combined[o];for(var o in this._extendedAttrs={},n._extendedAttrs)this._extendedAttrs[o]=n._extendedAttrs[o];this.isWrapped=n.isWrapped},g.prototype.clone=function(){var n=new g(0);for(var o in n._data=new Uint32Array(this._data),n.length=this.length,this._combined)n._combined[o]=this._combined[o];for(var o in this._extendedAttrs)n._extendedAttrs[o]=this._extendedAttrs[o];return n.isWrapped=this.isWrapped,n},g.prototype.getTrimmedLength=function(){for(var n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0])return n+(this._data[3*n+0]>>22);return 0},g.prototype.copyCellsFrom=function(n,o,h,s,t){var e=n._data;if(t)for(var i=s-1;i>=0;i--)for(var a=0;a<3;a++)this._data[3*(h+i)+a]=e[3*(o+i)+a];else for(i=0;i<s;i++)for(a=0;a<3;a++)this._data[3*(h+i)+a]=e[3*(o+i)+a];var l=Object.keys(n._combined);for(a=0;a<l.length;a++){var v=parseInt(l[a],10);v>=o&&(this._combined[v-o+h]=n._combined[v])}},g.prototype.translateToString=function(n,o,h){n===void 0&&(n=!1),o===void 0&&(o=0),h===void 0&&(h=this.length),n&&(h=Math.min(h,this.getTrimmedLength()));for(var s="";o<h;){var t=this._data[3*o+0],e=2097151&t;s+=2097152&t?this._combined[o]:e?(0,f.stringFromCodePoint)(e):p.WHITESPACE_CELL_CHAR,o+=t>>22||1}return s},g}();c.BufferLine=C},4841:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(y,f){if(y.start.y>y.end.y)throw new Error("Buffer range end ("+y.end.x+", "+y.end.y+") cannot be before start ("+y.start.x+", "+y.start.y+")");return f*(y.end.y-y.start.y)+(y.end.x-y.start.x+1)}},4634:(z,c)=>{function y(f,p,_){if(p===f.length-1)return f[p].getTrimmedLength();var u=!f[p].hasContent(_-1)&&f[p].getWidth(_-1)===1,C=f[p+1].getWidth(0)===2;return u&&C?_-1:_}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(f,p,_,u,C){for(var g=[],n=0;n<f.length-1;n++){var o=n,h=f.get(++o);if(h.isWrapped){for(var s=[f.get(n)];o<f.length&&h.isWrapped;)s.push(h),h=f.get(++o);if(u>=n&&u<o)n+=s.length-1;else{for(var t=0,e=y(s,t,p),i=1,a=0;i<s.length;){var l=y(s,i,p),v=l-a,m=_-e,E=Math.min(v,m);s[t].copyCellsFrom(s[i],a,e,E,!1),(e+=E)===_&&(t++,e=0),(a+=E)===l&&(i++,a=0),e===0&&t!==0&&s[t-1].getWidth(_-1)===2&&(s[t].copyCellsFrom(s[t-1],_-1,e++,1,!1),s[t-1].setCell(_-1,C))}s[t].replaceCells(e,_,C);for(var L=0,b=s.length-1;b>0&&(b>t||s[b].getTrimmedLength()===0);b--)L++;L>0&&(g.push(n+s.length-L),g.push(L)),n+=s.length-1}}}return g},c.reflowLargerCreateNewLayout=function(f,p){for(var _=[],u=0,C=p[u],g=0,n=0;n<f.length;n++)if(C===n){var o=p[++u];f.onDeleteEmitter.fire({index:n-g,amount:o}),n+=o-1,g+=o,C=p[++u]}else _.push(n);return{layout:_,countRemoved:g}},c.reflowLargerApplyNewLayout=function(f,p){for(var _=[],u=0;u<p.length;u++)_.push(f.get(p[u]));for(u=0;u<_.length;u++)f.set(u,_[u]);f.length=p.length},c.reflowSmallerGetNewLineLengths=function(f,p,_){for(var u=[],C=f.map(function(e,i){return y(f,i,p)}).reduce(function(e,i){return e+i}),g=0,n=0,o=0;o<C;){if(C-o<_){u.push(C-o);break}g+=_;var h=y(f,n,p);g>h&&(g-=h,n++);var s=f[n].getWidth(g-1)===2;s&&g--;var t=s?_-1:_;u.push(t),o+=t}return u},c.getWrappedLineTrimmedLength=y},5295:function(z,c,y){var f,p=this&&this.__extends||(f=function(g,n){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var s in h)Object.prototype.hasOwnProperty.call(h,s)&&(o[s]=h[s])},f(g,n)},function(g,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=g}f(g,n),g.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)});Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;var _=y(9092),u=y(8460),C=function(g){function n(o,h){var s=g.call(this)||this;return s._optionsService=o,s._bufferService=h,s._onBufferActivate=s.register(new u.EventEmitter),s.reset(),s}return p(n,g),Object.defineProperty(n.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),n.prototype.reset=function(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(n.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),n.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}))},n.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}))},n.prototype.resize=function(o,h){this._normal.resize(o,h),this._alt.resize(o,h)},n.prototype.setupTabStops=function(o){this._normal.setupTabStops(o),this._alt.setupTabStops(o)},n}(y(844).Disposable);c.BufferSet=C},511:function(z,c,y){var f,p=this&&this.__extends||(f=function(n,o){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,s){h.__proto__=s}||function(h,s){for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(h[t]=s[t])},f(n,o)},function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function h(){this.constructor=n}f(n,o),n.prototype=o===null?Object.create(o):(h.prototype=o.prototype,new h)});Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;var _=y(482),u=y(643),C=y(3734),g=function(n){function o(){var h=n!==null&&n.apply(this,arguments)||this;return h.content=0,h.fg=0,h.bg=0,h.extended=new C.ExtendedAttrs,h.combinedData="",h}return p(o,n),o.fromCharData=function(h){var s=new o;return s.setFromCharData(h),s},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,_.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(h){this.fg=h[u.CHAR_DATA_ATTR_INDEX],this.bg=0;var s=!1;if(h[u.CHAR_DATA_CHAR_INDEX].length>2)s=!0;else if(h[u.CHAR_DATA_CHAR_INDEX].length===2){var t=h[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){var e=h[u.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(t-55296)+e-56320+65536|h[u.CHAR_DATA_WIDTH_INDEX]<<22:s=!0}else s=!0}else this.content=h[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[u.CHAR_DATA_WIDTH_INDEX]<<22;s&&(this.combinedData=h[u.CHAR_DATA_CHAR_INDEX],this.content=2097152|h[u.CHAR_DATA_WIDTH_INDEX]<<22)},o.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},o}(C.AttributeData);c.CellData=g},643:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=256,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:function(z,c,y){var f,p=this&&this.__extends||(f=function(C,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(n[h]=o[h])},f(C,g)},function(C,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function n(){this.constructor=C}f(C,g),C.prototype=g===null?Object.create(g):(n.prototype=g.prototype,new n)});Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;var _=y(8460),u=function(C){function g(n){var o=C.call(this)||this;return o.line=n,o._id=g._nextId++,o.isDisposed=!1,o._onDispose=new _.EventEmitter,o}return p(g,C),Object.defineProperty(g.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),g.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),C.prototype.dispose.call(this))},g._nextId=1,g}(y(844).Disposable);c.Marker=u},7116:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.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"},c.CHARSETS.A={"#":"\xA3"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},c.CHARSETS.C=c.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},c.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},c.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},c.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},c.CHARSETS.E=c.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},c.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},c.CHARSETS.H=c.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(z,c)=>{var y,f;Object.defineProperty(c,"__esModule",{value:!0}),c.C1=c.C0=void 0,(f=c.C0||(c.C0={})).NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL="\x7F",(y=c.C1||(c.C1={})).PAD="\x80",y.HOP="\x81",y.BPH="\x82",y.NBH="\x83",y.IND="\x84",y.NEL="\x85",y.SSA="\x86",y.ESA="\x87",y.HTS="\x88",y.HTJ="\x89",y.VTS="\x8A",y.PLD="\x8B",y.PLU="\x8C",y.RI="\x8D",y.SS2="\x8E",y.SS3="\x8F",y.DCS="\x90",y.PU1="\x91",y.PU2="\x92",y.STS="\x93",y.CCH="\x94",y.MW="\x95",y.SPA="\x96",y.EPA="\x97",y.SOS="\x98",y.SGCI="\x99",y.SCI="\x9A",y.CSI="\x9B",y.ST="\x9C",y.OSC="\x9D",y.PM="\x9E",y.APC="\x9F"},7399:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;var f=y(2584),p={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:["'",'"']};c.evaluateKeyboardEvent=function(_,u,C,g){var n={type:0,cancel:!1,key:void 0},o=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?n.key=u?f.C0.ESC+"OA":f.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?n.key=u?f.C0.ESC+"OD":f.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?n.key=u?f.C0.ESC+"OC":f.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(n.key=u?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(_.shiftKey){n.key=f.C0.BS;break}if(_.altKey){n.key=f.C0.ESC+f.C0.DEL;break}n.key=f.C0.DEL;break;case 9:if(_.shiftKey){n.key=f.C0.ESC+"[Z";break}n.key=f.C0.HT,n.cancel=!0;break;case 13:n.key=_.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,n.cancel=!0;break;case 27:n.key=f.C0.ESC,_.altKey&&(n.key=f.C0.ESC+f.C0.ESC),n.cancel=!0;break;case 37:if(_.metaKey)break;o?(n.key=f.C0.ESC+"[1;"+(o+1)+"D",n.key===f.C0.ESC+"[1;3D"&&(n.key=f.C0.ESC+(C?"b":"[1;5D"))):n.key=u?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(_.metaKey)break;o?(n.key=f.C0.ESC+"[1;"+(o+1)+"C",n.key===f.C0.ESC+"[1;3C"&&(n.key=f.C0.ESC+(C?"f":"[1;5C"))):n.key=u?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(_.metaKey)break;o?(n.key=f.C0.ESC+"[1;"+(o+1)+"A",C||n.key!==f.C0.ESC+"[1;3A"||(n.key=f.C0.ESC+"[1;5A")):n.key=u?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(_.metaKey)break;o?(n.key=f.C0.ESC+"[1;"+(o+1)+"B",C||n.key!==f.C0.ESC+"[1;3B"||(n.key=f.C0.ESC+"[1;5B")):n.key=u?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(n.key=f.C0.ESC+"[2~");break;case 46:n.key=o?f.C0.ESC+"[3;"+(o+1)+"~":f.C0.ESC+"[3~";break;case 36:n.key=o?f.C0.ESC+"[1;"+(o+1)+"H":u?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:n.key=o?f.C0.ESC+"[1;"+(o+1)+"F":u?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:_.shiftKey?n.type=2:n.key=f.C0.ESC+"[5~";break;case 34:_.shiftKey?n.type=3:n.key=f.C0.ESC+"[6~";break;case 112:n.key=o?f.C0.ESC+"[1;"+(o+1)+"P":f.C0.ESC+"OP";break;case 113:n.key=o?f.C0.ESC+"[1;"+(o+1)+"Q":f.C0.ESC+"OQ";break;case 114:n.key=o?f.C0.ESC+"[1;"+(o+1)+"R":f.C0.ESC+"OR";break;case 115:n.key=o?f.C0.ESC+"[1;"+(o+1)+"S":f.C0.ESC+"OS";break;case 116:n.key=o?f.C0.ESC+"[15;"+(o+1)+"~":f.C0.ESC+"[15~";break;case 117:n.key=o?f.C0.ESC+"[17;"+(o+1)+"~":f.C0.ESC+"[17~";break;case 118:n.key=o?f.C0.ESC+"[18;"+(o+1)+"~":f.C0.ESC+"[18~";break;case 119:n.key=o?f.C0.ESC+"[19;"+(o+1)+"~":f.C0.ESC+"[19~";break;case 120:n.key=o?f.C0.ESC+"[20;"+(o+1)+"~":f.C0.ESC+"[20~";break;case 121:n.key=o?f.C0.ESC+"[21;"+(o+1)+"~":f.C0.ESC+"[21~";break;case 122:n.key=o?f.C0.ESC+"[23;"+(o+1)+"~":f.C0.ESC+"[23~";break;case 123:n.key=o?f.C0.ESC+"[24;"+(o+1)+"~":f.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(C&&!g||!_.altKey||_.metaKey)!C||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?n.key=_.key:_.key&&_.ctrlKey&&_.key==="_"&&(n.key=f.C0.US):_.keyCode===65&&(n.type=1);else{var h=p[_.keyCode],s=h==null?void 0:h[_.shiftKey?1:0];if(s)n.key=f.C0.ESC+s;else if(_.keyCode>=65&&_.keyCode<=90){var t=_.ctrlKey?_.keyCode-64:_.keyCode+32;n.key=f.C0.ESC+String.fromCharCode(t)}}else _.keyCode>=65&&_.keyCode<=90?n.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?n.key=f.C0.NUL:_.keyCode>=51&&_.keyCode<=55?n.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?n.key=f.C0.DEL:_.keyCode===219?n.key=f.C0.ESC:_.keyCode===220?n.key=f.C0.FS:_.keyCode===221&&(n.key=f.C0.GS)}return n}},482:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(p){return p>65535?(p-=65536,String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):String.fromCharCode(p)},c.utf32ToString=function(p,_,u){_===void 0&&(_=0),u===void 0&&(u=p.length);for(var C="",g=_;g<u;++g){var n=p[g];n>65535?(n-=65536,C+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):C+=String.fromCharCode(n)}return C};var y=function(){function p(){this._interim=0}return p.prototype.clear=function(){this._interim=0},p.prototype.decode=function(_,u){var C=_.length;if(!C)return 0;var g=0,n=0;this._interim&&(56320<=(s=_.charCodeAt(n++))&&s<=57343?u[g++]=1024*(this._interim-55296)+s-56320+65536:(u[g++]=this._interim,u[g++]=s),this._interim=0);for(var o=n;o<C;++o){var h=_.charCodeAt(o);if(55296<=h&&h<=56319){if(++o>=C)return this._interim=h,g;var s;56320<=(s=_.charCodeAt(o))&&s<=57343?u[g++]=1024*(h-55296)+s-56320+65536:(u[g++]=h,u[g++]=s)}else h!==65279&&(u[g++]=h)}return g},p}();c.StringToUtf32=y;var f=function(){function p(){this.interim=new Uint8Array(3)}return p.prototype.clear=function(){this.interim.fill(0)},p.prototype.decode=function(_,u){var C=_.length;if(!C)return 0;var g,n,o,h,s=0,t=0,e=0;if(this.interim[0]){var i=!1,a=this.interim[0];a&=(224&a)==192?31:(240&a)==224?15:7;for(var l=0,v=void 0;(v=63&this.interim[++l])&&l<4;)a<<=6,a|=v;for(var m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=m-l;e<E;){if(e>=C)return 0;if((192&(v=_[e++]))!=128){e--,i=!0;break}this.interim[l++]=v,a<<=6,a|=63&v}i||(m===2?a<128?e--:u[s++]=a:m===3?a<2048||a>=55296&&a<=57343||a===65279||(u[s++]=a):a<65536||a>1114111||(u[s++]=a)),this.interim.fill(0)}for(var L=C-4,b=e;b<C;){for(;!(!(b<L)||128&(g=_[b])||128&(n=_[b+1])||128&(o=_[b+2])||128&(h=_[b+3]));)u[s++]=g,u[s++]=n,u[s++]=o,u[s++]=h,b+=4;if((g=_[b++])<128)u[s++]=g;else if((224&g)==192){if(b>=C)return this.interim[0]=g,s;if((192&(n=_[b++]))!=128){b--;continue}if((t=(31&g)<<6|63&n)<128){b--;continue}u[s++]=t}else if((240&g)==224){if(b>=C)return this.interim[0]=g,s;if((192&(n=_[b++]))!=128){b--;continue}if(b>=C)return this.interim[0]=g,this.interim[1]=n,s;if((192&(o=_[b++]))!=128){b--;continue}if((t=(15&g)<<12|(63&n)<<6|63&o)<2048||t>=55296&&t<=57343||t===65279)continue;u[s++]=t}else if((248&g)==240){if(b>=C)return this.interim[0]=g,s;if((192&(n=_[b++]))!=128){b--;continue}if(b>=C)return this.interim[0]=g,this.interim[1]=n,s;if((192&(o=_[b++]))!=128){b--;continue}if(b>=C)return this.interim[0]=g,this.interim[1]=n,this.interim[2]=o,s;if((192&(h=_[b++]))!=128){b--;continue}if((t=(7&g)<<18|(63&n)<<12|(63&o)<<6|63&h)<65536||t>1114111)continue;u[s++]=t}}return s},p}();c.Utf8ToUtf32=f},225:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;var f,p=y(8273),_=[[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]],u=[[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 g(){if(this.version="6",!f){f=new Uint8Array(65536),(0,p.fill)(f,1),f[0]=0,(0,p.fill)(f,0,1,32),(0,p.fill)(f,0,127,160),(0,p.fill)(f,2,4352,4448),f[9001]=2,f[9002]=2,(0,p.fill)(f,2,11904,42192),f[12351]=1,(0,p.fill)(f,2,44032,55204),(0,p.fill)(f,2,63744,64256),(0,p.fill)(f,2,65040,65050),(0,p.fill)(f,2,65072,65136),(0,p.fill)(f,2,65280,65377),(0,p.fill)(f,2,65504,65511);for(var n=0;n<_.length;++n)(0,p.fill)(f,0,_[n][0],_[n][1]+1)}}return g.prototype.wcwidth=function(n){return n<32?0:n<127?1:n<65536?f[n]:function(o,h){var s,t=0,e=h.length-1;if(o<h[0][0]||o>h[e][1])return!1;for(;e>=t;)if(o>h[s=t+e>>1][1])t=s+1;else{if(!(o<h[s][0]))return!0;e=s-1}return!1}(n,u)?0:n>=131072&&n<=196605||n>=196608&&n<=262141?2:1},g}();c.UnicodeV6=C},5981:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;var y=typeof queueMicrotask=="undefined"?function(p){Promise.resolve().then(p)}:queueMicrotask,f=function(){function p(_){this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return p.prototype.writeSync=function(_,u){if(u!==void 0&&this._syncCalls>u)this._syncCalls=0;else if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var C;for(this._isSyncWriting=!0;C=this._writeBuffer.shift();){this._action(C);var g=this._callbacks.shift();g&&g()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},p.prototype.write=function(_,u){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+=_.length,this._writeBuffer.push(_),this._callbacks.push(u)},p.prototype._innerWrite=function(_,u){var C=this;_===void 0&&(_=0),u===void 0&&(u=!0);for(var g=_||Date.now();this._writeBuffer.length>this._bufferOffset;){var n=this._writeBuffer[this._bufferOffset],o=this._action(n,u);if(o)return void o.catch(function(s){return y(function(){throw s}),Promise.resolve(!1)}).then(function(s){return Date.now()-g>=12?setTimeout(function(){return C._innerWrite(0,s)}):C._innerWrite(g,s)});var h=this._callbacks[this._bufferOffset];if(h&&h(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-g>=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)},p}();c.WriteBuffer=f},5941:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;var y=/^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function p(_,u){var C=_.toString(16),g=C.length<2?"0"+C:C;switch(u){case 4:return C[0];case 8:return g;case 12:return(g+g).slice(0,3);default:return g+g}}c.parseColor=function(_){if(_){var u=_.toLowerCase();if(u.indexOf("rgb:")===0){u=u.slice(4);var C=y.exec(u);if(C){var g=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/g*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/g*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/g*255)]}}else if(u.indexOf("#")===0&&(u=u.slice(1),f.exec(u)&&[3,6,9,12].includes(u.length))){for(var n=u.length/3,o=[0,0,0],h=0;h<3;++h){var s=parseInt(u.slice(n*h,n*h+n),16);o[h]=n===1?s<<4:n===2?s:n===3?s>>4:s>>8}return o}}},c.toRgbString=function(_,u){u===void 0&&(u=16);var C=_[0],g=_[1],n=_[2];return"rgb:"+p(C,u)+"/"+p(g,u)+"/"+p(n,u)}},5770:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;var f=y(482),p=y(8742),_=y(5770),u=[],C=function(){function o(){this._handlers=Object.create(null),this._active=u,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=u},o.prototype.registerHandler=function(h,s){this._handlers[h]===void 0&&(this._handlers[h]=[]);var t=this._handlers[h];return t.push(s),{dispose:function(){var e=t.indexOf(s);e!==-1&&t.splice(e,1)}}},o.prototype.clearHandler=function(h){this._handlers[h]&&delete this._handlers[h]},o.prototype.setHandlerFallback=function(h){this._handlerFb=h},o.prototype.reset=function(){if(this._active.length)for(var h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].unhook(!1);this._stack.paused=!1,this._active=u,this._ident=0},o.prototype.hook=function(h,s){if(this.reset(),this._ident=h,this._active=this._handlers[h]||u,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(s);else this._handlerFb(this._ident,"HOOK",s)},o.prototype.put=function(h,s,t){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(h,s,t);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(h,s,t))},o.prototype.unhook=function(h,s){if(s===void 0&&(s=!0),this._active.length){var t=!1,e=this._active.length-1,i=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,t=s,i=this._stack.fallThrough,this._stack.paused=!1),!i&&t===!1){for(;e>=0&&(t=this._active[e].unhook(h))!==!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",h);this._active=u,this._ident=0},o}();c.DcsParser=C;var g=new p.Params;g.addParam(0);var n=function(){function o(h){this._handler=h,this._data="",this._params=g,this._hitLimit=!1}return o.prototype.hook=function(h){this._params=h.length>1||h.params[0]?h.clone():g,this._data="",this._hitLimit=!1},o.prototype.put=function(h,s,t){this._hitLimit||(this._data+=(0,f.utf32ToString)(h,s,t),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},o.prototype.unhook=function(h){var s=this,t=!1;if(this._hitLimit)t=!1;else if(h&&(t=this._handler(this._data,this._params))instanceof Promise)return t.then(function(e){return s._params=g,s._data="",s._hitLimit=!1,e});return this._params=g,this._data="",this._hitLimit=!1,t},o}();c.DcsHandler=n},2015:function(z,c,y){var f,p=this&&this.__extends||(f=function(t,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(i[l]=a[l])},f(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 i(){this.constructor=t}f(t,e),t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;var _=y(844),u=y(8273),C=y(8742),g=y(6242),n=y(6351),o=function(){function t(e){this.table=new Uint8Array(e)}return t.prototype.setDefault=function(e,i){(0,u.fill)(this.table,e<<4|i)},t.prototype.add=function(e,i,a,l){this.table[i<<8|e]=a<<4|l},t.prototype.addMany=function(e,i,a,l){for(var v=0;v<e.length;v++)this.table[i<<8|e[v]]=a<<4|l},t}();c.TransitionTable=o;var h=160;c.VT500_TRANSITION_TABLE=function(){var t=new o(4095),e=Array.apply(null,Array(256)).map(function(E,L){return L}),i=function(E,L){return e.slice(E,L)},a=i(32,127),l=i(0,24);l.push(25),l.push.apply(l,i(28,32));var v,m=i(0,14);for(v in t.setDefault(1,0),t.addMany(a,0,2,0),m)t.addMany([24,26,153,154],v,3,0),t.addMany(i(128,144),v,3,0),t.addMany(i(144,152),v,3,0),t.add(156,v,0,0),t.add(27,v,11,1),t.add(157,v,4,8),t.addMany([152,158,159],v,0,7),t.add(155,v,11,3),t.add(144,v,11,9);return t.addMany(l,0,3,0),t.addMany(l,1,3,1),t.add(127,1,0,1),t.addMany(l,8,0,8),t.addMany(l,3,3,3),t.add(127,3,0,3),t.addMany(l,4,3,4),t.add(127,4,0,4),t.addMany(l,6,3,6),t.addMany(l,5,3,5),t.add(127,5,0,5),t.addMany(l,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(a,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(i(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(a,7,0,7),t.addMany(l,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(i(64,127),3,7,0),t.addMany(i(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(i(48,60),4,8,4),t.addMany(i(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(i(32,64),6,0,6),t.add(127,6,0,6),t.addMany(i(64,127),6,0,0),t.addMany(i(32,48),3,9,5),t.addMany(i(32,48),5,9,5),t.addMany(i(48,64),5,0,6),t.addMany(i(64,127),5,7,0),t.addMany(i(32,48),4,9,5),t.addMany(i(32,48),1,9,2),t.addMany(i(32,48),2,9,2),t.addMany(i(48,127),2,10,0),t.addMany(i(48,80),1,10,0),t.addMany(i(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(i(96,127),1,10,0),t.add(80,1,11,9),t.addMany(l,9,0,9),t.add(127,9,0,9),t.addMany(i(28,32),9,0,9),t.addMany(i(32,48),9,9,12),t.addMany(i(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(l,11,0,11),t.addMany(i(32,128),11,0,11),t.addMany(i(28,32),11,0,11),t.addMany(l,10,0,10),t.add(127,10,0,10),t.addMany(i(28,32),10,0,10),t.addMany(i(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(i(32,48),10,9,12),t.addMany(l,12,0,12),t.add(127,12,0,12),t.addMany(i(28,32),12,0,12),t.addMany(i(32,48),12,9,12),t.addMany(i(48,64),12,0,11),t.addMany(i(64,127),12,12,13),t.addMany(i(64,127),10,12,13),t.addMany(i(64,127),9,12,13),t.addMany(l,13,13,13),t.addMany(a,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(h,0,2,0),t.add(h,8,5,8),t.add(h,6,0,6),t.add(h,11,0,11),t.add(h,13,13,13),t}();var s=function(t){function e(i){i===void 0&&(i=c.VT500_TRANSITION_TABLE);var a=t.call(this)||this;return a._transitions=i,a._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},a.initialState=0,a.currentState=a.initialState,a._params=new C.Params,a._params.addParam(0),a._collect=0,a.precedingCodepoint=0,a._printHandlerFb=function(l,v,m){},a._executeHandlerFb=function(l){},a._csiHandlerFb=function(l,v){},a._escHandlerFb=function(l){},a._errorHandlerFb=function(l){return l},a._printHandler=a._printHandlerFb,a._executeHandlers=Object.create(null),a._csiHandlers=Object.create(null),a._escHandlers=Object.create(null),a._oscParser=new g.OscParser,a._dcsParser=new n.DcsParser,a._errorHandler=a._errorHandlerFb,a.registerEscHandler({final:"\\"},function(){return!0}),a}return p(e,t),e.prototype._identifier=function(i,a){a===void 0&&(a=[64,126]);var l=0;if(i.prefix){if(i.prefix.length>1)throw new Error("only one byte as prefix supported");if((l=i.prefix.charCodeAt(0))&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(i.intermediates){if(i.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var v=0;v<i.intermediates.length;++v){var m=i.intermediates.charCodeAt(v);if(32>m||m>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=m}}if(i.final.length!==1)throw new Error("final must be a single byte");var E=i.final.charCodeAt(0);if(a[0]>E||E>a[1])throw new Error("final must be in range "+a[0]+" .. "+a[1]);return(l<<=8)|E},e.prototype.identToString=function(i){for(var a=[];i;)a.push(String.fromCharCode(255&i)),i>>=8;return a.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(i){this._printHandler=i},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(i,a){var l=this._identifier(i,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);var v=this._escHandlers[l];return v.push(a),{dispose:function(){var m=v.indexOf(a);m!==-1&&v.splice(m,1)}}},e.prototype.clearEscHandler=function(i){this._escHandlers[this._identifier(i,[48,126])]&&delete this._escHandlers[this._identifier(i,[48,126])]},e.prototype.setEscHandlerFallback=function(i){this._escHandlerFb=i},e.prototype.setExecuteHandler=function(i,a){this._executeHandlers[i.charCodeAt(0)]=a},e.prototype.clearExecuteHandler=function(i){this._executeHandlers[i.charCodeAt(0)]&&delete this._executeHandlers[i.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(i){this._executeHandlerFb=i},e.prototype.registerCsiHandler=function(i,a){var l=this._identifier(i);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);var v=this._csiHandlers[l];return v.push(a),{dispose:function(){var m=v.indexOf(a);m!==-1&&v.splice(m,1)}}},e.prototype.clearCsiHandler=function(i){this._csiHandlers[this._identifier(i)]&&delete this._csiHandlers[this._identifier(i)]},e.prototype.setCsiHandlerFallback=function(i){this._csiHandlerFb=i},e.prototype.registerDcsHandler=function(i,a){return this._dcsParser.registerHandler(this._identifier(i),a)},e.prototype.clearDcsHandler=function(i){this._dcsParser.clearHandler(this._identifier(i))},e.prototype.setDcsHandlerFallback=function(i){this._dcsParser.setHandlerFallback(i)},e.prototype.registerOscHandler=function(i,a){return this._oscParser.registerHandler(i,a)},e.prototype.clearOscHandler=function(i){this._oscParser.clearHandler(i)},e.prototype.setOscHandlerFallback=function(i){this._oscParser.setHandlerFallback(i)},e.prototype.setErrorHandler=function(i){this._errorHandler=i},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(i,a,l,v,m){this._parseStack.state=i,this._parseStack.handlers=a,this._parseStack.handlerPos=l,this._parseStack.transition=v,this._parseStack.chunkPos=m},e.prototype.parse=function(i,a,l){var v,m=0,E=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var b=this._parseStack.handlers,S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&S>-1){for(;S>=0&&(v=b[S](this._params))!==!0;S--)if(v instanceof Promise)return this._parseStack.handlerPos=S,v}this._parseStack.handlers=[];break;case 4:if(l===!1&&S>-1){for(;S>=0&&(v=b[S]())!==!0;S--)if(v instanceof Promise)return this._parseStack.handlerPos=S,v}this._parseStack.handlers=[];break;case 6:if(m=i[this._parseStack.chunkPos],v=this._dcsParser.unhook(m!==24&&m!==26,l))return v;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(m=i[this._parseStack.chunkPos],v=this._oscParser.end(m!==24&&m!==26,l))return v;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var T=L;T<a;++T){switch(m=i[T],(E=this._transitions.table[this.currentState<<8|(m<160?m:h)])>>4){case 2:for(var k=T+1;;++k){if(k>=a||(m=i[k])<32||m>126&&m<h){this._printHandler(i,T,k),T=k-1;break}if(++k>=a||(m=i[k])<32||m>126&&m<h){this._printHandler(i,T,k),T=k-1;break}if(++k>=a||(m=i[k])<32||m>126&&m<h){this._printHandler(i,T,k),T=k-1;break}if(++k>=a||(m=i[k])<32||m>126&&m<h){this._printHandler(i,T,k),T=k-1;break}}break;case 3:this._executeHandlers[m]?this._executeHandlers[m]():this._executeHandlerFb(m),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:m,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var W=(b=this._csiHandlers[this._collect<<8|m])?b.length-1:-1;W>=0&&(v=b[W](this._params))!==!0;W--)if(v instanceof Promise)return this._preserveStack(3,b,W,E,T),v;W<0&&this._csiHandlerFb(this._collect<<8|m,this._params),this.precedingCodepoint=0;break;case 8:do switch(m){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(m-48)}while(++T<a&&(m=i[T])>47&&m<60);T--;break;case 9:this._collect<<=8,this._collect|=m;break;case 10:for(var D=this._escHandlers[this._collect<<8|m],A=D?D.length-1:-1;A>=0&&(v=D[A]())!==!0;A--)if(v instanceof Promise)return this._preserveStack(4,D,A,E,T),v;A<0&&this._escHandlerFb(this._collect<<8|m),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|m,this._params);break;case 13:for(var O=T+1;;++O)if(O>=a||(m=i[O])===24||m===26||m===27||m>127&&m<h){this._dcsParser.put(i,T,O),T=O-1;break}break;case 14:if(v=this._dcsParser.unhook(m!==24&&m!==26))return this._preserveStack(6,[],0,E,T),v;m===27&&(E|=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 H=T+1;;H++)if(H>=a||(m=i[H])<32||m>127&&m<h){this._oscParser.put(i,T,H),T=H-1;break}break;case 6:if(v=this._oscParser.end(m!==24&&m!==26))return this._preserveStack(5,[],0,E,T),v;m===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&E}},e}(_.Disposable);c.EscapeSequenceParser=s},6242:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;var f=y(5770),p=y(482),_=[],u=function(){function g(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return g.prototype.registerHandler=function(n,o){this._handlers[n]===void 0&&(this._handlers[n]=[]);var h=this._handlers[n];return h.push(o),{dispose:function(){var s=h.indexOf(o);s!==-1&&h.splice(s,1)}}},g.prototype.clearHandler=function(n){this._handlers[n]&&delete this._handlers[n]},g.prototype.setHandlerFallback=function(n){this._handlerFb=n},g.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=_},g.prototype.reset=function(){if(this._state===2)for(var n=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;n>=0;--n)this._active[n].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0},g.prototype._start=function(){if(this._active=this._handlers[this._id]||_,this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].start();else this._handlerFb(this._id,"START")},g.prototype._put=function(n,o,h){if(this._active.length)for(var s=this._active.length-1;s>=0;s--)this._active[s].put(n,o,h);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(n,o,h))},g.prototype.start=function(){this.reset(),this._state=1},g.prototype.put=function(n,o,h){if(this._state!==3){if(this._state===1)for(;o<h;){var s=n[o++];if(s===59){this._state=2,this._start();break}if(s<48||57<s)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+s-48}this._state===2&&h-o>0&&this._put(n,o,h)}},g.prototype.end=function(n,o){if(o===void 0&&(o=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var h=!1,s=this._active.length-1,t=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,h=o,t=this._stack.fallThrough,this._stack.paused=!1),!t&&h===!1){for(;s>=0&&(h=this._active[s].end(n))!==!0;s--)if(h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,h;s--}for(;s>=0;s--)if((h=this._active[s].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,h}else this._handlerFb(this._id,"END",n);this._active=_,this._id=-1,this._state=0}},g}();c.OscParser=u;var C=function(){function g(n){this._handler=n,this._data="",this._hitLimit=!1}return g.prototype.start=function(){this._data="",this._hitLimit=!1},g.prototype.put=function(n,o,h){this._hitLimit||(this._data+=(0,p.utf32ToString)(n,o,h),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},g.prototype.end=function(n){var o=this,h=!1;if(this._hitLimit)h=!1;else if(n&&(h=this._handler(this._data))instanceof Promise)return h.then(function(s){return o._data="",o._hitLimit=!1,s});return this._data="",this._hitLimit=!1,h},g}();c.OscHandler=C},8742:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;var y=2147483647,f=function(){function p(_,u){if(_===void 0&&(_=32),u===void 0&&(u=32),this.maxLength=_,this.maxSubParamsLength=u,u>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(u),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return p.fromArray=function(_){var u=new p;if(!_.length)return u;for(var C=Array.isArray(_[0])?1:0;C<_.length;++C){var g=_[C];if(Array.isArray(g))for(var n=0;n<g.length;++n)u.addSubParam(g[n]);else u.addParam(g)}return u},p.prototype.clone=function(){var _=new p(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_},p.prototype.toArray=function(){for(var _=[],u=0;u<this.length;++u){_.push(this.params[u]);var C=this._subParamsIdx[u]>>8,g=255&this._subParamsIdx[u];g-C>0&&_.push(Array.prototype.slice.call(this._subParams,C,g))}return _},p.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},p.prototype.addParam=function(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>y?y:_}},p.prototype.addSubParam=function(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>y?y:_,this._subParamsIdx[this.length-1]++}},p.prototype.hasSubParams=function(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0},p.prototype.getSubParams=function(_){var u=this._subParamsIdx[_]>>8,C=255&this._subParamsIdx[_];return C-u>0?this._subParams.subarray(u,C):null},p.prototype.getSubParamsAll=function(){for(var _={},u=0;u<this.length;++u){var C=this._subParamsIdx[u]>>8,g=255&this._subParamsIdx[u];g-C>0&&(_[u]=this._subParams.slice(C,g))}return _},p.prototype.addDigit=function(_){var u;if(!(this._rejectDigits||!(u=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var C=this._digitIsSub?this._subParams:this.params,g=C[u-1];C[u-1]=~g?Math.min(10*g+_,y):_}},p}();c.Params=f},5741:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0;var y=function(){function f(){this._addons=[]}return f.prototype.dispose=function(){for(var p=this._addons.length-1;p>=0;p--)this._addons[p].instance.dispose()},f.prototype.loadAddon=function(p,_){var u=this,C={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(C),_.dispose=function(){return u._wrappedAddonDispose(C)},_.activate(p)},f.prototype._wrappedAddonDispose=function(p){if(!p.isDisposed){for(var _=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===p){_=u;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");p.isDisposed=!0,p.dispose.apply(p.instance),this._addons.splice(_,1)}},f}();c.AddonManager=y},8771:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;var f=y(3785),p=y(511),_=function(){function u(C,g){this._buffer=C,this.type=g}return u.prototype.init=function(C){return this._buffer=C,this},Object.defineProperty(u.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),u.prototype.getLine=function(C){var g=this._buffer.lines.get(C);if(g)return new f.BufferLineApiView(g)},u.prototype.getNullCell=function(){return new p.CellData},u}();c.BufferApiView=_},3785:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;var f=y(511),p=function(){function _(u){this._line=u}return Object.defineProperty(_.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),_.prototype.getCell=function(u,C){if(!(u<0||u>=this._line.length))return C?(this._line.loadCell(u,C),C):this._line.loadCell(u,new f.CellData)},_.prototype.translateToString=function(u,C,g){return this._line.translateToString(u,C,g)},_}();c.BufferLineApiView=p},8285:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;var f=y(8771),p=y(8460),_=function(){function u(C){var g=this;this._core=C,this._onBufferChange=new p.EventEmitter,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return g._onBufferChange.fire(g.active)})}return Object.defineProperty(u.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.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(u.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),u}();c.BufferNamespaceApi=_},7975:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0;var y=function(){function f(p){this._core=p}return f.prototype.registerCsiHandler=function(p,_){return this._core.registerCsiHandler(p,function(u){return _(u.toArray())})},f.prototype.addCsiHandler=function(p,_){return this.registerCsiHandler(p,_)},f.prototype.registerDcsHandler=function(p,_){return this._core.registerDcsHandler(p,function(u,C){return _(u,C.toArray())})},f.prototype.addDcsHandler=function(p,_){return this.registerDcsHandler(p,_)},f.prototype.registerEscHandler=function(p,_){return this._core.registerEscHandler(p,_)},f.prototype.addEscHandler=function(p,_){return this.registerEscHandler(p,_)},f.prototype.registerOscHandler=function(p,_){return this._core.registerOscHandler(p,_)},f.prototype.addOscHandler=function(p,_){return this.registerOscHandler(p,_)},f}();c.ParserApi=y},7090:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0;var y=function(){function f(p){this._core=p}return f.prototype.register=function(p){this._core.unicodeService.register(p)},Object.defineProperty(f.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(p){this._core.unicodeService.activeVersion=p},enumerable:!1,configurable:!0}),f}();c.UnicodeApi=y},744:function(z,c,y){var f,p=this&&this.__extends||(f=function(s,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},f(s,t)},function(s,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=s}f(s,t),s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),_=this&&this.__decorate||function(s,t,e,i){var a,l=arguments.length,v=l<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,t,e,i);else for(var m=s.length-1;m>=0;m--)(a=s[m])&&(v=(l<3?a(v):l>3?a(t,e,v):a(t,e))||v);return l>3&&v&&Object.defineProperty(t,e,v),v},u=this&&this.__param||function(s,t){return function(e,i){t(e,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;var C=y(2585),g=y(5295),n=y(8460),o=y(844);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;var h=function(s){function t(e){var i=s.call(this)||this;return i._optionsService=e,i.isUserScrolling=!1,i._onResize=new n.EventEmitter,i._onScroll=new n.EventEmitter,i.cols=Math.max(e.options.cols||0,c.MINIMUM_COLS),i.rows=Math.max(e.options.rows||0,c.MINIMUM_ROWS),i.buffers=new g.BufferSet(e,i),i}return p(t,s),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(){s.prototype.dispose.call(this),this.buffers.dispose()},t.prototype.resize=function(e,i){this.cols=e,this.rows=i,this.buffers.resize(e,i),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:i})},t.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},t.prototype.scroll=function(e,i){i===void 0&&(i=!1);var a,l=this.buffer;(a=this._cachedBlankLine)&&a.length===this.cols&&a.getFg(0)===e.fg&&a.getBg(0)===e.bg||(a=l.getBlankLine(e,i),this._cachedBlankLine=a),a.isWrapped=i;var v=l.ybase+l.scrollTop,m=l.ybase+l.scrollBottom;if(l.scrollTop===0){var E=l.lines.isFull;m===l.lines.length-1?E?l.lines.recycle().copyFrom(a):l.lines.push(a.clone()):l.lines.splice(m+1,0,a.clone()),E?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{var L=m-v+1;l.lines.shiftElements(v+1,L-1,-1),l.lines.set(m,a.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)},t.prototype.scrollLines=function(e,i,a){var l=this.buffer;if(e<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else e+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);var v=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+e,l.ybase),0),v!==l.ydisp&&(i||this._onScroll.fire(l.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 i=e-this.buffer.ydisp;i!==0&&this.scrollLines(i)},_([u(0,C.IOptionsService)],t)}(o.Disposable);c.BufferService=h},7994:(z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0;var y=function(){function f(){this.glevel=0,this._charsets=[]}return f.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},f.prototype.setgLevel=function(p){this.glevel=p,this.charset=this._charsets[p]},f.prototype.setgCharset=function(p,_){this._charsets[p]=_,this.glevel===p&&(this.charset=_)},f}();c.CharsetService=y},1753:function(z,c,y){var f=this&&this.__decorate||function(s,t,e,i){var a,l=arguments.length,v=l<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,t,e,i);else for(var m=s.length-1;m>=0;m--)(a=s[m])&&(v=(l<3?a(v):l>3?a(t,e,v):a(t,e))||v);return l>3&&v&&Object.defineProperty(t,e,v),v},p=this&&this.__param||function(s,t){return function(e,i){t(e,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;var _=y(2585),u=y(8460),C={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(s){return s.button!==4&&s.action===1&&(s.ctrl=!1,s.alt=!1,s.shift=!1,!0)}},VT200:{events:19,restrict:function(s){return s.action!==32}},DRAG:{events:23,restrict:function(s){return s.action!==32||s.button!==3}},ANY:{events:31,restrict:function(s){return!0}}};function g(s,t){var e=(s.ctrl?16:0)|(s.shift?4:0)|(s.alt?8:0);return s.button===4?(e|=64,e|=s.action):(e|=3&s.button,4&s.button&&(e|=64),8&s.button&&(e|=128),s.action===32?e|=32:s.action!==0||t||(e|=3)),e}var n=String.fromCharCode,o={DEFAULT:function(s){var t=[g(s,!1)+32,s.col+32,s.row+32];return t[0]>255||t[1]>255||t[2]>255?"":"[M"+n(t[0])+n(t[1])+n(t[2])},SGR:function(s){var t=s.action===0&&s.button!==4?"m":"M";return"[<"+g(s,!0)+";"+s.col+";"+s.row+t}},h=function(){function s(t,e){this._bufferService=t,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new u.EventEmitter,this._lastEvent=null;for(var i=0,a=Object.keys(C);i<a.length;i++){var l=a[i];this.addProtocol(l,C[l])}for(var v=0,m=Object.keys(o);v<m.length;v++){var E=m[v];this.addEncoding(E,o[E])}this.reset()}return s.prototype.addProtocol=function(t,e){this._protocols[t]=e},s.prototype.addEncoding=function(t,e){this._encodings[t]=e},Object.defineProperty(s.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(s.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(s.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}),s.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(s.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),s.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},s.prototype.explainEvents=function(t){return{down:!!(1&t),up:!!(2&t),drag:!!(4&t),move:!!(8&t),wheel:!!(16&t)}},s.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},f([p(0,_.IBufferService),p(1,_.ICoreService)],s)}();c.CoreMouseService=h},6975:function(z,c,y){var f,p=this&&this.__extends||(f=function(e,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(a[v]=l[v])},f(e,i)},function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function a(){this.constructor=e}f(e,i),e.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}),_=this&&this.__decorate||function(e,i,a,l){var v,m=arguments.length,E=m<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(e,i,a,l);else for(var L=e.length-1;L>=0;L--)(v=e[L])&&(E=(m<3?v(E):m>3?v(i,a,E):v(i,a))||E);return m>3&&E&&Object.defineProperty(i,a,E),E},u=this&&this.__param||function(e,i){return function(a,l){i(a,l,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;var C=y(2585),g=y(8460),n=y(1439),o=y(844),h=Object.freeze({insertMode:!1}),s=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),t=function(e){function i(a,l,v,m){var E=e.call(this)||this;return E._bufferService=l,E._logService=v,E._optionsService=m,E.isCursorInitialized=!1,E.isCursorHidden=!1,E._onData=E.register(new g.EventEmitter),E._onUserInput=E.register(new g.EventEmitter),E._onBinary=E.register(new g.EventEmitter),E._scrollToBottom=a,E.register({dispose:function(){return E._scrollToBottom=void 0}}),E.modes=(0,n.clone)(h),E.decPrivateModes=(0,n.clone)(s),E}return p(i,e),Object.defineProperty(i.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),i.prototype.reset=function(){this.modes=(0,n.clone)(h),this.decPrivateModes=(0,n.clone)(s)},i.prototype.triggerDataEvent=function(a,l){if(l===void 0&&(l=!1),!this._optionsService.options.disableStdin){var v=this._bufferService.buffer;v.ybase!==v.ydisp&&this._scrollToBottom(),l&&this._onUserInput.fire(),this._logService.debug('sending data "'+a+'"',function(){return a.split("").map(function(m){return m.charCodeAt(0)})}),this._onData.fire(a)}},i.prototype.triggerBinaryEvent=function(a){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+a+'"',function(){return a.split("").map(function(l){return l.charCodeAt(0)})}),this._onBinary.fire(a))},_([u(1,C.IBufferService),u(2,C.ILogService),u(3,C.IOptionsService)],i)}(o.Disposable);c.CoreService=t},3730:function(z,c,y){var f=this&&this.__decorate||function(C,g,n,o){var h,s=arguments.length,t=s<3?g:o===null?o=Object.getOwnPropertyDescriptor(g,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(C,g,n,o);else for(var e=C.length-1;e>=0;e--)(h=C[e])&&(t=(s<3?h(t):s>3?h(g,n,t):h(g,n))||t);return s>3&&t&&Object.defineProperty(g,n,t),t},p=this&&this.__param||function(C,g){return function(n,o){g(n,o,C)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DirtyRowService=void 0;var _=y(2585),u=function(){function C(g){this._bufferService=g,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(g){g<this._start?this._start=g:g>this._end&&(this._end=g)},C.prototype.markRangeDirty=function(g,n){if(g>n){var o=g;g=n,n=o}g<this._start&&(this._start=g),n>this._end&&(this._end=n)},C.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},f([p(0,_.IBufferService)],C)}();c.DirtyRowService=u},4348:function(z,c,y){var f=this&&this.__spreadArray||function(g,n,o){if(o||arguments.length===2)for(var h,s=0,t=n.length;s<t;s++)!h&&s in n||(h||(h=Array.prototype.slice.call(n,0,s)),h[s]=n[s]);return g.concat(h||Array.prototype.slice.call(n))};Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;var p=y(2585),_=y(8343),u=function(){function g(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];this._entries=new Map;for(var h=0,s=n;h<s.length;h++){var t=s[h],e=t[0],i=t[1];this.set(e,i)}}return g.prototype.set=function(n,o){var h=this._entries.get(n);return this._entries.set(n,o),h},g.prototype.forEach=function(n){this._entries.forEach(function(o,h){return n(h,o)})},g.prototype.has=function(n){return this._entries.has(n)},g.prototype.get=function(n){return this._entries.get(n)},g}();c.ServiceCollection=u;var C=function(){function g(){this._services=new u,this._services.set(p.IInstantiationService,this)}return g.prototype.setService=function(n,o){this._services.set(n,o)},g.prototype.getService=function(n){return this._services.get(n)},g.prototype.createInstance=function(n){for(var o=[],h=1;h<arguments.length;h++)o[h-1]=arguments[h];for(var s=(0,_.getServiceDependencies)(n).sort(function(m,E){return m.index-E.index}),t=[],e=0,i=s;e<i.length;e++){var a=i[e],l=this._services.get(a.id);if(!l)throw new Error("[createInstance] "+n.name+" depends on UNKNOWN service "+a.id+".");t.push(l)}var v=s.length>0?s[0].index:o.length;if(o.length!==v)throw new Error("[createInstance] First service dependency of "+n.name+" at position "+(v+1)+" conflicts with "+o.length+" static arguments");return new(n.bind.apply(n,f([void 0],f(f([],o,!0),t,!0),!1)))},g}();c.InstantiationService=C},7866:function(z,c,y){var f=this&&this.__decorate||function(n,o,h,s){var t,e=arguments.length,i=e<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,h):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,o,h,s);else for(var a=n.length-1;a>=0;a--)(t=n[a])&&(i=(e<3?t(i):e>3?t(o,h,i):t(o,h))||i);return e>3&&i&&Object.defineProperty(o,h,i),i},p=this&&this.__param||function(n,o){return function(h,s){o(h,s,n)}},_=this&&this.__spreadArray||function(n,o,h){if(h||arguments.length===2)for(var s,t=0,e=o.length;t<e;t++)!s&&t in o||(s||(s=Array.prototype.slice.call(o,0,t)),s[t]=o[t]);return n.concat(s||Array.prototype.slice.call(o))};Object.defineProperty(c,"__esModule",{value:!0}),c.LogService=void 0;var u=y(2585),C={debug:u.LogLevelEnum.DEBUG,info:u.LogLevelEnum.INFO,warn:u.LogLevelEnum.WARN,error:u.LogLevelEnum.ERROR,off:u.LogLevelEnum.OFF},g=function(){function n(o){var h=this;this._optionsService=o,this.logLevel=u.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(s){s==="logLevel"&&h._updateLogLevel()})}return n.prototype._updateLogLevel=function(){this.logLevel=C[this._optionsService.options.logLevel]},n.prototype._evalLazyOptionalParams=function(o){for(var h=0;h<o.length;h++)typeof o[h]=="function"&&(o[h]=o[h]())},n.prototype._log=function(o,h,s){this._evalLazyOptionalParams(s),o.call.apply(o,_([console,"xterm.js: "+h],s,!1))},n.prototype.debug=function(o){for(var h=[],s=1;s<arguments.length;s++)h[s-1]=arguments[s];this.logLevel<=u.LogLevelEnum.DEBUG&&this._log(console.log,o,h)},n.prototype.info=function(o){for(var h=[],s=1;s<arguments.length;s++)h[s-1]=arguments[s];this.logLevel<=u.LogLevelEnum.INFO&&this._log(console.info,o,h)},n.prototype.warn=function(o){for(var h=[],s=1;s<arguments.length;s++)h[s-1]=arguments[s];this.logLevel<=u.LogLevelEnum.WARN&&this._log(console.warn,o,h)},n.prototype.error=function(o){for(var h=[],s=1;s<arguments.length;s++)h[s-1]=arguments[s];this.logLevel<=u.LogLevelEnum.ERROR&&this._log(console.error,o,h)},f([p(0,u.IOptionsService)],n)}();c.LogService=g},7302:function(z,c,y){var f=this&&this.__assign||function(){return f=Object.assign||function(g){for(var n,o=1,h=arguments.length;o<h;o++)for(var s in n=arguments[o])Object.prototype.hasOwnProperty.call(n,s)&&(g[s]=n[s]);return g},f.apply(this,arguments)};Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=c.DEFAULT_BELL_SOUND=void 0;var p=y(8460),_=y(6114);c.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",c.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:c.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:_.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1};var u=["normal","bold","100","200","300","400","500","600","700","800","900"],C=function(){function g(n){for(var o in this._onOptionChange=new p.EventEmitter,this._options=f({},c.DEFAULT_OPTIONS),n)if(o in this._options)try{var h=n[o];this._options[o]=this._sanitizeAndValidateOption(o,h)}catch(s){console.error(s)}this.options=this._setupOptions(this._options)}return Object.defineProperty(g.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),g.prototype._setupOptions=function(n){var o=this,h=f({},n),s=function(e){Object.defineProperty(h,e,{get:function(){if(!(e in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return o._options[e]},set:function(i){if(!(e in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');i=o._sanitizeAndValidateOption(e,i),o._options[e]!==i&&(o._options[e]=i,o._onOptionChange.fire(e))}})};for(var t in h)s(t);return h},g.prototype.setOption=function(n,o){this.options[n]=o},g.prototype._sanitizeAndValidateOption=function(n,o){switch(n){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":o||(o=c.DEFAULT_OPTIONS[n]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=u.includes(o)?o:c.DEFAULT_OPTIONS[n];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(n+" cannot be less than 1, value: "+o);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(n+" cannot be less than 0, value: "+o);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(n+" cannot be less than or equal to 0, value: "+o);case"rows":case"cols":if(!o&&o!==0)throw new Error(n+" must be numeric, value: "+o)}return o},g.prototype.getOption=function(n){return this.options[n]},g}();c.OptionsService=C},8343:(z,c)=>{function y(f,p,_){p.di$target===p?p.di$dependencies.push({id:f,index:_}):(p.di$dependencies=[{id:f,index:_}],p.di$target=p)}Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0,c.serviceRegistry=new Map,c.getServiceDependencies=function(f){return f.di$dependencies||[]},c.createDecorator=function(f){if(c.serviceRegistry.has(f))return c.serviceRegistry.get(f);var p=function(_,u,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");y(p,_,C)};return p.toString=function(){return f},c.serviceRegistry.set(f,p),p}},2585:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IUnicodeService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.IDirtyRowService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;var f,p=y(8343);c.IBufferService=(0,p.createDecorator)("BufferService"),c.ICoreMouseService=(0,p.createDecorator)("CoreMouseService"),c.ICoreService=(0,p.createDecorator)("CoreService"),c.ICharsetService=(0,p.createDecorator)("CharsetService"),c.IDirtyRowService=(0,p.createDecorator)("DirtyRowService"),c.IInstantiationService=(0,p.createDecorator)("InstantiationService"),(f=c.LogLevelEnum||(c.LogLevelEnum={}))[f.DEBUG=0]="DEBUG",f[f.INFO=1]="INFO",f[f.WARN=2]="WARN",f[f.ERROR=3]="ERROR",f[f.OFF=4]="OFF",c.ILogService=(0,p.createDecorator)("LogService"),c.IOptionsService=(0,p.createDecorator)("OptionsService"),c.IUnicodeService=(0,p.createDecorator)("UnicodeService")},1480:(z,c,y)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;var f=y(8460),p=y(225),_=function(){function u(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter;var C=new p.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}return Object.defineProperty(u.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(u.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}),u.prototype.register=function(C){this._providers[C.version]=C},u.prototype.wcwidth=function(C){return this._activeProvider.wcwidth(C)},u.prototype.getStringCellWidth=function(C){for(var g=0,n=C.length,o=0;o<n;++o){var h=C.charCodeAt(o);if(55296<=h&&h<=56319){if(++o>=n)return g+this.wcwidth(h);var s=C.charCodeAt(o);56320<=s&&s<=57343?h=1024*(h-55296)+s-56320+65536:g+=this.wcwidth(s)}g+=this.wcwidth(h)}return g},u}();c.UnicodeService=_}},J={};function ne(z){var c=J[z];if(c!==void 0)return c.exports;var y=J[z]={exports:{}};return Q[z].call(y.exports,y,y.exports,ne),y.exports}var ie={};return(()=>{var z=ie;Object.defineProperty(z,"__esModule",{value:!0}),z.Terminal=void 0;var c=ne(3236),y=ne(9042),f=ne(7975),p=ne(7090),_=ne(5741),u=ne(8285),C=["cols","rows"],g=function(){function n(o){var h=this;this._core=new c.Terminal(o),this._addonManager=new _.AddonManager,this._publicOptions={};var s=function(i){Object.defineProperty(t._publicOptions,i,{get:function(){return h._core.options[i]},set:function(a){h._checkReadonlyOptions(i),h._core.options[i]=a}})},t=this;for(var e in this._core.options)s(e)}return n.prototype._checkReadonlyOptions=function(o){if(C.includes(o))throw new Error('Option "'+o+'" can only be set in the constructor')},n.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(n.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new f.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"unicode",{get:function(){return this._checkProposedApi(),new p.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new u.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"modes",{get:function(){var o=this._core.coreService.decPrivateModes,h="none";switch(this._core.coreMouseService.activeProtocol){case"X10":h="x10";break;case"VT200":h="vt200";break;case"DRAG":h="drag";break;case"ANY":h="any"}return{applicationCursorKeysMode:o.applicationCursorKeys,applicationKeypadMode:o.applicationKeypad,bracketedPasteMode:o.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:h,originMode:o.origin,reverseWraparoundMode:o.reverseWraparound,sendFocusMode:o.sendFocus,wraparoundMode:o.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"options",{get:function(){return this._publicOptions},set:function(o){for(var h in o)this._publicOptions[h]=o[h]},enumerable:!1,configurable:!0}),n.prototype.blur=function(){this._core.blur()},n.prototype.focus=function(){this._core.focus()},n.prototype.resize=function(o,h){this._verifyIntegers(o,h),this._core.resize(o,h)},n.prototype.open=function(o){this._core.open(o)},n.prototype.attachCustomKeyEventHandler=function(o){this._core.attachCustomKeyEventHandler(o)},n.prototype.registerLinkMatcher=function(o,h,s){return this._checkProposedApi(),this._core.registerLinkMatcher(o,h,s)},n.prototype.deregisterLinkMatcher=function(o){this._checkProposedApi(),this._core.deregisterLinkMatcher(o)},n.prototype.registerLinkProvider=function(o){return this._checkProposedApi(),this._core.registerLinkProvider(o)},n.prototype.registerCharacterJoiner=function(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)},n.prototype.deregisterCharacterJoiner=function(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)},n.prototype.registerMarker=function(o){return this._checkProposedApi(),this._verifyIntegers(o),this._core.addMarker(o)},n.prototype.addMarker=function(o){return this.registerMarker(o)},n.prototype.hasSelection=function(){return this._core.hasSelection()},n.prototype.select=function(o,h,s){this._verifyIntegers(o,h,s),this._core.select(o,h,s)},n.prototype.getSelection=function(){return this._core.getSelection()},n.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},n.prototype.clearSelection=function(){this._core.clearSelection()},n.prototype.selectAll=function(){this._core.selectAll()},n.prototype.selectLines=function(o,h){this._verifyIntegers(o,h),this._core.selectLines(o,h)},n.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},n.prototype.scrollLines=function(o){this._verifyIntegers(o),this._core.scrollLines(o)},n.prototype.scrollPages=function(o){this._verifyIntegers(o),this._core.scrollPages(o)},n.prototype.scrollToTop=function(){this._core.scrollToTop()},n.prototype.scrollToBottom=function(){this._core.scrollToBottom()},n.prototype.scrollToLine=function(o){this._verifyIntegers(o),this._core.scrollToLine(o)},n.prototype.clear=function(){this._core.clear()},n.prototype.write=function(o,h){this._core.write(o,h)},n.prototype.writeUtf8=function(o,h){this._core.write(o,h)},n.prototype.writeln=function(o,h){this._core.write(o),this._core.write(`\r
`,h)},n.prototype.paste=function(o){this._core.paste(o)},n.prototype.getOption=function(o){return this._core.optionsService.getOption(o)},n.prototype.setOption=function(o,h){this._checkReadonlyOptions(o),this._core.optionsService.setOption(o,h)},n.prototype.refresh=function(o,h){this._verifyIntegers(o,h),this._core.refresh(o,h)},n.prototype.reset=function(){this._core.reset()},n.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},n.prototype.loadAddon=function(o){return this._addonManager.loadAddon(this,o)},Object.defineProperty(n,"strings",{get:function(){return y},enumerable:!1,configurable:!0}),n.prototype._verifyIntegers=function(){for(var o=[],h=0;h<arguments.length;h++)o[h]=arguments[h];for(var s=0,t=o;s<t.length;s++){var e=t[s];if(e===1/0||isNaN(e)||e%1!=0)throw new Error("This API only accepts integers")}},n}();z.Terminal=g})(),ie})()})});var Wn=Tr((mr,Br)=>{(function(Q,J){typeof mr=="object"&&typeof Br=="object"?Br.exports=J():typeof define=="function"&&define.amd?define([],J):typeof mr=="object"?mr.FitAddon=J():Q.FitAddon=J()})(self,function(){return(()=>{"use strict";var Q={775:(ne,ie)=>{Object.defineProperty(ie,"__esModule",{value:!0}),ie.FitAddon=void 0;var z=function(){function c(){}return c.prototype.activate=function(y){this._terminal=y},c.prototype.dispose=function(){},c.prototype.fit=function(){var y=this.proposeDimensions();if(y&&this._terminal){var f=this._terminal._core;this._terminal.rows===y.rows&&this._terminal.cols===y.cols||(f._renderService.clear(),this._terminal.resize(y.cols,y.rows))}},c.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var y=this._terminal._core;if(y._renderService.dimensions.actualCellWidth!==0&&y._renderService.dimensions.actualCellHeight!==0){var f=window.getComputedStyle(this._terminal.element.parentElement),p=parseInt(f.getPropertyValue("height")),_=Math.max(0,parseInt(f.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),C=p-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),g=_-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-y.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(g/y._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(C/y._renderService.dimensions.actualCellHeight))}}}},c}();ie.FitAddon=z}},J={};return function ne(ie){if(J[ie])return J[ie].exports;var z=J[ie]={exports:{}};return Q[ie](z,z.exports,ne),z.exports}(775)})()})});var Nn=Tr((Pr,Ir)=>{(function(Q,J){typeof Pr=="object"&&typeof Ir!="undefined"?Ir.exports=J():typeof define=="function"&&define.amd?define(J):(Q=typeof globalThis!="undefined"?globalThis:Q||self).bootstrap=J()})(Pr,function(){"use strict";let Q="transitionend",J=w=>{let r=w.getAttribute("data-bs-target");if(!r||r==="#"){let d=w.getAttribute("href");if(!d||!d.includes("#")&&!d.startsWith("."))return null;d.includes("#")&&!d.startsWith("#")&&(d=`#${d.split("#")[1]}`),r=d&&d!=="#"?d.trim():null}return r},ne=w=>{let r=J(w);return r&&document.querySelector(r)?r:null},ie=w=>{let r=J(w);return r?document.querySelector(r):null},z=w=>{w.dispatchEvent(new Event(Q))},c=w=>!(!w||typeof w!="object")&&(w.jquery!==void 0&&(w=w[0]),w.nodeType!==void 0),y=w=>c(w)?w.jquery?w[0]:w:typeof w=="string"&&w.length>0?document.querySelector(w):null,f=(w,r,d)=>{Object.keys(d).forEach(M=>{let P=d[M],F=r[M],N=F&&c(F)?"element":(X=F)==null?`${X}`:{}.toString.call(X).match(/\s([a-z]+)/i)[1].toLowerCase();var X;if(!new RegExp(P).test(N))throw new TypeError(`${w.toUpperCase()}: Option "${M}" provided type "${N}" but expected type "${P}".`)})},p=w=>!(!c(w)||w.getClientRects().length===0)&&getComputedStyle(w).getPropertyValue("visibility")==="visible",_=w=>!w||w.nodeType!==Node.ELEMENT_NODE||!!w.classList.contains("disabled")||(w.disabled!==void 0?w.disabled:w.hasAttribute("disabled")&&w.getAttribute("disabled")!=="false"),u=w=>{if(!document.documentElement.attachShadow)return null;if(typeof w.getRootNode=="function"){let r=w.getRootNode();return r instanceof ShadowRoot?r:null}return w instanceof ShadowRoot?w:w.parentNode?u(w.parentNode):null},C=()=>{},g=w=>{w.offsetHeight},n=()=>{let{jQuery:w}=window;return w&&!document.body.hasAttribute("data-bs-no-jquery")?w:null},o=[],h=()=>document.documentElement.dir==="rtl",s=w=>{var r;r=()=>{let d=n();if(d){let M=w.NAME,P=d.fn[M];d.fn[M]=w.jQueryInterface,d.fn[M].Constructor=w,d.fn[M].noConflict=()=>(d.fn[M]=P,w.jQueryInterface)}},document.readyState==="loading"?(o.length||document.addEventListener("DOMContentLoaded",()=>{o.forEach(d=>d())}),o.push(r)):r()},t=w=>{typeof w=="function"&&w()},e=(w,r,d=!0)=>{if(!d)return void t(w);let M=(N=>{if(!N)return 0;let{transitionDuration:X,transitionDelay:$}=window.getComputedStyle(N),te=Number.parseFloat(X),re=Number.parseFloat($);return te||re?(X=X.split(",")[0],$=$.split(",")[0],1e3*(Number.parseFloat(X)+Number.parseFloat($))):0})(r)+5,P=!1,F=({target:N})=>{N===r&&(P=!0,r.removeEventListener(Q,F),t(w))};r.addEventListener(Q,F),setTimeout(()=>{P||z(r)},M)},i=(w,r,d,M)=>{let P=w.indexOf(r);if(P===-1)return w[!d&&M?w.length-1:0];let F=w.length;return P+=d?1:-1,M&&(P=(P+F)%F),w[Math.max(0,Math.min(P,F-1))]},a=/[^.]*(?=\..*)\.|.*/,l=/\..*/,v=/::\d+$/,m={},E=1,L={mouseenter:"mouseover",mouseleave:"mouseout"},b=/^(mouseenter|mouseleave)/i,S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function T(w,r){return r&&`${r}::${E++}`||w.uidEvent||E++}function k(w){let r=T(w);return w.uidEvent=r,m[r]=m[r]||{},m[r]}function W(w,r,d=null){let M=Object.keys(w);for(let P=0,F=M.length;P<F;P++){let N=w[M[P]];if(N.originalHandler===r&&N.delegationSelector===d)return N}return null}function D(w,r,d){let M=typeof r=="string",P=M?d:r,F=H(w);return S.has(F)||(F=w),[M,P,F]}function A(w,r,d,M,P){if(typeof r!="string"||!w)return;if(d||(d=M,M=null),b.test(r)){let ae=ce=>function(fe){if(!fe.relatedTarget||fe.relatedTarget!==fe.delegateTarget&&!fe.delegateTarget.contains(fe.relatedTarget))return ce.call(this,fe)};M?M=ae(M):d=ae(d)}let[F,N,X]=D(r,d,M),$=k(w),te=$[X]||($[X]={}),re=W(te,N,F?d:null);if(re)return void(re.oneOff=re.oneOff&&P);let Z=T(N,r.replace(a,"")),_e=F?function(ae,ce,fe){return function ue(Se){let ge=ae.querySelectorAll(ce);for(let{target:de}=Se;de&&de!==this;de=de.parentNode)for(let me=ge.length;me--;)if(ge[me]===de)return Se.delegateTarget=de,ue.oneOff&&R.off(ae,Se.type,ce,fe),fe.apply(de,[Se]);return null}}(w,d,M):function(ae,ce){return function fe(ue){return ue.delegateTarget=ae,fe.oneOff&&R.off(ae,ue.type,ce),ce.apply(ae,[ue])}}(w,d);_e.delegationSelector=F?d:null,_e.originalHandler=N,_e.oneOff=P,_e.uidEvent=Z,te[Z]=_e,w.addEventListener(X,_e,F)}function O(w,r,d,M,P){let F=W(r[d],M,P);F&&(w.removeEventListener(d,F,Boolean(P)),delete r[d][F.uidEvent])}function H(w){return w=w.replace(l,""),L[w]||w}let R={on(w,r,d,M){A(w,r,d,M,!1)},one(w,r,d,M){A(w,r,d,M,!0)},off(w,r,d,M){if(typeof r!="string"||!w)return;let[P,F,N]=D(r,d,M),X=N!==r,$=k(w),te=r.startsWith(".");if(F!==void 0)return!$||!$[N]?void 0:void O(w,$,N,F,P?d:null);te&&Object.keys($).forEach(Z=>{(function(_e,ae,ce,fe){let ue=ae[ce]||{};Object.keys(ue).forEach(Se=>{if(Se.includes(fe)){let ge=ue[Se];O(_e,ae,ce,ge.originalHandler,ge.delegationSelector)}})})(w,$,Z,r.slice(1))});let re=$[N]||{};Object.keys(re).forEach(Z=>{let _e=Z.replace(v,"");if(!X||r.includes(_e)){let ae=re[Z];O(w,$,N,ae.originalHandler,ae.delegationSelector)}})},trigger(w,r,d){if(typeof r!="string"||!w)return null;let M=n(),P=H(r),F=r!==P,N=S.has(P),X,$=!0,te=!0,re=!1,Z=null;return F&&M&&(X=M.Event(r,d),M(w).trigger(X),$=!X.isPropagationStopped(),te=!X.isImmediatePropagationStopped(),re=X.isDefaultPrevented()),N?(Z=document.createEvent("HTMLEvents"),Z.initEvent(P,$,!0)):Z=new CustomEvent(r,{bubbles:$,cancelable:!0}),d!==void 0&&Object.keys(d).forEach(_e=>{Object.defineProperty(Z,_e,{get:()=>d[_e]})}),re&&Z.preventDefault(),te&&w.dispatchEvent(Z),Z.defaultPrevented&&X!==void 0&&X.preventDefault(),Z}},G=new Map,Y={set(w,r,d){G.has(w)||G.set(w,new Map);let M=G.get(w);M.has(r)||M.size===0?M.set(r,d):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(M.keys())[0]}.`)},get:(w,r)=>G.has(w)&&G.get(w).get(r)||null,remove(w,r){if(!G.has(w))return;let d=G.get(w);d.delete(r),d.size===0&&G.delete(w)}};class oe{constructor(r){(r=y(r))&&(this._element=r,Y.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Y.remove(this._element,this.constructor.DATA_KEY),R.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(r=>{this[r]=null})}_queueCallback(r,d,M=!0){e(r,d,M)}static getInstance(r){return Y.get(y(r),this.DATA_KEY)}static getOrCreateInstance(r,d={}){return this.getInstance(r)||new this(r,typeof d=="object"?d:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}let le=(w,r="hide")=>{let d=`click.dismiss${w.EVENT_KEY}`,M=w.NAME;R.on(document,d,`[data-bs-dismiss="${M}"]`,function(P){if(["A","AREA"].includes(this.tagName)&&P.preventDefault(),_(this))return;let F=ie(this)||this.closest(`.${M}`);w.getOrCreateInstance(F)[r]()})};class he extends oe{static get NAME(){return"alert"}close(){if(R.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");let r=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,r)}_destroyElement(){this._element.remove(),R.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(r){return this.each(function(){let d=he.getOrCreateInstance(this);if(typeof r=="string"){if(d[r]===void 0||r.startsWith("_")||r==="constructor")throw new TypeError(`No method named "${r}"`);d[r](this)}})}}le(he,"close"),s(he);let x='[data-bs-toggle="button"]';class B extends oe{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(r){return this.each(function(){let d=B.getOrCreateInstance(this);r==="toggle"&&d[r]()})}}function I(w){return w==="true"||w!=="false"&&(w===Number(w).toString()?Number(w):w===""||w==="null"?null:w)}function K(w){return w.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}R.on(document,"click.bs.button.data-api",x,w=>{w.preventDefault();let r=w.target.closest(x);B.getOrCreateInstance(r).toggle()}),s(B);let j={setDataAttribute(w,r,d){w.setAttribute(`data-bs-${K(r)}`,d)},removeDataAttribute(w,r){w.removeAttribute(`data-bs-${K(r)}`)},getDataAttributes(w){if(!w)return{};let r={};return Object.keys(w.dataset).filter(d=>d.startsWith("bs")).forEach(d=>{let M=d.replace(/^bs/,"");M=M.charAt(0).toLowerCase()+M.slice(1,M.length),r[M]=I(w.dataset[d])}),r},getDataAttribute:(w,r)=>I(w.getAttribute(`data-bs-${K(r)}`)),offset(w){let r=w.getBoundingClientRect();return{top:r.top+window.pageYOffset,left:r.left+window.pageXOffset}},position:w=>({top:w.offsetTop,left:w.offsetLeft})},V={find:(w,r=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(r,w)),findOne:(w,r=document.documentElement)=>Element.prototype.querySelector.call(r,w),children:(w,r)=>[].concat(...w.children).filter(d=>d.matches(r)),parents(w,r){let d=[],M=w.parentNode;for(;M&&M.nodeType===Node.ELEMENT_NODE&&M.nodeType!==3;)M.matches(r)&&d.push(M),M=M.parentNode;return d},prev(w,r){let d=w.previousElementSibling;for(;d;){if(d.matches(r))return[d];d=d.previousElementSibling}return[]},next(w,r){let d=w.nextElementSibling;for(;d;){if(d.matches(r))return[d];d=d.nextElementSibling}return[]},focusableChildren(w){let r=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(d=>`${d}:not([tabindex^="-"])`).join(", ");return this.find(r,w).filter(d=>!_(d)&&p(d))}},se="carousel",Ce={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},ke={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Ee="next",ee="prev",Le="left",Be="right",at={ArrowLeft:Be,ArrowRight:Le},Lt="slid.bs.carousel",ft="active",jt=".active.carousel-item";class Ye extends oe{constructor(r,d){super(r),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(d),this._indicatorsElement=V.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Ce}static get NAME(){return se}next(){this._slide(Ee)}nextWhenVisible(){!document.hidden&&p(this._element)&&this.next()}prev(){this._slide(ee)}pause(r){r||(this._isPaused=!0),V.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(z(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(r){r||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(r){this._activeElement=V.findOne(jt,this._element);let d=this._getItemIndex(this._activeElement);if(r>this._items.length-1||r<0)return;if(this._isSliding)return void R.one(this._element,Lt,()=>this.to(r));if(d===r)return this.pause(),void this.cycle();let M=r>d?Ee:ee;this._slide(M,this._items[r])}_getConfig(r){return r={...Ce,...j.getDataAttributes(this._element),...typeof r=="object"?r:{}},f(se,r,ke),r}_handleSwipe(){let r=Math.abs(this.touchDeltaX);if(r<=40)return;let d=r/this.touchDeltaX;this.touchDeltaX=0,d&&this._slide(d>0?Be:Le)}_addEventListeners(){this._config.keyboard&&R.on(this._element,"keydown.bs.carousel",r=>this._keydown(r)),this._config.pause==="hover"&&(R.on(this._element,"mouseenter.bs.carousel",r=>this.pause(r)),R.on(this._element,"mouseleave.bs.carousel",r=>this.cycle(r))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){let r=F=>this._pointerEvent&&(F.pointerType==="pen"||F.pointerType==="touch"),d=F=>{r(F)?this.touchStartX=F.clientX:this._pointerEvent||(this.touchStartX=F.touches[0].clientX)},M=F=>{this.touchDeltaX=F.touches&&F.touches.length>1?0:F.touches[0].clientX-this.touchStartX},P=F=>{r(F)&&(this.touchDeltaX=F.clientX-this.touchStartX),this._handleSwipe(),this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(N=>this.cycle(N),500+this._config.interval))};V.find(".carousel-item img",this._element).forEach(F=>{R.on(F,"dragstart.bs.carousel",N=>N.preventDefault())}),this._pointerEvent?(R.on(this._element,"pointerdown.bs.carousel",F=>d(F)),R.on(this._element,"pointerup.bs.carousel",F=>P(F)),this._element.classList.add("pointer-event")):(R.on(this._element,"touchstart.bs.carousel",F=>d(F)),R.on(this._element,"touchmove.bs.carousel",F=>M(F)),R.on(this._element,"touchend.bs.carousel",F=>P(F)))}_keydown(r){if(/input|textarea/i.test(r.target.tagName))return;let d=at[r.key];d&&(r.preventDefault(),this._slide(d))}_getItemIndex(r){return this._items=r&&r.parentNode?V.find(".carousel-item",r.parentNode):[],this._items.indexOf(r)}_getItemByOrder(r,d){let M=r===Ee;return i(this._items,d,M,this._config.wrap)}_triggerSlideEvent(r,d){let M=this._getItemIndex(r),P=this._getItemIndex(V.findOne(jt,this._element));return R.trigger(this._element,"slide.bs.carousel",{relatedTarget:r,direction:d,from:P,to:M})}_setActiveIndicatorElement(r){if(this._indicatorsElement){let d=V.findOne(".active",this._indicatorsElement);d.classList.remove(ft),d.removeAttribute("aria-current");let M=V.find("[data-bs-target]",this._indicatorsElement);for(let P=0;P<M.length;P++)if(Number.parseInt(M[P].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(r)){M[P].classList.add(ft),M[P].setAttribute("aria-current","true");break}}}_updateInterval(){let r=this._activeElement||V.findOne(jt,this._element);if(!r)return;let d=Number.parseInt(r.getAttribute("data-bs-interval"),10);d?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=d):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(r,d){let M=this._directionToOrder(r),P=V.findOne(jt,this._element),F=this._getItemIndex(P),N=d||this._getItemByOrder(M,P),X=this._getItemIndex(N),$=Boolean(this._interval),te=M===Ee,re=te?"carousel-item-start":"carousel-item-end",Z=te?"carousel-item-next":"carousel-item-prev",_e=this._orderToDirection(M);if(N&&N.classList.contains(ft))return void(this._isSliding=!1);if(this._isSliding||this._triggerSlideEvent(N,_e).defaultPrevented||!P||!N)return;this._isSliding=!0,$&&this.pause(),this._setActiveIndicatorElement(N),this._activeElement=N;let ae=()=>{R.trigger(this._element,Lt,{relatedTarget:N,direction:_e,from:F,to:X})};if(this._element.classList.contains("slide")){N.classList.add(Z),g(N),P.classList.add(re),N.classList.add(re);let ce=()=>{N.classList.remove(re,Z),N.classList.add(ft),P.classList.remove(ft,Z,re),this._isSliding=!1,setTimeout(ae,0)};this._queueCallback(ce,P,!0)}else P.classList.remove(ft),N.classList.add(ft),this._isSliding=!1,ae();$&&this.cycle()}_directionToOrder(r){return[Be,Le].includes(r)?h()?r===Le?ee:Ee:r===Le?Ee:ee:r}_orderToDirection(r){return[Ee,ee].includes(r)?h()?r===ee?Le:Be:r===ee?Be:Le:r}static carouselInterface(r,d){let M=Ye.getOrCreateInstance(r,d),{_config:P}=M;typeof d=="object"&&(P={...P,...d});let F=typeof d=="string"?d:P.slide;if(typeof d=="number")M.to(d);else if(typeof F=="string"){if(M[F]===void 0)throw new TypeError(`No method named "${F}"`);M[F]()}else P.interval&&P.ride&&(M.pause(),M.cycle())}static jQueryInterface(r){return this.each(function(){Ye.carouselInterface(this,r)})}static dataApiClickHandler(r){let d=ie(this);if(!d||!d.classList.contains("carousel"))return;let M={...j.getDataAttributes(d),...j.getDataAttributes(this)},P=this.getAttribute("data-bs-slide-to");P&&(M.interval=!1),Ye.carouselInterface(d,M),P&&Ye.getInstance(d).to(P),r.preventDefault()}}R.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",Ye.dataApiClickHandler),R.on(window,"load.bs.carousel.data-api",()=>{let w=V.find('[data-bs-ride="carousel"]');for(let r=0,d=w.length;r<d;r++)Ye.carouselInterface(w[r],Ye.getInstance(w[r]))}),s(Ye);let Bi="collapse",Pi={toggle:!0,parent:null},Xi={toggle:"boolean",parent:"(null|element)"},ei="show",Ft="collapse",Wt="collapsing",Ii="collapsed",Hi=":scope .collapse .collapse",ti='[data-bs-toggle="collapse"]';class dt extends oe{constructor(r,d){super(r),this._isTransitioning=!1,this._config=this._getConfig(d),this._triggerArray=[];let M=V.find(ti);for(let P=0,F=M.length;P<F;P++){let N=M[P],X=ne(N),$=V.find(X).filter(te=>te===this._element);X!==null&&$.length&&(this._selector=X,this._triggerArray.push(N))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Pi}static get NAME(){return Bi}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let r,d=[];if(this._config.parent){let N=V.find(Hi,this._config.parent);d=V.find(".collapse.show, .collapse.collapsing",this._config.parent).filter(X=>!N.includes(X))}let M=V.findOne(this._selector);if(d.length){let N=d.find(X=>M!==X);if(r=N?dt.getInstance(N):null,r&&r._isTransitioning)return}if(R.trigger(this._element,"show.bs.collapse").defaultPrevented)return;d.forEach(N=>{M!==N&&dt.getOrCreateInstance(N,{toggle:!1}).hide(),r||Y.set(N,"bs.collapse",null)});let P=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(Wt),this._element.style[P]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let F=`scroll${P[0].toUpperCase()+P.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(Ft,ei),this._element.style[P]="",R.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[P]=`${this._element[F]}px`}hide(){if(this._isTransitioning||!this._isShown()||R.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,g(this._element),this._element.classList.add(Wt),this._element.classList.remove(Ft,ei);let d=this._triggerArray.length;for(let M=0;M<d;M++){let P=this._triggerArray[M],F=ie(P);F&&!this._isShown(F)&&this._addAriaAndCollapsedClass([P],!1)}this._isTransitioning=!0,this._element.style[r]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(Ft),R.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}_isShown(r=this._element){return r.classList.contains(ei)}_getConfig(r){return(r={...Pi,...j.getDataAttributes(this._element),...r}).toggle=Boolean(r.toggle),r.parent=y(r.parent),f(Bi,r,Xi),r}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;let r=V.find(Hi,this._config.parent);V.find(ti,this._config.parent).filter(d=>!r.includes(d)).forEach(d=>{let M=ie(d);M&&this._addAriaAndCollapsedClass([d],this._isShown(M))})}_addAriaAndCollapsedClass(r,d){r.length&&r.forEach(M=>{d?M.classList.remove(Ii):M.classList.add(Ii),M.setAttribute("aria-expanded",d)})}static jQueryInterface(r){return this.each(function(){let d={};typeof r=="string"&&/show|hide/.test(r)&&(d.toggle=!1);let M=dt.getOrCreateInstance(this,d);if(typeof r=="string"){if(M[r]===void 0)throw new TypeError(`No method named "${r}"`);M[r]()}})}}R.on(document,"click.bs.collapse.data-api",ti,function(w){(w.target.tagName==="A"||w.delegateTarget&&w.delegateTarget.tagName==="A")&&w.preventDefault();let r=ne(this);V.find(r).forEach(d=>{dt.getOrCreateInstance(d,{toggle:!1}).toggle()})}),s(dt);var Re="top",Pe="bottom",Ie="right",De="left",Et="auto",_t=[Re,Pe,Ie,De],ct="start",pt="end",ii="clippingParents",Nt="viewport",vt="popper",ri="reference",qt=_t.reduce(function(w,r){return w.concat([r+"-"+ct,r+"-"+pt])},[]),Ut=[].concat(_t,[Et]).reduce(function(w,r){return w.concat([r,r+"-"+ct,r+"-"+pt])},[]),ni="beforeRead",oi="read",si="afterRead",ai="beforeMain",ci="main",li="afterMain",hi="beforeWrite",ui="write",fi="afterWrite",di=[ni,oi,si,ai,ci,li,hi,ui,fi];function Ue(w){return w?(w.nodeName||"").toLowerCase():null}function Fe(w){if(w==null)return window;if(w.toString()!=="[object Window]"){var r=w.ownerDocument;return r&&r.defaultView||window}return w}function yt(w){return w instanceof Fe(w).Element||w instanceof Element}function He(w){return w instanceof Fe(w).HTMLElement||w instanceof HTMLElement}function _i(w){return typeof ShadowRoot!="undefined"&&(w instanceof Fe(w).ShadowRoot||w instanceof ShadowRoot)}let zt={name:"applyStyles",enabled:!0,phase:"write",fn:function(w){var r=w.state;Object.keys(r.elements).forEach(function(d){var M=r.styles[d]||{},P=r.attributes[d]||{},F=r.elements[d];He(F)&&Ue(F)&&(Object.assign(F.style,M),Object.keys(P).forEach(function(N){var X=P[N];X===!1?F.removeAttribute(N):F.setAttribute(N,X===!0?"":X)}))})},effect:function(w){var r=w.state,d={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(r.elements.popper.style,d.popper),r.styles=d,r.elements.arrow&&Object.assign(r.elements.arrow.style,d.arrow),function(){Object.keys(r.elements).forEach(function(M){var P=r.elements[M],F=r.attributes[M]||{},N=Object.keys(r.styles.hasOwnProperty(M)?r.styles[M]:d[M]).reduce(function(X,$){return X[$]="",X},{});He(P)&&Ue(P)&&(Object.assign(P.style,N),Object.keys(F).forEach(function(X){P.removeAttribute(X)}))})}},requires:["computeStyles"]};function ze(w){return w.split("-")[0]}function gt(w,r){var d=w.getBoundingClientRect();return{width:d.width/1,height:d.height/1,top:d.top/1,right:d.right/1,bottom:d.bottom/1,left:d.left/1,x:d.left/1,y:d.top/1}}function Kt(w){var r=gt(w),d=w.offsetWidth,M=w.offsetHeight;return Math.abs(r.width-d)<=1&&(d=r.width),Math.abs(r.height-M)<=1&&(M=r.height),{x:w.offsetLeft,y:w.offsetTop,width:d,height:M}}function pi(w,r){var d=r.getRootNode&&r.getRootNode();if(w.contains(r))return!0;if(d&&_i(d)){var M=r;do{if(M&&w.isSameNode(M))return!0;M=M.parentNode||M.host}while(M)}return!1}function $e(w){return Fe(w).getComputedStyle(w)}function ji(w){return["table","td","th"].indexOf(Ue(w))>=0}function tt(w){return((yt(w)?w.ownerDocument:w.document)||window.document).documentElement}function At(w){return Ue(w)==="html"?w:w.assignedSlot||w.parentNode||(_i(w)?w.host:null)||tt(w)}function vi(w){return He(w)&&$e(w).position!=="fixed"?w.offsetParent:null}function bt(w){for(var r=Fe(w),d=vi(w);d&&ji(d)&&$e(d).position==="static";)d=vi(d);return d&&(Ue(d)==="html"||Ue(d)==="body"&&$e(d).position==="static")?r:d||function(M){var P=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&He(M)&&$e(M).position==="fixed")return null;for(var F=At(M);He(F)&&["html","body"].indexOf(Ue(F))<0;){var N=$e(F);if(N.transform!=="none"||N.perspective!=="none"||N.contain==="paint"||["transform","perspective"].indexOf(N.willChange)!==-1||P&&N.willChange==="filter"||P&&N.filter&&N.filter!=="none")return F;F=F.parentNode}return null}(w)||r}function Vt(w){return["top","bottom"].indexOf(w)>=0?"x":"y"}var it=Math.max,Ct=Math.min,xt=Math.round;function kt(w,r,d){return it(w,Ct(r,d))}function gi(w){return Object.assign({},{top:0,right:0,bottom:0,left:0},w)}function mi(w,r){return r.reduce(function(d,M){return d[M]=w,d},{})}let yi={name:"arrow",enabled:!0,phase:"main",fn:function(w){var r,d=w.state,M=w.name,P=w.options,F=d.elements.arrow,N=d.modifiersData.popperOffsets,X=ze(d.placement),$=Vt(X),te=[De,Ie].indexOf(X)>=0?"height":"width";if(F&&N){var re=function(be,we){return gi(typeof(be=typeof be=="function"?be(Object.assign({},we.rects,{placement:we.placement})):be)!="number"?be:mi(be,_t))}(P.padding,d),Z=Kt(F),_e=$==="y"?Re:De,ae=$==="y"?Pe:Ie,ce=d.rects.reference[te]+d.rects.reference[$]-N[$]-d.rects.popper[te],fe=N[$]-d.rects.reference[$],ue=bt(F),Se=ue?$==="y"?ue.clientHeight||0:ue.clientWidth||0:0,ge=ce/2-fe/2,de=re[_e],me=Se-Z[te]-re[ae],pe=Se/2-Z[te]/2+ge,ve=kt(de,pe,me),ye=$;d.modifiersData[M]=((r={})[ye]=ve,r.centerOffset=ve-pe,r)}},effect:function(w){var r=w.state,d=w.options.element,M=d===void 0?"[data-popper-arrow]":d;M!=null&&(typeof M!="string"||(M=r.elements.popper.querySelector(M)))&&pi(r.elements.popper,M)&&(r.elements.arrow=M)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mt(w){return w.split("-")[1]}var Fi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wi(w){var r,d=w.popper,M=w.popperRect,P=w.placement,F=w.variation,N=w.offsets,X=w.position,$=w.gpuAcceleration,te=w.adaptive,re=w.roundOffsets,Z=re===!0?function(Ne){var Ge=Ne.x,ht=Ne.y,Te=window.devicePixelRatio||1;return{x:xt(xt(Ge*Te)/Te)||0,y:xt(xt(ht*Te)/Te)||0}}(N):typeof re=="function"?re(N):N,_e=Z.x,ae=_e===void 0?0:_e,ce=Z.y,fe=ce===void 0?0:ce,ue=N.hasOwnProperty("x"),Se=N.hasOwnProperty("y"),ge=De,de=Re,me=window;if(te){var pe=bt(d),ve="clientHeight",ye="clientWidth";pe===Fe(d)&&$e(pe=tt(d)).position!=="static"&&X==="absolute"&&(ve="scrollHeight",ye="scrollWidth"),pe=pe,P!==Re&&(P!==De&&P!==Ie||F!==pt)||(de=Pe,fe-=pe[ve]-M.height,fe*=$?1:-1),P!==De&&(P!==Re&&P!==Pe||F!==pt)||(ge=Ie,ae-=pe[ye]-M.width,ae*=$?1:-1)}var be,we=Object.assign({position:X},te&&Fi);return $?Object.assign({},we,((be={})[de]=Se?"0":"",be[ge]=ue?"0":"",be.transform=(me.devicePixelRatio||1)<=1?"translate("+ae+"px, "+fe+"px)":"translate3d("+ae+"px, "+fe+"px, 0)",be)):Object.assign({},we,((r={})[de]=Se?fe+"px":"",r[ge]=ue?ae+"px":"",r.transform="",r))}let bi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(w){var r=w.state,d=w.options,M=d.gpuAcceleration,P=M===void 0||M,F=d.adaptive,N=F===void 0||F,X=d.roundOffsets,$=X===void 0||X,te={placement:ze(r.placement),variation:mt(r.placement),popper:r.elements.popper,popperRect:r.rects.popper,gpuAcceleration:P};r.modifiersData.popperOffsets!=null&&(r.styles.popper=Object.assign({},r.styles.popper,Wi(Object.assign({},te,{offsets:r.modifiersData.popperOffsets,position:r.options.strategy,adaptive:N,roundOffsets:$})))),r.modifiersData.arrow!=null&&(r.styles.arrow=Object.assign({},r.styles.arrow,Wi(Object.assign({},te,{offsets:r.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:$})))),r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-placement":r.placement})},data:{}};var Gt={passive:!0};let Ci={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(w){var r=w.state,d=w.instance,M=w.options,P=M.scroll,F=P===void 0||P,N=M.resize,X=N===void 0||N,$=Fe(r.elements.popper),te=[].concat(r.scrollParents.reference,r.scrollParents.popper);return F&&te.forEach(function(re){re.addEventListener("scroll",d.update,Gt)}),X&&$.addEventListener("resize",d.update,Gt),function(){F&&te.forEach(function(re){re.removeEventListener("scroll",d.update,Gt)}),X&&$.removeEventListener("resize",d.update,Gt)}},data:{}};var Yi={left:"right",right:"left",bottom:"top",top:"bottom"};function Xt(w){return w.replace(/left|right|bottom|top/g,function(r){return Yi[r]})}var $i={start:"end",end:"start"};function Ni(w){return w.replace(/start|end/g,function(r){return $i[r]})}function Si(w){var r=Fe(w);return{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function wi(w){return gt(tt(w)).left+Si(w).scrollLeft}function Li(w){var r=$e(w),d=r.overflow,M=r.overflowX,P=r.overflowY;return/auto|scroll|overlay|hidden/.test(d+P+M)}function qi(w){return["html","body","#document"].indexOf(Ue(w))>=0?w.ownerDocument.body:He(w)&&Li(w)?w:qi(At(w))}function Mt(w,r){var d;r===void 0&&(r=[]);var M=qi(w),P=M===((d=w.ownerDocument)==null?void 0:d.body),F=Fe(M),N=P?[F].concat(F.visualViewport||[],Li(M)?M:[]):M,X=r.concat(N);return P?X:X.concat(Mt(At(N)))}function Ei(w){return Object.assign({},w,{left:w.x,top:w.y,right:w.x+w.width,bottom:w.y+w.height})}function Ui(w,r){return r===Nt?Ei(function(d){var M=Fe(d),P=tt(d),F=M.visualViewport,N=P.clientWidth,X=P.clientHeight,$=0,te=0;return F&&(N=F.width,X=F.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||($=F.offsetLeft,te=F.offsetTop)),{width:N,height:X,x:$+wi(d),y:te}}(w)):He(r)?function(d){var M=gt(d);return M.top=M.top+d.clientTop,M.left=M.left+d.clientLeft,M.bottom=M.top+d.clientHeight,M.right=M.left+d.clientWidth,M.width=d.clientWidth,M.height=d.clientHeight,M.x=M.left,M.y=M.top,M}(r):Ei(function(d){var M,P=tt(d),F=Si(d),N=(M=d.ownerDocument)==null?void 0:M.body,X=it(P.scrollWidth,P.clientWidth,N?N.scrollWidth:0,N?N.clientWidth:0),$=it(P.scrollHeight,P.clientHeight,N?N.scrollHeight:0,N?N.clientHeight:0),te=-F.scrollLeft+wi(d),re=-F.scrollTop;return $e(N||P).direction==="rtl"&&(te+=it(P.clientWidth,N?N.clientWidth:0)-X),{width:X,height:$,x:te,y:re}}(tt(w)))}function zi(w){var r,d=w.reference,M=w.element,P=w.placement,F=P?ze(P):null,N=P?mt(P):null,X=d.x+d.width/2-M.width/2,$=d.y+d.height/2-M.height/2;switch(F){case Re:r={x:X,y:d.y-M.height};break;case Pe:r={x:X,y:d.y+d.height};break;case Ie:r={x:d.x+d.width,y:$};break;case De:r={x:d.x-M.width,y:$};break;default:r={x:d.x,y:d.y}}var te=F?Vt(F):null;if(te!=null){var re=te==="y"?"height":"width";switch(N){case ct:r[te]=r[te]-(d[re]/2-M[re]/2);break;case pt:r[te]=r[te]+(d[re]/2-M[re]/2)}}return r}function Tt(w,r){r===void 0&&(r={});var d=r,M=d.placement,P=M===void 0?w.placement:M,F=d.boundary,N=F===void 0?ii:F,X=d.rootBoundary,$=X===void 0?Nt:X,te=d.elementContext,re=te===void 0?vt:te,Z=d.altBoundary,_e=Z!==void 0&&Z,ae=d.padding,ce=ae===void 0?0:ae,fe=gi(typeof ce!="number"?ce:mi(ce,_t)),ue=re===vt?ri:vt,Se=w.rects.popper,ge=w.elements[_e?ue:re],de=function(Ge,ht,Te){var Oi=ht==="clippingParents"?function(xe){var Ri=Mt(At(xe)),et=["absolute","fixed"].indexOf($e(xe).position)>=0&&He(xe)?bt(xe):xe;return yt(et)?Ri.filter(function(Xe){return yt(Xe)&&pi(Xe,et)&&Ue(Xe)!=="body"}):[]}(Ge):[].concat(ht),It=[].concat(Oi,[Te]),Ht=It[0],qe=It.reduce(function(xe,Ri){var et=Ui(Ge,Ri);return xe.top=it(et.top,xe.top),xe.right=Ct(et.right,xe.right),xe.bottom=Ct(et.bottom,xe.bottom),xe.left=it(et.left,xe.left),xe},Ui(Ge,Ht));return qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top,qe.x=qe.left,qe.y=qe.top,qe}(yt(ge)?ge:ge.contextElement||tt(w.elements.popper),N,$),me=gt(w.elements.reference),pe=zi({reference:me,element:Se,strategy:"absolute",placement:P}),ve=Ei(Object.assign({},Se,pe)),ye=re===vt?ve:me,be={top:de.top-ye.top+fe.top,bottom:ye.bottom-de.bottom+fe.bottom,left:de.left-ye.left+fe.left,right:ye.right-de.right+fe.right},we=w.modifiersData.offset;if(re===vt&&we){var Ne=we[P];Object.keys(be).forEach(function(Ge){var ht=[Ie,Pe].indexOf(Ge)>=0?1:-1,Te=[Re,Pe].indexOf(Ge)>=0?"y":"x";be[Ge]+=Ne[Te]*ht})}return be}function Sr(w,r){r===void 0&&(r={});var d=r,M=d.placement,P=d.boundary,F=d.rootBoundary,N=d.padding,X=d.flipVariations,$=d.allowedAutoPlacements,te=$===void 0?Ut:$,re=mt(M),Z=re?X?qt:qt.filter(function(ce){return mt(ce)===re}):_t,_e=Z.filter(function(ce){return te.indexOf(ce)>=0});_e.length===0&&(_e=Z);var ae=_e.reduce(function(ce,fe){return ce[fe]=Tt(w,{placement:fe,boundary:P,rootBoundary:F,padding:N})[ze(fe)],ce},{});return Object.keys(ae).sort(function(ce,fe){return ae[ce]-ae[fe]})}let Zi={name:"flip",enabled:!0,phase:"main",fn:function(w){var r=w.state,d=w.options,M=w.name;if(!r.modifiersData[M]._skip){for(var P=d.mainAxis,F=P===void 0||P,N=d.altAxis,X=N===void 0||N,$=d.fallbackPlacements,te=d.padding,re=d.boundary,Z=d.rootBoundary,_e=d.altBoundary,ae=d.flipVariations,ce=ae===void 0||ae,fe=d.allowedAutoPlacements,ue=r.options.placement,Se=ze(ue),ge=$||(Se!==ue&&ce?function(Xe){if(ze(Xe)===Et)return[];var ut=Xt(Xe);return[Ni(Xe),ut,Ni(ut)]}(ue):[Xt(ue)]),de=[ue].concat(ge).reduce(function(Xe,ut){return Xe.concat(ze(ut)===Et?Sr(r,{placement:ut,boundary:re,rootBoundary:Z,padding:te,flipVariations:ce,allowedAutoPlacements:fe}):ut)},[]),me=r.rects.reference,pe=r.rects.popper,ve=new Map,ye=!0,be=de[0],we=0;we<de.length;we++){var Ne=de[we],Ge=ze(Ne),ht=mt(Ne)===ct,Te=[Re,Pe].indexOf(Ge)>=0,Oi=Te?"width":"height",It=Tt(r,{placement:Ne,boundary:re,rootBoundary:Z,altBoundary:_e,padding:te}),Ht=Te?ht?Ie:De:ht?Pe:Re;me[Oi]>pe[Oi]&&(Ht=Xt(Ht));var qe=Xt(Ht),xe=[];if(F&&xe.push(It[Ge]<=0),X&&xe.push(It[Ht]<=0,It[qe]<=0),xe.every(function(Xe){return Xe})){be=Ne,ye=!1;break}ve.set(Ne,xe)}if(ye)for(var Ri=function(Xe){var ut=de.find(function(pr){var cr=ve.get(pr);if(cr)return cr.slice(0,Xe).every(function(Vi){return Vi})});if(ut)return be=ut,"break"},et=ce?3:1;et>0&&Ri(et)!=="break";et--);r.placement!==be&&(r.modifiersData[M]._skip=!0,r.placement=be,r.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ji(w,r,d){return d===void 0&&(d={x:0,y:0}),{top:w.top-r.height-d.y,right:w.right-r.width+d.x,bottom:w.bottom-r.height+d.y,left:w.left-r.width-d.x}}function lr(w){return[Re,Ie,Pe,De].some(function(r){return w[r]>=0})}let hr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(w){var r=w.state,d=w.name,M=r.rects.reference,P=r.rects.popper,F=r.modifiersData.preventOverflow,N=Tt(r,{elementContext:"reference"}),X=Tt(r,{altBoundary:!0}),$=Ji(N,M),te=Ji(X,P,F),re=lr($),Z=lr(te);r.modifiersData[d]={referenceClippingOffsets:$,popperEscapeOffsets:te,isReferenceHidden:re,hasPopperEscaped:Z},r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-reference-hidden":re,"data-popper-escaped":Z})}},U={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(w){var r=w.state,d=w.options,M=w.name,P=d.offset,F=P===void 0?[0,0]:P,N=Ut.reduce(function(re,Z){return re[Z]=function(_e,ae,ce){var fe=ze(_e),ue=[De,Re].indexOf(fe)>=0?-1:1,Se=typeof ce=="function"?ce(Object.assign({},ae,{placement:_e})):ce,ge=Se[0],de=Se[1];return ge=ge||0,de=(de||0)*ue,[De,Ie].indexOf(fe)>=0?{x:de,y:ge}:{x:ge,y:de}}(Z,r.rects,F),re},{}),X=N[r.placement],$=X.x,te=X.y;r.modifiersData.popperOffsets!=null&&(r.modifiersData.popperOffsets.x+=$,r.modifiersData.popperOffsets.y+=te),r.modifiersData[M]=N}},q={name:"popperOffsets",enabled:!0,phase:"read",fn:function(w){var r=w.state,d=w.name;r.modifiersData[d]=zi({reference:r.rects.reference,element:r.rects.popper,strategy:"absolute",placement:r.placement})},data:{}},rt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(w){var r=w.state,d=w.options,M=w.name,P=d.mainAxis,F=P===void 0||P,N=d.altAxis,X=N!==void 0&&N,$=d.boundary,te=d.rootBoundary,re=d.altBoundary,Z=d.padding,_e=d.tether,ae=_e===void 0||_e,ce=d.tetherOffset,fe=ce===void 0?0:ce,ue=Tt(r,{boundary:$,rootBoundary:te,padding:Z,altBoundary:re}),Se=ze(r.placement),ge=mt(r.placement),de=!ge,me=Vt(Se),pe=me==="x"?"y":"x",ve=r.modifiersData.popperOffsets,ye=r.rects.reference,be=r.rects.popper,we=typeof fe=="function"?fe(Object.assign({},r.rects,{placement:r.placement})):fe,Ne={x:0,y:0};if(ve){if(F||X){var Ge=me==="y"?Re:De,ht=me==="y"?Pe:Ie,Te=me==="y"?"height":"width",Oi=ve[me],It=ve[me]+ue[Ge],Ht=ve[me]-ue[ht],qe=ae?-be[Te]/2:0,xe=ge===ct?ye[Te]:be[Te],Ri=ge===ct?-be[Te]:-ye[Te],et=r.elements.arrow,Xe=ae&&et?Kt(et):{width:0,height:0},ut=r.modifiersData["arrow#persistent"]?r.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},pr=ut[Ge],cr=ut[ht],Vi=kt(0,ye[Te],Xe[Te]),mo=de?ye[Te]/2-qe-Vi-pr-we:xe-Vi-pr-we,yo=de?-ye[Te]/2+qe+Vi+cr+we:Ri+Vi+cr+we,kr=r.elements.arrow&&bt(r.elements.arrow),bo=kr?me==="y"?kr.clientTop||0:kr.clientLeft||0:0,xn=r.modifiersData.offset?r.modifiersData.offset[r.placement][me]:0,kn=ve[me]+mo-xn-bo,Mn=ve[me]+yo-xn;if(F){var Tn=kt(ae?Ct(It,kn):It,Oi,ae?it(Ht,Mn):Ht);ve[me]=Tn,Ne[me]=Tn-Oi}if(X){var Co=me==="x"?Re:De,So=me==="x"?Pe:Ie,vr=ve[pe],On=vr+ue[Co],Rn=vr-ue[So],Dn=kt(ae?Ct(On,kn):On,vr,ae?it(Rn,Mn):Rn);ve[pe]=Dn,Ne[pe]=Dn-vr}}r.modifiersData[M]=Ne}},requiresIfExists:["offset"]};function Ai(w,r,d){d===void 0&&(d=!1);var M=He(r);He(r)&&function(re){var Z=re.getBoundingClientRect();Z.width,re.offsetWidth,Z.height,re.offsetHeight}(r);var P,F,N=tt(r),X=gt(w),$={scrollLeft:0,scrollTop:0},te={x:0,y:0};return(M||!M&&!d)&&((Ue(r)!=="body"||Li(N))&&($=(P=r)!==Fe(P)&&He(P)?{scrollLeft:(F=P).scrollLeft,scrollTop:F.scrollTop}:Si(P)),He(r)?((te=gt(r)).x+=r.clientLeft,te.y+=r.clientTop):N&&(te.x=wi(N))),{x:X.left+$.scrollLeft-te.x,y:X.top+$.scrollTop-te.y,width:X.width,height:X.height}}function xi(w){var r=new Map,d=new Set,M=[];function P(F){d.add(F.name),[].concat(F.requires||[],F.requiresIfExists||[]).forEach(function(N){if(!d.has(N)){var X=r.get(N);X&&P(X)}}),M.push(F)}return w.forEach(function(F){r.set(F.name,F)}),w.forEach(function(F){d.has(F.name)||P(F)}),M}var Me={placement:"bottom",modifiers:[],strategy:"absolute"};function nt(){for(var w=arguments.length,r=new Array(w),d=0;d<w;d++)r[d]=arguments[d];return!r.some(function(M){return!(M&&typeof M.getBoundingClientRect=="function")})}function Ke(w){w===void 0&&(w={});var r=w,d=r.defaultModifiers,M=d===void 0?[]:d,P=r.defaultOptions,F=P===void 0?Me:P;return function(N,X,$){$===void 0&&($=F);var te,re,Z={placement:"bottom",orderedModifiers:[],options:Object.assign({},Me,F),modifiersData:{},elements:{reference:N,popper:X},attributes:{},styles:{}},_e=[],ae=!1,ce={state:Z,setOptions:function(ue){var Se=typeof ue=="function"?ue(Z.options):ue;fe(),Z.options=Object.assign({},F,Z.options,Se),Z.scrollParents={reference:yt(N)?Mt(N):N.contextElement?Mt(N.contextElement):[],popper:Mt(X)};var ge,de,me=function(pe){var ve=xi(pe);return di.reduce(function(ye,be){return ye.concat(ve.filter(function(we){return we.phase===be}))},[])}((ge=[].concat(M,Z.options.modifiers),de=ge.reduce(function(pe,ve){var ye=pe[ve.name];return pe[ve.name]=ye?Object.assign({},ye,ve,{options:Object.assign({},ye.options,ve.options),data:Object.assign({},ye.data,ve.data)}):ve,pe},{}),Object.keys(de).map(function(pe){return de[pe]})));return Z.orderedModifiers=me.filter(function(pe){return pe.enabled}),Z.orderedModifiers.forEach(function(pe){var ve=pe.name,ye=pe.options,be=ye===void 0?{}:ye,we=pe.effect;if(typeof we=="function"){var Ne=we({state:Z,name:ve,instance:ce,options:be});_e.push(Ne||function(){})}}),ce.update()},forceUpdate:function(){if(!ae){var ue=Z.elements,Se=ue.reference,ge=ue.popper;if(nt(Se,ge)){Z.rects={reference:Ai(Se,bt(ge),Z.options.strategy==="fixed"),popper:Kt(ge)},Z.reset=!1,Z.placement=Z.options.placement,Z.orderedModifiers.forEach(function(we){return Z.modifiersData[we.name]=Object.assign({},we.data)});for(var de=0;de<Z.orderedModifiers.length;de++)if(Z.reset!==!0){var me=Z.orderedModifiers[de],pe=me.fn,ve=me.options,ye=ve===void 0?{}:ve,be=me.name;typeof pe=="function"&&(Z=pe({state:Z,options:ye,name:be,instance:ce})||Z)}else Z.reset=!1,de=-1}}},update:(te=function(){return new Promise(function(ue){ce.forceUpdate(),ue(Z)})},function(){return re||(re=new Promise(function(ue){Promise.resolve().then(function(){re=void 0,ue(te())})})),re}),destroy:function(){fe(),ae=!0}};if(!nt(N,X))return ce;function fe(){_e.forEach(function(ue){return ue()}),_e=[]}return ce.setOptions($).then(function(ue){!ae&&$.onFirstUpdate&&$.onFirstUpdate(ue)}),ce}}var ki=Ke(),We=Ke({defaultModifiers:[Ci,q,bi,zt]}),Ze=Ke({defaultModifiers:[Ci,q,bi,zt,U,Zi,rt,yi,hr]});let Yt=Object.freeze({__proto__:null,popperGenerator:Ke,detectOverflow:Tt,createPopperBase:ki,createPopper:Ze,createPopperLite:We,top:Re,bottom:Pe,right:Ie,left:De,auto:Et,basePlacements:_t,start:ct,end:pt,clippingParents:ii,viewport:Nt,popper:vt,reference:ri,variationPlacements:qt,placements:Ut,beforeRead:ni,read:oi,afterRead:si,beforeMain:ai,main:ci,afterMain:li,beforeWrite:hi,write:ui,afterWrite:fi,modifierPhases:di,applyStyles:zt,arrow:yi,computeStyles:bi,eventListeners:Ci,flip:Zi,hide:hr,offset:U,popperOffsets:q,preventOverflow:rt}),Ot="dropdown",St="Escape",Rt="Space",Ve="ArrowUp",je="ArrowDown",Ae=new RegExp("ArrowUp|ArrowDown|Escape"),lt="click.bs.dropdown.data-api",Je="keydown.bs.dropdown.data-api",Qe="show",ot='[data-bs-toggle="dropdown"]',$t=".dropdown-menu",wt=h()?"top-end":"top-start",Zt=h()?"top-start":"top-end",Dt=h()?"bottom-end":"bottom-start",Qi=h()?"bottom-start":"bottom-end",er=h()?"left-start":"right-start",Bt=h()?"right-start":"left-start",Pt={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},wr={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class st extends oe{constructor(r,d){super(r),this._popper=null,this._config=this._getConfig(d),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Pt}static get DefaultType(){return wr}static get NAME(){return Ot}toggle(){return this._isShown()?this.hide():this.show()}show(){if(_(this._element)||this._isShown(this._menu))return;let r={relatedTarget:this._element};if(R.trigger(this._element,"show.bs.dropdown",r).defaultPrevented)return;let d=st.getParentFromElement(this._element);this._inNavbar?j.setDataAttribute(this._menu,"popper","none"):this._createPopper(d),"ontouchstart"in document.documentElement&&!d.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(M=>R.on(M,"mouseover",C)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Qe),this._element.classList.add(Qe),R.trigger(this._element,"shown.bs.dropdown",r)}hide(){if(_(this._element)||!this._isShown(this._menu))return;let r={relatedTarget:this._element};this._completeHide(r)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(r){R.trigger(this._element,"hide.bs.dropdown",r).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(d=>R.off(d,"mouseover",C)),this._popper&&this._popper.destroy(),this._menu.classList.remove(Qe),this._element.classList.remove(Qe),this._element.setAttribute("aria-expanded","false"),j.removeDataAttribute(this._menu,"popper"),R.trigger(this._element,"hidden.bs.dropdown",r))}_getConfig(r){if(r={...this.constructor.Default,...j.getDataAttributes(this._element),...r},f(Ot,r,this.constructor.DefaultType),typeof r.reference=="object"&&!c(r.reference)&&typeof r.reference.getBoundingClientRect!="function")throw new TypeError(`${Ot.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return r}_createPopper(r){if(Yt===void 0)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let d=this._element;this._config.reference==="parent"?d=r:c(this._config.reference)?d=y(this._config.reference):typeof this._config.reference=="object"&&(d=this._config.reference);let M=this._getPopperConfig(),P=M.modifiers.find(F=>F.name==="applyStyles"&&F.enabled===!1);this._popper=Ze(d,this._menu,M),P&&j.setDataAttribute(this._menu,"popper","static")}_isShown(r=this._element){return r.classList.contains(Qe)}_getMenuElement(){return V.next(this._element,$t)[0]}_getPlacement(){let r=this._element.parentNode;if(r.classList.contains("dropend"))return er;if(r.classList.contains("dropstart"))return Bt;let d=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return r.classList.contains("dropup")?d?Zt:wt:d?Qi:Dt}_detectNavbar(){return this._element.closest(".navbar")!==null}_getOffset(){let{offset:r}=this._config;return typeof r=="string"?r.split(",").map(d=>Number.parseInt(d,10)):typeof r=="function"?d=>r(d,this._element):r}_getPopperConfig(){let r={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return this._config.display==="static"&&(r.modifiers=[{name:"applyStyles",enabled:!1}]),{...r,...typeof this._config.popperConfig=="function"?this._config.popperConfig(r):this._config.popperConfig}}_selectMenuItem({key:r,target:d}){let M=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(p);M.length&&i(M,d,r===je,!M.includes(d)).focus()}static jQueryInterface(r){return this.each(function(){let d=st.getOrCreateInstance(this,r);if(typeof r=="string"){if(d[r]===void 0)throw new TypeError(`No method named "${r}"`);d[r]()}})}static clearMenus(r){if(r&&(r.button===2||r.type==="keyup"&&r.key!=="Tab"))return;let d=V.find(ot);for(let M=0,P=d.length;M<P;M++){let F=st.getInstance(d[M]);if(!F||F._config.autoClose===!1||!F._isShown())continue;let N={relatedTarget:F._element};if(r){let X=r.composedPath(),$=X.includes(F._menu);if(X.includes(F._element)||F._config.autoClose==="inside"&&!$||F._config.autoClose==="outside"&&$||F._menu.contains(r.target)&&(r.type==="keyup"&&r.key==="Tab"||/input|select|option|textarea|form/i.test(r.target.tagName)))continue;r.type==="click"&&(N.clickEvent=r)}F._completeHide(N)}}static getParentFromElement(r){return ie(r)||r.parentNode}static dataApiKeydownHandler(r){if(/input|textarea/i.test(r.target.tagName)?r.key===Rt||r.key!==St&&(r.key!==je&&r.key!==Ve||r.target.closest($t)):!Ae.test(r.key))return;let d=this.classList.contains(Qe);if(!d&&r.key===St||(r.preventDefault(),r.stopPropagation(),_(this)))return;let M=this.matches(ot)?this:V.prev(this,ot)[0],P=st.getOrCreateInstance(M);if(r.key!==St)return r.key===Ve||r.key===je?(d||P.show(),void P._selectMenuItem(r)):void(d&&r.key!==Rt||st.clearMenus());P.hide()}}R.on(document,Je,ot,st.dataApiKeydownHandler),R.on(document,Je,$t,st.dataApiKeydownHandler),R.on(document,lt,st.clearMenus),R.on(document,"keyup.bs.dropdown.data-api",st.clearMenus),R.on(document,lt,ot,function(w){w.preventDefault(),st.getOrCreateInstance(this).toggle()}),s(st);let Wr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Nr=".sticky-top";class Lr{constructor(){this._element=document.body}getWidth(){let r=document.documentElement.clientWidth;return Math.abs(window.innerWidth-r)}hide(){let r=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",d=>d+r),this._setElementAttributes(Wr,"paddingRight",d=>d+r),this._setElementAttributes(Nr,"marginRight",d=>d-r)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(r,d,M){let P=this.getWidth();this._applyManipulationCallback(r,F=>{if(F!==this._element&&window.innerWidth>F.clientWidth+P)return;this._saveInitialAttribute(F,d);let N=window.getComputedStyle(F)[d];F.style[d]=`${M(Number.parseFloat(N))}px`})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(Wr,"paddingRight"),this._resetElementAttributes(Nr,"marginRight")}_saveInitialAttribute(r,d){let M=r.style[d];M&&j.setDataAttribute(r,d,M)}_resetElementAttributes(r,d){this._applyManipulationCallback(r,M=>{let P=j.getDataAttribute(M,d);P===void 0?M.style.removeProperty(d):(j.removeDataAttribute(M,d),M.style[d]=P)})}_applyManipulationCallback(r,d){c(r)?d(r):V.find(r,this._element).forEach(d)}isOverflowing(){return this.getWidth()>0}}let Zn={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Jn={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},qr="show",Ur="mousedown.bs.backdrop";class zr{constructor(r){this._config=this._getConfig(r),this._isAppended=!1,this._element=null}show(r){this._config.isVisible?(this._append(),this._config.isAnimated&&g(this._getElement()),this._getElement().classList.add(qr),this._emulateAnimation(()=>{t(r)})):t(r)}hide(r){this._config.isVisible?(this._getElement().classList.remove(qr),this._emulateAnimation(()=>{this.dispose(),t(r)})):t(r)}_getElement(){if(!this._element){let r=document.createElement("div");r.className=this._config.className,this._config.isAnimated&&r.classList.add("fade"),this._element=r}return this._element}_getConfig(r){return(r={...Zn,...typeof r=="object"?r:{}}).rootElement=y(r.rootElement),f("backdrop",r,Jn),r}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),R.on(this._getElement(),Ur,()=>{t(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(R.off(this._element,Ur),this._element.remove(),this._isAppended=!1)}_emulateAnimation(r){e(r,this._getElement(),this._config.isAnimated)}}let Qn={trapElement:null,autofocus:!0},eo={trapElement:"element",autofocus:"boolean"},Kr=".bs.focustrap",Vr="backward";class Gr{constructor(r){this._config=this._getConfig(r),this._isActive=!1,this._lastTabNavDirection=null}activate(){let{trapElement:r,autofocus:d}=this._config;this._isActive||(d&&r.focus(),R.off(document,Kr),R.on(document,"focusin.bs.focustrap",M=>this._handleFocusin(M)),R.on(document,"keydown.tab.bs.focustrap",M=>this._handleKeydown(M)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,R.off(document,Kr))}_handleFocusin(r){let{target:d}=r,{trapElement:M}=this._config;if(d===document||d===M||M.contains(d))return;let P=V.focusableChildren(M);P.length===0?M.focus():this._lastTabNavDirection===Vr?P[P.length-1].focus():P[0].focus()}_handleKeydown(r){r.key==="Tab"&&(this._lastTabNavDirection=r.shiftKey?Vr:"forward")}_getConfig(r){return r={...Qn,...typeof r=="object"?r:{}},f("focustrap",r,eo),r}}let Xr="modal",Yr="Escape",$r={backdrop:!0,keyboard:!0,focus:!0},to={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Zr="hidden.bs.modal",Jr="show.bs.modal",Qr="resize.bs.modal",en="click.dismiss.bs.modal",tn="keydown.dismiss.bs.modal",rn="mousedown.dismiss.bs.modal",nn="modal-open",on="show",Er="modal-static";class Mi extends oe{constructor(r,d){super(r),this._config=this._getConfig(d),this._dialog=V.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Lr}static get Default(){return $r}static get NAME(){return Xr}toggle(r){return this._isShown?this.hide():this.show(r)}show(r){this._isShown||this._isTransitioning||R.trigger(this._element,Jr,{relatedTarget:r}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(nn),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),R.on(this._dialog,rn,()=>{R.one(this._element,"mouseup.dismiss.bs.modal",d=>{d.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(r)))}hide(){if(!this._isShown||this._isTransitioning||R.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;let r=this._isAnimated();r&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(on),R.off(this._element,en),R.off(this._dialog,rn),this._queueCallback(()=>this._hideModal(),this._element,r)}dispose(){[window,this._dialog].forEach(r=>R.off(r,".bs.modal")),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new zr({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Gr({trapElement:this._element})}_getConfig(r){return r={...$r,...j.getDataAttributes(this._element),...typeof r=="object"?r:{}},f(Xr,r,to),r}_showElement(r){let d=this._isAnimated(),M=V.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,M&&(M.scrollTop=0),d&&g(this._element),this._element.classList.add(on),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,R.trigger(this._element,"shown.bs.modal",{relatedTarget:r})},this._dialog,d)}_setEscapeEvent(){this._isShown?R.on(this._element,tn,r=>{this._config.keyboard&&r.key===Yr?(r.preventDefault(),this.hide()):this._config.keyboard||r.key!==Yr||this._triggerBackdropTransition()}):R.off(this._element,tn)}_setResizeEvent(){this._isShown?R.on(window,Qr,()=>this._adjustDialog()):R.off(window,Qr)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(nn),this._resetAdjustments(),this._scrollBar.reset(),R.trigger(this._element,Zr)})}_showBackdrop(r){R.on(this._element,en,d=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:d.target===d.currentTarget&&(this._config.backdrop===!0?this.hide():this._config.backdrop==="static"&&this._triggerBackdropTransition())}),this._backdrop.show(r)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(R.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;let{classList:r,scrollHeight:d,style:M}=this._element,P=d>document.documentElement.clientHeight;!P&&M.overflowY==="hidden"||r.contains(Er)||(P||(M.overflowY="hidden"),r.add(Er),this._queueCallback(()=>{r.remove(Er),P||this._queueCallback(()=>{M.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let r=this._element.scrollHeight>document.documentElement.clientHeight,d=this._scrollBar.getWidth(),M=d>0;(!M&&r&&!h()||M&&!r&&h())&&(this._element.style.paddingLeft=`${d}px`),(M&&!r&&!h()||!M&&r&&h())&&(this._element.style.paddingRight=`${d}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(r,d){return this.each(function(){let M=Mi.getOrCreateInstance(this,r);if(typeof r=="string"){if(M[r]===void 0)throw new TypeError(`No method named "${r}"`);M[r](d)}})}}R.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',function(w){let r=ie(this);["A","AREA"].includes(this.tagName)&&w.preventDefault(),R.one(r,Jr,M=>{M.defaultPrevented||R.one(r,Zr,()=>{p(this)&&this.focus()})});let d=V.findOne(".modal.show");d&&Mi.getInstance(d).hide(),Mi.getOrCreateInstance(r).toggle(this)}),le(Mi),s(Mi);let sn="offcanvas",an={backdrop:!0,keyboard:!0,scroll:!1},io={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},cn="show",ln=".offcanvas.show",hn="hidden.bs.offcanvas";class Jt extends oe{constructor(r,d){super(r),this._config=this._getConfig(d),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return sn}static get Default(){return an}toggle(r){return this._isShown?this.hide():this.show(r)}show(r){this._isShown||R.trigger(this._element,"show.bs.offcanvas",{relatedTarget:r}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||new Lr().hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(cn),this._queueCallback(()=>{this._config.scroll||this._focustrap.activate(),R.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:r})},this._element,!0))}hide(){this._isShown&&(R.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(cn),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||new Lr().reset(),R.trigger(this._element,hn)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(r){return r={...an,...j.getDataAttributes(this._element),...typeof r=="object"?r:{}},f(sn,r,io),r}_initializeBackDrop(){return new zr({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Gr({trapElement:this._element})}_addEventListeners(){R.on(this._element,"keydown.dismiss.bs.offcanvas",r=>{this._config.keyboard&&r.key==="Escape"&&this.hide()})}static jQueryInterface(r){return this.each(function(){let d=Jt.getOrCreateInstance(this,r);if(typeof r=="string"){if(d[r]===void 0||r.startsWith("_")||r==="constructor")throw new TypeError(`No method named "${r}"`);d[r](this)}})}}R.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',function(w){let r=ie(this);if(["A","AREA"].includes(this.tagName)&&w.preventDefault(),_(this))return;R.one(r,hn,()=>{p(this)&&this.focus()});let d=V.findOne(ln);d&&d!==r&&Jt.getInstance(d).hide(),Jt.getOrCreateInstance(r).toggle(this)}),R.on(window,"load.bs.offcanvas.data-api",()=>V.find(ln).forEach(w=>Jt.getOrCreateInstance(w).show())),le(Jt),s(Jt);let ro=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),no=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,oo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,so=(w,r)=>{let d=w.nodeName.toLowerCase();if(r.includes(d))return!ro.has(d)||Boolean(no.test(w.nodeValue)||oo.test(w.nodeValue));let M=r.filter(P=>P instanceof RegExp);for(let P=0,F=M.length;P<F;P++)if(M[P].test(d))return!0;return!1};function un(w,r,d){if(!w.length)return w;if(d&&typeof d=="function")return d(w);let M=new window.DOMParser().parseFromString(w,"text/html"),P=[].concat(...M.body.querySelectorAll("*"));for(let F=0,N=P.length;F<N;F++){let X=P[F],$=X.nodeName.toLowerCase();if(!Object.keys(r).includes($)){X.remove();continue}let te=[].concat(...X.attributes),re=[].concat(r["*"]||[],r[$]||[]);te.forEach(Z=>{so(Z,re)||X.removeAttribute(Z.nodeName)})}return M.body.innerHTML}let fn="tooltip",ao=new Set(["sanitize","allowList","sanitizeFn"]),co={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},lo={AUTO:"auto",TOP:"top",RIGHT:h()?"left":"right",BOTTOM:"bottom",LEFT:h()?"right":"left"},ho={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},uo={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},ur="fade",tr="show",ir="show",Ar="out",dn=".tooltip-inner",_n=".modal",pn="hide.bs.modal",fr="hover",vn="focus";class Ti extends oe{constructor(r,d){if(Yt===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(r),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(d),this.tip=null,this._setListeners()}static get Default(){return ho}static get NAME(){return fn}static get Event(){return uo}static get DefaultType(){return co}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(r){if(this._isEnabled)if(r){let d=this._initializeOnDelegatedTarget(r);d._activeTrigger.click=!d._activeTrigger.click,d._isWithActiveTrigger()?d._enter(null,d):d._leave(null,d)}else{if(this.getTipElement().classList.contains(tr))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),R.off(this._element.closest(_n),pn,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;let r=R.trigger(this._element,this.constructor.Event.SHOW),d=u(this._element),M=d===null?this._element.ownerDocument.documentElement.contains(this._element):d.contains(this._element);if(r.defaultPrevented||!M)return;this.constructor.NAME==="tooltip"&&this.tip&&this.getTitle()!==this.tip.querySelector(dn).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);let P=this.getTipElement(),F=(Z=>{do Z+=Math.floor(1e6*Math.random());while(document.getElementById(Z));return Z})(this.constructor.NAME);P.setAttribute("id",F),this._element.setAttribute("aria-describedby",F),this._config.animation&&P.classList.add(ur);let N=typeof this._config.placement=="function"?this._config.placement.call(this,P,this._element):this._config.placement,X=this._getAttachment(N);this._addAttachmentClass(X);let{container:$}=this._config;Y.set(P,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||($.append(P),R.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Ze(this._element,P,this._getPopperConfig(X)),P.classList.add(tr);let te=this._resolvePossibleFunction(this._config.customClass);te&&P.classList.add(...te.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(Z=>{R.on(Z,"mouseover",C)});let re=this.tip.classList.contains(ur);this._queueCallback(()=>{let Z=this._hoverState;this._hoverState=null,R.trigger(this._element,this.constructor.Event.SHOWN),Z===Ar&&this._leave(null,this)},this.tip,re)}hide(){if(!this._popper)return;let r=this.getTipElement();if(R.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;r.classList.remove(tr),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(M=>R.off(M,"mouseover",C)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;let d=this.tip.classList.contains(ur);this._queueCallback(()=>{this._isWithActiveTrigger()||(this._hoverState!==ir&&r.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),R.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())},this.tip,d),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;let r=document.createElement("div");r.innerHTML=this._config.template;let d=r.children[0];return this.setContent(d),d.classList.remove(ur,tr),this.tip=d,this.tip}setContent(r){this._sanitizeAndSetContent(r,this.getTitle(),dn)}_sanitizeAndSetContent(r,d,M){let P=V.findOne(M,r);d||!P?this.setElementContent(P,d):P.remove()}setElementContent(r,d){if(r!==null)return c(d)?(d=y(d),void(this._config.html?d.parentNode!==r&&(r.innerHTML="",r.append(d)):r.textContent=d.textContent)):void(this._config.html?(this._config.sanitize&&(d=un(d,this._config.allowList,this._config.sanitizeFn)),r.innerHTML=d):r.textContent=d)}getTitle(){let r=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(r)}updateAttachment(r){return r==="right"?"end":r==="left"?"start":r}_initializeOnDelegatedTarget(r,d){return d||this.constructor.getOrCreateInstance(r.delegateTarget,this._getDelegateConfig())}_getOffset(){let{offset:r}=this._config;return typeof r=="string"?r.split(",").map(d=>Number.parseInt(d,10)):typeof r=="function"?d=>r(d,this._element):r}_resolvePossibleFunction(r){return typeof r=="function"?r.call(this._element):r}_getPopperConfig(r){let d={placement:r,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:M=>this._handlePopperPlacementChange(M)}],onFirstUpdate:M=>{M.options.placement!==M.placement&&this._handlePopperPlacementChange(M)}};return{...d,...typeof this._config.popperConfig=="function"?this._config.popperConfig(d):this._config.popperConfig}}_addAttachmentClass(r){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(r)}`)}_getAttachment(r){return lo[r.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(r=>{if(r==="click")R.on(this._element,this.constructor.Event.CLICK,this._config.selector,d=>this.toggle(d));else if(r!=="manual"){let d=r===fr?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,M=r===fr?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;R.on(this._element,d,this._config.selector,P=>this._enter(P)),R.on(this._element,M,this._config.selector,P=>this._leave(P))}}),this._hideModalHandler=()=>{this._element&&this.hide()},R.on(this._element.closest(_n),pn,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){let r=this._element.getAttribute("title"),d=typeof this._element.getAttribute("data-bs-original-title");(r||d!=="string")&&(this._element.setAttribute("data-bs-original-title",r||""),!r||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",r),this._element.setAttribute("title",""))}_enter(r,d){d=this._initializeOnDelegatedTarget(r,d),r&&(d._activeTrigger[r.type==="focusin"?vn:fr]=!0),d.getTipElement().classList.contains(tr)||d._hoverState===ir?d._hoverState=ir:(clearTimeout(d._timeout),d._hoverState=ir,d._config.delay&&d._config.delay.show?d._timeout=setTimeout(()=>{d._hoverState===ir&&d.show()},d._config.delay.show):d.show())}_leave(r,d){d=this._initializeOnDelegatedTarget(r,d),r&&(d._activeTrigger[r.type==="focusout"?vn:fr]=d._element.contains(r.relatedTarget)),d._isWithActiveTrigger()||(clearTimeout(d._timeout),d._hoverState=Ar,d._config.delay&&d._config.delay.hide?d._timeout=setTimeout(()=>{d._hoverState===Ar&&d.hide()},d._config.delay.hide):d.hide())}_isWithActiveTrigger(){for(let r in this._activeTrigger)if(this._activeTrigger[r])return!0;return!1}_getConfig(r){let d=j.getDataAttributes(this._element);return Object.keys(d).forEach(M=>{ao.has(M)&&delete d[M]}),(r={...this.constructor.Default,...d,...typeof r=="object"&&r?r:{}}).container=r.container===!1?document.body:y(r.container),typeof r.delay=="number"&&(r.delay={show:r.delay,hide:r.delay}),typeof r.title=="number"&&(r.title=r.title.toString()),typeof r.content=="number"&&(r.content=r.content.toString()),f(fn,r,this.constructor.DefaultType),r.sanitize&&(r.template=un(r.template,r.allowList,r.sanitizeFn)),r}_getDelegateConfig(){let r={};for(let d in this._config)this.constructor.Default[d]!==this._config[d]&&(r[d]=this._config[d]);return r}_cleanTipClass(){let r=this.getTipElement(),d=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),M=r.getAttribute("class").match(d);M!==null&&M.length>0&&M.map(P=>P.trim()).forEach(P=>r.classList.remove(P))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(r){let{state:d}=r;d&&(this.tip=d.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(d.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(r){return this.each(function(){let d=Ti.getOrCreateInstance(this,r);if(typeof r=="string"){if(d[r]===void 0)throw new TypeError(`No method named "${r}"`);d[r]()}})}}s(Ti);let fo={...Ti.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},_o={...Ti.DefaultType,content:"(string|element|function)"},po={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class dr extends Ti{static get Default(){return fo}static get NAME(){return"popover"}static get Event(){return po}static get DefaultType(){return _o}isWithContent(){return this.getTitle()||this._getContent()}setContent(r){this._sanitizeAndSetContent(r,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(r,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(r){return this.each(function(){let d=dr.getOrCreateInstance(this,r);if(typeof r=="string"){if(d[r]===void 0)throw new TypeError(`No method named "${r}"`);d[r]()}})}}s(dr);let gn="scrollspy",mn={offset:10,method:"auto",target:""},vo={offset:"number",method:"string",target:"(string|element)"},Ki="active",xr=".nav-link, .list-group-item, .dropdown-item",yn="position";class rr extends oe{constructor(r,d){super(r),this._scrollElement=this._element.tagName==="BODY"?window:this._element,this._config=this._getConfig(d),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,R.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return mn}static get NAME(){return gn}refresh(){let r=this._scrollElement===this._scrollElement.window?"offset":yn,d=this._config.method==="auto"?r:this._config.method,M=d===yn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),V.find(xr,this._config.target).map(P=>{let F=ne(P),N=F?V.findOne(F):null;if(N){let X=N.getBoundingClientRect();if(X.width||X.height)return[j[d](N).top+M,F]}return null}).filter(P=>P).sort((P,F)=>P[0]-F[0]).forEach(P=>{this._offsets.push(P[0]),this._targets.push(P[1])})}dispose(){R.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(r){return(r={...mn,...j.getDataAttributes(this._element),...typeof r=="object"&&r?r:{}}).target=y(r.target)||document.documentElement,f(gn,r,vo),r}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){let r=this._getScrollTop()+this._config.offset,d=this._getScrollHeight(),M=this._config.offset+d-this._getOffsetHeight();if(this._scrollHeight!==d&&this.refresh(),r>=M){let P=this._targets[this._targets.length-1];this._activeTarget!==P&&this._activate(P)}else{if(this._activeTarget&&r<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let P=this._offsets.length;P--;)this._activeTarget!==this._targets[P]&&r>=this._offsets[P]&&(this._offsets[P+1]===void 0||r<this._offsets[P+1])&&this._activate(this._targets[P])}}_activate(r){this._activeTarget=r,this._clear();let d=xr.split(",").map(P=>`${P}[data-bs-target="${r}"],${P}[href="${r}"]`),M=V.findOne(d.join(","),this._config.target);M.classList.add(Ki),M.classList.contains("dropdown-item")?V.findOne(".dropdown-toggle",M.closest(".dropdown")).classList.add(Ki):V.parents(M,".nav, .list-group").forEach(P=>{V.prev(P,".nav-link, .list-group-item").forEach(F=>F.classList.add(Ki)),V.prev(P,".nav-item").forEach(F=>{V.children(F,".nav-link").forEach(N=>N.classList.add(Ki))})}),R.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:r})}_clear(){V.find(xr,this._config.target).filter(r=>r.classList.contains(Ki)).forEach(r=>r.classList.remove(Ki))}static jQueryInterface(r){return this.each(function(){let d=rr.getOrCreateInstance(this,r);if(typeof r=="string"){if(d[r]===void 0)throw new TypeError(`No method named "${r}"`);d[r]()}})}}R.on(window,"load.bs.scrollspy.data-api",()=>{V.find('[data-bs-spy="scroll"]').forEach(w=>new rr(w))}),s(rr);let nr="active",bn="fade",Cn="show",Sn=".active",wn=":scope > li > .active";class or extends oe{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(nr))return;let r,d=ie(this._element),M=this._element.closest(".nav, .list-group");if(M){let N=M.nodeName==="UL"||M.nodeName==="OL"?wn:Sn;r=V.find(N,M),r=r[r.length-1]}let P=r?R.trigger(r,"hide.bs.tab",{relatedTarget:this._element}):null;if(R.trigger(this._element,"show.bs.tab",{relatedTarget:r}).defaultPrevented||P!==null&&P.defaultPrevented)return;this._activate(this._element,M);let F=()=>{R.trigger(r,"hidden.bs.tab",{relatedTarget:this._element}),R.trigger(this._element,"shown.bs.tab",{relatedTarget:r})};d?this._activate(d,d.parentNode,F):F()}_activate(r,d,M){let P=(!d||d.nodeName!=="UL"&&d.nodeName!=="OL"?V.children(d,Sn):V.find(wn,d))[0],F=M&&P&&P.classList.contains(bn),N=()=>this._transitionComplete(r,P,M);P&&F?(P.classList.remove(Cn),this._queueCallback(N,r,!0)):N()}_transitionComplete(r,d,M){if(d){d.classList.remove(nr);let F=V.findOne(":scope > .dropdown-menu .active",d.parentNode);F&&F.classList.remove(nr),d.getAttribute("role")==="tab"&&d.setAttribute("aria-selected",!1)}r.classList.add(nr),r.getAttribute("role")==="tab"&&r.setAttribute("aria-selected",!0),g(r),r.classList.contains(bn)&&r.classList.add(Cn);let P=r.parentNode;if(P&&P.nodeName==="LI"&&(P=P.parentNode),P&&P.classList.contains("dropdown-menu")){let F=r.closest(".dropdown");F&&V.find(".dropdown-toggle",F).forEach(N=>N.classList.add(nr)),r.setAttribute("aria-expanded",!0)}M&&M()}static jQueryInterface(r){return this.each(function(){let d=or.getOrCreateInstance(this);if(typeof r=="string"){if(d[r]===void 0)throw new TypeError(`No method named "${r}"`);d[r]()}})}}R.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',function(w){["A","AREA"].includes(this.tagName)&&w.preventDefault(),_(this)||or.getOrCreateInstance(this).show()}),s(or);let Ln="toast",En="hide",sr="show",_r="showing",go={animation:"boolean",autohide:"boolean",delay:"number"},An={animation:!0,autohide:!0,delay:5e3};class ar extends oe{constructor(r,d){super(r),this._config=this._getConfig(d),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return go}static get Default(){return An}static get NAME(){return Ln}show(){R.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(En),g(this._element),this._element.classList.add(sr),this._element.classList.add(_r),this._queueCallback(()=>{this._element.classList.remove(_r),R.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains(sr)&&(R.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(_r),this._queueCallback(()=>{this._element.classList.add(En),this._element.classList.remove(_r),this._element.classList.remove(sr),R.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(sr)&&this._element.classList.remove(sr),super.dispose()}_getConfig(r){return r={...An,...j.getDataAttributes(this._element),...typeof r=="object"&&r?r:{}},f(Ln,r,this.constructor.DefaultType),r}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(r,d){switch(r.type){case"mouseover":case"mouseout":this._hasMouseInteraction=d;break;case"focusin":case"focusout":this._hasKeyboardInteraction=d}if(d)return void this._clearTimeout();let M=r.relatedTarget;this._element===M||this._element.contains(M)||this._maybeScheduleHide()}_setListeners(){R.on(this._element,"mouseover.bs.toast",r=>this._onInteraction(r,!0)),R.on(this._element,"mouseout.bs.toast",r=>this._onInteraction(r,!1)),R.on(this._element,"focusin.bs.toast",r=>this._onInteraction(r,!0)),R.on(this._element,"focusout.bs.toast",r=>this._onInteraction(r,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(r){return this.each(function(){let d=ar.getOrCreateInstance(this,r);if(typeof r=="string"){if(d[r]===void 0)throw new TypeError(`No method named "${r}"`);d[r](this)}})}}return le(ar),s(ar),{Alert:he,Button:B,Carousel:Ye,Collapse:dt,Dropdown:st,Modal:Mi,Offcanvas:Jt,Popover:dr,ScrollSpy:rr,Tab:or,Toast:ar,Tooltip:Ti}})});var To=Q=>new Promise((J,ne)=>{let ie=new FileReader;ie.addEventListener("load",z=>{let c=z?.target?.result;if(!c){ne(new TypeError("readImage: No file."));return}J(c)}),ie.readAsDataURL(Q)}),Bn=Q=>new Promise((J,ne)=>{let ie=new Image;ie.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAAA1BMVEUAAACnej3aAAAAAXRSTlPHReaPdQAAAApJREFUCNdjwAsAAB4AAdpxxYoAAAAASUVORK5CYII=",ie.addEventListener("load",()=>J(ie)),ie.addEventListener("error",()=>ne(new Error(`Error loading image from URL: '${Q}'.`)));try{ie.setAttribute("crossOrigin","Anonymous"),ie.src=Q}catch(z){ne(z)}}),Pn=To;var Oe=[],Oo=()=>{Oe.push([0,0,0,0]),Oe.push([128,0,0,1]),Oe.push([0,128,0,2]),Oe.push([128,128,0,3]),Oe.push([0,0,128,4]),Oe.push([128,0,128,5]),Oe.push([0,128,128,6]),Oe.push([192,192,192,7]),Oe.push([128,128,128,8]),Oe.push([255,0,0,9]),Oe.push([0,255,0,10]),Oe.push([255,255,0,11]),Oe.push([0,0,255,12]),Oe.push([255,0,255,13]),Oe.push([0,255,255,14]),Oe.push([255,255,255,15]),[0,95,135,175,215,255].forEach(Q=>{[0,95,135,175,215,255].forEach(J=>{[0,95,135,175,215,255].forEach(ne=>{Oe.push([Q,J,ne,16+parseInt(""+Math.floor(Q/255*5)+Math.floor(J/255*5)+Math.floor(ne/255*5),6)])})})}),[8,18,28,38,48,58,68,78,88,98,108,118,128,138,148,158,168,178,188,198,208,218,228,238].forEach(Q=>{Oe.push([Q,Q,Q,232+Math.floor(Q/10)])})},Ro=(Q,J)=>[...Q].sort((ne,ie)=>Math.abs(ne[0]-J[0])+Math.abs(ne[1]-J[1])+Math.abs(ne[2]-J[2])-(Math.abs(ie[0]-J[0])+Math.abs(ie[1]-J[1])+Math.abs(ie[2]-J[2]))||ne[3]-ie[3]).shift()||[0,0,0,0],Do=(Q,J,ne)=>(Oe.length||Oo(),(Ro(Oe,[Q,J,ne])||[])[3]),In=Do;var Rr=document.createElement("canvas"),Hn=Rr.getContext("2d"),Gi=(Q,J,ne=!1)=>{let[ie,z,c]=Q;return Di(Q)?ne?"39":"49":J.colours==="true"?`${ne?38:48};2;${ie??0};${z??0};${c??0}`:`${ne?38:48};5;${In(ie??0,z??0,c??0)}`},Di=([,,,Q])=>(Q??0)<13,Bo=(Q,J)=>{let ne=Q.width,ie=Q.height,z="";if(ne>J.maxWidth){let f=ne/J.maxWidth;ne=J.maxWidth,ie=Math.floor(ie/f)}if(ie>J.maxHeight){let f=ie/J.maxHeight;ie=J.maxHeight,ne=Math.floor(ne/f)}Rr.width=ne,Rr.height=ie,Hn.drawImage(Q,0,0,ne,ie);let c=Hn.getImageData(0,0,ne,ie),y=c.data;for(let f=0,p=y.length;f<p;){let _=()=>f>0&&f/4%ne==0;if(J.unicode){let u=y.slice(f,f+4),C=y.slice(f+ne*4,f+4+ne*4);u[0]===C[0]&&u[1]===C[1]&&u[2]===C[2]&&!Di(u)&&!Di(C)||Di(u)&&Di(C)?z+=`[${Gi(u,J)}m `:Di(C)&&!Di(u)?z+=`[${Gi(C,J)};${Gi(u,J,!0)}m\u2580`:z+=`[${Gi(C,J,!0)};${Gi(u,J)}m\u2584`,f+=4,_()&&(f+=4*ne,z+=`[m
`);continue}z+=`[${Gi(y.slice(f,f+4),J)}m `,f+=4,_()&&(z+=`[m
`)}for(;z.match(/(\x1b\[[0-9;]+m)([?? ]+)\1/);)z=z.replace(/(\x1b\[[0-9;]+m)([?? ]+)\1/g,"$1$2");return z},jn=Bo;var qn=Or(Fn()),Un=Or(Wn()),zo=Or(Nn());document.addEventListener("click",Q=>{let J=Q.target;if(!(J instanceof HTMLElement)||!J.matches("a.copy"))return;Q.preventDefault();let ne=J.dataset.clipboardTarget??null;if(!ne)return;let ie=document.querySelector(ne);!ie||navigator.clipboard.writeText(ie.innerText.replace(/\x1b/g,"\\e"))});var yr=document.querySelector(".parser .btn"),br=yr.querySelector('input[type="file"]'),zn=yr.querySelector(".spinner-border"),Qt=document.querySelector('input[type="url"]'),Hr=document.querySelector(".error-container"),Kn=Hr.querySelector(".error-content"),Vn=Array.from(document.querySelectorAll('input[name="colours"]')),Gn=document.querySelector('input[name="maxHeight"]'),Xn=document.querySelector('input[name="maxWidth"]'),Yn=document.querySelector('input[name="unicode"]'),Cr=new qn.Terminal({convertEol:!0,theme:{background:"#272822",cursor:"transparent",foreground:"#f8f8f2"}}),jr=new Un.FitAddon,Po=document.querySelector("pre.copy-paste code"),Fr=(Q="")=>{if(Q===""){Hr.classList.add("d-none"),Kn.innerText="";return}Hr.classList.remove("d-none"),Kn.innerText=Q},$n=(Q,J=()=>{})=>Bn(Q).then(ne=>{let ie=jn(ne,{colours:Vn.reduce((z,c)=>c.checked?c.value:z,"256"),maxHeight:parseInt(Gn.value,10),maxWidth:parseInt(Xn.value,10),unicode:Yn.checked});Cr.reset(),Cr.write(ie),Po.innerText=`printf "${ie.replace(/\x1b/g,"\\e")}";`,Fr("")}).catch(ne=>Fr(ne.message)).finally(()=>J()),Io=(Q=()=>{})=>{let J=br?.files?.[0],ne=Qt.value;if(J){Pn(J).then(ie=>$n(ie,Q)).catch(ie=>Fr(ie.message));return}if(ne){$n(ne,Q);return}requestAnimationFrame(Q)};Cr.loadAddon(jr);Cr.open(document.querySelector("div.terminal"));jr.fit();window.addEventListener("resize",()=>jr.fit());br.addEventListener("input",()=>{Qt.value=""});Qt.addEventListener("input",Q=>{if(!Qt.reportValidity()||Qt.value===""){Q.stopImmediatePropagation();return}br.value=""});[...Vn,Gn,Xn,Yn,br,Qt].forEach(Q=>Q.addEventListener("input",()=>{yr.classList.add("disabled"),Qt.setAttribute("disabled",""),zn.classList.remove("d-none"),Io(()=>{yr.classList.remove("disabled"),Qt.removeAttribute("disabled"),zn.classList.add("d-none")})}));})();
/*!
* Bootstrap v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
//# sourceMappingURL=app.js.map
|