diff --git a/web/Modules/Terminal/Filament/Pages/Terminal.php b/web/Modules/Terminal/Filament/Pages/Terminal.php
index d1d7774..8a9ff3e 100644
--- a/web/Modules/Terminal/Filament/Pages/Terminal.php
+++ b/web/Modules/Terminal/Filament/Pages/Terminal.php
@@ -31,7 +31,7 @@ class Terminal extends Page
if ($runNewTerminal) {
$exec = shell_exec('node /usr/local/phyre/web/Modules/Terminal/nodejs/terminal/server.js >> /usr/local/phyre/web/storage/logs/terminal/server-terminal.log &');
}
-
+
return [
'title' => 'Terminal',
'sessionId' => $sessionId,
diff --git a/web/Modules/Terminal/resources/views/filament/pages/terminal.blade.php b/web/Modules/Terminal/resources/views/filament/pages/terminal.blade.php
index f9cb8bf..000bd7e 100644
--- a/web/Modules/Terminal/resources/views/filament/pages/terminal.blade.php
+++ b/web/Modules/Terminal/resources/views/filament/pages/terminal.blade.php
@@ -9,7 +9,9 @@
@vite('resources/js/web-terminal.js')
-
+
diff --git a/web/public/build/assets/web-terminal-6085c523.js b/web/public/build/assets/web-terminal-940be4ad.js
similarity index 99%
rename from web/public/build/assets/web-terminal-6085c523.js
rename to web/public/build/assets/web-terminal-940be4ad.js
index 04f3be6..b7fd4e1 100644
--- a/web/public/build/assets/web-terminal-6085c523.js
+++ b/web/public/build/assets/web-terminal-940be4ad.js
@@ -63,4 +63,4 @@ out vec4 outColor;
void main() {
outColor = v_color;
-}`)),this.register((0,c.toDisposable)(()=>S.deleteProgram(this._program))),this._projectionLocation=(0,l.throwIfFalsy)(S.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=S.createVertexArray(),S.bindVertexArray(this._vertexArrayObject);const w=new Float32Array([0,0,1,0,0,1,1,1]),L=S.createBuffer();this.register((0,c.toDisposable)(()=>S.deleteBuffer(L))),S.bindBuffer(S.ARRAY_BUFFER,L),S.bufferData(S.ARRAY_BUFFER,w,S.STATIC_DRAW),S.enableVertexAttribArray(3),S.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),B=S.createBuffer();this.register((0,c.toDisposable)(()=>S.deleteBuffer(B))),S.bindBuffer(S.ELEMENT_ARRAY_BUFFER,B),S.bufferData(S.ELEMENT_ARRAY_BUFFER,D,S.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(S.createBuffer()),this.register((0,c.toDisposable)(()=>S.deleteBuffer(this._attributesBuffer))),S.bindBuffer(S.ARRAY_BUFFER,this._attributesBuffer),S.enableVertexAttribArray(0),S.vertexAttribPointer(0,2,S.FLOAT,!1,v,0),S.vertexAttribDivisor(0,1),S.enableVertexAttribArray(1),S.vertexAttribPointer(1,2,S.FLOAT,!1,v,2*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(1,1),S.enableVertexAttribArray(2),S.vertexAttribPointer(2,4,S.FLOAT,!1,v,4*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(2,1),this._updateCachedColors(b.colors),this.register(this._themeService.onChangeColors(k=>{this._updateCachedColors(k),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(_){const f=this._gl;f.useProgram(this._program),f.bindVertexArray(this._vertexArrayObject),f.uniformMatrix4fv(this._projectionLocation,!1,d.PROJECTION_MATRIX),f.bindBuffer(f.ARRAY_BUFFER,this._attributesBuffer),f.bufferData(f.ARRAY_BUFFER,_.attributes,f.DYNAMIC_DRAW),f.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,f.UNSIGNED_BYTE,0,_.count)}handleResize(){this._updateViewportRectangle()}setDimensions(_){this._dimensions=_}_updateCachedColors(_){this._bgFloat=this._colorToFloat32Array(_.background),this._cursorFloat=this._colorToFloat32Array(_.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(_){const f=this._terminal,C=this._vertices;let b,S,w,L,D,B,k,M,y,x,R,A=1;for(b=0;b>24&255)/255,i=(r>>16&255)/255,u=(r>>8&255)/255,p=1,this._addRectangle(_.attributes,f,e,o,(w-S)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,s,i,u,p)}_addRectangle(_,f,C,b,S,w,L,D,B,k){_[f]=C/this._dimensions.device.canvas.width,_[f+1]=b/this._dimensions.device.canvas.height,_[f+2]=S/this._dimensions.device.canvas.width,_[f+3]=w/this._dimensions.device.canvas.height,_[f+4]=L,_[f+5]=D,_[f+6]=B,_[f+7]=k}_addRectangleFloat(_,f,C,b,S,w,L){_[f]=C/this._dimensions.device.canvas.width,_[f+1]=b/this._dimensions.device.canvas.height,_[f+2]=S/this._dimensions.device.canvas.width,_[f+3]=w/this._dimensions.device.canvas.height,_[f+4]=L[0],_[f+5]=L[1],_[f+6]=L[2],_[f+7]=L[3]}_colorToFloat32Array(_){return new Float32Array([(_.rgba>>24&255)/255,(_.rgba>>16&255)/255,(_.rgba>>8&255)/255,(255&_.rgba)/255])}}t.RectangleRenderer=h},310:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderModel=t.COMBINED_CHAR_BIT_MASK=t.RENDER_MODEL_EXT_OFFSET=t.RENDER_MODEL_FG_OFFSET=t.RENDER_MODEL_BG_OFFSET=t.RENDER_MODEL_INDICIES_PER_CELL=void 0;const l=a(296);t.RENDER_MODEL_INDICIES_PER_CELL=4,t.RENDER_MODEL_BG_OFFSET=1,t.RENDER_MODEL_FG_OFFSET=2,t.RENDER_MODEL_EXT_OFFSET=3,t.COMBINED_CHAR_BIT_MASK=2147483648,t.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,l.createSelectionRenderModel)()}resize(c,n){const d=c*n*t.RENDER_MODEL_INDICIES_PER_CELL;d!==this.cells.length&&(this.cells=new Uint32Array(d),this.lineLengths=new Uint32Array(n))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JoinedCellData=t.WebglRenderer=void 0;const l=a(820),c=a(274),n=a(627),d=a(457),v=a(56),g=a(374),r=a(345),e=a(859),o=a(147),s=a(782),i=a(855),u=a(965),p=a(742),h=a(310),m=a(733);class _ extends e.Disposable{constructor(S,w,L,D,B,k,M,y,x){super(),this._terminal=S,this._characterJoinerService=w,this._charSizeService=L,this._coreBrowserService=D,this._coreService=B,this._decorationService=k,this._optionsService=M,this._themeService=y,this._cursorBlinkStateManager=new e.MutableDisposable,this._charAtlasDisposable=this.register(new e.MutableDisposable),this._observerDisposable=this.register(new e.MutableDisposable),this._model=new h.RenderModel,this._workCell=new s.CellData,this._workCell2=new s.CellData,this._rectangleRenderer=this.register(new e.MutableDisposable),this._glyphRenderer=this.register(new e.MutableDisposable),this._onChangeTextureAtlas=this.register(new r.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new r.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new r.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new r.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new c.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new m.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,M,this._themeService)],this.dimensions=(0,g.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(M.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const R={antialias:!1,depth:!1,preserveDrawingBuffer:x};if(this._gl=this._canvas.getContext("webgl2",R),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextlost",A=>{console.log("webglcontextlost event received"),A.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(A)},3e3)})),this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextrestored",A=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,n.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(A,I)=>this._setCanvasDevicePixelDimensions(A,I)),this.register(this._coreBrowserService.onWindowChange(A=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._canvas,A,(I,H)=>this._setCanvasDevicePixelDimensions(I,H))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,e.toDisposable)(()=>{var A;for(const I of this._renderLayers)I.dispose();(A=this._canvas.parentElement)==null||A.removeChild(this._canvas),(0,n.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var S;return(S=this._charAtlas)==null?void 0:S.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(S,w){var L,D,B,k;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const M of this._renderLayers)M.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(L=this._rectangleRenderer.value)==null||L.setDimensions(this.dimensions),(D=this._rectangleRenderer.value)==null||D.handleResize(),(B=this._glyphRenderer.value)==null||B.setDimensions(this.dimensions),(k=this._glyphRenderer.value)==null||k.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var S;for(const w of this._renderLayers)w.handleBlur(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.pause(),this._requestRedrawViewport()}handleFocus(){var S;for(const w of this._renderLayers)w.handleFocus(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.resume(),this._requestRedrawViewport()}handleSelectionChanged(S,w,L){for(const D of this._renderLayers)D.handleSelectionChanged(this._terminal,S,w,L);this._model.selection.update(this._core,S,w,L),this._requestRedrawViewport()}handleCursorMove(){var S;for(const w of this._renderLayers)w.handleCursorMove(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new p.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new u.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var w;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const S=(0,n.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==S&&(this._onChangeTextureAtlas.fire(S.pages[0].canvas),this._charAtlasDisposable.value=(0,e.getDisposeArrayDisposable)([(0,r.forwardEvent)(S.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,r.forwardEvent)(S.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=S,this._charAtlas.warmUp(),(w=this._glyphRenderer.value)==null||w.setAtlas(this._charAtlas)}_clearModel(S){var w;this._model.clear(),S&&((w=this._glyphRenderer.value)==null||w.clear())}clearTextureAtlas(){var S;(S=this._charAtlas)==null||S.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var S;this._clearModel(!0);for(const w of this._renderLayers)w.reset(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(S){return-1}deregisterCharacterJoiner(S){return!1}renderRows(S,w){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const L of this._renderLayers)L.handleGridChanged(this._terminal,S,w);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(S,w),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(S,w){const L=this._core;let D,B,k,M,y,x,R,A,I,H,j,N,T,E,F=this._workCell;S=C(S,L.rows-1,0),w=C(w,L.rows-1,0);const P=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,z=P-L.buffer.ydisp,W=Math.min(this._terminal.buffer.active.cursorX,L.cols-1);let Y=-1;const U=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let te=!1;for(B=S;B<=w;B++)for(k=B+L.buffer.ydisp,M=L.buffer.lines.get(k),this._model.lineLengths[B]=0,y=this._characterJoinerService.getJoinedCharacters(k),T=0;T0&&T===y[0][0]&&(x=!0,A=y.shift(),F=new f(F,M.translateToString(!0,A[0],A[1]),A[1]-A[0]),R=A[1]-1),I=F.getChars(),H=F.getCode(),N=(B*L.cols+T)*h.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(F,T,k,this.dimensions.device.cell.width),U&&k===P&&(T===W&&(this._model.cursor={x:W,y:z,width:F.getWidth(),style:this._coreBrowserService.isFocused?L.options.cursorStyle||"block":L.options.cursorInactiveStyle,cursorWidth:L.options.cursorWidth,dpr:this._devicePixelRatio},Y=W+F.getWidth()-1),T>=W&&T<=Y&&(this._coreBrowserService.isFocused&&(L.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&L.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),H!==i.NULL_CELL_CODE&&(this._model.lineLengths[B]=T+1),(this._model.cells[N]!==H||this._model.cells[N+h.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[N+h.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[N+h.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(te=!0,I.length>1&&(H|=h.COMBINED_CHAR_BIT_MASK),this._model.cells[N]=H,this._model.cells[N+h.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[N+h.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[N+h.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,j=F.getWidth(),this._glyphRenderer.value.updateCell(T,B,H,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,I,j,D),x))for(F=this._workCell,T++;T{Object.defineProperty(t,"__esModule",{value:!0}),t.GLTexture=t.expandFloat32Array=t.createShader=t.createProgram=t.PROJECTION_MATRIX=void 0;const l=a(374);function c(n,d,v){const g=(0,l.throwIfFalsy)(n.createShader(d));if(n.shaderSource(g,v),n.compileShader(g),n.getShaderParameter(g,n.COMPILE_STATUS))return g;console.error(n.getShaderInfoLog(g)),n.deleteShader(g)}t.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),t.createProgram=function(n,d,v){const g=(0,l.throwIfFalsy)(n.createProgram());if(n.attachShader(g,(0,l.throwIfFalsy)(c(n,n.VERTEX_SHADER,d))),n.attachShader(g,(0,l.throwIfFalsy)(c(n,n.FRAGMENT_SHADER,v))),n.linkProgram(g),n.getProgramParameter(g,n.LINK_STATUS))return g;console.error(n.getProgramInfoLog(g)),n.deleteProgram(g)},t.createShader=c,t.expandFloat32Array=function(n,d){const v=Math.min(2*n.length,d),g=new Float32Array(v);for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;const l=a(627),c=a(237),n=a(374),d=a(859);class v extends d.Disposable{constructor(r,e,o,s,i,u,p,h){super(),this._container=e,this._alpha=i,this._coreBrowserService=u,this._optionsService=p,this._themeService=h,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${o}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(m=>{this._refreshCharAtlas(r,m),this.reset(r)})),this.register((0,d.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,n.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(r){}handleFocus(r){}handleCursorMove(r){}handleGridChanged(r,e,o){}handleSelectionChanged(r,e,o,s=!1){}_setTransparency(r,e){if(e===this._alpha)return;const o=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,o),this._refreshCharAtlas(r,this._themeService.colors),this.handleGridChanged(r,0,r.rows-1)}_refreshCharAtlas(r,e){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,l.acquireTextureAtlas)(r,this._optionsService.rawOptions,e,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(r,e){this._deviceCellWidth=e.device.cell.width,this._deviceCellHeight=e.device.cell.height,this._deviceCharWidth=e.device.char.width,this._deviceCharHeight=e.device.char.height,this._deviceCharLeft=e.device.char.left,this._deviceCharTop=e.device.char.top,this._canvas.width=e.device.canvas.width,this._canvas.height=e.device.canvas.height,this._canvas.style.width=`${e.css.canvas.width}px`,this._canvas.style.height=`${e.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(r,this._themeService.colors)}_fillBottomLineAtCells(r,e,o=1){this._ctx.fillRect(r*this._deviceCellWidth,(e+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,o*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(r,e,o,s){this._alpha?this._ctx.clearRect(r*this._deviceCellWidth,e*this._deviceCellHeight,o*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(r*this._deviceCellWidth,e*this._deviceCellHeight,o*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(r,e,o,s){this._ctx.font=this._getFont(r,!1,!1),this._ctx.textBaseline=c.TEXT_BASELINE,this._clipCell(o,s,e.getWidth()),this._ctx.fillText(e.getChars(),o*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(r,e,o){this._ctx.beginPath(),this._ctx.rect(r*this._deviceCellWidth,e*this._deviceCellHeight,o*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(r,e,o){return`${o?"italic":""} ${e?r.options.fontWeightBold:r.options.fontWeight} ${r.options.fontSize*this._coreBrowserService.dpr}px ${r.options.fontFamily}`}}t.BaseRenderLayer=v},733:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;const l=a(197),c=a(237),n=a(592);class d extends n.BaseRenderLayer{constructor(g,r,e,o,s,i,u){super(e,g,"link",r,!0,s,i,u),this.register(o.onShowLinkUnderline(p=>this._handleShowLinkUnderline(p))),this.register(o.onHideLinkUnderline(p=>this._handleHideLinkUnderline(p)))}resize(g,r){super.resize(g,r),this._state=void 0}reset(g){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const g=this._state.y2-this._state.y1-1;g>0&&this._clearCells(0,this._state.y1+1,this._state.cols,g),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(g){if(g.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:g.fg!==void 0&&(0,l.is256Color)(g.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[g.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,g.y1===g.y2)this._fillBottomLineAtCells(g.x1,g.y1,g.x2-g.x1);else{this._fillBottomLineAtCells(g.x1,g.y1,g.cols-g.x1);for(let r=g.y1+1;r{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(a,l,c,n){a.addEventListener(l,c,n);let d=!1;return{dispose:()=>{d||(d=!0,a.removeEventListener(l,c,n))}}}},274:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellColorResolver=void 0;const l=a(855),c=a(160),n=a(374);let d,v=0,g=0,r=!1,e=!1,o=!1,s=0;t.CellColorResolver=class{constructor(i,u,p,h,m,_){this._terminal=i,this._optionService=u,this._selectionRenderModel=p,this._decorationService=h,this._coreBrowserService=m,this._themeService=_,this.result={fg:0,bg:0,ext:0}}resolve(i,u,p,h){if(this.result.bg=i.bg,this.result.fg=i.fg,this.result.ext=268435456&i.bg?i.extended.ext:0,g=0,v=0,e=!1,r=!1,o=!1,d=this._themeService.colors,s=0,i.getCode()!==l.NULL_CELL_CODE&&i.extended.underlineStyle===4){const m=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));s=u*h%(2*Math.round(m))}if(this._decorationService.forEachDecorationAtCell(u,p,"bottom",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),o=this._selectionRenderModel.isCellSelected(this._terminal,u,p),o){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:g=(16777215&this.result.fg)<<8|255;break;default:g=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:g=(16777215&this.result.bg)<<8|255}g=c.rgba.blend(g,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else g=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(e=!0,d.selectionForeground&&(v=d.selectionForeground.rgba>>8&16777215,r=!0),(0,n.treatGlyphAsBackgroundColor)(i.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))v=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:v=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:v=(16777215&this.result.fg)<<8|255;break;default:v=this._themeService.colors.foreground.rgba}v=c.rgba.blend(v,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}r=!0}}this._decorationService.forEachDecorationAtCell(u,p,"top",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),e&&(g=o?-16777216&i.bg&-134217729|g|50331648:-16777216&i.bg|g|50331648),r&&(v=-16777216&i.fg&-67108865|v|50331648),67108864&this.result.fg&&(e&&!r&&(v=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&d.background.rgba>>8|50331648,r=!0),!e&&r&&(g=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&d.foreground.rgba>>8|50331648,e=!0)),d=void 0,this.result.bg=e?g:this.result.bg,this.result.fg=r?v:this.result.fg,this.result.ext&=536870911,this.result.ext|=s<<29&3758096384}}},627:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireTextureAtlas=void 0;const l=a(509),c=a(197),n=[];t.acquireTextureAtlas=function(d,v,g,r,e,o,s,i){const u=(0,c.generateConfig)(r,e,o,s,v,g,i);for(let m=0;m=0){if((0,c.configEquals)(_.config,u))return _.atlas;_.ownedBy.length===1?(_.atlas.dispose(),n.splice(m,1)):_.ownedBy.splice(f,1);break}}for(let m=0;m{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;const l=a(160);t.generateConfig=function(c,n,d,v,g,r,e){const o={foreground:r.foreground,background:r.background,cursor:l.NULL_COLOR,cursorAccent:l.NULL_COLOR,selectionForeground:l.NULL_COLOR,selectionBackgroundTransparent:l.NULL_COLOR,selectionBackgroundOpaque:l.NULL_COLOR,selectionInactiveBackgroundTransparent:l.NULL_COLOR,selectionInactiveBackgroundOpaque:l.NULL_COLOR,ansi:r.ansi.slice(),contrastCache:r.contrastCache,halfContrastCache:r.halfContrastCache};return{customGlyphs:g.customGlyphs,devicePixelRatio:e,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight,deviceCellWidth:c,deviceCellHeight:n,deviceCharWidth:d,deviceCharHeight:v,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,drawBoldTextInBrightColors:g.drawBoldTextInBrightColors,minimumContrastRatio:g.minimumContrastRatio,colors:o}},t.configEquals=function(c,n){for(let d=0;d{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const l=a(399);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorBlinkStateManager=void 0,t.CursorBlinkStateManager=class{constructor(a,l){this._renderCallback=a,this._coreBrowserService=l,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(a=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,l>0)return void this._restartInterval(l)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(l)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},a)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.powerlineDefinitions=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;const l=a(374);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╒":{1:(r,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(r,e)=>`M${.5-r},1 L${.5-r},.5 L1,.5 M${.5+r},.5 L${.5+r},1`},"╔":{1:(r,e)=>`M1,${.5-e} L${.5-r},${.5-e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╕":{1:(r,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(r,e)=>`M${.5+r},1 L${.5+r},.5 L0,.5 M${.5-r},.5 L${.5-r},1`},"╗":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5+r},${.5-e} L${.5+r},1`},"╘":{1:(r,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(r,e)=>`M1,.5 L${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╚":{1:(r,e)=>`M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0 M1,${.5+e} L${.5-r},${.5+e} L${.5-r},0`},"╛":{1:(r,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(r,e)=>`M0,.5 L${.5+r},.5 L${.5+r},0 M${.5-r},.5 L${.5-r},0`},"╝":{1:(r,e)=>`M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M0,${.5+e} L${.5+r},${.5+e} L${.5+r},0`},"╞":{1:(r,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1 M${.5+r},.5 L1,.5`},"╠":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╡":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(r,e)=>`M0,.5 L${.5-r},.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╣":{1:(r,e)=>`M${.5+r},0 L${.5+r},1 M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0`},"╤":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},1 M${.5+r},.5 L${.5+r},1`},"╦":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╧":{1:(r,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╩":{1:(r,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╪":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╬":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},t.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.tryDrawCustomChar=function(r,e,o,s,i,u,p,h){const m=t.blockElementDefinitions[e];if(m)return function(b,S,w,L,D,B){for(let k=0;k7&&parseInt(M.slice(7,9),16)||1;else{if(!M.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${M}" when drawing pattern glyph`);[j,N,T,E]=M.substring(5,M.length-1).split(",").map(F=>parseFloat(F))}for(let F=0;Fr.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(r,e)=>r.lineTo(e[0],e[1]),M:(r,e)=>r.moveTo(e[0],e[1])};function g(r,e,o,s,i,u,p,h=0,m=0){const _=r.map(f=>parseFloat(f)||parseInt(f));if(_.length<2)throw new Error("Too few arguments for instruction");for(let f=0;f<_.length;f+=2)_[f]*=e-h*p-m*p,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,e,0)),_[f]+=s+h*p;for(let f=1;f<_.length;f+=2)_[f]*=o,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,o,0)),_[f]+=i;return _}},56:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeDevicePixelDimensions=void 0;const l=a(859);t.observeDevicePixelDimensions=function(c,n,d){let v=new n.ResizeObserver(g=>{const r=g.find(s=>s.target===c);if(!r)return;if(!("devicePixelContentBoxSize"in r))return v==null||v.disconnect(),void(v=void 0);const e=r.devicePixelContentBoxSize[0].inlineSize,o=r.devicePixelContentBoxSize[0].blockSize;e>0&&o>0&&d(e,o)});try{v.observe(c,{box:["device-pixel-content-box"]})}catch{v.disconnect(),v=void 0}return(0,l.toDisposable)(()=>v==null?void 0:v.disconnect())}},374:(O,t)=>{function a(c){return 57508<=c&&c<=57558}function l(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},t.isPowerlineGlyph=a,t.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},t.isEmoji=l,t.allowRescaling=function(c,n,d,v){return n===1&&d>Math.ceil(1.5*v)&&c!==void 0&&c>255&&!l(c)&&!a(c)&&!function(g){return 57344<=g&&g<=63743}(c)},t.treatGlyphAsBackgroundColor=function(c){return a(c)||function(n){return 9472<=n&&n<=9631}(c)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(c,n,d=0){return(c-(2*Math.round(n)-d))%(2*Math.round(n))}},296:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,n,d,v=!1){if(this.selectionStart=n,this.selectionEnd=d,!n||!d||n[0]===d[0]&&n[1]===d[1])return void this.clear();const g=c.buffers.active.ydisp,r=n[1]-g,e=d[1]-g,o=Math.max(r,0),s=Math.min(e,c.rows-1);o>=c.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=r,this.viewportEndRow=e,this.viewportCappedStartRow=o,this.viewportCappedEndRow=s,this.startCol=n[0],this.endCol=d[0])}isCellSelected(c,n,d){return!!this.hasSelection&&(d-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&d>=this.viewportCappedStartRow&&n=this.viewportCappedStartRow&&n>=this.endCol&&d<=this.viewportCappedEndRow:d>this.viewportStartRow&&d=this.startCol&&n=this.startCol)}}t.createSelectionRenderModel=function(){return new a}},509:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextureAtlas=void 0;const l=a(237),c=a(860),n=a(374),d=a(160),v=a(345),g=a(485),r=a(385),e=a(147),o=a(855),s={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let i;class u{get pages(){return this._pages}constructor(f,C,b){this._document=f,this._config=C,this._unicodeService=b,this._didWarmUp=!1,this._cacheMap=new g.FourKeyMap,this._cacheMapCombined=new g.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new e.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new v.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new v.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=m(f,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,n.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const f of this.pages)f.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const f=new r.IdleTaskQueue;for(let C=33;C<126;C++)f.enqueue(()=>{if(!this._cacheMap.get(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT)){const b=this._drawToCache(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT);this._cacheMap.set(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT,b)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const f of this._pages)f.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(u.maxAtlasPages&&this._pages.length>=Math.max(4,u.maxAtlasPages)){const C=this._pages.filter(k=>2*k.canvas.width<=(u.maxTextureSize||4096)).sort((k,M)=>M.canvas.width!==k.canvas.width?M.canvas.width-k.canvas.width:M.percentageUsed-k.percentageUsed);let b=-1,S=0;for(let k=0;kk.glyphs[0].texturePage).sort((k,M)=>k>M?1:-1),D=this.pages.length-w.length,B=this._mergePages(w,D);B.version++;for(let k=L.length-1;k>=0;k--)this._deletePage(L[k]);this.pages.push(B),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(B.canvas)}const f=new p(this._document,this._textureSize);return this._pages.push(f),this._activePages.push(f),this._onAddTextureAtlasCanvas.fire(f.canvas),f}_mergePages(f,C){const b=2*f[0].canvas.width,S=new p(this._document,b,f);for(const[w,L]of f.entries()){const D=w*L.canvas.width%b,B=Math.floor(w/2)*L.canvas.height;S.ctx.drawImage(L.canvas,D,B);for(const M of L.glyphs)M.texturePage=C,M.sizeClipSpace.x=M.size.x/b,M.sizeClipSpace.y=M.size.y/b,M.texturePosition.x+=D,M.texturePosition.y+=B,M.texturePositionClipSpace.x=M.texturePosition.x/b,M.texturePositionClipSpace.y=M.texturePosition.y/b;this._onRemoveTextureAtlasCanvas.fire(L.canvas);const k=this._activePages.indexOf(L);k!==-1&&this._activePages.splice(k,1)}return S}_deletePage(f){this._pages.splice(f,1);for(let C=f;C=this._config.colors.ansi.length)throw new Error("No color found for idx "+f);return this._config.colors.ansi[f]}_getBackgroundColor(f,C,b,S){if(this._config.allowTransparency)return d.NULL_COLOR;let w;switch(f){case 16777216:case 33554432:w=this._getColorFromAnsiIndex(C);break;case 50331648:const L=e.AttributeData.toColorRGB(C);w=d.channels.toColor(L[0],L[1],L[2]);break;default:w=b?d.color.opaque(this._config.colors.foreground):this._config.colors.background}return w}_getForegroundColor(f,C,b,S,w,L,D,B,k,M){const y=this._getMinimumContrastColor(f,C,b,S,w,L,D,k,B,M);if(y)return y;let x;switch(w){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&k&&L<8&&(L+=8),x=this._getColorFromAnsiIndex(L);break;case 50331648:const R=e.AttributeData.toColorRGB(L);x=d.channels.toColor(R[0],R[1],R[2]);break;default:x=D?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(x=d.color.opaque(x)),B&&(x=d.color.multiplyOpacity(x,l.DIM_OPACITY)),x}_resolveBackgroundRgba(f,C,b){switch(f){case 16777216:case 33554432:return this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(f,C,b,S){switch(f){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&S&&C<8&&(C+=8),this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(f,C,b,S,w,L,D,B,k,M){if(this._config.minimumContrastRatio===1||M)return;const y=this._getContrastCache(k),x=y.getColor(f,S);if(x!==void 0)return x||void 0;const R=this._resolveBackgroundRgba(C,b,D),A=this._resolveForegroundRgba(w,L,D,B),I=d.rgba.ensureContrastRatio(R,A,this._config.minimumContrastRatio/(k?2:1));if(!I)return void y.setColor(f,S,null);const H=d.channels.toColor(I>>24&255,I>>16&255,I>>8&255);return y.setColor(f,S,H),H}_getContrastCache(f){return f?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(f,C,b,S,w=!1){const L=typeof f=="number"?String.fromCharCode(f):f,D=Math.min(this._config.deviceCellWidth*Math.max(L.length,2)+4,this._textureSize);this._tmpCanvas.width=$?2*$-ae:$-ae;ae>=$||pe===0?(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z+pe,Q),this._tmpCtx.lineTo(J,Q)):(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(Z+pe,Q),this._tmpCtx.moveTo(Z+pe+$,Q),this._tmpCtx.lineTo(J,Q)),ae=(0,n.computeNextVariantOffset)(J-Z,$,ae);break;case 5:const ye=.6,Le=.3,me=J-Z,be=Math.floor(ye*me),we=Math.floor(Le*me),xe=me-be-we;this._tmpCtx.setLineDash([be,we,xe]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q);break;default:this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!te&&this._config.fontSize>=12&&!this._config.allowTransparency&&L!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const se=this._tmpCtx.measureText(L);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in se&&se.actualBoundingBoxDescent>0){this._tmpCtx.save();const Z=new Path2D;Z.rect(ie,Q-Math.ceil($/2),this._config.deviceCellWidth*re,oe-Q+Math.ceil($/2)),this._tmpCtx.clip(Z),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(L,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(I){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),K=$%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+K),this._tmpCtx.stroke()}if(te||this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight),L==="_"&&!this._config.allowTransparency){let $=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X);if($)for(let K=1;K<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight-K),$=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X),$);K++);}if(A){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),K=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function($){for(let K=0;K<$.data.length;K+=4)if($.data[K+3]>0)return!1;return!0}(de):h(de,E,Y,X),ue)return s;const V=this._findGlyphBoundingBox(de,this._workBoundingBox,D,W,te,U);let q,G;for(;;){if(this._activePages.length===0){const $=this._createNewPage();q=$,G=$.currentRow,G.height=V.size.y;break}q=this._activePages[this._activePages.length-1],G=q.currentRow;for(const $ of this._activePages)V.size.y<=$.currentRow.height&&(q=$,G=$.currentRow);for(let $=this._activePages.length-1;$>=0;$--)for(const K of this._activePages[$].fixedRows)K.height<=G.height&&V.size.y<=K.height&&(q=this._activePages[$],G=K);if(G.y+V.size.y>=q.canvas.height||G.height>V.size.y+2){let $=!1;if(q.currentRow.y+q.currentRow.height+V.size.y>=q.canvas.height){let K;for(const ie of this._activePages)if(ie.currentRow.y+ie.currentRow.height+V.size.y=u.maxAtlasPages&&G.y+V.size.y<=q.canvas.height&&G.height>=V.size.y&&G.x+V.size.x<=q.canvas.width)$=!0;else{const ie=this._createNewPage();q=ie,G=ie.currentRow,G.height=V.size.y,$=!0}}$||(q.currentRow.height>0&&q.fixedRows.push(q.currentRow),G={x:0,y:q.currentRow.y+q.currentRow.height,height:V.size.y},q.fixedRows.push(G),q.currentRow={x:0,y:G.y+G.height,height:0})}if(G.x+V.size.x<=q.canvas.width)break;G===q.currentRow?(G.x=0,G.y+=G.height,G.height=0):q.fixedRows.splice(q.fixedRows.indexOf(G),1)}return V.texturePage=this._pages.indexOf(q),V.texturePosition.x=G.x,V.texturePosition.y=G.y,V.texturePositionClipSpace.x=G.x/q.canvas.width,V.texturePositionClipSpace.y=G.y/q.canvas.height,V.sizeClipSpace.x/=q.canvas.width,V.sizeClipSpace.y/=q.canvas.height,G.height=Math.max(G.height,V.size.y),G.x+=V.size.x,q.ctx.putImageData(de,V.texturePosition.x-this._workBoundingBox.left,V.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,V.size.x,V.size.y),q.addGlyph(V),q.version++,V}_findGlyphBoundingBox(f,C,b,S,w,L){C.top=0;const D=S?this._config.deviceCellHeight:this._tmpCanvas.height,B=S?this._config.deviceCellWidth:b;let k=!1;for(let M=0;M=L;M--){for(let y=0;y=0;M--){for(let y=0;y>>24,w=f.rgba>>>16&255,L=f.rgba>>>8&255,D=C.rgba>>>24,B=C.rgba>>>16&255,k=C.rgba>>>8&255,M=Math.floor((Math.abs(S-D)+Math.abs(w-B)+Math.abs(L-k))/12);let y=!0;for(let x=0;x<_.data.length;x+=4)_.data[x]===S&&_.data[x+1]===w&&_.data[x+2]===L||b&&Math.abs(_.data[x]-S)+Math.abs(_.data[x+1]-w)+Math.abs(_.data[x+2]-L){Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let a=0,l=0,c=0,n=0;var d,v,g,r,e;function o(i){const u=i.toString(16);return u.length<2?"0"+u:u}function s(i,u){return i>>0},i.toColor=function(u,p,h,m){return{css:i.toCss(u,p,h,m),rgba:i.toRgba(u,p,h,m)}}}(d||(t.channels=d={})),function(i){function u(p,h){return n=Math.round(255*h),[a,l,c]=e.toChannels(p.rgba),{css:d.toCss(a,l,c,n),rgba:d.toRgba(a,l,c,n)}}i.blend=function(p,h){if(n=(255&h.rgba)/255,n===1)return{css:h.css,rgba:h.rgba};const m=h.rgba>>24&255,_=h.rgba>>16&255,f=h.rgba>>8&255,C=p.rgba>>24&255,b=p.rgba>>16&255,S=p.rgba>>8&255;return a=C+Math.round((m-C)*n),l=b+Math.round((_-b)*n),c=S+Math.round((f-S)*n),{css:d.toCss(a,l,c),rgba:d.toRgba(a,l,c)}},i.isOpaque=function(p){return(255&p.rgba)==255},i.ensureContrastRatio=function(p,h,m){const _=e.ensureContrastRatio(p.rgba,h.rgba,m);if(_)return d.toColor(_>>24&255,_>>16&255,_>>8&255)},i.opaque=function(p){const h=(255|p.rgba)>>>0;return[a,l,c]=e.toChannels(h),{css:d.toCss(a,l,c),rgba:h}},i.opacity=u,i.multiplyOpacity=function(p,h){return n=255&p.rgba,u(p,n*h/255)},i.toColorRGB=function(p){return[p.rgba>>24&255,p.rgba>>16&255,p.rgba>>8&255]}}(v||(t.color=v={})),function(i){let u,p;try{const h=document.createElement("canvas");h.width=1,h.height=1;const m=h.getContext("2d",{willReadFrequently:!0});m&&(u=m,u.globalCompositeOperation="copy",p=u.createLinearGradient(0,0,1,1))}catch{}i.toColor=function(h){if(h.match(/#[\da-f]{3,8}/i))switch(h.length){case 4:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),d.toColor(a,l,c);case 5:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),n=parseInt(h.slice(4,5).repeat(2),16),d.toColor(a,l,c,n);case 7:return{css:h,rgba:(parseInt(h.slice(1),16)<<8|255)>>>0};case 9:return{css:h,rgba:parseInt(h.slice(1),16)>>>0}}const m=h.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return a=parseInt(m[1]),l=parseInt(m[2]),c=parseInt(m[3]),n=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),d.toColor(a,l,c,n);if(!u||!p)throw new Error("css.toColor: Unsupported css format");if(u.fillStyle=p,u.fillStyle=h,typeof u.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(u.fillRect(0,0,1,1),[a,l,c,n]=u.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:d.toRgba(a,l,c,n),css:h}}}(g||(t.css=g={})),function(i){function u(p,h,m){const _=p/255,f=h/255,C=m/255;return .2126*(_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))}i.relativeLuminance=function(p){return u(p>>16&255,p>>8&255,255&p)},i.relativeLuminance2=u}(r||(t.rgb=r={})),function(i){function u(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S>0||w>0||L>0);)S-=Math.max(0,Math.ceil(.1*S)),w-=Math.max(0,Math.ceil(.1*w)),L-=Math.max(0,Math.ceil(.1*L)),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}function p(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S<255||w<255||L<255);)S=Math.min(255,S+Math.ceil(.1*(255-S))),w=Math.min(255,w+Math.ceil(.1*(255-w))),L=Math.min(255,L+Math.ceil(.1*(255-L))),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}i.blend=function(h,m){if(n=(255&m)/255,n===1)return m;const _=m>>24&255,f=m>>16&255,C=m>>8&255,b=h>>24&255,S=h>>16&255,w=h>>8&255;return a=b+Math.round((_-b)*n),l=S+Math.round((f-S)*n),c=w+Math.round((C-w)*n),d.toRgba(a,l,c)},i.ensureContrastRatio=function(h,m,_){const f=r.relativeLuminance(h>>8),C=r.relativeLuminance(m>>8);if(s(f,C)<_){if(C>8));if(L<_){const D=p(h,m,_);return L>s(f,r.relativeLuminance(D>>8))?w:D}return w}const b=p(h,m,_),S=s(f,r.relativeLuminance(b>>8));if(S<_){const w=u(h,m,_);return S>s(f,r.relativeLuminance(w>>8))?b:w}return b}},i.reduceLuminance=u,i.increaseLuminance=p,i.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]}}(e||(t.rgba=e={})),t.toPaddedHex=o,t.contrastRatio=s},345:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let l=0;ll.fire(c))},t.runAndSubscribe=function(a,l){return l(void 0),a(c=>l(c))}},859:(O,t)=>{function a(l){for(const c of l)c.dispose();l.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const c=this._disposables.indexOf(l);c!==-1&&this._disposables.splice(c,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){var c;this._isDisposed||l===this._value||((c=this._value)==null||c.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,(l=this._value)==null||l.dispose(),this._value=void 0}},t.toDisposable=function(l){return{dispose:l}},t.disposeArray=a,t.getDisposeArrayDisposable=function(l){return{dispose:()=>a(l)}}},485:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(c,n,d){this._data[c]||(this._data[c]={}),this._data[c][n]=d}get(c,n){return this._data[c]?this._data[c][n]:void 0}clear(){this._data={}}}t.TwoKeyMap=a,t.FourKeyMap=class{constructor(){this._data=new a}set(l,c,n,d,v){this._data.get(l,c)||this._data.set(l,c,new a),this._data.get(l,c).set(n,d,v)}get(l,c,n,d){var v;return(v=this._data.get(l,c))==null?void 0:v.get(n,d)}clear(){this._data.clear()}}},399:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=typeof process<"u"&&"title"in process;const a=t.isNode?"node":navigator.userAgent,l=t.isNode?"node":navigator.platform;t.isFirefox=a.includes("Firefox"),t.isLegacyEdge=a.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(a),t.getSafariVersion=function(){if(!t.isSafari)return 0;const c=a.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),t.isIpad=l==="iPad",t.isIphone=l==="iPhone",t.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),t.isLinux=l.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(a)},385:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const l=a(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),this._start()}flush(){for(;this._io)return e-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-g))}ms`),void this._start();e=o}this.clear()}}class n extends c{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const g=Date.now()+v;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},147:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new a;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=a;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,d=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=d}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}t.ExtendedAttrs=l},782:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const l=a(133),c=a(855),n=a(147);class d extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(g){const r=new d;return r.setFromCharData(g),r}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let r=!1;if(g[c.CHAR_DATA_CHAR_INDEX].length>2)r=!0;else if(g[c.CHAR_DATA_CHAR_INDEX].length===2){const e=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const o=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(e-55296)+o-56320+65536|g[c.CHAR_DATA_WIDTH_INDEX]<<22:r=!0}else r=!0}else this.content=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[c.CHAR_DATA_WIDTH_INDEX]<<22;r&&(this.combinedData=g[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=d},855:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},133:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},t.utf32ToString=function(a,l=0,c=a.length){let n="";for(let d=l;d65535?(v-=65536,n+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):n+=String.fromCharCode(v)}return n},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,l){const c=a.length;if(!c)return 0;let n=0,d=0;if(this._interim){const v=a.charCodeAt(d++);56320<=v&&v<=57343?l[n++]=1024*(this._interim-55296)+v-56320+65536:(l[n++]=this._interim,l[n++]=v),this._interim=0}for(let v=d;v=c)return this._interim=g,n;const r=a.charCodeAt(v);56320<=r&&r<=57343?l[n++]=1024*(g-55296)+r-56320+65536:(l[n++]=g,l[n++]=r)}else g!==65279&&(l[n++]=g)}return n}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,l){const c=a.length;if(!c)return 0;let n,d,v,g,r=0,e=0,o=0;if(this.interim[0]){let u=!1,p=this.interim[0];p&=(224&p)==192?31:(240&p)==224?15:7;let h,m=0;for(;(h=63&this.interim[++m])&&m<4;)p<<=6,p|=h;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=_-m;for(;o=c)return 0;if(h=a[o++],(192&h)!=128){o--,u=!0;break}this.interim[m++]=h,p<<=6,p|=63&h}u||(_===2?p<128?o--:l[r++]=p:_===3?p<2048||p>=55296&&p<=57343||p===65279||(l[r++]=p):p<65536||p>1114111||(l[r++]=p)),this.interim.fill(0)}const s=c-4;let i=o;for(;i=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(e=(31&n)<<6|63&d,e<128){i--;continue}l[r++]=e}else if((240&n)==224){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(e=(15&n)<<12|(63&d)<<6|63&v,e<2048||e>=55296&&e<=57343||e===65279)continue;l[r++]=e}else if((248&n)==240){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,this.interim[2]=v,r;if(g=a[i++],(192&g)!=128){i--;continue}if(e=(7&n)<<18|(63&d)<<12|(63&v)<<6|63&g,e<65536||e>1114111)continue;l[r++]=e}}return r}}},776:function(O,t,a){var l=this&&this.__decorate||function(e,o,s,i){var u,p=arguments.length,h=p<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,s):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(e,o,s,i);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(h=(p<3?u(h):p>3?u(o,s,h):u(o,s))||h);return p>3&&h&&Object.defineProperty(o,s,h),h},c=this&&this.__param||function(e,o){return function(s,i){o(s,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=a(859),d=a(97),v={trace:d.LogLevelEnum.TRACE,debug:d.LogLevelEnum.DEBUG,info:d.LogLevelEnum.INFO,warn:d.LogLevelEnum.WARN,error:d.LogLevelEnum.ERROR,off:d.LogLevelEnum.OFF};let g,r=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),g=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let o=0;oJSON.stringify(h)).join(", ")})`);const p=i.apply(this,u);return g.trace(`GlyphRenderer#${i.name} return`,p),p}}},726:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const a="di$target",l="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(c){return c[l]||[]},t.createDecorator=function(c){if(t.serviceRegistry.has(c))return t.serviceRegistry.get(c);const n=function(d,v,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(r,e,o){e[a]===e?e[l].push({id:r,index:o}):(e[l]=[{id:r,index:o}],e[a]=e)})(n,d,g)};return n.toString=()=>c,t.serviceRegistry.set(c,n),n}},97:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const l=a(726);var c;t.IBufferService=(0,l.createDecorator)("BufferService"),t.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),t.ICoreService=(0,l.createDecorator)("CoreService"),t.ICharsetService=(0,l.createDecorator)("CharsetService"),t.IInstantiationService=(0,l.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(c||(t.LogLevelEnum=c={})),t.ILogService=(0,l.createDecorator)("LogService"),t.IOptionsService=(0,l.createDecorator)("OptionsService"),t.IOscLinkService=(0,l.createDecorator)("OscLinkService"),t.IUnicodeService=(0,l.createDecorator)("UnicodeService"),t.IDecorationService=(0,l.createDecorator)("DecorationService")}},ne={};function ee(O){var t=ne[O];if(t!==void 0)return t.exports;var a=ne[O]={exports:{}};return ce[O].call(a.exports,a,a.exports,ee),a.exports}var le={};return(()=>{var O=le;Object.defineProperty(O,"__esModule",{value:!0}),O.WebglAddon=void 0;const t=ee(345),a=ee(859),l=ee(399),c=ee(666),n=ee(776);class d extends a.Disposable{constructor(g){if(l.isSafari&&(0,l.getSafariVersion)()<16){const r={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",r))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=g,this._onChangeTextureAtlas=this.register(new t.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new t.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new t.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new t.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(g){const r=g._core;if(!g.element)return void this.register(r.onWillOpen(()=>this.activate(g)));this._terminal=g;const e=r.coreService,o=r.optionsService,s=r,i=s._renderService,u=s._characterJoinerService,p=s._charSizeService,h=s._coreBrowserService,m=s._decorationService,_=s._logService,f=s._themeService;(0,n.setTraceLogger)(_),this._renderer=this.register(new c.WebglRenderer(g,u,p,h,e,m,o,f,this._preserveDrawingBuffer)),this.register((0,t.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,t.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,t.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),i.setRenderer(this._renderer),this.register((0,a.toDisposable)(()=>{const C=this._terminal._core._renderService;C.setRenderer(this._terminal._core._createRenderer()),C.handleResize(g.cols,g.rows)}))}get textureAtlas(){var g;return(g=this._renderer)==null?void 0:g.textureAtlas}clearTextureAtlas(){var g;(g=this._renderer)==null||g.clearTextureAtlas()}}O.WebglAddon=d})(),le})())})(Ae);var Oe=Ae.exports,De={exports:{}};(function(he,Ce){(function(ce,ne){he.exports=ne()})(self,()=>(()=>{var ce={903:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;const l=a(274),c=a(627),n=a(237),d=a(860),v=a(374),g=a(296),r=a(345),e=a(859),o=a(399),s=a(855);class i extends e.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var h;return(h=this._charAtlas)==null?void 0:h.pages[0].canvas}constructor(h,m,_,f,C,b,S,w,L,D){super(),this._terminal=h,this._container=m,this._alpha=C,this._themeService=b,this._bufferService=S,this._optionsService=w,this._decorationService=L,this._coreBrowserService=D,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,g.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new e.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new l.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${_}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors(B=>{this._refreshCharAtlas(B),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)})),this.register((0,e.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(h,m){}handleSelectionChanged(h,m,_=!1){this._selectionModel.update(this._terminal._core,h,m,_)}_setTransparency(h){if(h===this._alpha)return;const m=this._canvas;this._alpha=h,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,m),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(h){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,c.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,h,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,r.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let m=0;m1?this._charAtlas.getRasterizedGlyphCombinedChar(f,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(h.getCode()||s.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!S.size.x||!S.size.y)return;this._ctx.save(),this._clipRow(_),this._bitmapGenerator[S.texturePage]&&this._charAtlas.pages[S.texturePage].canvas!==this._bitmapGenerator[S.texturePage].canvas&&((D=(L=this._bitmapGenerator[S.texturePage])==null?void 0:L.bitmap)==null||D.close(),delete this._bitmapGenerator[S.texturePage]),this._charAtlas.pages[S.texturePage].version!==((B=this._bitmapGenerator[S.texturePage])==null?void 0:B.version)&&(this._bitmapGenerator[S.texturePage]||(this._bitmapGenerator[S.texturePage]=new u(this._charAtlas.pages[S.texturePage].canvas)),this._bitmapGenerator[S.texturePage].refresh(),this._bitmapGenerator[S.texturePage].version=this._charAtlas.pages[S.texturePage].version);let w=S.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,v.allowRescaling)(C,b,S.size.x,this._deviceCellWidth)&&(w=this._deviceCellWidth-1),this._ctx.drawImage(((k=this._bitmapGenerator[S.texturePage])==null?void 0:k.bitmap)||this._charAtlas.pages[S.texturePage].canvas,S.texturePosition.x,S.texturePosition.y,S.size.x,S.size.y,m*this._deviceCellWidth+this._deviceCharLeft-S.offset.x,_*this._deviceCellHeight+this._deviceCharTop-S.offset.y,w,S.size.y),this._ctx.restore()}_clipRow(h){this._ctx.beginPath(),this._ctx.rect(0,h*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(h,m){return`${m?"italic":""} ${h?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}t.BaseRenderLayer=i;class u{get bitmap(){return this._bitmap}constructor(h){this.canvas=h,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var h;(h=this._bitmap)==null||h.close(),this._bitmap=void 0,o.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout(()=>this._generate(),100)),this._state===1&&(this._state=2))}_generate(){var h;this._state===0&&((h=this._bitmap)==null||h.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then(m=>{this._state===2?this.refresh():this._bitmap=m,this._state=0}),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasRenderer=void 0;const l=a(627),c=a(56),n=a(374),d=a(345),v=a(859),g=a(873),r=a(43),e=a(630),o=a(744);class s extends v.Disposable{constructor(u,p,h,m,_,f,C,b,S,w,L){super(),this._terminal=u,this._screenElement=p,this._bufferService=m,this._charSizeService=_,this._optionsService=f,this._coreBrowserService=S,this._themeService=L,this._observerDisposable=this.register(new v.MutableDisposable),this._onRequestRedraw=this.register(new d.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new d.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new d.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const D=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new o.TextRenderLayer(this._terminal,this._screenElement,0,D,this._bufferService,this._optionsService,C,w,this._coreBrowserService,L),new e.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,w,this._optionsService,L),new r.LinkRenderLayer(this._terminal,this._screenElement,2,h,this._bufferService,this._optionsService,w,this._coreBrowserService,L),new g.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,b,this._coreBrowserService,w,L)];for(const B of this._renderLayers)(0,d.forwardEvent)(B.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,n.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(B,k)=>this._setCanvasDevicePixelDimensions(B,k)),this.register(this._coreBrowserService.onWindowChange(B=>{this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,B,(k,M)=>this._setCanvasDevicePixelDimensions(k,M))})),this.register((0,v.toDisposable)(()=>{for(const B of this._renderLayers)B.dispose();(0,l.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(u,p){this._updateDimensions();for(const h of this._renderLayers)h.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation(u=>u.handleBlur())}handleFocus(){this._runOperation(u=>u.handleFocus())}handleSelectionChanged(u,p,h=!1){this._runOperation(m=>m.handleSelectionChanged(u,p,h)),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation(u=>u.handleCursorMove())}clear(){this._runOperation(u=>u.reset())}_runOperation(u){for(const p of this._renderLayers)u(p)}renderRows(u,p){for(const h of this._renderLayers)h.handleGridChanged(u,p)}clearTextureAtlas(){for(const u of this._renderLayers)u.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const u=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*u),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*u),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/u),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/u),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(u,p){this.dimensions.device.canvas.height=p,this.dimensions.device.canvas.width=u;for(const h of this._renderLayers)h.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}t.CanvasRenderer=s},873:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRenderLayer=void 0;const l=a(457),c=a(859),n=a(399),d=a(782),v=a(903);class g extends v.BaseRenderLayer{constructor(e,o,s,i,u,p,h,m,_,f){super(e,o,"cursor",s,!0,f,u,p,_,m),this._onRequestRedraw=i,this._coreService=h,this._cursorBlinkStateManager=this.register(new c.MutableDisposable),this._cell=new d.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(p.onOptionChange(()=>this._handleOptionsChanged())),this._handleOptionsChanged()}resize(e){super.resize(e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var e;this._clearCursor(),(e=this._cursorBlinkStateManager.value)==null||e.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var e;(e=this._cursorBlinkStateManager.value)==null||e.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var e;(e=this._cursorBlinkStateManager.value)==null||e.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new l.CursorBlinkStateManager(()=>this._render(!0),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var e;(e=this._cursorBlinkStateManager.value)==null||e.restartBlinkAnimation()}handleGridChanged(e,o){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(e){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const o=this._bufferService.buffer.ybase+this._bufferService.buffer.y,s=o-this._bufferService.buffer.ydisp;if(s<0||s>=this._bufferService.rows)return void this._clearCursor();const i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(o).loadCell(i,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const u=this._optionsService.rawOptions.cursorStyle,p=this._optionsService.rawOptions.cursorInactiveStyle;return p&&p!=="none"&&this._cursorRenderers[p](i,s,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=s,this._state.isFocused=!1,this._state.style=u,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===i&&this._state.y===s&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](i,s,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=s,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(n.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(e,o,s){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(e,o,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(e,o,s){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(e,o,s.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(s,e,o),this._ctx.restore()}_renderUnderlineCursor(e,o,s){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(e,o),this._ctx.restore()}_renderOutlineCursor(e,o,s){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(e,o,s.getWidth(),1),this._ctx.restore()}}t.CursorRenderLayer=g},574:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridCache=void 0,t.GridCache=class{constructor(){this.cache=[]}resize(a,l){for(let c=0;c{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;const l=a(197),c=a(237),n=a(903);class d extends n.BaseRenderLayer{constructor(g,r,e,o,s,i,u,p,h){super(g,r,"link",e,!0,h,s,i,u,p),this.register(o.onShowLinkUnderline(m=>this._handleShowLinkUnderline(m))),this.register(o.onHideLinkUnderline(m=>this._handleHideLinkUnderline(m)))}resize(g){super.resize(g),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const g=this._state.y2-this._state.y1-1;g>0&&this._clearCells(0,this._state.y1+1,this._state.cols,g),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(g){if(g.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:g.fg&&(0,l.is256Color)(g.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[g.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,g.y1===g.y2)this._fillBottomLineAtCells(g.x1,g.y1,g.x2-g.x1);else{this._fillBottomLineAtCells(g.x1,g.y1,g.cols-g.x1);for(let r=g.y1+1;r{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRenderLayer=void 0;const l=a(903);class c extends l.BaseRenderLayer{constructor(d,v,g,r,e,o,s,i){super(d,v,"selection",g,!0,i,r,s,o,e),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(d){super.resize(d),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(d,v,g){super.handleSelectionChanged(d,v,g),this._redrawSelection(d,v,g)}_redrawSelection(d,v,g){if(!this._didStateChange(d,v,g,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!d||!v)return void this._clearState();const r=d[1]-this._bufferService.buffer.ydisp,e=v[1]-this._bufferService.buffer.ydisp,o=Math.max(r,0),s=Math.min(e,this._bufferService.rows-1);if(o>=this._bufferService.rows||s<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,g){const i=d[0],u=v[0]-i,p=s-o+1;this._fillCells(i,o,u,p)}else{const i=r===o?d[0]:0,u=o===e?v[0]:this._bufferService.cols;this._fillCells(i,o,u-i,1);const p=Math.max(s-o-1,0);if(this._fillCells(0,o+1,this._bufferService.cols,p),o!==s){const h=e===s?v[0]:this._bufferService.cols;this._fillCells(0,s,h,1)}}this._state.start=[d[0],d[1]],this._state.end=[v[0],v[1]],this._state.columnSelectMode=g,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(d,v,g,r){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(v,this._state.end)||g!==this._state.columnSelectMode||r!==this._state.ydisp}_areCoordinatesEqual(d,v){return!(!d||!v)&&d[0]===v[0]&&d[1]===v[1]}}t.SelectionRenderLayer=c},744:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextRenderLayer=void 0;const l=a(577),c=a(147),n=a(782),d=a(855),v=a(903),g=a(574);class r extends v.BaseRenderLayer{constructor(o,s,i,u,p,h,m,_,f,C){super(o,s,"text",i,u,C,p,h,_,f),this._characterJoinerService=m,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new n.CellData,this._state=new g.GridCache,this.register(h.onSpecificOptionChange("allowTransparency",b=>this._setTransparency(b)))}resize(o){super.resize(o);const s=this._getFont(!1,!1);this._characterWidth===o.device.char.width&&this._characterFont===s||(this._characterWidth=o.device.char.width,this._characterFont=s,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(o,s,i){for(let u=o;u<=s;u++){const p=u+this._bufferService.buffer.ydisp,h=this._bufferService.buffer.lines.get(p),m=this._characterJoinerService.getJoinedCharacters(p);for(let _=0;_0&&_===m[0][0]){C=!0;const S=m.shift();f=new l.JoinedCellData(this._workCell,h.translateToString(!0,S[0],S[1]),S[1]-S[0]),b=S[1]-1}!C&&this._isOverlapping(f)&&b{let b=null;_.isInverse()?b=_.isFgDefault()?this._themeService.colors.foreground.css:_.isFgRGB()?`rgb(${c.AttributeData.toColorRGB(_.getFgColor()).join(",")})`:this._themeService.colors.ansi[_.getFgColor()].css:_.isBgRGB()?b=`rgb(${c.AttributeData.toColorRGB(_.getBgColor()).join(",")})`:_.isBgPalette()&&(b=this._themeService.colors.ansi[_.getBgColor()].css);let S=!1;this._decorationService.forEachDecorationAtCell(f,this._bufferService.buffer.ydisp+C,void 0,w=>{w.options.layer!=="top"&&S||(w.backgroundColorRGB&&(b=w.backgroundColorRGB.css),S=w.options.layer==="top")}),m===null&&(p=f,h=C),C!==h?(i.fillStyle=m||"",this._fillCells(p,h,u-p,1),p=f,h=C):m!==b&&(i.fillStyle=m||"",this._fillCells(p,h,f-p,1),p=f,h=C),m=b}),m!==null&&(i.fillStyle=m,this._fillCells(p,h,u-p,1)),i.restore()}_drawForeground(o,s){this._forEachCell(o,s,(i,u,p)=>this._drawChars(i,u,p))}handleGridChanged(o,s){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,o,this._bufferService.cols,s-o+1),this._drawBackground(o,s),this._drawForeground(o,s))}_isOverlapping(o){if(o.getWidth()!==1||o.getCode()<256)return!1;const s=o.getChars();if(this._characterOverlapCache.hasOwnProperty(s))return this._characterOverlapCache[s];this._ctx.save(),this._ctx.font=this._characterFont;const i=Math.floor(this._ctx.measureText(s).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[s]=i,i}}t.TextRenderLayer=r},274:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellColorResolver=void 0;const l=a(855),c=a(160),n=a(374);let d,v=0,g=0,r=!1,e=!1,o=!1,s=0;t.CellColorResolver=class{constructor(i,u,p,h,m,_){this._terminal=i,this._optionService=u,this._selectionRenderModel=p,this._decorationService=h,this._coreBrowserService=m,this._themeService=_,this.result={fg:0,bg:0,ext:0}}resolve(i,u,p,h){if(this.result.bg=i.bg,this.result.fg=i.fg,this.result.ext=268435456&i.bg?i.extended.ext:0,g=0,v=0,e=!1,r=!1,o=!1,d=this._themeService.colors,s=0,i.getCode()!==l.NULL_CELL_CODE&&i.extended.underlineStyle===4){const m=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));s=u*h%(2*Math.round(m))}if(this._decorationService.forEachDecorationAtCell(u,p,"bottom",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),o=this._selectionRenderModel.isCellSelected(this._terminal,u,p),o){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:g=(16777215&this.result.fg)<<8|255;break;default:g=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:g=(16777215&this.result.bg)<<8|255}g=c.rgba.blend(g,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else g=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(e=!0,d.selectionForeground&&(v=d.selectionForeground.rgba>>8&16777215,r=!0),(0,n.treatGlyphAsBackgroundColor)(i.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))v=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:v=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:v=(16777215&this.result.fg)<<8|255;break;default:v=this._themeService.colors.foreground.rgba}v=c.rgba.blend(v,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}r=!0}}this._decorationService.forEachDecorationAtCell(u,p,"top",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),e&&(g=o?-16777216&i.bg&-134217729|g|50331648:-16777216&i.bg|g|50331648),r&&(v=-16777216&i.fg&-67108865|v|50331648),67108864&this.result.fg&&(e&&!r&&(v=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&d.background.rgba>>8|50331648,r=!0),!e&&r&&(g=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&d.foreground.rgba>>8|50331648,e=!0)),d=void 0,this.result.bg=e?g:this.result.bg,this.result.fg=r?v:this.result.fg,this.result.ext&=536870911,this.result.ext|=s<<29&3758096384}}},627:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireTextureAtlas=void 0;const l=a(509),c=a(197),n=[];t.acquireTextureAtlas=function(d,v,g,r,e,o,s,i){const u=(0,c.generateConfig)(r,e,o,s,v,g,i);for(let m=0;m=0){if((0,c.configEquals)(_.config,u))return _.atlas;_.ownedBy.length===1?(_.atlas.dispose(),n.splice(m,1)):_.ownedBy.splice(f,1);break}}for(let m=0;m{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;const l=a(160);t.generateConfig=function(c,n,d,v,g,r,e){const o={foreground:r.foreground,background:r.background,cursor:l.NULL_COLOR,cursorAccent:l.NULL_COLOR,selectionForeground:l.NULL_COLOR,selectionBackgroundTransparent:l.NULL_COLOR,selectionBackgroundOpaque:l.NULL_COLOR,selectionInactiveBackgroundTransparent:l.NULL_COLOR,selectionInactiveBackgroundOpaque:l.NULL_COLOR,ansi:r.ansi.slice(),contrastCache:r.contrastCache,halfContrastCache:r.halfContrastCache};return{customGlyphs:g.customGlyphs,devicePixelRatio:e,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight,deviceCellWidth:c,deviceCellHeight:n,deviceCharWidth:d,deviceCharHeight:v,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,drawBoldTextInBrightColors:g.drawBoldTextInBrightColors,minimumContrastRatio:g.minimumContrastRatio,colors:o}},t.configEquals=function(c,n){for(let d=0;d{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const l=a(399);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorBlinkStateManager=void 0,t.CursorBlinkStateManager=class{constructor(a,l){this._renderCallback=a,this._coreBrowserService=l,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(a=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,l>0)return void this._restartInterval(l)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(l)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},a)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.powerlineDefinitions=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;const l=a(374);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╒":{1:(r,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(r,e)=>`M${.5-r},1 L${.5-r},.5 L1,.5 M${.5+r},.5 L${.5+r},1`},"╔":{1:(r,e)=>`M1,${.5-e} L${.5-r},${.5-e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╕":{1:(r,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(r,e)=>`M${.5+r},1 L${.5+r},.5 L0,.5 M${.5-r},.5 L${.5-r},1`},"╗":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5+r},${.5-e} L${.5+r},1`},"╘":{1:(r,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(r,e)=>`M1,.5 L${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╚":{1:(r,e)=>`M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0 M1,${.5+e} L${.5-r},${.5+e} L${.5-r},0`},"╛":{1:(r,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(r,e)=>`M0,.5 L${.5+r},.5 L${.5+r},0 M${.5-r},.5 L${.5-r},0`},"╝":{1:(r,e)=>`M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M0,${.5+e} L${.5+r},${.5+e} L${.5+r},0`},"╞":{1:(r,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1 M${.5+r},.5 L1,.5`},"╠":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╡":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(r,e)=>`M0,.5 L${.5-r},.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╣":{1:(r,e)=>`M${.5+r},0 L${.5+r},1 M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0`},"╤":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},1 M${.5+r},.5 L${.5+r},1`},"╦":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╧":{1:(r,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╩":{1:(r,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╪":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╬":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},t.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.tryDrawCustomChar=function(r,e,o,s,i,u,p,h){const m=t.blockElementDefinitions[e];if(m)return function(b,S,w,L,D,B){for(let k=0;k7&&parseInt(M.slice(7,9),16)||1;else{if(!M.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${M}" when drawing pattern glyph`);[j,N,T,E]=M.substring(5,M.length-1).split(",").map(F=>parseFloat(F))}for(let F=0;Fr.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(r,e)=>r.lineTo(e[0],e[1]),M:(r,e)=>r.moveTo(e[0],e[1])};function g(r,e,o,s,i,u,p,h=0,m=0){const _=r.map(f=>parseFloat(f)||parseInt(f));if(_.length<2)throw new Error("Too few arguments for instruction");for(let f=0;f<_.length;f+=2)_[f]*=e-h*p-m*p,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,e,0)),_[f]+=s+h*p;for(let f=1;f<_.length;f+=2)_[f]*=o,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,o,0)),_[f]+=i;return _}},56:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeDevicePixelDimensions=void 0;const l=a(859);t.observeDevicePixelDimensions=function(c,n,d){let v=new n.ResizeObserver(g=>{const r=g.find(s=>s.target===c);if(!r)return;if(!("devicePixelContentBoxSize"in r))return v==null||v.disconnect(),void(v=void 0);const e=r.devicePixelContentBoxSize[0].inlineSize,o=r.devicePixelContentBoxSize[0].blockSize;e>0&&o>0&&d(e,o)});try{v.observe(c,{box:["device-pixel-content-box"]})}catch{v.disconnect(),v=void 0}return(0,l.toDisposable)(()=>v==null?void 0:v.disconnect())}},374:(O,t)=>{function a(c){return 57508<=c&&c<=57558}function l(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},t.isPowerlineGlyph=a,t.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},t.isEmoji=l,t.allowRescaling=function(c,n,d,v){return n===1&&d>Math.ceil(1.5*v)&&c!==void 0&&c>255&&!l(c)&&!a(c)&&!function(g){return 57344<=g&&g<=63743}(c)},t.treatGlyphAsBackgroundColor=function(c){return a(c)||function(n){return 9472<=n&&n<=9631}(c)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(c,n,d=0){return(c-(2*Math.round(n)-d))%(2*Math.round(n))}},296:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,n,d,v=!1){if(this.selectionStart=n,this.selectionEnd=d,!n||!d||n[0]===d[0]&&n[1]===d[1])return void this.clear();const g=c.buffers.active.ydisp,r=n[1]-g,e=d[1]-g,o=Math.max(r,0),s=Math.min(e,c.rows-1);o>=c.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=r,this.viewportEndRow=e,this.viewportCappedStartRow=o,this.viewportCappedEndRow=s,this.startCol=n[0],this.endCol=d[0])}isCellSelected(c,n,d){return!!this.hasSelection&&(d-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&d>=this.viewportCappedStartRow&&n=this.viewportCappedStartRow&&n>=this.endCol&&d<=this.viewportCappedEndRow:d>this.viewportStartRow&&d=this.startCol&&n=this.startCol)}}t.createSelectionRenderModel=function(){return new a}},509:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextureAtlas=void 0;const l=a(237),c=a(860),n=a(374),d=a(160),v=a(345),g=a(485),r=a(385),e=a(147),o=a(855),s={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let i;class u{get pages(){return this._pages}constructor(f,C,b){this._document=f,this._config=C,this._unicodeService=b,this._didWarmUp=!1,this._cacheMap=new g.FourKeyMap,this._cacheMapCombined=new g.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new e.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new v.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new v.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=m(f,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,n.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const f of this.pages)f.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const f=new r.IdleTaskQueue;for(let C=33;C<126;C++)f.enqueue(()=>{if(!this._cacheMap.get(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT)){const b=this._drawToCache(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT);this._cacheMap.set(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT,b)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const f of this._pages)f.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(u.maxAtlasPages&&this._pages.length>=Math.max(4,u.maxAtlasPages)){const C=this._pages.filter(k=>2*k.canvas.width<=(u.maxTextureSize||4096)).sort((k,M)=>M.canvas.width!==k.canvas.width?M.canvas.width-k.canvas.width:M.percentageUsed-k.percentageUsed);let b=-1,S=0;for(let k=0;kk.glyphs[0].texturePage).sort((k,M)=>k>M?1:-1),D=this.pages.length-w.length,B=this._mergePages(w,D);B.version++;for(let k=L.length-1;k>=0;k--)this._deletePage(L[k]);this.pages.push(B),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(B.canvas)}const f=new p(this._document,this._textureSize);return this._pages.push(f),this._activePages.push(f),this._onAddTextureAtlasCanvas.fire(f.canvas),f}_mergePages(f,C){const b=2*f[0].canvas.width,S=new p(this._document,b,f);for(const[w,L]of f.entries()){const D=w*L.canvas.width%b,B=Math.floor(w/2)*L.canvas.height;S.ctx.drawImage(L.canvas,D,B);for(const M of L.glyphs)M.texturePage=C,M.sizeClipSpace.x=M.size.x/b,M.sizeClipSpace.y=M.size.y/b,M.texturePosition.x+=D,M.texturePosition.y+=B,M.texturePositionClipSpace.x=M.texturePosition.x/b,M.texturePositionClipSpace.y=M.texturePosition.y/b;this._onRemoveTextureAtlasCanvas.fire(L.canvas);const k=this._activePages.indexOf(L);k!==-1&&this._activePages.splice(k,1)}return S}_deletePage(f){this._pages.splice(f,1);for(let C=f;C=this._config.colors.ansi.length)throw new Error("No color found for idx "+f);return this._config.colors.ansi[f]}_getBackgroundColor(f,C,b,S){if(this._config.allowTransparency)return d.NULL_COLOR;let w;switch(f){case 16777216:case 33554432:w=this._getColorFromAnsiIndex(C);break;case 50331648:const L=e.AttributeData.toColorRGB(C);w=d.channels.toColor(L[0],L[1],L[2]);break;default:w=b?d.color.opaque(this._config.colors.foreground):this._config.colors.background}return w}_getForegroundColor(f,C,b,S,w,L,D,B,k,M){const y=this._getMinimumContrastColor(f,C,b,S,w,L,D,k,B,M);if(y)return y;let x;switch(w){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&k&&L<8&&(L+=8),x=this._getColorFromAnsiIndex(L);break;case 50331648:const R=e.AttributeData.toColorRGB(L);x=d.channels.toColor(R[0],R[1],R[2]);break;default:x=D?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(x=d.color.opaque(x)),B&&(x=d.color.multiplyOpacity(x,l.DIM_OPACITY)),x}_resolveBackgroundRgba(f,C,b){switch(f){case 16777216:case 33554432:return this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(f,C,b,S){switch(f){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&S&&C<8&&(C+=8),this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(f,C,b,S,w,L,D,B,k,M){if(this._config.minimumContrastRatio===1||M)return;const y=this._getContrastCache(k),x=y.getColor(f,S);if(x!==void 0)return x||void 0;const R=this._resolveBackgroundRgba(C,b,D),A=this._resolveForegroundRgba(w,L,D,B),I=d.rgba.ensureContrastRatio(R,A,this._config.minimumContrastRatio/(k?2:1));if(!I)return void y.setColor(f,S,null);const H=d.channels.toColor(I>>24&255,I>>16&255,I>>8&255);return y.setColor(f,S,H),H}_getContrastCache(f){return f?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(f,C,b,S,w=!1){const L=typeof f=="number"?String.fromCharCode(f):f,D=Math.min(this._config.deviceCellWidth*Math.max(L.length,2)+4,this._textureSize);this._tmpCanvas.width=$?2*$-ae:$-ae;ae>=$||pe===0?(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z+pe,Q),this._tmpCtx.lineTo(J,Q)):(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(Z+pe,Q),this._tmpCtx.moveTo(Z+pe+$,Q),this._tmpCtx.lineTo(J,Q)),ae=(0,n.computeNextVariantOffset)(J-Z,$,ae);break;case 5:const ye=.6,Le=.3,me=J-Z,be=Math.floor(ye*me),we=Math.floor(Le*me),xe=me-be-we;this._tmpCtx.setLineDash([be,we,xe]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q);break;default:this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!te&&this._config.fontSize>=12&&!this._config.allowTransparency&&L!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const se=this._tmpCtx.measureText(L);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in se&&se.actualBoundingBoxDescent>0){this._tmpCtx.save();const Z=new Path2D;Z.rect(ie,Q-Math.ceil($/2),this._config.deviceCellWidth*re,oe-Q+Math.ceil($/2)),this._tmpCtx.clip(Z),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(L,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(I){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),K=$%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+K),this._tmpCtx.stroke()}if(te||this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight),L==="_"&&!this._config.allowTransparency){let $=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X);if($)for(let K=1;K<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight-K),$=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X),$);K++);}if(A){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),K=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function($){for(let K=0;K<$.data.length;K+=4)if($.data[K+3]>0)return!1;return!0}(de):h(de,E,Y,X),ue)return s;const V=this._findGlyphBoundingBox(de,this._workBoundingBox,D,W,te,U);let q,G;for(;;){if(this._activePages.length===0){const $=this._createNewPage();q=$,G=$.currentRow,G.height=V.size.y;break}q=this._activePages[this._activePages.length-1],G=q.currentRow;for(const $ of this._activePages)V.size.y<=$.currentRow.height&&(q=$,G=$.currentRow);for(let $=this._activePages.length-1;$>=0;$--)for(const K of this._activePages[$].fixedRows)K.height<=G.height&&V.size.y<=K.height&&(q=this._activePages[$],G=K);if(G.y+V.size.y>=q.canvas.height||G.height>V.size.y+2){let $=!1;if(q.currentRow.y+q.currentRow.height+V.size.y>=q.canvas.height){let K;for(const ie of this._activePages)if(ie.currentRow.y+ie.currentRow.height+V.size.y=u.maxAtlasPages&&G.y+V.size.y<=q.canvas.height&&G.height>=V.size.y&&G.x+V.size.x<=q.canvas.width)$=!0;else{const ie=this._createNewPage();q=ie,G=ie.currentRow,G.height=V.size.y,$=!0}}$||(q.currentRow.height>0&&q.fixedRows.push(q.currentRow),G={x:0,y:q.currentRow.y+q.currentRow.height,height:V.size.y},q.fixedRows.push(G),q.currentRow={x:0,y:G.y+G.height,height:0})}if(G.x+V.size.x<=q.canvas.width)break;G===q.currentRow?(G.x=0,G.y+=G.height,G.height=0):q.fixedRows.splice(q.fixedRows.indexOf(G),1)}return V.texturePage=this._pages.indexOf(q),V.texturePosition.x=G.x,V.texturePosition.y=G.y,V.texturePositionClipSpace.x=G.x/q.canvas.width,V.texturePositionClipSpace.y=G.y/q.canvas.height,V.sizeClipSpace.x/=q.canvas.width,V.sizeClipSpace.y/=q.canvas.height,G.height=Math.max(G.height,V.size.y),G.x+=V.size.x,q.ctx.putImageData(de,V.texturePosition.x-this._workBoundingBox.left,V.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,V.size.x,V.size.y),q.addGlyph(V),q.version++,V}_findGlyphBoundingBox(f,C,b,S,w,L){C.top=0;const D=S?this._config.deviceCellHeight:this._tmpCanvas.height,B=S?this._config.deviceCellWidth:b;let k=!1;for(let M=0;M=L;M--){for(let y=0;y=0;M--){for(let y=0;y>>24,w=f.rgba>>>16&255,L=f.rgba>>>8&255,D=C.rgba>>>24,B=C.rgba>>>16&255,k=C.rgba>>>8&255,M=Math.floor((Math.abs(S-D)+Math.abs(w-B)+Math.abs(L-k))/12);let y=!0;for(let x=0;x<_.data.length;x+=4)_.data[x]===S&&_.data[x+1]===w&&_.data[x+2]===L||b&&Math.abs(_.data[x]-S)+Math.abs(_.data[x+1]-w)+Math.abs(_.data[x+2]-L)=0;_--)(p=o[_])&&(m=(h<3?p(m):h>3?p(s,i,m):p(s,i))||m);return h>3&&m&&Object.defineProperty(s,i,m),m},c=this&&this.__param||function(o,s){return function(i,u){s(i,u,o)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const n=a(147),d=a(855),v=a(782),g=a(97);class r extends n.AttributeData{constructor(s,i,u){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=i,this._width=u}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=r;let e=t.CharacterJoinerService=class ke{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new v.CellData}register(s){const i={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(i),i.id}deregister(s){for(let i=0;i1){const S=this._getJoinedRanges(p,_,m,i,h);for(let w=0;w1){const b=this._getJoinedRanges(p,_,m,i,h);for(let S=0;S{Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let a=0,l=0,c=0,n=0;var d,v,g,r,e;function o(i){const u=i.toString(16);return u.length<2?"0"+u:u}function s(i,u){return i>>0},i.toColor=function(u,p,h,m){return{css:i.toCss(u,p,h,m),rgba:i.toRgba(u,p,h,m)}}}(d||(t.channels=d={})),function(i){function u(p,h){return n=Math.round(255*h),[a,l,c]=e.toChannels(p.rgba),{css:d.toCss(a,l,c,n),rgba:d.toRgba(a,l,c,n)}}i.blend=function(p,h){if(n=(255&h.rgba)/255,n===1)return{css:h.css,rgba:h.rgba};const m=h.rgba>>24&255,_=h.rgba>>16&255,f=h.rgba>>8&255,C=p.rgba>>24&255,b=p.rgba>>16&255,S=p.rgba>>8&255;return a=C+Math.round((m-C)*n),l=b+Math.round((_-b)*n),c=S+Math.round((f-S)*n),{css:d.toCss(a,l,c),rgba:d.toRgba(a,l,c)}},i.isOpaque=function(p){return(255&p.rgba)==255},i.ensureContrastRatio=function(p,h,m){const _=e.ensureContrastRatio(p.rgba,h.rgba,m);if(_)return d.toColor(_>>24&255,_>>16&255,_>>8&255)},i.opaque=function(p){const h=(255|p.rgba)>>>0;return[a,l,c]=e.toChannels(h),{css:d.toCss(a,l,c),rgba:h}},i.opacity=u,i.multiplyOpacity=function(p,h){return n=255&p.rgba,u(p,n*h/255)},i.toColorRGB=function(p){return[p.rgba>>24&255,p.rgba>>16&255,p.rgba>>8&255]}}(v||(t.color=v={})),function(i){let u,p;try{const h=document.createElement("canvas");h.width=1,h.height=1;const m=h.getContext("2d",{willReadFrequently:!0});m&&(u=m,u.globalCompositeOperation="copy",p=u.createLinearGradient(0,0,1,1))}catch{}i.toColor=function(h){if(h.match(/#[\da-f]{3,8}/i))switch(h.length){case 4:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),d.toColor(a,l,c);case 5:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),n=parseInt(h.slice(4,5).repeat(2),16),d.toColor(a,l,c,n);case 7:return{css:h,rgba:(parseInt(h.slice(1),16)<<8|255)>>>0};case 9:return{css:h,rgba:parseInt(h.slice(1),16)>>>0}}const m=h.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return a=parseInt(m[1]),l=parseInt(m[2]),c=parseInt(m[3]),n=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),d.toColor(a,l,c,n);if(!u||!p)throw new Error("css.toColor: Unsupported css format");if(u.fillStyle=p,u.fillStyle=h,typeof u.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(u.fillRect(0,0,1,1),[a,l,c,n]=u.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:d.toRgba(a,l,c,n),css:h}}}(g||(t.css=g={})),function(i){function u(p,h,m){const _=p/255,f=h/255,C=m/255;return .2126*(_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))}i.relativeLuminance=function(p){return u(p>>16&255,p>>8&255,255&p)},i.relativeLuminance2=u}(r||(t.rgb=r={})),function(i){function u(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S>0||w>0||L>0);)S-=Math.max(0,Math.ceil(.1*S)),w-=Math.max(0,Math.ceil(.1*w)),L-=Math.max(0,Math.ceil(.1*L)),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}function p(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S<255||w<255||L<255);)S=Math.min(255,S+Math.ceil(.1*(255-S))),w=Math.min(255,w+Math.ceil(.1*(255-w))),L=Math.min(255,L+Math.ceil(.1*(255-L))),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}i.blend=function(h,m){if(n=(255&m)/255,n===1)return m;const _=m>>24&255,f=m>>16&255,C=m>>8&255,b=h>>24&255,S=h>>16&255,w=h>>8&255;return a=b+Math.round((_-b)*n),l=S+Math.round((f-S)*n),c=w+Math.round((C-w)*n),d.toRgba(a,l,c)},i.ensureContrastRatio=function(h,m,_){const f=r.relativeLuminance(h>>8),C=r.relativeLuminance(m>>8);if(s(f,C)<_){if(C>8));if(L<_){const D=p(h,m,_);return L>s(f,r.relativeLuminance(D>>8))?w:D}return w}const b=p(h,m,_),S=s(f,r.relativeLuminance(b>>8));if(S<_){const w=u(h,m,_);return S>s(f,r.relativeLuminance(w>>8))?b:w}return b}},i.reduceLuminance=u,i.increaseLuminance=p,i.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]}}(e||(t.rgba=e={})),t.toPaddedHex=o,t.contrastRatio=s},345:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let l=0;ll.fire(c))},t.runAndSubscribe=function(a,l){return l(void 0),a(c=>l(c))}},859:(O,t)=>{function a(l){for(const c of l)c.dispose();l.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const c=this._disposables.indexOf(l);c!==-1&&this._disposables.splice(c,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){var c;this._isDisposed||l===this._value||((c=this._value)==null||c.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,(l=this._value)==null||l.dispose(),this._value=void 0}},t.toDisposable=function(l){return{dispose:l}},t.disposeArray=a,t.getDisposeArrayDisposable=function(l){return{dispose:()=>a(l)}}},485:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(c,n,d){this._data[c]||(this._data[c]={}),this._data[c][n]=d}get(c,n){return this._data[c]?this._data[c][n]:void 0}clear(){this._data={}}}t.TwoKeyMap=a,t.FourKeyMap=class{constructor(){this._data=new a}set(l,c,n,d,v){this._data.get(l,c)||this._data.set(l,c,new a),this._data.get(l,c).set(n,d,v)}get(l,c,n,d){var v;return(v=this._data.get(l,c))==null?void 0:v.get(n,d)}clear(){this._data.clear()}}},399:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=typeof process<"u"&&"title"in process;const a=t.isNode?"node":navigator.userAgent,l=t.isNode?"node":navigator.platform;t.isFirefox=a.includes("Firefox"),t.isLegacyEdge=a.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(a),t.getSafariVersion=function(){if(!t.isSafari)return 0;const c=a.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),t.isIpad=l==="iPad",t.isIphone=l==="iPhone",t.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),t.isLinux=l.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(a)},385:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const l=a(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),this._start()}flush(){for(;this._io)return e-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-g))}ms`),void this._start();e=o}this.clear()}}class n extends c{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const g=Date.now()+v;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},147:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new a;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=a;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,d=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=d}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}t.ExtendedAttrs=l},782:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const l=a(133),c=a(855),n=a(147);class d extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(g){const r=new d;return r.setFromCharData(g),r}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let r=!1;if(g[c.CHAR_DATA_CHAR_INDEX].length>2)r=!0;else if(g[c.CHAR_DATA_CHAR_INDEX].length===2){const e=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const o=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(e-55296)+o-56320+65536|g[c.CHAR_DATA_WIDTH_INDEX]<<22:r=!0}else r=!0}else this.content=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[c.CHAR_DATA_WIDTH_INDEX]<<22;r&&(this.combinedData=g[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=d},855:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},133:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},t.utf32ToString=function(a,l=0,c=a.length){let n="";for(let d=l;d65535?(v-=65536,n+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):n+=String.fromCharCode(v)}return n},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,l){const c=a.length;if(!c)return 0;let n=0,d=0;if(this._interim){const v=a.charCodeAt(d++);56320<=v&&v<=57343?l[n++]=1024*(this._interim-55296)+v-56320+65536:(l[n++]=this._interim,l[n++]=v),this._interim=0}for(let v=d;v=c)return this._interim=g,n;const r=a.charCodeAt(v);56320<=r&&r<=57343?l[n++]=1024*(g-55296)+r-56320+65536:(l[n++]=g,l[n++]=r)}else g!==65279&&(l[n++]=g)}return n}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,l){const c=a.length;if(!c)return 0;let n,d,v,g,r=0,e=0,o=0;if(this.interim[0]){let u=!1,p=this.interim[0];p&=(224&p)==192?31:(240&p)==224?15:7;let h,m=0;for(;(h=63&this.interim[++m])&&m<4;)p<<=6,p|=h;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=_-m;for(;o=c)return 0;if(h=a[o++],(192&h)!=128){o--,u=!0;break}this.interim[m++]=h,p<<=6,p|=63&h}u||(_===2?p<128?o--:l[r++]=p:_===3?p<2048||p>=55296&&p<=57343||p===65279||(l[r++]=p):p<65536||p>1114111||(l[r++]=p)),this.interim.fill(0)}const s=c-4;let i=o;for(;i=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(e=(31&n)<<6|63&d,e<128){i--;continue}l[r++]=e}else if((240&n)==224){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(e=(15&n)<<12|(63&d)<<6|63&v,e<2048||e>=55296&&e<=57343||e===65279)continue;l[r++]=e}else if((248&n)==240){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,this.interim[2]=v,r;if(g=a[i++],(192&g)!=128){i--;continue}if(e=(7&n)<<18|(63&d)<<12|(63&v)<<6|63&g,e<65536||e>1114111)continue;l[r++]=e}}return r}}},776:function(O,t,a){var l=this&&this.__decorate||function(e,o,s,i){var u,p=arguments.length,h=p<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,s):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(e,o,s,i);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(h=(p<3?u(h):p>3?u(o,s,h):u(o,s))||h);return p>3&&h&&Object.defineProperty(o,s,h),h},c=this&&this.__param||function(e,o){return function(s,i){o(s,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=a(859),d=a(97),v={trace:d.LogLevelEnum.TRACE,debug:d.LogLevelEnum.DEBUG,info:d.LogLevelEnum.INFO,warn:d.LogLevelEnum.WARN,error:d.LogLevelEnum.ERROR,off:d.LogLevelEnum.OFF};let g,r=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),g=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let o=0;oJSON.stringify(h)).join(", ")})`);const p=i.apply(this,u);return g.trace(`GlyphRenderer#${i.name} return`,p),p}}},726:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const a="di$target",l="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(c){return c[l]||[]},t.createDecorator=function(c){if(t.serviceRegistry.has(c))return t.serviceRegistry.get(c);const n=function(d,v,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(r,e,o){e[a]===e?e[l].push({id:r,index:o}):(e[l]=[{id:r,index:o}],e[a]=e)})(n,d,g)};return n.toString=()=>c,t.serviceRegistry.set(c,n),n}},97:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const l=a(726);var c;t.IBufferService=(0,l.createDecorator)("BufferService"),t.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),t.ICoreService=(0,l.createDecorator)("CoreService"),t.ICharsetService=(0,l.createDecorator)("CharsetService"),t.IInstantiationService=(0,l.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(c||(t.LogLevelEnum=c={})),t.ILogService=(0,l.createDecorator)("LogService"),t.IOptionsService=(0,l.createDecorator)("OptionsService"),t.IOscLinkService=(0,l.createDecorator)("OscLinkService"),t.IUnicodeService=(0,l.createDecorator)("UnicodeService"),t.IDecorationService=(0,l.createDecorator)("DecorationService")}},ne={};function ee(O){var t=ne[O];if(t!==void 0)return t.exports;var a=ne[O]={exports:{}};return ce[O].call(a.exports,a,a.exports,ee),a.exports}var le={};return(()=>{var O=le;Object.defineProperty(O,"__esModule",{value:!0}),O.CanvasAddon=void 0;const t=ee(345),a=ee(859),l=ee(776),c=ee(949);class n extends a.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new t.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new t.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var v;return(v=this._renderer)==null?void 0:v.textureAtlas}activate(v){const g=v._core;if(!v.element)return void this.register(g.onWillOpen(()=>this.activate(v)));this._terminal=v;const r=g.coreService,e=g.optionsService,o=g.screenElement,s=g.linkifier,i=g,u=i._bufferService,p=i._renderService,h=i._characterJoinerService,m=i._charSizeService,_=i._coreBrowserService,f=i._decorationService,C=i._logService,b=i._themeService;(0,l.setTraceLogger)(C),this._renderer=new c.CanvasRenderer(v,o,s,u,m,e,h,r,_,f,b),this.register((0,t.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),p.setRenderer(this._renderer),p.handleResize(u.cols,u.rows),this.register((0,a.toDisposable)(()=>{var S;p.setRenderer(this._terminal._core._createRenderer()),p.handleResize(v.cols,v.rows),(S=this._renderer)==null||S.dispose(),this._renderer=void 0}))}clearTextureAtlas(){var v;(v=this._renderer)==null||v.clearTextureAtlas()}}O.CanvasAddon=n})(),le})())})(De);var Pe=De.exports,Te={exports:{}};(function(he,Ce){(function(ce,ne){he.exports=ne()})(self,()=>(()=>{var ce={};return(()=>{var ne=ce;Object.defineProperty(ne,"__esModule",{value:!0}),ne.FitAddon=void 0,ne.FitAddon=class{activate(ee){this._terminal=ee}dispose(){}fit(){const ee=this.proposeDimensions();if(!ee||!this._terminal||isNaN(ee.cols)||isNaN(ee.rows))return;const le=this._terminal._core;this._terminal.rows===ee.rows&&this._terminal.cols===ee.cols||(le._renderService.clear(),this._terminal.resize(ee.cols,ee.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ee=this._terminal._core,le=ee._renderService.dimensions;if(le.css.cell.width===0||le.css.cell.height===0)return;const O=this._terminal.options.scrollback===0?0:ee.viewport.scrollBarWidth,t=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(t.getPropertyValue("height")),l=Math.max(0,parseInt(t.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),n=a-(parseInt(c.getPropertyValue("padding-top"))+parseInt(c.getPropertyValue("padding-bottom"))),d=l-(parseInt(c.getPropertyValue("padding-right"))+parseInt(c.getPropertyValue("padding-left")))-O;return{cols:Math.max(2,Math.floor(d/le.css.cell.width)),rows:Math.max(1,Math.floor(n/le.css.cell.height))}}}})(),ce})())})(Te);var Ie=Te.exports;let Ee=document.getElementById("js-web-terminal");if(Ee!==null){const he=new Be.Terminal({allowTransparency:!0,theme:{background:"#09090b",foreground:"#cccccc",selectionBackground:"#399ef440",black:"#666666",blue:"#399ef4",brightBlack:"#666666",brightBlue:"#399ef4",brightCyan:"#21c5c7",brightGreen:"#4eb071",brightMagenta:"#b168df",brightRed:"#da6771",brightWhite:"#efefef",brightYellow:"#fff099",cyan:"#21c5c7",green:"#4eb071",magenta:"#b168df",red:"#da6771",white:"#efefef",yellow:"#fff099"}});typeof WebGL2RenderingContext<"u"?he.loadAddon(new Oe.WebglAddon):he.loadAddon(new Pe.CanvasAddon);const Ce=new Ie.FitAddon;he.loadAddon(Ce),he.open(Ee),Ce.fit();const ce=new WebSocket(`ws://${window.location.host}/_shell/?sessionId=${window.terminal.sessionId}`);ce.addEventListener("open",ne=>{he.onData(ee=>ce.send(ee)),ce.addEventListener("message",ee=>he.write(ee.data))}),ce.addEventListener("error",ne=>{he.reset(),he.writeln("Connection error.")}),ce.addEventListener("close",ne=>{ne.wasClean&&(he.reset(),he.writeln(ne.reason??"Connection closed."))})}
+}`)),this.register((0,c.toDisposable)(()=>S.deleteProgram(this._program))),this._projectionLocation=(0,l.throwIfFalsy)(S.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=S.createVertexArray(),S.bindVertexArray(this._vertexArrayObject);const w=new Float32Array([0,0,1,0,0,1,1,1]),L=S.createBuffer();this.register((0,c.toDisposable)(()=>S.deleteBuffer(L))),S.bindBuffer(S.ARRAY_BUFFER,L),S.bufferData(S.ARRAY_BUFFER,w,S.STATIC_DRAW),S.enableVertexAttribArray(3),S.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),B=S.createBuffer();this.register((0,c.toDisposable)(()=>S.deleteBuffer(B))),S.bindBuffer(S.ELEMENT_ARRAY_BUFFER,B),S.bufferData(S.ELEMENT_ARRAY_BUFFER,D,S.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(S.createBuffer()),this.register((0,c.toDisposable)(()=>S.deleteBuffer(this._attributesBuffer))),S.bindBuffer(S.ARRAY_BUFFER,this._attributesBuffer),S.enableVertexAttribArray(0),S.vertexAttribPointer(0,2,S.FLOAT,!1,v,0),S.vertexAttribDivisor(0,1),S.enableVertexAttribArray(1),S.vertexAttribPointer(1,2,S.FLOAT,!1,v,2*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(1,1),S.enableVertexAttribArray(2),S.vertexAttribPointer(2,4,S.FLOAT,!1,v,4*Float32Array.BYTES_PER_ELEMENT),S.vertexAttribDivisor(2,1),this._updateCachedColors(b.colors),this.register(this._themeService.onChangeColors(k=>{this._updateCachedColors(k),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(_){const f=this._gl;f.useProgram(this._program),f.bindVertexArray(this._vertexArrayObject),f.uniformMatrix4fv(this._projectionLocation,!1,d.PROJECTION_MATRIX),f.bindBuffer(f.ARRAY_BUFFER,this._attributesBuffer),f.bufferData(f.ARRAY_BUFFER,_.attributes,f.DYNAMIC_DRAW),f.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,f.UNSIGNED_BYTE,0,_.count)}handleResize(){this._updateViewportRectangle()}setDimensions(_){this._dimensions=_}_updateCachedColors(_){this._bgFloat=this._colorToFloat32Array(_.background),this._cursorFloat=this._colorToFloat32Array(_.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(_){const f=this._terminal,C=this._vertices;let b,S,w,L,D,B,k,M,y,x,R,A=1;for(b=0;b>24&255)/255,i=(r>>16&255)/255,u=(r>>8&255)/255,p=1,this._addRectangle(_.attributes,f,e,o,(w-S)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,s,i,u,p)}_addRectangle(_,f,C,b,S,w,L,D,B,k){_[f]=C/this._dimensions.device.canvas.width,_[f+1]=b/this._dimensions.device.canvas.height,_[f+2]=S/this._dimensions.device.canvas.width,_[f+3]=w/this._dimensions.device.canvas.height,_[f+4]=L,_[f+5]=D,_[f+6]=B,_[f+7]=k}_addRectangleFloat(_,f,C,b,S,w,L){_[f]=C/this._dimensions.device.canvas.width,_[f+1]=b/this._dimensions.device.canvas.height,_[f+2]=S/this._dimensions.device.canvas.width,_[f+3]=w/this._dimensions.device.canvas.height,_[f+4]=L[0],_[f+5]=L[1],_[f+6]=L[2],_[f+7]=L[3]}_colorToFloat32Array(_){return new Float32Array([(_.rgba>>24&255)/255,(_.rgba>>16&255)/255,(_.rgba>>8&255)/255,(255&_.rgba)/255])}}t.RectangleRenderer=h},310:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderModel=t.COMBINED_CHAR_BIT_MASK=t.RENDER_MODEL_EXT_OFFSET=t.RENDER_MODEL_FG_OFFSET=t.RENDER_MODEL_BG_OFFSET=t.RENDER_MODEL_INDICIES_PER_CELL=void 0;const l=a(296);t.RENDER_MODEL_INDICIES_PER_CELL=4,t.RENDER_MODEL_BG_OFFSET=1,t.RENDER_MODEL_FG_OFFSET=2,t.RENDER_MODEL_EXT_OFFSET=3,t.COMBINED_CHAR_BIT_MASK=2147483648,t.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,l.createSelectionRenderModel)()}resize(c,n){const d=c*n*t.RENDER_MODEL_INDICIES_PER_CELL;d!==this.cells.length&&(this.cells=new Uint32Array(d),this.lineLengths=new Uint32Array(n))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JoinedCellData=t.WebglRenderer=void 0;const l=a(820),c=a(274),n=a(627),d=a(457),v=a(56),g=a(374),r=a(345),e=a(859),o=a(147),s=a(782),i=a(855),u=a(965),p=a(742),h=a(310),m=a(733);class _ extends e.Disposable{constructor(S,w,L,D,B,k,M,y,x){super(),this._terminal=S,this._characterJoinerService=w,this._charSizeService=L,this._coreBrowserService=D,this._coreService=B,this._decorationService=k,this._optionsService=M,this._themeService=y,this._cursorBlinkStateManager=new e.MutableDisposable,this._charAtlasDisposable=this.register(new e.MutableDisposable),this._observerDisposable=this.register(new e.MutableDisposable),this._model=new h.RenderModel,this._workCell=new s.CellData,this._workCell2=new s.CellData,this._rectangleRenderer=this.register(new e.MutableDisposable),this._glyphRenderer=this.register(new e.MutableDisposable),this._onChangeTextureAtlas=this.register(new r.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new r.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new r.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new r.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new c.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new m.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,M,this._themeService)],this.dimensions=(0,g.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(M.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const R={antialias:!1,depth:!1,preserveDrawingBuffer:x};if(this._gl=this._canvas.getContext("webgl2",R),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextlost",A=>{console.log("webglcontextlost event received"),A.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(A)},3e3)})),this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextrestored",A=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,n.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(A,I)=>this._setCanvasDevicePixelDimensions(A,I)),this.register(this._coreBrowserService.onWindowChange(A=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._canvas,A,(I,H)=>this._setCanvasDevicePixelDimensions(I,H))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,e.toDisposable)(()=>{var A;for(const I of this._renderLayers)I.dispose();(A=this._canvas.parentElement)==null||A.removeChild(this._canvas),(0,n.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var S;return(S=this._charAtlas)==null?void 0:S.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(S,w){var L,D,B,k;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const M of this._renderLayers)M.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(L=this._rectangleRenderer.value)==null||L.setDimensions(this.dimensions),(D=this._rectangleRenderer.value)==null||D.handleResize(),(B=this._glyphRenderer.value)==null||B.setDimensions(this.dimensions),(k=this._glyphRenderer.value)==null||k.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var S;for(const w of this._renderLayers)w.handleBlur(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.pause(),this._requestRedrawViewport()}handleFocus(){var S;for(const w of this._renderLayers)w.handleFocus(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.resume(),this._requestRedrawViewport()}handleSelectionChanged(S,w,L){for(const D of this._renderLayers)D.handleSelectionChanged(this._terminal,S,w,L);this._model.selection.update(this._core,S,w,L),this._requestRedrawViewport()}handleCursorMove(){var S;for(const w of this._renderLayers)w.handleCursorMove(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new p.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new u.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var w;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const S=(0,n.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==S&&(this._onChangeTextureAtlas.fire(S.pages[0].canvas),this._charAtlasDisposable.value=(0,e.getDisposeArrayDisposable)([(0,r.forwardEvent)(S.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,r.forwardEvent)(S.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=S,this._charAtlas.warmUp(),(w=this._glyphRenderer.value)==null||w.setAtlas(this._charAtlas)}_clearModel(S){var w;this._model.clear(),S&&((w=this._glyphRenderer.value)==null||w.clear())}clearTextureAtlas(){var S;(S=this._charAtlas)==null||S.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var S;this._clearModel(!0);for(const w of this._renderLayers)w.reset(this._terminal);(S=this._cursorBlinkStateManager.value)==null||S.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(S){return-1}deregisterCharacterJoiner(S){return!1}renderRows(S,w){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const L of this._renderLayers)L.handleGridChanged(this._terminal,S,w);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(S,w),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(S,w){const L=this._core;let D,B,k,M,y,x,R,A,I,H,j,N,T,E,F=this._workCell;S=C(S,L.rows-1,0),w=C(w,L.rows-1,0);const P=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,z=P-L.buffer.ydisp,W=Math.min(this._terminal.buffer.active.cursorX,L.cols-1);let Y=-1;const U=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let te=!1;for(B=S;B<=w;B++)for(k=B+L.buffer.ydisp,M=L.buffer.lines.get(k),this._model.lineLengths[B]=0,y=this._characterJoinerService.getJoinedCharacters(k),T=0;T0&&T===y[0][0]&&(x=!0,A=y.shift(),F=new f(F,M.translateToString(!0,A[0],A[1]),A[1]-A[0]),R=A[1]-1),I=F.getChars(),H=F.getCode(),N=(B*L.cols+T)*h.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(F,T,k,this.dimensions.device.cell.width),U&&k===P&&(T===W&&(this._model.cursor={x:W,y:z,width:F.getWidth(),style:this._coreBrowserService.isFocused?L.options.cursorStyle||"block":L.options.cursorInactiveStyle,cursorWidth:L.options.cursorWidth,dpr:this._devicePixelRatio},Y=W+F.getWidth()-1),T>=W&&T<=Y&&(this._coreBrowserService.isFocused&&(L.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&L.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),H!==i.NULL_CELL_CODE&&(this._model.lineLengths[B]=T+1),(this._model.cells[N]!==H||this._model.cells[N+h.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[N+h.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[N+h.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(te=!0,I.length>1&&(H|=h.COMBINED_CHAR_BIT_MASK),this._model.cells[N]=H,this._model.cells[N+h.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[N+h.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[N+h.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,j=F.getWidth(),this._glyphRenderer.value.updateCell(T,B,H,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,I,j,D),x))for(F=this._workCell,T++;T{Object.defineProperty(t,"__esModule",{value:!0}),t.GLTexture=t.expandFloat32Array=t.createShader=t.createProgram=t.PROJECTION_MATRIX=void 0;const l=a(374);function c(n,d,v){const g=(0,l.throwIfFalsy)(n.createShader(d));if(n.shaderSource(g,v),n.compileShader(g),n.getShaderParameter(g,n.COMPILE_STATUS))return g;console.error(n.getShaderInfoLog(g)),n.deleteShader(g)}t.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),t.createProgram=function(n,d,v){const g=(0,l.throwIfFalsy)(n.createProgram());if(n.attachShader(g,(0,l.throwIfFalsy)(c(n,n.VERTEX_SHADER,d))),n.attachShader(g,(0,l.throwIfFalsy)(c(n,n.FRAGMENT_SHADER,v))),n.linkProgram(g),n.getProgramParameter(g,n.LINK_STATUS))return g;console.error(n.getProgramInfoLog(g)),n.deleteProgram(g)},t.createShader=c,t.expandFloat32Array=function(n,d){const v=Math.min(2*n.length,d),g=new Float32Array(v);for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;const l=a(627),c=a(237),n=a(374),d=a(859);class v extends d.Disposable{constructor(r,e,o,s,i,u,p,h){super(),this._container=e,this._alpha=i,this._coreBrowserService=u,this._optionsService=p,this._themeService=h,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${o}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(m=>{this._refreshCharAtlas(r,m),this.reset(r)})),this.register((0,d.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,n.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(r){}handleFocus(r){}handleCursorMove(r){}handleGridChanged(r,e,o){}handleSelectionChanged(r,e,o,s=!1){}_setTransparency(r,e){if(e===this._alpha)return;const o=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,o),this._refreshCharAtlas(r,this._themeService.colors),this.handleGridChanged(r,0,r.rows-1)}_refreshCharAtlas(r,e){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,l.acquireTextureAtlas)(r,this._optionsService.rawOptions,e,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(r,e){this._deviceCellWidth=e.device.cell.width,this._deviceCellHeight=e.device.cell.height,this._deviceCharWidth=e.device.char.width,this._deviceCharHeight=e.device.char.height,this._deviceCharLeft=e.device.char.left,this._deviceCharTop=e.device.char.top,this._canvas.width=e.device.canvas.width,this._canvas.height=e.device.canvas.height,this._canvas.style.width=`${e.css.canvas.width}px`,this._canvas.style.height=`${e.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(r,this._themeService.colors)}_fillBottomLineAtCells(r,e,o=1){this._ctx.fillRect(r*this._deviceCellWidth,(e+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,o*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(r,e,o,s){this._alpha?this._ctx.clearRect(r*this._deviceCellWidth,e*this._deviceCellHeight,o*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(r*this._deviceCellWidth,e*this._deviceCellHeight,o*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(r,e,o,s){this._ctx.font=this._getFont(r,!1,!1),this._ctx.textBaseline=c.TEXT_BASELINE,this._clipCell(o,s,e.getWidth()),this._ctx.fillText(e.getChars(),o*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(r,e,o){this._ctx.beginPath(),this._ctx.rect(r*this._deviceCellWidth,e*this._deviceCellHeight,o*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(r,e,o){return`${o?"italic":""} ${e?r.options.fontWeightBold:r.options.fontWeight} ${r.options.fontSize*this._coreBrowserService.dpr}px ${r.options.fontFamily}`}}t.BaseRenderLayer=v},733:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;const l=a(197),c=a(237),n=a(592);class d extends n.BaseRenderLayer{constructor(g,r,e,o,s,i,u){super(e,g,"link",r,!0,s,i,u),this.register(o.onShowLinkUnderline(p=>this._handleShowLinkUnderline(p))),this.register(o.onHideLinkUnderline(p=>this._handleHideLinkUnderline(p)))}resize(g,r){super.resize(g,r),this._state=void 0}reset(g){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const g=this._state.y2-this._state.y1-1;g>0&&this._clearCells(0,this._state.y1+1,this._state.cols,g),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(g){if(g.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:g.fg!==void 0&&(0,l.is256Color)(g.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[g.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,g.y1===g.y2)this._fillBottomLineAtCells(g.x1,g.y1,g.x2-g.x1);else{this._fillBottomLineAtCells(g.x1,g.y1,g.cols-g.x1);for(let r=g.y1+1;r{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(a,l,c,n){a.addEventListener(l,c,n);let d=!1;return{dispose:()=>{d||(d=!0,a.removeEventListener(l,c,n))}}}},274:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellColorResolver=void 0;const l=a(855),c=a(160),n=a(374);let d,v=0,g=0,r=!1,e=!1,o=!1,s=0;t.CellColorResolver=class{constructor(i,u,p,h,m,_){this._terminal=i,this._optionService=u,this._selectionRenderModel=p,this._decorationService=h,this._coreBrowserService=m,this._themeService=_,this.result={fg:0,bg:0,ext:0}}resolve(i,u,p,h){if(this.result.bg=i.bg,this.result.fg=i.fg,this.result.ext=268435456&i.bg?i.extended.ext:0,g=0,v=0,e=!1,r=!1,o=!1,d=this._themeService.colors,s=0,i.getCode()!==l.NULL_CELL_CODE&&i.extended.underlineStyle===4){const m=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));s=u*h%(2*Math.round(m))}if(this._decorationService.forEachDecorationAtCell(u,p,"bottom",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),o=this._selectionRenderModel.isCellSelected(this._terminal,u,p),o){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:g=(16777215&this.result.fg)<<8|255;break;default:g=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:g=(16777215&this.result.bg)<<8|255}g=c.rgba.blend(g,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else g=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(e=!0,d.selectionForeground&&(v=d.selectionForeground.rgba>>8&16777215,r=!0),(0,n.treatGlyphAsBackgroundColor)(i.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))v=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:v=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:v=(16777215&this.result.fg)<<8|255;break;default:v=this._themeService.colors.foreground.rgba}v=c.rgba.blend(v,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}r=!0}}this._decorationService.forEachDecorationAtCell(u,p,"top",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),e&&(g=o?-16777216&i.bg&-134217729|g|50331648:-16777216&i.bg|g|50331648),r&&(v=-16777216&i.fg&-67108865|v|50331648),67108864&this.result.fg&&(e&&!r&&(v=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&d.background.rgba>>8|50331648,r=!0),!e&&r&&(g=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&d.foreground.rgba>>8|50331648,e=!0)),d=void 0,this.result.bg=e?g:this.result.bg,this.result.fg=r?v:this.result.fg,this.result.ext&=536870911,this.result.ext|=s<<29&3758096384}}},627:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireTextureAtlas=void 0;const l=a(509),c=a(197),n=[];t.acquireTextureAtlas=function(d,v,g,r,e,o,s,i){const u=(0,c.generateConfig)(r,e,o,s,v,g,i);for(let m=0;m=0){if((0,c.configEquals)(_.config,u))return _.atlas;_.ownedBy.length===1?(_.atlas.dispose(),n.splice(m,1)):_.ownedBy.splice(f,1);break}}for(let m=0;m{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;const l=a(160);t.generateConfig=function(c,n,d,v,g,r,e){const o={foreground:r.foreground,background:r.background,cursor:l.NULL_COLOR,cursorAccent:l.NULL_COLOR,selectionForeground:l.NULL_COLOR,selectionBackgroundTransparent:l.NULL_COLOR,selectionBackgroundOpaque:l.NULL_COLOR,selectionInactiveBackgroundTransparent:l.NULL_COLOR,selectionInactiveBackgroundOpaque:l.NULL_COLOR,ansi:r.ansi.slice(),contrastCache:r.contrastCache,halfContrastCache:r.halfContrastCache};return{customGlyphs:g.customGlyphs,devicePixelRatio:e,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight,deviceCellWidth:c,deviceCellHeight:n,deviceCharWidth:d,deviceCharHeight:v,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,drawBoldTextInBrightColors:g.drawBoldTextInBrightColors,minimumContrastRatio:g.minimumContrastRatio,colors:o}},t.configEquals=function(c,n){for(let d=0;d{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const l=a(399);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorBlinkStateManager=void 0,t.CursorBlinkStateManager=class{constructor(a,l){this._renderCallback=a,this._coreBrowserService=l,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(a=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,l>0)return void this._restartInterval(l)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(l)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},a)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.powerlineDefinitions=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;const l=a(374);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╒":{1:(r,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(r,e)=>`M${.5-r},1 L${.5-r},.5 L1,.5 M${.5+r},.5 L${.5+r},1`},"╔":{1:(r,e)=>`M1,${.5-e} L${.5-r},${.5-e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╕":{1:(r,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(r,e)=>`M${.5+r},1 L${.5+r},.5 L0,.5 M${.5-r},.5 L${.5-r},1`},"╗":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5+r},${.5-e} L${.5+r},1`},"╘":{1:(r,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(r,e)=>`M1,.5 L${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╚":{1:(r,e)=>`M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0 M1,${.5+e} L${.5-r},${.5+e} L${.5-r},0`},"╛":{1:(r,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(r,e)=>`M0,.5 L${.5+r},.5 L${.5+r},0 M${.5-r},.5 L${.5-r},0`},"╝":{1:(r,e)=>`M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M0,${.5+e} L${.5+r},${.5+e} L${.5+r},0`},"╞":{1:(r,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1 M${.5+r},.5 L1,.5`},"╠":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╡":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(r,e)=>`M0,.5 L${.5-r},.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╣":{1:(r,e)=>`M${.5+r},0 L${.5+r},1 M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0`},"╤":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},1 M${.5+r},.5 L${.5+r},1`},"╦":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╧":{1:(r,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╩":{1:(r,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╪":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╬":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},t.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.tryDrawCustomChar=function(r,e,o,s,i,u,p,h){const m=t.blockElementDefinitions[e];if(m)return function(b,S,w,L,D,B){for(let k=0;k7&&parseInt(M.slice(7,9),16)||1;else{if(!M.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${M}" when drawing pattern glyph`);[j,N,T,E]=M.substring(5,M.length-1).split(",").map(F=>parseFloat(F))}for(let F=0;Fr.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(r,e)=>r.lineTo(e[0],e[1]),M:(r,e)=>r.moveTo(e[0],e[1])};function g(r,e,o,s,i,u,p,h=0,m=0){const _=r.map(f=>parseFloat(f)||parseInt(f));if(_.length<2)throw new Error("Too few arguments for instruction");for(let f=0;f<_.length;f+=2)_[f]*=e-h*p-m*p,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,e,0)),_[f]+=s+h*p;for(let f=1;f<_.length;f+=2)_[f]*=o,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,o,0)),_[f]+=i;return _}},56:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeDevicePixelDimensions=void 0;const l=a(859);t.observeDevicePixelDimensions=function(c,n,d){let v=new n.ResizeObserver(g=>{const r=g.find(s=>s.target===c);if(!r)return;if(!("devicePixelContentBoxSize"in r))return v==null||v.disconnect(),void(v=void 0);const e=r.devicePixelContentBoxSize[0].inlineSize,o=r.devicePixelContentBoxSize[0].blockSize;e>0&&o>0&&d(e,o)});try{v.observe(c,{box:["device-pixel-content-box"]})}catch{v.disconnect(),v=void 0}return(0,l.toDisposable)(()=>v==null?void 0:v.disconnect())}},374:(O,t)=>{function a(c){return 57508<=c&&c<=57558}function l(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},t.isPowerlineGlyph=a,t.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},t.isEmoji=l,t.allowRescaling=function(c,n,d,v){return n===1&&d>Math.ceil(1.5*v)&&c!==void 0&&c>255&&!l(c)&&!a(c)&&!function(g){return 57344<=g&&g<=63743}(c)},t.treatGlyphAsBackgroundColor=function(c){return a(c)||function(n){return 9472<=n&&n<=9631}(c)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(c,n,d=0){return(c-(2*Math.round(n)-d))%(2*Math.round(n))}},296:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,n,d,v=!1){if(this.selectionStart=n,this.selectionEnd=d,!n||!d||n[0]===d[0]&&n[1]===d[1])return void this.clear();const g=c.buffers.active.ydisp,r=n[1]-g,e=d[1]-g,o=Math.max(r,0),s=Math.min(e,c.rows-1);o>=c.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=r,this.viewportEndRow=e,this.viewportCappedStartRow=o,this.viewportCappedEndRow=s,this.startCol=n[0],this.endCol=d[0])}isCellSelected(c,n,d){return!!this.hasSelection&&(d-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&d>=this.viewportCappedStartRow&&n=this.viewportCappedStartRow&&n>=this.endCol&&d<=this.viewportCappedEndRow:d>this.viewportStartRow&&d=this.startCol&&n=this.startCol)}}t.createSelectionRenderModel=function(){return new a}},509:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextureAtlas=void 0;const l=a(237),c=a(860),n=a(374),d=a(160),v=a(345),g=a(485),r=a(385),e=a(147),o=a(855),s={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let i;class u{get pages(){return this._pages}constructor(f,C,b){this._document=f,this._config=C,this._unicodeService=b,this._didWarmUp=!1,this._cacheMap=new g.FourKeyMap,this._cacheMapCombined=new g.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new e.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new v.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new v.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=m(f,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,n.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const f of this.pages)f.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const f=new r.IdleTaskQueue;for(let C=33;C<126;C++)f.enqueue(()=>{if(!this._cacheMap.get(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT)){const b=this._drawToCache(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT);this._cacheMap.set(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT,b)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const f of this._pages)f.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(u.maxAtlasPages&&this._pages.length>=Math.max(4,u.maxAtlasPages)){const C=this._pages.filter(k=>2*k.canvas.width<=(u.maxTextureSize||4096)).sort((k,M)=>M.canvas.width!==k.canvas.width?M.canvas.width-k.canvas.width:M.percentageUsed-k.percentageUsed);let b=-1,S=0;for(let k=0;kk.glyphs[0].texturePage).sort((k,M)=>k>M?1:-1),D=this.pages.length-w.length,B=this._mergePages(w,D);B.version++;for(let k=L.length-1;k>=0;k--)this._deletePage(L[k]);this.pages.push(B),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(B.canvas)}const f=new p(this._document,this._textureSize);return this._pages.push(f),this._activePages.push(f),this._onAddTextureAtlasCanvas.fire(f.canvas),f}_mergePages(f,C){const b=2*f[0].canvas.width,S=new p(this._document,b,f);for(const[w,L]of f.entries()){const D=w*L.canvas.width%b,B=Math.floor(w/2)*L.canvas.height;S.ctx.drawImage(L.canvas,D,B);for(const M of L.glyphs)M.texturePage=C,M.sizeClipSpace.x=M.size.x/b,M.sizeClipSpace.y=M.size.y/b,M.texturePosition.x+=D,M.texturePosition.y+=B,M.texturePositionClipSpace.x=M.texturePosition.x/b,M.texturePositionClipSpace.y=M.texturePosition.y/b;this._onRemoveTextureAtlasCanvas.fire(L.canvas);const k=this._activePages.indexOf(L);k!==-1&&this._activePages.splice(k,1)}return S}_deletePage(f){this._pages.splice(f,1);for(let C=f;C=this._config.colors.ansi.length)throw new Error("No color found for idx "+f);return this._config.colors.ansi[f]}_getBackgroundColor(f,C,b,S){if(this._config.allowTransparency)return d.NULL_COLOR;let w;switch(f){case 16777216:case 33554432:w=this._getColorFromAnsiIndex(C);break;case 50331648:const L=e.AttributeData.toColorRGB(C);w=d.channels.toColor(L[0],L[1],L[2]);break;default:w=b?d.color.opaque(this._config.colors.foreground):this._config.colors.background}return w}_getForegroundColor(f,C,b,S,w,L,D,B,k,M){const y=this._getMinimumContrastColor(f,C,b,S,w,L,D,k,B,M);if(y)return y;let x;switch(w){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&k&&L<8&&(L+=8),x=this._getColorFromAnsiIndex(L);break;case 50331648:const R=e.AttributeData.toColorRGB(L);x=d.channels.toColor(R[0],R[1],R[2]);break;default:x=D?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(x=d.color.opaque(x)),B&&(x=d.color.multiplyOpacity(x,l.DIM_OPACITY)),x}_resolveBackgroundRgba(f,C,b){switch(f){case 16777216:case 33554432:return this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(f,C,b,S){switch(f){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&S&&C<8&&(C+=8),this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(f,C,b,S,w,L,D,B,k,M){if(this._config.minimumContrastRatio===1||M)return;const y=this._getContrastCache(k),x=y.getColor(f,S);if(x!==void 0)return x||void 0;const R=this._resolveBackgroundRgba(C,b,D),A=this._resolveForegroundRgba(w,L,D,B),I=d.rgba.ensureContrastRatio(R,A,this._config.minimumContrastRatio/(k?2:1));if(!I)return void y.setColor(f,S,null);const H=d.channels.toColor(I>>24&255,I>>16&255,I>>8&255);return y.setColor(f,S,H),H}_getContrastCache(f){return f?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(f,C,b,S,w=!1){const L=typeof f=="number"?String.fromCharCode(f):f,D=Math.min(this._config.deviceCellWidth*Math.max(L.length,2)+4,this._textureSize);this._tmpCanvas.width=$?2*$-ae:$-ae;ae>=$||pe===0?(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z+pe,Q),this._tmpCtx.lineTo(J,Q)):(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(Z+pe,Q),this._tmpCtx.moveTo(Z+pe+$,Q),this._tmpCtx.lineTo(J,Q)),ae=(0,n.computeNextVariantOffset)(J-Z,$,ae);break;case 5:const ye=.6,Le=.3,me=J-Z,be=Math.floor(ye*me),we=Math.floor(Le*me),xe=me-be-we;this._tmpCtx.setLineDash([be,we,xe]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q);break;default:this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!te&&this._config.fontSize>=12&&!this._config.allowTransparency&&L!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const se=this._tmpCtx.measureText(L);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in se&&se.actualBoundingBoxDescent>0){this._tmpCtx.save();const Z=new Path2D;Z.rect(ie,Q-Math.ceil($/2),this._config.deviceCellWidth*re,oe-Q+Math.ceil($/2)),this._tmpCtx.clip(Z),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(L,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(I){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),K=$%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+K),this._tmpCtx.stroke()}if(te||this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight),L==="_"&&!this._config.allowTransparency){let $=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X);if($)for(let K=1;K<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight-K),$=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X),$);K++);}if(A){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),K=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function($){for(let K=0;K<$.data.length;K+=4)if($.data[K+3]>0)return!1;return!0}(de):h(de,E,Y,X),ue)return s;const V=this._findGlyphBoundingBox(de,this._workBoundingBox,D,W,te,U);let q,G;for(;;){if(this._activePages.length===0){const $=this._createNewPage();q=$,G=$.currentRow,G.height=V.size.y;break}q=this._activePages[this._activePages.length-1],G=q.currentRow;for(const $ of this._activePages)V.size.y<=$.currentRow.height&&(q=$,G=$.currentRow);for(let $=this._activePages.length-1;$>=0;$--)for(const K of this._activePages[$].fixedRows)K.height<=G.height&&V.size.y<=K.height&&(q=this._activePages[$],G=K);if(G.y+V.size.y>=q.canvas.height||G.height>V.size.y+2){let $=!1;if(q.currentRow.y+q.currentRow.height+V.size.y>=q.canvas.height){let K;for(const ie of this._activePages)if(ie.currentRow.y+ie.currentRow.height+V.size.y=u.maxAtlasPages&&G.y+V.size.y<=q.canvas.height&&G.height>=V.size.y&&G.x+V.size.x<=q.canvas.width)$=!0;else{const ie=this._createNewPage();q=ie,G=ie.currentRow,G.height=V.size.y,$=!0}}$||(q.currentRow.height>0&&q.fixedRows.push(q.currentRow),G={x:0,y:q.currentRow.y+q.currentRow.height,height:V.size.y},q.fixedRows.push(G),q.currentRow={x:0,y:G.y+G.height,height:0})}if(G.x+V.size.x<=q.canvas.width)break;G===q.currentRow?(G.x=0,G.y+=G.height,G.height=0):q.fixedRows.splice(q.fixedRows.indexOf(G),1)}return V.texturePage=this._pages.indexOf(q),V.texturePosition.x=G.x,V.texturePosition.y=G.y,V.texturePositionClipSpace.x=G.x/q.canvas.width,V.texturePositionClipSpace.y=G.y/q.canvas.height,V.sizeClipSpace.x/=q.canvas.width,V.sizeClipSpace.y/=q.canvas.height,G.height=Math.max(G.height,V.size.y),G.x+=V.size.x,q.ctx.putImageData(de,V.texturePosition.x-this._workBoundingBox.left,V.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,V.size.x,V.size.y),q.addGlyph(V),q.version++,V}_findGlyphBoundingBox(f,C,b,S,w,L){C.top=0;const D=S?this._config.deviceCellHeight:this._tmpCanvas.height,B=S?this._config.deviceCellWidth:b;let k=!1;for(let M=0;M=L;M--){for(let y=0;y=0;M--){for(let y=0;y>>24,w=f.rgba>>>16&255,L=f.rgba>>>8&255,D=C.rgba>>>24,B=C.rgba>>>16&255,k=C.rgba>>>8&255,M=Math.floor((Math.abs(S-D)+Math.abs(w-B)+Math.abs(L-k))/12);let y=!0;for(let x=0;x<_.data.length;x+=4)_.data[x]===S&&_.data[x+1]===w&&_.data[x+2]===L||b&&Math.abs(_.data[x]-S)+Math.abs(_.data[x+1]-w)+Math.abs(_.data[x+2]-L){Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let a=0,l=0,c=0,n=0;var d,v,g,r,e;function o(i){const u=i.toString(16);return u.length<2?"0"+u:u}function s(i,u){return i>>0},i.toColor=function(u,p,h,m){return{css:i.toCss(u,p,h,m),rgba:i.toRgba(u,p,h,m)}}}(d||(t.channels=d={})),function(i){function u(p,h){return n=Math.round(255*h),[a,l,c]=e.toChannels(p.rgba),{css:d.toCss(a,l,c,n),rgba:d.toRgba(a,l,c,n)}}i.blend=function(p,h){if(n=(255&h.rgba)/255,n===1)return{css:h.css,rgba:h.rgba};const m=h.rgba>>24&255,_=h.rgba>>16&255,f=h.rgba>>8&255,C=p.rgba>>24&255,b=p.rgba>>16&255,S=p.rgba>>8&255;return a=C+Math.round((m-C)*n),l=b+Math.round((_-b)*n),c=S+Math.round((f-S)*n),{css:d.toCss(a,l,c),rgba:d.toRgba(a,l,c)}},i.isOpaque=function(p){return(255&p.rgba)==255},i.ensureContrastRatio=function(p,h,m){const _=e.ensureContrastRatio(p.rgba,h.rgba,m);if(_)return d.toColor(_>>24&255,_>>16&255,_>>8&255)},i.opaque=function(p){const h=(255|p.rgba)>>>0;return[a,l,c]=e.toChannels(h),{css:d.toCss(a,l,c),rgba:h}},i.opacity=u,i.multiplyOpacity=function(p,h){return n=255&p.rgba,u(p,n*h/255)},i.toColorRGB=function(p){return[p.rgba>>24&255,p.rgba>>16&255,p.rgba>>8&255]}}(v||(t.color=v={})),function(i){let u,p;try{const h=document.createElement("canvas");h.width=1,h.height=1;const m=h.getContext("2d",{willReadFrequently:!0});m&&(u=m,u.globalCompositeOperation="copy",p=u.createLinearGradient(0,0,1,1))}catch{}i.toColor=function(h){if(h.match(/#[\da-f]{3,8}/i))switch(h.length){case 4:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),d.toColor(a,l,c);case 5:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),n=parseInt(h.slice(4,5).repeat(2),16),d.toColor(a,l,c,n);case 7:return{css:h,rgba:(parseInt(h.slice(1),16)<<8|255)>>>0};case 9:return{css:h,rgba:parseInt(h.slice(1),16)>>>0}}const m=h.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return a=parseInt(m[1]),l=parseInt(m[2]),c=parseInt(m[3]),n=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),d.toColor(a,l,c,n);if(!u||!p)throw new Error("css.toColor: Unsupported css format");if(u.fillStyle=p,u.fillStyle=h,typeof u.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(u.fillRect(0,0,1,1),[a,l,c,n]=u.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:d.toRgba(a,l,c,n),css:h}}}(g||(t.css=g={})),function(i){function u(p,h,m){const _=p/255,f=h/255,C=m/255;return .2126*(_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))}i.relativeLuminance=function(p){return u(p>>16&255,p>>8&255,255&p)},i.relativeLuminance2=u}(r||(t.rgb=r={})),function(i){function u(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S>0||w>0||L>0);)S-=Math.max(0,Math.ceil(.1*S)),w-=Math.max(0,Math.ceil(.1*w)),L-=Math.max(0,Math.ceil(.1*L)),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}function p(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S<255||w<255||L<255);)S=Math.min(255,S+Math.ceil(.1*(255-S))),w=Math.min(255,w+Math.ceil(.1*(255-w))),L=Math.min(255,L+Math.ceil(.1*(255-L))),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}i.blend=function(h,m){if(n=(255&m)/255,n===1)return m;const _=m>>24&255,f=m>>16&255,C=m>>8&255,b=h>>24&255,S=h>>16&255,w=h>>8&255;return a=b+Math.round((_-b)*n),l=S+Math.round((f-S)*n),c=w+Math.round((C-w)*n),d.toRgba(a,l,c)},i.ensureContrastRatio=function(h,m,_){const f=r.relativeLuminance(h>>8),C=r.relativeLuminance(m>>8);if(s(f,C)<_){if(C>8));if(L<_){const D=p(h,m,_);return L>s(f,r.relativeLuminance(D>>8))?w:D}return w}const b=p(h,m,_),S=s(f,r.relativeLuminance(b>>8));if(S<_){const w=u(h,m,_);return S>s(f,r.relativeLuminance(w>>8))?b:w}return b}},i.reduceLuminance=u,i.increaseLuminance=p,i.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]}}(e||(t.rgba=e={})),t.toPaddedHex=o,t.contrastRatio=s},345:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let l=0;ll.fire(c))},t.runAndSubscribe=function(a,l){return l(void 0),a(c=>l(c))}},859:(O,t)=>{function a(l){for(const c of l)c.dispose();l.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const c=this._disposables.indexOf(l);c!==-1&&this._disposables.splice(c,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){var c;this._isDisposed||l===this._value||((c=this._value)==null||c.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,(l=this._value)==null||l.dispose(),this._value=void 0}},t.toDisposable=function(l){return{dispose:l}},t.disposeArray=a,t.getDisposeArrayDisposable=function(l){return{dispose:()=>a(l)}}},485:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(c,n,d){this._data[c]||(this._data[c]={}),this._data[c][n]=d}get(c,n){return this._data[c]?this._data[c][n]:void 0}clear(){this._data={}}}t.TwoKeyMap=a,t.FourKeyMap=class{constructor(){this._data=new a}set(l,c,n,d,v){this._data.get(l,c)||this._data.set(l,c,new a),this._data.get(l,c).set(n,d,v)}get(l,c,n,d){var v;return(v=this._data.get(l,c))==null?void 0:v.get(n,d)}clear(){this._data.clear()}}},399:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=typeof process<"u"&&"title"in process;const a=t.isNode?"node":navigator.userAgent,l=t.isNode?"node":navigator.platform;t.isFirefox=a.includes("Firefox"),t.isLegacyEdge=a.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(a),t.getSafariVersion=function(){if(!t.isSafari)return 0;const c=a.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),t.isIpad=l==="iPad",t.isIphone=l==="iPhone",t.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),t.isLinux=l.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(a)},385:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const l=a(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),this._start()}flush(){for(;this._io)return e-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-g))}ms`),void this._start();e=o}this.clear()}}class n extends c{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const g=Date.now()+v;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},147:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new a;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=a;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,d=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=d}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}t.ExtendedAttrs=l},782:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const l=a(133),c=a(855),n=a(147);class d extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(g){const r=new d;return r.setFromCharData(g),r}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let r=!1;if(g[c.CHAR_DATA_CHAR_INDEX].length>2)r=!0;else if(g[c.CHAR_DATA_CHAR_INDEX].length===2){const e=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const o=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(e-55296)+o-56320+65536|g[c.CHAR_DATA_WIDTH_INDEX]<<22:r=!0}else r=!0}else this.content=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[c.CHAR_DATA_WIDTH_INDEX]<<22;r&&(this.combinedData=g[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=d},855:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},133:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},t.utf32ToString=function(a,l=0,c=a.length){let n="";for(let d=l;d65535?(v-=65536,n+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):n+=String.fromCharCode(v)}return n},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,l){const c=a.length;if(!c)return 0;let n=0,d=0;if(this._interim){const v=a.charCodeAt(d++);56320<=v&&v<=57343?l[n++]=1024*(this._interim-55296)+v-56320+65536:(l[n++]=this._interim,l[n++]=v),this._interim=0}for(let v=d;v=c)return this._interim=g,n;const r=a.charCodeAt(v);56320<=r&&r<=57343?l[n++]=1024*(g-55296)+r-56320+65536:(l[n++]=g,l[n++]=r)}else g!==65279&&(l[n++]=g)}return n}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,l){const c=a.length;if(!c)return 0;let n,d,v,g,r=0,e=0,o=0;if(this.interim[0]){let u=!1,p=this.interim[0];p&=(224&p)==192?31:(240&p)==224?15:7;let h,m=0;for(;(h=63&this.interim[++m])&&m<4;)p<<=6,p|=h;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=_-m;for(;o=c)return 0;if(h=a[o++],(192&h)!=128){o--,u=!0;break}this.interim[m++]=h,p<<=6,p|=63&h}u||(_===2?p<128?o--:l[r++]=p:_===3?p<2048||p>=55296&&p<=57343||p===65279||(l[r++]=p):p<65536||p>1114111||(l[r++]=p)),this.interim.fill(0)}const s=c-4;let i=o;for(;i=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(e=(31&n)<<6|63&d,e<128){i--;continue}l[r++]=e}else if((240&n)==224){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(e=(15&n)<<12|(63&d)<<6|63&v,e<2048||e>=55296&&e<=57343||e===65279)continue;l[r++]=e}else if((248&n)==240){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,this.interim[2]=v,r;if(g=a[i++],(192&g)!=128){i--;continue}if(e=(7&n)<<18|(63&d)<<12|(63&v)<<6|63&g,e<65536||e>1114111)continue;l[r++]=e}}return r}}},776:function(O,t,a){var l=this&&this.__decorate||function(e,o,s,i){var u,p=arguments.length,h=p<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,s):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(e,o,s,i);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(h=(p<3?u(h):p>3?u(o,s,h):u(o,s))||h);return p>3&&h&&Object.defineProperty(o,s,h),h},c=this&&this.__param||function(e,o){return function(s,i){o(s,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=a(859),d=a(97),v={trace:d.LogLevelEnum.TRACE,debug:d.LogLevelEnum.DEBUG,info:d.LogLevelEnum.INFO,warn:d.LogLevelEnum.WARN,error:d.LogLevelEnum.ERROR,off:d.LogLevelEnum.OFF};let g,r=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),g=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let o=0;oJSON.stringify(h)).join(", ")})`);const p=i.apply(this,u);return g.trace(`GlyphRenderer#${i.name} return`,p),p}}},726:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const a="di$target",l="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(c){return c[l]||[]},t.createDecorator=function(c){if(t.serviceRegistry.has(c))return t.serviceRegistry.get(c);const n=function(d,v,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(r,e,o){e[a]===e?e[l].push({id:r,index:o}):(e[l]=[{id:r,index:o}],e[a]=e)})(n,d,g)};return n.toString=()=>c,t.serviceRegistry.set(c,n),n}},97:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const l=a(726);var c;t.IBufferService=(0,l.createDecorator)("BufferService"),t.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),t.ICoreService=(0,l.createDecorator)("CoreService"),t.ICharsetService=(0,l.createDecorator)("CharsetService"),t.IInstantiationService=(0,l.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(c||(t.LogLevelEnum=c={})),t.ILogService=(0,l.createDecorator)("LogService"),t.IOptionsService=(0,l.createDecorator)("OptionsService"),t.IOscLinkService=(0,l.createDecorator)("OscLinkService"),t.IUnicodeService=(0,l.createDecorator)("UnicodeService"),t.IDecorationService=(0,l.createDecorator)("DecorationService")}},ne={};function ee(O){var t=ne[O];if(t!==void 0)return t.exports;var a=ne[O]={exports:{}};return ce[O].call(a.exports,a,a.exports,ee),a.exports}var le={};return(()=>{var O=le;Object.defineProperty(O,"__esModule",{value:!0}),O.WebglAddon=void 0;const t=ee(345),a=ee(859),l=ee(399),c=ee(666),n=ee(776);class d extends a.Disposable{constructor(g){if(l.isSafari&&(0,l.getSafariVersion)()<16){const r={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",r))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=g,this._onChangeTextureAtlas=this.register(new t.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new t.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new t.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new t.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(g){const r=g._core;if(!g.element)return void this.register(r.onWillOpen(()=>this.activate(g)));this._terminal=g;const e=r.coreService,o=r.optionsService,s=r,i=s._renderService,u=s._characterJoinerService,p=s._charSizeService,h=s._coreBrowserService,m=s._decorationService,_=s._logService,f=s._themeService;(0,n.setTraceLogger)(_),this._renderer=this.register(new c.WebglRenderer(g,u,p,h,e,m,o,f,this._preserveDrawingBuffer)),this.register((0,t.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,t.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,t.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),i.setRenderer(this._renderer),this.register((0,a.toDisposable)(()=>{const C=this._terminal._core._renderService;C.setRenderer(this._terminal._core._createRenderer()),C.handleResize(g.cols,g.rows)}))}get textureAtlas(){var g;return(g=this._renderer)==null?void 0:g.textureAtlas}clearTextureAtlas(){var g;(g=this._renderer)==null||g.clearTextureAtlas()}}O.WebglAddon=d})(),le})())})(Ae);var Oe=Ae.exports,De={exports:{}};(function(he,Ce){(function(ce,ne){he.exports=ne()})(self,()=>(()=>{var ce={903:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;const l=a(274),c=a(627),n=a(237),d=a(860),v=a(374),g=a(296),r=a(345),e=a(859),o=a(399),s=a(855);class i extends e.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var h;return(h=this._charAtlas)==null?void 0:h.pages[0].canvas}constructor(h,m,_,f,C,b,S,w,L,D){super(),this._terminal=h,this._container=m,this._alpha=C,this._themeService=b,this._bufferService=S,this._optionsService=w,this._decorationService=L,this._coreBrowserService=D,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,g.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new e.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new l.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${_}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors(B=>{this._refreshCharAtlas(B),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)})),this.register((0,e.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(h,m){}handleSelectionChanged(h,m,_=!1){this._selectionModel.update(this._terminal._core,h,m,_)}_setTransparency(h){if(h===this._alpha)return;const m=this._canvas;this._alpha=h,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,m),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(h){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,c.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,h,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,r.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let m=0;m1?this._charAtlas.getRasterizedGlyphCombinedChar(f,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(h.getCode()||s.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!S.size.x||!S.size.y)return;this._ctx.save(),this._clipRow(_),this._bitmapGenerator[S.texturePage]&&this._charAtlas.pages[S.texturePage].canvas!==this._bitmapGenerator[S.texturePage].canvas&&((D=(L=this._bitmapGenerator[S.texturePage])==null?void 0:L.bitmap)==null||D.close(),delete this._bitmapGenerator[S.texturePage]),this._charAtlas.pages[S.texturePage].version!==((B=this._bitmapGenerator[S.texturePage])==null?void 0:B.version)&&(this._bitmapGenerator[S.texturePage]||(this._bitmapGenerator[S.texturePage]=new u(this._charAtlas.pages[S.texturePage].canvas)),this._bitmapGenerator[S.texturePage].refresh(),this._bitmapGenerator[S.texturePage].version=this._charAtlas.pages[S.texturePage].version);let w=S.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,v.allowRescaling)(C,b,S.size.x,this._deviceCellWidth)&&(w=this._deviceCellWidth-1),this._ctx.drawImage(((k=this._bitmapGenerator[S.texturePage])==null?void 0:k.bitmap)||this._charAtlas.pages[S.texturePage].canvas,S.texturePosition.x,S.texturePosition.y,S.size.x,S.size.y,m*this._deviceCellWidth+this._deviceCharLeft-S.offset.x,_*this._deviceCellHeight+this._deviceCharTop-S.offset.y,w,S.size.y),this._ctx.restore()}_clipRow(h){this._ctx.beginPath(),this._ctx.rect(0,h*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(h,m){return`${m?"italic":""} ${h?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}t.BaseRenderLayer=i;class u{get bitmap(){return this._bitmap}constructor(h){this.canvas=h,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var h;(h=this._bitmap)==null||h.close(),this._bitmap=void 0,o.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout(()=>this._generate(),100)),this._state===1&&(this._state=2))}_generate(){var h;this._state===0&&((h=this._bitmap)==null||h.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then(m=>{this._state===2?this.refresh():this._bitmap=m,this._state=0}),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasRenderer=void 0;const l=a(627),c=a(56),n=a(374),d=a(345),v=a(859),g=a(873),r=a(43),e=a(630),o=a(744);class s extends v.Disposable{constructor(u,p,h,m,_,f,C,b,S,w,L){super(),this._terminal=u,this._screenElement=p,this._bufferService=m,this._charSizeService=_,this._optionsService=f,this._coreBrowserService=S,this._themeService=L,this._observerDisposable=this.register(new v.MutableDisposable),this._onRequestRedraw=this.register(new d.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new d.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new d.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const D=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new o.TextRenderLayer(this._terminal,this._screenElement,0,D,this._bufferService,this._optionsService,C,w,this._coreBrowserService,L),new e.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,w,this._optionsService,L),new r.LinkRenderLayer(this._terminal,this._screenElement,2,h,this._bufferService,this._optionsService,w,this._coreBrowserService,L),new g.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,b,this._coreBrowserService,w,L)];for(const B of this._renderLayers)(0,d.forwardEvent)(B.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,n.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(B,k)=>this._setCanvasDevicePixelDimensions(B,k)),this.register(this._coreBrowserService.onWindowChange(B=>{this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,B,(k,M)=>this._setCanvasDevicePixelDimensions(k,M))})),this.register((0,v.toDisposable)(()=>{for(const B of this._renderLayers)B.dispose();(0,l.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(u,p){this._updateDimensions();for(const h of this._renderLayers)h.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation(u=>u.handleBlur())}handleFocus(){this._runOperation(u=>u.handleFocus())}handleSelectionChanged(u,p,h=!1){this._runOperation(m=>m.handleSelectionChanged(u,p,h)),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation(u=>u.handleCursorMove())}clear(){this._runOperation(u=>u.reset())}_runOperation(u){for(const p of this._renderLayers)u(p)}renderRows(u,p){for(const h of this._renderLayers)h.handleGridChanged(u,p)}clearTextureAtlas(){for(const u of this._renderLayers)u.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const u=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*u),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*u),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/u),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/u),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(u,p){this.dimensions.device.canvas.height=p,this.dimensions.device.canvas.width=u;for(const h of this._renderLayers)h.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}t.CanvasRenderer=s},873:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRenderLayer=void 0;const l=a(457),c=a(859),n=a(399),d=a(782),v=a(903);class g extends v.BaseRenderLayer{constructor(e,o,s,i,u,p,h,m,_,f){super(e,o,"cursor",s,!0,f,u,p,_,m),this._onRequestRedraw=i,this._coreService=h,this._cursorBlinkStateManager=this.register(new c.MutableDisposable),this._cell=new d.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(p.onOptionChange(()=>this._handleOptionsChanged())),this._handleOptionsChanged()}resize(e){super.resize(e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var e;this._clearCursor(),(e=this._cursorBlinkStateManager.value)==null||e.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var e;(e=this._cursorBlinkStateManager.value)==null||e.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var e;(e=this._cursorBlinkStateManager.value)==null||e.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new l.CursorBlinkStateManager(()=>this._render(!0),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var e;(e=this._cursorBlinkStateManager.value)==null||e.restartBlinkAnimation()}handleGridChanged(e,o){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(e){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const o=this._bufferService.buffer.ybase+this._bufferService.buffer.y,s=o-this._bufferService.buffer.ydisp;if(s<0||s>=this._bufferService.rows)return void this._clearCursor();const i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(o).loadCell(i,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const u=this._optionsService.rawOptions.cursorStyle,p=this._optionsService.rawOptions.cursorInactiveStyle;return p&&p!=="none"&&this._cursorRenderers[p](i,s,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=s,this._state.isFocused=!1,this._state.style=u,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===i&&this._state.y===s&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](i,s,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=s,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(n.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(e,o,s){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(e,o,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(e,o,s){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(e,o,s.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(s,e,o),this._ctx.restore()}_renderUnderlineCursor(e,o,s){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(e,o),this._ctx.restore()}_renderOutlineCursor(e,o,s){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(e,o,s.getWidth(),1),this._ctx.restore()}}t.CursorRenderLayer=g},574:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridCache=void 0,t.GridCache=class{constructor(){this.cache=[]}resize(a,l){for(let c=0;c{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;const l=a(197),c=a(237),n=a(903);class d extends n.BaseRenderLayer{constructor(g,r,e,o,s,i,u,p,h){super(g,r,"link",e,!0,h,s,i,u,p),this.register(o.onShowLinkUnderline(m=>this._handleShowLinkUnderline(m))),this.register(o.onHideLinkUnderline(m=>this._handleHideLinkUnderline(m)))}resize(g){super.resize(g),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const g=this._state.y2-this._state.y1-1;g>0&&this._clearCells(0,this._state.y1+1,this._state.cols,g),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(g){if(g.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:g.fg&&(0,l.is256Color)(g.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[g.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,g.y1===g.y2)this._fillBottomLineAtCells(g.x1,g.y1,g.x2-g.x1);else{this._fillBottomLineAtCells(g.x1,g.y1,g.cols-g.x1);for(let r=g.y1+1;r{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRenderLayer=void 0;const l=a(903);class c extends l.BaseRenderLayer{constructor(d,v,g,r,e,o,s,i){super(d,v,"selection",g,!0,i,r,s,o,e),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(d){super.resize(d),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(d,v,g){super.handleSelectionChanged(d,v,g),this._redrawSelection(d,v,g)}_redrawSelection(d,v,g){if(!this._didStateChange(d,v,g,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!d||!v)return void this._clearState();const r=d[1]-this._bufferService.buffer.ydisp,e=v[1]-this._bufferService.buffer.ydisp,o=Math.max(r,0),s=Math.min(e,this._bufferService.rows-1);if(o>=this._bufferService.rows||s<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,g){const i=d[0],u=v[0]-i,p=s-o+1;this._fillCells(i,o,u,p)}else{const i=r===o?d[0]:0,u=o===e?v[0]:this._bufferService.cols;this._fillCells(i,o,u-i,1);const p=Math.max(s-o-1,0);if(this._fillCells(0,o+1,this._bufferService.cols,p),o!==s){const h=e===s?v[0]:this._bufferService.cols;this._fillCells(0,s,h,1)}}this._state.start=[d[0],d[1]],this._state.end=[v[0],v[1]],this._state.columnSelectMode=g,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(d,v,g,r){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(v,this._state.end)||g!==this._state.columnSelectMode||r!==this._state.ydisp}_areCoordinatesEqual(d,v){return!(!d||!v)&&d[0]===v[0]&&d[1]===v[1]}}t.SelectionRenderLayer=c},744:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextRenderLayer=void 0;const l=a(577),c=a(147),n=a(782),d=a(855),v=a(903),g=a(574);class r extends v.BaseRenderLayer{constructor(o,s,i,u,p,h,m,_,f,C){super(o,s,"text",i,u,C,p,h,_,f),this._characterJoinerService=m,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new n.CellData,this._state=new g.GridCache,this.register(h.onSpecificOptionChange("allowTransparency",b=>this._setTransparency(b)))}resize(o){super.resize(o);const s=this._getFont(!1,!1);this._characterWidth===o.device.char.width&&this._characterFont===s||(this._characterWidth=o.device.char.width,this._characterFont=s,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(o,s,i){for(let u=o;u<=s;u++){const p=u+this._bufferService.buffer.ydisp,h=this._bufferService.buffer.lines.get(p),m=this._characterJoinerService.getJoinedCharacters(p);for(let _=0;_0&&_===m[0][0]){C=!0;const S=m.shift();f=new l.JoinedCellData(this._workCell,h.translateToString(!0,S[0],S[1]),S[1]-S[0]),b=S[1]-1}!C&&this._isOverlapping(f)&&b{let b=null;_.isInverse()?b=_.isFgDefault()?this._themeService.colors.foreground.css:_.isFgRGB()?`rgb(${c.AttributeData.toColorRGB(_.getFgColor()).join(",")})`:this._themeService.colors.ansi[_.getFgColor()].css:_.isBgRGB()?b=`rgb(${c.AttributeData.toColorRGB(_.getBgColor()).join(",")})`:_.isBgPalette()&&(b=this._themeService.colors.ansi[_.getBgColor()].css);let S=!1;this._decorationService.forEachDecorationAtCell(f,this._bufferService.buffer.ydisp+C,void 0,w=>{w.options.layer!=="top"&&S||(w.backgroundColorRGB&&(b=w.backgroundColorRGB.css),S=w.options.layer==="top")}),m===null&&(p=f,h=C),C!==h?(i.fillStyle=m||"",this._fillCells(p,h,u-p,1),p=f,h=C):m!==b&&(i.fillStyle=m||"",this._fillCells(p,h,f-p,1),p=f,h=C),m=b}),m!==null&&(i.fillStyle=m,this._fillCells(p,h,u-p,1)),i.restore()}_drawForeground(o,s){this._forEachCell(o,s,(i,u,p)=>this._drawChars(i,u,p))}handleGridChanged(o,s){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,o,this._bufferService.cols,s-o+1),this._drawBackground(o,s),this._drawForeground(o,s))}_isOverlapping(o){if(o.getWidth()!==1||o.getCode()<256)return!1;const s=o.getChars();if(this._characterOverlapCache.hasOwnProperty(s))return this._characterOverlapCache[s];this._ctx.save(),this._ctx.font=this._characterFont;const i=Math.floor(this._ctx.measureText(s).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[s]=i,i}}t.TextRenderLayer=r},274:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellColorResolver=void 0;const l=a(855),c=a(160),n=a(374);let d,v=0,g=0,r=!1,e=!1,o=!1,s=0;t.CellColorResolver=class{constructor(i,u,p,h,m,_){this._terminal=i,this._optionService=u,this._selectionRenderModel=p,this._decorationService=h,this._coreBrowserService=m,this._themeService=_,this.result={fg:0,bg:0,ext:0}}resolve(i,u,p,h){if(this.result.bg=i.bg,this.result.fg=i.fg,this.result.ext=268435456&i.bg?i.extended.ext:0,g=0,v=0,e=!1,r=!1,o=!1,d=this._themeService.colors,s=0,i.getCode()!==l.NULL_CELL_CODE&&i.extended.underlineStyle===4){const m=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));s=u*h%(2*Math.round(m))}if(this._decorationService.forEachDecorationAtCell(u,p,"bottom",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),o=this._selectionRenderModel.isCellSelected(this._terminal,u,p),o){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:g=(16777215&this.result.fg)<<8|255;break;default:g=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:g=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:g=(16777215&this.result.bg)<<8|255}g=c.rgba.blend(g,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else g=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(e=!0,d.selectionForeground&&(v=d.selectionForeground.rgba>>8&16777215,r=!0),(0,n.treatGlyphAsBackgroundColor)(i.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))v=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:v=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:v=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:v=(16777215&this.result.fg)<<8|255;break;default:v=this._themeService.colors.foreground.rgba}v=c.rgba.blend(v,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}r=!0}}this._decorationService.forEachDecorationAtCell(u,p,"top",m=>{m.backgroundColorRGB&&(g=m.backgroundColorRGB.rgba>>8&16777215,e=!0),m.foregroundColorRGB&&(v=m.foregroundColorRGB.rgba>>8&16777215,r=!0)}),e&&(g=o?-16777216&i.bg&-134217729|g|50331648:-16777216&i.bg|g|50331648),r&&(v=-16777216&i.fg&-67108865|v|50331648),67108864&this.result.fg&&(e&&!r&&(v=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&d.background.rgba>>8|50331648,r=!0),!e&&r&&(g=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&d.foreground.rgba>>8|50331648,e=!0)),d=void 0,this.result.bg=e?g:this.result.bg,this.result.fg=r?v:this.result.fg,this.result.ext&=536870911,this.result.ext|=s<<29&3758096384}}},627:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireTextureAtlas=void 0;const l=a(509),c=a(197),n=[];t.acquireTextureAtlas=function(d,v,g,r,e,o,s,i){const u=(0,c.generateConfig)(r,e,o,s,v,g,i);for(let m=0;m=0){if((0,c.configEquals)(_.config,u))return _.atlas;_.ownedBy.length===1?(_.atlas.dispose(),n.splice(m,1)):_.ownedBy.splice(f,1);break}}for(let m=0;m{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;const l=a(160);t.generateConfig=function(c,n,d,v,g,r,e){const o={foreground:r.foreground,background:r.background,cursor:l.NULL_COLOR,cursorAccent:l.NULL_COLOR,selectionForeground:l.NULL_COLOR,selectionBackgroundTransparent:l.NULL_COLOR,selectionBackgroundOpaque:l.NULL_COLOR,selectionInactiveBackgroundTransparent:l.NULL_COLOR,selectionInactiveBackgroundOpaque:l.NULL_COLOR,ansi:r.ansi.slice(),contrastCache:r.contrastCache,halfContrastCache:r.halfContrastCache};return{customGlyphs:g.customGlyphs,devicePixelRatio:e,letterSpacing:g.letterSpacing,lineHeight:g.lineHeight,deviceCellWidth:c,deviceCellHeight:n,deviceCharWidth:d,deviceCharHeight:v,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,drawBoldTextInBrightColors:g.drawBoldTextInBrightColors,minimumContrastRatio:g.minimumContrastRatio,colors:o}},t.configEquals=function(c,n){for(let d=0;d{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const l=a(399);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorBlinkStateManager=void 0,t.CursorBlinkStateManager=class{constructor(a,l){this._renderCallback=a,this._coreBrowserService=l,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(a=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,l>0)return void this._restartInterval(l)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(l)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},a)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.powerlineDefinitions=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;const l=a(374);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╒":{1:(r,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(r,e)=>`M${.5-r},1 L${.5-r},.5 L1,.5 M${.5+r},.5 L${.5+r},1`},"╔":{1:(r,e)=>`M1,${.5-e} L${.5-r},${.5-e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╕":{1:(r,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(r,e)=>`M${.5+r},1 L${.5+r},.5 L0,.5 M${.5-r},.5 L${.5-r},1`},"╗":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5+r},${.5-e} L${.5+r},1`},"╘":{1:(r,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(r,e)=>`M1,.5 L${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╚":{1:(r,e)=>`M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0 M1,${.5+e} L${.5-r},${.5+e} L${.5-r},0`},"╛":{1:(r,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(r,e)=>`M0,.5 L${.5+r},.5 L${.5+r},0 M${.5-r},.5 L${.5-r},0`},"╝":{1:(r,e)=>`M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M0,${.5+e} L${.5+r},${.5+e} L${.5+r},0`},"╞":{1:(r,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1 M${.5+r},.5 L1,.5`},"╠":{1:(r,e)=>`M${.5-r},0 L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╡":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(r,e)=>`M0,.5 L${.5-r},.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╣":{1:(r,e)=>`M${.5+r},0 L${.5+r},1 M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0`},"╤":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},1 M${.5+r},.5 L${.5+r},1`},"╦":{1:(r,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1`},"╧":{1:(r,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},.5 L${.5-r},0 M${.5+r},.5 L${.5+r},0`},"╩":{1:(r,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╪":{1:(r,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(r,e)=>`M0,.5 L1,.5 M${.5-r},0 L${.5-r},1 M${.5+r},0 L${.5+r},1`},"╬":{1:(r,e)=>`M0,${.5+e} L${.5-r},${.5+e} L${.5-r},1 M1,${.5+e} L${.5+r},${.5+e} L${.5+r},1 M0,${.5-e} L${.5-r},${.5-e} L${.5-r},0 M1,${.5-e} L${.5+r},${.5-e} L${.5+r},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(r,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(r,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},t.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.powerlineDefinitions[""]=t.powerlineDefinitions[""],t.tryDrawCustomChar=function(r,e,o,s,i,u,p,h){const m=t.blockElementDefinitions[e];if(m)return function(b,S,w,L,D,B){for(let k=0;k7&&parseInt(M.slice(7,9),16)||1;else{if(!M.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${M}" when drawing pattern glyph`);[j,N,T,E]=M.substring(5,M.length-1).split(",").map(F=>parseFloat(F))}for(let F=0;Fr.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(r,e)=>r.lineTo(e[0],e[1]),M:(r,e)=>r.moveTo(e[0],e[1])};function g(r,e,o,s,i,u,p,h=0,m=0){const _=r.map(f=>parseFloat(f)||parseInt(f));if(_.length<2)throw new Error("Too few arguments for instruction");for(let f=0;f<_.length;f+=2)_[f]*=e-h*p-m*p,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,e,0)),_[f]+=s+h*p;for(let f=1;f<_.length;f+=2)_[f]*=o,u&&_[f]!==0&&(_[f]=d(Math.round(_[f]+.5)-.5,o,0)),_[f]+=i;return _}},56:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeDevicePixelDimensions=void 0;const l=a(859);t.observeDevicePixelDimensions=function(c,n,d){let v=new n.ResizeObserver(g=>{const r=g.find(s=>s.target===c);if(!r)return;if(!("devicePixelContentBoxSize"in r))return v==null||v.disconnect(),void(v=void 0);const e=r.devicePixelContentBoxSize[0].inlineSize,o=r.devicePixelContentBoxSize[0].blockSize;e>0&&o>0&&d(e,o)});try{v.observe(c,{box:["device-pixel-content-box"]})}catch{v.disconnect(),v=void 0}return(0,l.toDisposable)(()=>v==null?void 0:v.disconnect())}},374:(O,t)=>{function a(c){return 57508<=c&&c<=57558}function l(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},t.isPowerlineGlyph=a,t.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},t.isEmoji=l,t.allowRescaling=function(c,n,d,v){return n===1&&d>Math.ceil(1.5*v)&&c!==void 0&&c>255&&!l(c)&&!a(c)&&!function(g){return 57344<=g&&g<=63743}(c)},t.treatGlyphAsBackgroundColor=function(c){return a(c)||function(n){return 9472<=n&&n<=9631}(c)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(c,n,d=0){return(c-(2*Math.round(n)-d))%(2*Math.round(n))}},296:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,n,d,v=!1){if(this.selectionStart=n,this.selectionEnd=d,!n||!d||n[0]===d[0]&&n[1]===d[1])return void this.clear();const g=c.buffers.active.ydisp,r=n[1]-g,e=d[1]-g,o=Math.max(r,0),s=Math.min(e,c.rows-1);o>=c.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=r,this.viewportEndRow=e,this.viewportCappedStartRow=o,this.viewportCappedEndRow=s,this.startCol=n[0],this.endCol=d[0])}isCellSelected(c,n,d){return!!this.hasSelection&&(d-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&d>=this.viewportCappedStartRow&&n=this.viewportCappedStartRow&&n>=this.endCol&&d<=this.viewportCappedEndRow:d>this.viewportStartRow&&d=this.startCol&&n=this.startCol)}}t.createSelectionRenderModel=function(){return new a}},509:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextureAtlas=void 0;const l=a(237),c=a(860),n=a(374),d=a(160),v=a(345),g=a(485),r=a(385),e=a(147),o=a(855),s={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let i;class u{get pages(){return this._pages}constructor(f,C,b){this._document=f,this._config=C,this._unicodeService=b,this._didWarmUp=!1,this._cacheMap=new g.FourKeyMap,this._cacheMapCombined=new g.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new e.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new v.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new v.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=m(f,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,n.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const f of this.pages)f.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const f=new r.IdleTaskQueue;for(let C=33;C<126;C++)f.enqueue(()=>{if(!this._cacheMap.get(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT)){const b=this._drawToCache(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT);this._cacheMap.set(C,o.DEFAULT_COLOR,o.DEFAULT_COLOR,o.DEFAULT_EXT,b)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const f of this._pages)f.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(u.maxAtlasPages&&this._pages.length>=Math.max(4,u.maxAtlasPages)){const C=this._pages.filter(k=>2*k.canvas.width<=(u.maxTextureSize||4096)).sort((k,M)=>M.canvas.width!==k.canvas.width?M.canvas.width-k.canvas.width:M.percentageUsed-k.percentageUsed);let b=-1,S=0;for(let k=0;kk.glyphs[0].texturePage).sort((k,M)=>k>M?1:-1),D=this.pages.length-w.length,B=this._mergePages(w,D);B.version++;for(let k=L.length-1;k>=0;k--)this._deletePage(L[k]);this.pages.push(B),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(B.canvas)}const f=new p(this._document,this._textureSize);return this._pages.push(f),this._activePages.push(f),this._onAddTextureAtlasCanvas.fire(f.canvas),f}_mergePages(f,C){const b=2*f[0].canvas.width,S=new p(this._document,b,f);for(const[w,L]of f.entries()){const D=w*L.canvas.width%b,B=Math.floor(w/2)*L.canvas.height;S.ctx.drawImage(L.canvas,D,B);for(const M of L.glyphs)M.texturePage=C,M.sizeClipSpace.x=M.size.x/b,M.sizeClipSpace.y=M.size.y/b,M.texturePosition.x+=D,M.texturePosition.y+=B,M.texturePositionClipSpace.x=M.texturePosition.x/b,M.texturePositionClipSpace.y=M.texturePosition.y/b;this._onRemoveTextureAtlasCanvas.fire(L.canvas);const k=this._activePages.indexOf(L);k!==-1&&this._activePages.splice(k,1)}return S}_deletePage(f){this._pages.splice(f,1);for(let C=f;C=this._config.colors.ansi.length)throw new Error("No color found for idx "+f);return this._config.colors.ansi[f]}_getBackgroundColor(f,C,b,S){if(this._config.allowTransparency)return d.NULL_COLOR;let w;switch(f){case 16777216:case 33554432:w=this._getColorFromAnsiIndex(C);break;case 50331648:const L=e.AttributeData.toColorRGB(C);w=d.channels.toColor(L[0],L[1],L[2]);break;default:w=b?d.color.opaque(this._config.colors.foreground):this._config.colors.background}return w}_getForegroundColor(f,C,b,S,w,L,D,B,k,M){const y=this._getMinimumContrastColor(f,C,b,S,w,L,D,k,B,M);if(y)return y;let x;switch(w){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&k&&L<8&&(L+=8),x=this._getColorFromAnsiIndex(L);break;case 50331648:const R=e.AttributeData.toColorRGB(L);x=d.channels.toColor(R[0],R[1],R[2]);break;default:x=D?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(x=d.color.opaque(x)),B&&(x=d.color.multiplyOpacity(x,l.DIM_OPACITY)),x}_resolveBackgroundRgba(f,C,b){switch(f){case 16777216:case 33554432:return this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(f,C,b,S){switch(f){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&S&&C<8&&(C+=8),this._getColorFromAnsiIndex(C).rgba;case 50331648:return C<<8;default:return b?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(f,C,b,S,w,L,D,B,k,M){if(this._config.minimumContrastRatio===1||M)return;const y=this._getContrastCache(k),x=y.getColor(f,S);if(x!==void 0)return x||void 0;const R=this._resolveBackgroundRgba(C,b,D),A=this._resolveForegroundRgba(w,L,D,B),I=d.rgba.ensureContrastRatio(R,A,this._config.minimumContrastRatio/(k?2:1));if(!I)return void y.setColor(f,S,null);const H=d.channels.toColor(I>>24&255,I>>16&255,I>>8&255);return y.setColor(f,S,H),H}_getContrastCache(f){return f?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(f,C,b,S,w=!1){const L=typeof f=="number"?String.fromCharCode(f):f,D=Math.min(this._config.deviceCellWidth*Math.max(L.length,2)+4,this._textureSize);this._tmpCanvas.width=$?2*$-ae:$-ae;ae>=$||pe===0?(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z+pe,Q),this._tmpCtx.lineTo(J,Q)):(this._tmpCtx.setLineDash([Math.round($),Math.round($)]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(Z+pe,Q),this._tmpCtx.moveTo(Z+pe+$,Q),this._tmpCtx.lineTo(J,Q)),ae=(0,n.computeNextVariantOffset)(J-Z,$,ae);break;case 5:const ye=.6,Le=.3,me=J-Z,be=Math.floor(ye*me),we=Math.floor(Le*me),xe=me-be-we;this._tmpCtx.setLineDash([be,we,xe]),this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q);break;default:this._tmpCtx.moveTo(Z,Q),this._tmpCtx.lineTo(J,Q)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!te&&this._config.fontSize>=12&&!this._config.allowTransparency&&L!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const se=this._tmpCtx.measureText(L);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in se&&se.actualBoundingBoxDescent>0){this._tmpCtx.save();const Z=new Path2D;Z.rect(ie,Q-Math.ceil($/2),this._config.deviceCellWidth*re,oe-Q+Math.ceil($/2)),this._tmpCtx.clip(Z),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(L,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(I){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),K=$%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+K),this._tmpCtx.stroke()}if(te||this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight),L==="_"&&!this._config.allowTransparency){let $=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X);if($)for(let K=1;K<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(L,U,U+this._config.deviceCharHeight-K),$=h(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),E,Y,X),$);K++);}if(A){const $=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),K=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=$,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*re,U+Math.floor(this._config.deviceCharHeight/2)-K),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ue;if(ue=this._config.allowTransparency?function($){for(let K=0;K<$.data.length;K+=4)if($.data[K+3]>0)return!1;return!0}(de):h(de,E,Y,X),ue)return s;const V=this._findGlyphBoundingBox(de,this._workBoundingBox,D,W,te,U);let q,G;for(;;){if(this._activePages.length===0){const $=this._createNewPage();q=$,G=$.currentRow,G.height=V.size.y;break}q=this._activePages[this._activePages.length-1],G=q.currentRow;for(const $ of this._activePages)V.size.y<=$.currentRow.height&&(q=$,G=$.currentRow);for(let $=this._activePages.length-1;$>=0;$--)for(const K of this._activePages[$].fixedRows)K.height<=G.height&&V.size.y<=K.height&&(q=this._activePages[$],G=K);if(G.y+V.size.y>=q.canvas.height||G.height>V.size.y+2){let $=!1;if(q.currentRow.y+q.currentRow.height+V.size.y>=q.canvas.height){let K;for(const ie of this._activePages)if(ie.currentRow.y+ie.currentRow.height+V.size.y=u.maxAtlasPages&&G.y+V.size.y<=q.canvas.height&&G.height>=V.size.y&&G.x+V.size.x<=q.canvas.width)$=!0;else{const ie=this._createNewPage();q=ie,G=ie.currentRow,G.height=V.size.y,$=!0}}$||(q.currentRow.height>0&&q.fixedRows.push(q.currentRow),G={x:0,y:q.currentRow.y+q.currentRow.height,height:V.size.y},q.fixedRows.push(G),q.currentRow={x:0,y:G.y+G.height,height:0})}if(G.x+V.size.x<=q.canvas.width)break;G===q.currentRow?(G.x=0,G.y+=G.height,G.height=0):q.fixedRows.splice(q.fixedRows.indexOf(G),1)}return V.texturePage=this._pages.indexOf(q),V.texturePosition.x=G.x,V.texturePosition.y=G.y,V.texturePositionClipSpace.x=G.x/q.canvas.width,V.texturePositionClipSpace.y=G.y/q.canvas.height,V.sizeClipSpace.x/=q.canvas.width,V.sizeClipSpace.y/=q.canvas.height,G.height=Math.max(G.height,V.size.y),G.x+=V.size.x,q.ctx.putImageData(de,V.texturePosition.x-this._workBoundingBox.left,V.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,V.size.x,V.size.y),q.addGlyph(V),q.version++,V}_findGlyphBoundingBox(f,C,b,S,w,L){C.top=0;const D=S?this._config.deviceCellHeight:this._tmpCanvas.height,B=S?this._config.deviceCellWidth:b;let k=!1;for(let M=0;M=L;M--){for(let y=0;y=0;M--){for(let y=0;y>>24,w=f.rgba>>>16&255,L=f.rgba>>>8&255,D=C.rgba>>>24,B=C.rgba>>>16&255,k=C.rgba>>>8&255,M=Math.floor((Math.abs(S-D)+Math.abs(w-B)+Math.abs(L-k))/12);let y=!0;for(let x=0;x<_.data.length;x+=4)_.data[x]===S&&_.data[x+1]===w&&_.data[x+2]===L||b&&Math.abs(_.data[x]-S)+Math.abs(_.data[x+1]-w)+Math.abs(_.data[x+2]-L)=0;_--)(p=o[_])&&(m=(h<3?p(m):h>3?p(s,i,m):p(s,i))||m);return h>3&&m&&Object.defineProperty(s,i,m),m},c=this&&this.__param||function(o,s){return function(i,u){s(i,u,o)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const n=a(147),d=a(855),v=a(782),g=a(97);class r extends n.AttributeData{constructor(s,i,u){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=i,this._width=u}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=r;let e=t.CharacterJoinerService=class ke{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new v.CellData}register(s){const i={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(i),i.id}deregister(s){for(let i=0;i1){const S=this._getJoinedRanges(p,_,m,i,h);for(let w=0;w1){const b=this._getJoinedRanges(p,_,m,i,h);for(let S=0;S{Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let a=0,l=0,c=0,n=0;var d,v,g,r,e;function o(i){const u=i.toString(16);return u.length<2?"0"+u:u}function s(i,u){return i>>0},i.toColor=function(u,p,h,m){return{css:i.toCss(u,p,h,m),rgba:i.toRgba(u,p,h,m)}}}(d||(t.channels=d={})),function(i){function u(p,h){return n=Math.round(255*h),[a,l,c]=e.toChannels(p.rgba),{css:d.toCss(a,l,c,n),rgba:d.toRgba(a,l,c,n)}}i.blend=function(p,h){if(n=(255&h.rgba)/255,n===1)return{css:h.css,rgba:h.rgba};const m=h.rgba>>24&255,_=h.rgba>>16&255,f=h.rgba>>8&255,C=p.rgba>>24&255,b=p.rgba>>16&255,S=p.rgba>>8&255;return a=C+Math.round((m-C)*n),l=b+Math.round((_-b)*n),c=S+Math.round((f-S)*n),{css:d.toCss(a,l,c),rgba:d.toRgba(a,l,c)}},i.isOpaque=function(p){return(255&p.rgba)==255},i.ensureContrastRatio=function(p,h,m){const _=e.ensureContrastRatio(p.rgba,h.rgba,m);if(_)return d.toColor(_>>24&255,_>>16&255,_>>8&255)},i.opaque=function(p){const h=(255|p.rgba)>>>0;return[a,l,c]=e.toChannels(h),{css:d.toCss(a,l,c),rgba:h}},i.opacity=u,i.multiplyOpacity=function(p,h){return n=255&p.rgba,u(p,n*h/255)},i.toColorRGB=function(p){return[p.rgba>>24&255,p.rgba>>16&255,p.rgba>>8&255]}}(v||(t.color=v={})),function(i){let u,p;try{const h=document.createElement("canvas");h.width=1,h.height=1;const m=h.getContext("2d",{willReadFrequently:!0});m&&(u=m,u.globalCompositeOperation="copy",p=u.createLinearGradient(0,0,1,1))}catch{}i.toColor=function(h){if(h.match(/#[\da-f]{3,8}/i))switch(h.length){case 4:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),d.toColor(a,l,c);case 5:return a=parseInt(h.slice(1,2).repeat(2),16),l=parseInt(h.slice(2,3).repeat(2),16),c=parseInt(h.slice(3,4).repeat(2),16),n=parseInt(h.slice(4,5).repeat(2),16),d.toColor(a,l,c,n);case 7:return{css:h,rgba:(parseInt(h.slice(1),16)<<8|255)>>>0};case 9:return{css:h,rgba:parseInt(h.slice(1),16)>>>0}}const m=h.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(m)return a=parseInt(m[1]),l=parseInt(m[2]),c=parseInt(m[3]),n=Math.round(255*(m[5]===void 0?1:parseFloat(m[5]))),d.toColor(a,l,c,n);if(!u||!p)throw new Error("css.toColor: Unsupported css format");if(u.fillStyle=p,u.fillStyle=h,typeof u.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(u.fillRect(0,0,1,1),[a,l,c,n]=u.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:d.toRgba(a,l,c,n),css:h}}}(g||(t.css=g={})),function(i){function u(p,h,m){const _=p/255,f=h/255,C=m/255;return .2126*(_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))}i.relativeLuminance=function(p){return u(p>>16&255,p>>8&255,255&p)},i.relativeLuminance2=u}(r||(t.rgb=r={})),function(i){function u(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S>0||w>0||L>0);)S-=Math.max(0,Math.ceil(.1*S)),w-=Math.max(0,Math.ceil(.1*w)),L-=Math.max(0,Math.ceil(.1*L)),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}function p(h,m,_){const f=h>>24&255,C=h>>16&255,b=h>>8&255;let S=m>>24&255,w=m>>16&255,L=m>>8&255,D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));for(;D<_&&(S<255||w<255||L<255);)S=Math.min(255,S+Math.ceil(.1*(255-S))),w=Math.min(255,w+Math.ceil(.1*(255-w))),L=Math.min(255,L+Math.ceil(.1*(255-L))),D=s(r.relativeLuminance2(S,w,L),r.relativeLuminance2(f,C,b));return(S<<24|w<<16|L<<8|255)>>>0}i.blend=function(h,m){if(n=(255&m)/255,n===1)return m;const _=m>>24&255,f=m>>16&255,C=m>>8&255,b=h>>24&255,S=h>>16&255,w=h>>8&255;return a=b+Math.round((_-b)*n),l=S+Math.round((f-S)*n),c=w+Math.round((C-w)*n),d.toRgba(a,l,c)},i.ensureContrastRatio=function(h,m,_){const f=r.relativeLuminance(h>>8),C=r.relativeLuminance(m>>8);if(s(f,C)<_){if(C>8));if(L<_){const D=p(h,m,_);return L>s(f,r.relativeLuminance(D>>8))?w:D}return w}const b=p(h,m,_),S=s(f,r.relativeLuminance(b>>8));if(S<_){const w=u(h,m,_);return S>s(f,r.relativeLuminance(w>>8))?b:w}return b}},i.reduceLuminance=u,i.increaseLuminance=p,i.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]}}(e||(t.rgba=e={})),t.toPaddedHex=o,t.contrastRatio=s},345:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let l=0;ll.fire(c))},t.runAndSubscribe=function(a,l){return l(void 0),a(c=>l(c))}},859:(O,t)=>{function a(l){for(const c of l)c.dispose();l.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const c=this._disposables.indexOf(l);c!==-1&&this._disposables.splice(c,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){var c;this._isDisposed||l===this._value||((c=this._value)==null||c.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,(l=this._value)==null||l.dispose(),this._value=void 0}},t.toDisposable=function(l){return{dispose:l}},t.disposeArray=a,t.getDisposeArrayDisposable=function(l){return{dispose:()=>a(l)}}},485:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(c,n,d){this._data[c]||(this._data[c]={}),this._data[c][n]=d}get(c,n){return this._data[c]?this._data[c][n]:void 0}clear(){this._data={}}}t.TwoKeyMap=a,t.FourKeyMap=class{constructor(){this._data=new a}set(l,c,n,d,v){this._data.get(l,c)||this._data.set(l,c,new a),this._data.get(l,c).set(n,d,v)}get(l,c,n,d){var v;return(v=this._data.get(l,c))==null?void 0:v.get(n,d)}clear(){this._data.clear()}}},399:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=typeof process<"u"&&"title"in process;const a=t.isNode?"node":navigator.userAgent,l=t.isNode?"node":navigator.platform;t.isFirefox=a.includes("Firefox"),t.isLegacyEdge=a.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(a),t.getSafariVersion=function(){if(!t.isSafari)return 0;const c=a.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),t.isIpad=l==="iPad",t.isIphone=l==="iPhone",t.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),t.isLinux=l.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(a)},385:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const l=a(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),this._start()}flush(){for(;this._io)return e-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-g))}ms`),void this._start();e=o}this.clear()}}class n extends c{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const g=Date.now()+v;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},147:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new a;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=a;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,d=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=d}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}t.ExtendedAttrs=l},782:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const l=a(133),c=a(855),n=a(147);class d extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(g){const r=new d;return r.setFromCharData(g),r}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let r=!1;if(g[c.CHAR_DATA_CHAR_INDEX].length>2)r=!0;else if(g[c.CHAR_DATA_CHAR_INDEX].length===2){const e=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const o=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(e-55296)+o-56320+65536|g[c.CHAR_DATA_WIDTH_INDEX]<<22:r=!0}else r=!0}else this.content=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[c.CHAR_DATA_WIDTH_INDEX]<<22;r&&(this.combinedData=g[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=d},855:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},133:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},t.utf32ToString=function(a,l=0,c=a.length){let n="";for(let d=l;d65535?(v-=65536,n+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):n+=String.fromCharCode(v)}return n},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,l){const c=a.length;if(!c)return 0;let n=0,d=0;if(this._interim){const v=a.charCodeAt(d++);56320<=v&&v<=57343?l[n++]=1024*(this._interim-55296)+v-56320+65536:(l[n++]=this._interim,l[n++]=v),this._interim=0}for(let v=d;v=c)return this._interim=g,n;const r=a.charCodeAt(v);56320<=r&&r<=57343?l[n++]=1024*(g-55296)+r-56320+65536:(l[n++]=g,l[n++]=r)}else g!==65279&&(l[n++]=g)}return n}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,l){const c=a.length;if(!c)return 0;let n,d,v,g,r=0,e=0,o=0;if(this.interim[0]){let u=!1,p=this.interim[0];p&=(224&p)==192?31:(240&p)==224?15:7;let h,m=0;for(;(h=63&this.interim[++m])&&m<4;)p<<=6,p|=h;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=_-m;for(;o=c)return 0;if(h=a[o++],(192&h)!=128){o--,u=!0;break}this.interim[m++]=h,p<<=6,p|=63&h}u||(_===2?p<128?o--:l[r++]=p:_===3?p<2048||p>=55296&&p<=57343||p===65279||(l[r++]=p):p<65536||p>1114111||(l[r++]=p)),this.interim.fill(0)}const s=c-4;let i=o;for(;i=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(e=(31&n)<<6|63&d,e<128){i--;continue}l[r++]=e}else if((240&n)==224){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(e=(15&n)<<12|(63&d)<<6|63&v,e<2048||e>=55296&&e<=57343||e===65279)continue;l[r++]=e}else if((248&n)==240){if(i>=c)return this.interim[0]=n,r;if(d=a[i++],(192&d)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,r;if(v=a[i++],(192&v)!=128){i--;continue}if(i>=c)return this.interim[0]=n,this.interim[1]=d,this.interim[2]=v,r;if(g=a[i++],(192&g)!=128){i--;continue}if(e=(7&n)<<18|(63&d)<<12|(63&v)<<6|63&g,e<65536||e>1114111)continue;l[r++]=e}}return r}}},776:function(O,t,a){var l=this&&this.__decorate||function(e,o,s,i){var u,p=arguments.length,h=p<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,s):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(e,o,s,i);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(h=(p<3?u(h):p>3?u(o,s,h):u(o,s))||h);return p>3&&h&&Object.defineProperty(o,s,h),h},c=this&&this.__param||function(e,o){return function(s,i){o(s,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=a(859),d=a(97),v={trace:d.LogLevelEnum.TRACE,debug:d.LogLevelEnum.DEBUG,info:d.LogLevelEnum.INFO,warn:d.LogLevelEnum.WARN,error:d.LogLevelEnum.ERROR,off:d.LogLevelEnum.OFF};let g,r=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),g=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let o=0;oJSON.stringify(h)).join(", ")})`);const p=i.apply(this,u);return g.trace(`GlyphRenderer#${i.name} return`,p),p}}},726:(O,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const a="di$target",l="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(c){return c[l]||[]},t.createDecorator=function(c){if(t.serviceRegistry.has(c))return t.serviceRegistry.get(c);const n=function(d,v,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(r,e,o){e[a]===e?e[l].push({id:r,index:o}):(e[l]=[{id:r,index:o}],e[a]=e)})(n,d,g)};return n.toString=()=>c,t.serviceRegistry.set(c,n),n}},97:(O,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const l=a(726);var c;t.IBufferService=(0,l.createDecorator)("BufferService"),t.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),t.ICoreService=(0,l.createDecorator)("CoreService"),t.ICharsetService=(0,l.createDecorator)("CharsetService"),t.IInstantiationService=(0,l.createDecorator)("InstantiationService"),function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"}(c||(t.LogLevelEnum=c={})),t.ILogService=(0,l.createDecorator)("LogService"),t.IOptionsService=(0,l.createDecorator)("OptionsService"),t.IOscLinkService=(0,l.createDecorator)("OscLinkService"),t.IUnicodeService=(0,l.createDecorator)("UnicodeService"),t.IDecorationService=(0,l.createDecorator)("DecorationService")}},ne={};function ee(O){var t=ne[O];if(t!==void 0)return t.exports;var a=ne[O]={exports:{}};return ce[O].call(a.exports,a,a.exports,ee),a.exports}var le={};return(()=>{var O=le;Object.defineProperty(O,"__esModule",{value:!0}),O.CanvasAddon=void 0;const t=ee(345),a=ee(859),l=ee(776),c=ee(949);class n extends a.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new t.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new t.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var v;return(v=this._renderer)==null?void 0:v.textureAtlas}activate(v){const g=v._core;if(!v.element)return void this.register(g.onWillOpen(()=>this.activate(v)));this._terminal=v;const r=g.coreService,e=g.optionsService,o=g.screenElement,s=g.linkifier,i=g,u=i._bufferService,p=i._renderService,h=i._characterJoinerService,m=i._charSizeService,_=i._coreBrowserService,f=i._decorationService,C=i._logService,b=i._themeService;(0,l.setTraceLogger)(C),this._renderer=new c.CanvasRenderer(v,o,s,u,m,e,h,r,_,f,b),this.register((0,t.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),p.setRenderer(this._renderer),p.handleResize(u.cols,u.rows),this.register((0,a.toDisposable)(()=>{var S;p.setRenderer(this._terminal._core._createRenderer()),p.handleResize(v.cols,v.rows),(S=this._renderer)==null||S.dispose(),this._renderer=void 0}))}clearTextureAtlas(){var v;(v=this._renderer)==null||v.clearTextureAtlas()}}O.CanvasAddon=n})(),le})())})(De);var Pe=De.exports,Te={exports:{}};(function(he,Ce){(function(ce,ne){he.exports=ne()})(self,()=>(()=>{var ce={};return(()=>{var ne=ce;Object.defineProperty(ne,"__esModule",{value:!0}),ne.FitAddon=void 0,ne.FitAddon=class{activate(ee){this._terminal=ee}dispose(){}fit(){const ee=this.proposeDimensions();if(!ee||!this._terminal||isNaN(ee.cols)||isNaN(ee.rows))return;const le=this._terminal._core;this._terminal.rows===ee.rows&&this._terminal.cols===ee.cols||(le._renderService.clear(),this._terminal.resize(ee.cols,ee.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ee=this._terminal._core,le=ee._renderService.dimensions;if(le.css.cell.width===0||le.css.cell.height===0)return;const O=this._terminal.options.scrollback===0?0:ee.viewport.scrollBarWidth,t=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(t.getPropertyValue("height")),l=Math.max(0,parseInt(t.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),n=a-(parseInt(c.getPropertyValue("padding-top"))+parseInt(c.getPropertyValue("padding-bottom"))),d=l-(parseInt(c.getPropertyValue("padding-right"))+parseInt(c.getPropertyValue("padding-left")))-O;return{cols:Math.max(2,Math.floor(d/le.css.cell.width)),rows:Math.max(1,Math.floor(n/le.css.cell.height))}}}})(),ce})())})(Te);var Ie=Te.exports;let Ee=document.getElementById("js-web-terminal");if(Ee!==null){const he=new Be.Terminal({allowTransparency:!0,theme:{background:"rgba(22,22,23,0)",foreground:"#cccccc",selectionBackground:"#399ef440",black:"#666666",blue:"#399ef4",brightBlack:"#666666",brightBlue:"#399ef4",brightCyan:"#21c5c7",brightGreen:"#4eb071",brightMagenta:"#b168df",brightRed:"#da6771",brightWhite:"#efefef",brightYellow:"#fff099",cyan:"#21c5c7",green:"#4eb071",magenta:"#b168df",red:"#da6771",white:"#efefef",yellow:"#fff099"}});typeof WebGL2RenderingContext<"u"?he.loadAddon(new Oe.WebglAddon):he.loadAddon(new Pe.CanvasAddon);const Ce=new Ie.FitAddon;he.loadAddon(Ce),he.open(Ee),Ce.fit();const ce=new WebSocket(`ws://${window.location.host}/_shell/?sessionId=${window.terminal.sessionId}`);ce.addEventListener("open",ne=>{he.onData(ee=>ce.send(ee)),ce.addEventListener("message",ee=>he.write(ee.data))}),ce.addEventListener("error",ne=>{he.reset(),he.writeln("Connection error.")}),ce.addEventListener("close",ne=>{ne.wasClean&&(he.reset(),he.writeln(ne.reason??"Connection closed."))})}
diff --git a/web/public/build/manifest.json b/web/public/build/manifest.json
index d5c4a26..64e047a 100644
--- a/web/public/build/manifest.json
+++ b/web/public/build/manifest.json
@@ -17,7 +17,7 @@
"css": [
"assets/web-terminal-c039bc4a.css"
],
- "file": "assets/web-terminal-6085c523.js",
+ "file": "assets/web-terminal-940be4ad.js",
"isEntry": true,
"src": "resources/js/web-terminal.js"
}
diff --git a/web/resources/js/web-terminal.js b/web/resources/js/web-terminal.js
index e69cd59..42917dd 100644
--- a/web/resources/js/web-terminal.js
+++ b/web/resources/js/web-terminal.js
@@ -10,7 +10,7 @@ if (terminalElement !== null) {
const terminal = new Terminal({
allowTransparency: true,
theme: {
- background: '#09090b',
+ background: 'rgba(22,22,23,0)',
foreground: '#cccccc',
selectionBackground: '#399ef440',
black: '#666666',
@@ -45,6 +45,7 @@ if (terminalElement !== null) {
fitAddon.fit();
+
const socket = new WebSocket(`ws://${window.location.host}/_shell/?sessionId=${window.terminal.sessionId}`);
socket.addEventListener('open', (_) => {
terminal.onData((data) => socket.send(data));