@opensumi/cli-engine 3.6.4-next-1734602150.0 → 3.6.5-next-1734685380.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/151.browser.js +58 -0
- package/lib/browser/238.browser.js +11 -0
- package/lib/browser/359.browser.js +1 -0
- package/lib/browser/412.browser.js +1 -0
- package/lib/browser/412.main.css +1 -0
- package/lib/browser/454.browser.js +264 -0
- package/lib/browser/622.browser.js +1 -0
- package/lib/browser/622.main.css +1 -0
- package/lib/browser/628.browser.js +1 -0
- package/lib/browser/804.browser.js +1 -0
- package/lib/browser/assets.json +94 -0
- package/lib/browser/browser.js +28966 -0
- package/lib/browser/e865fd888cafb2a91b52.module.wasm +0 -0
- package/lib/browser/f86e6127667de32bbd4f.png +0 -0
- package/lib/browser/fd3be59fe5f76327c48f.png +0 -0
- package/lib/browser/fonts/codicon.ttf +0 -0
- package/lib/browser/images/background-logo-icon.svg +19 -0
- package/lib/browser/images/boolean-dark.svg +3 -0
- package/lib/browser/images/boolean-light.svg +3 -0
- package/lib/browser/images/breakpoint-conditional-disabled.svg +4 -0
- package/lib/browser/images/breakpoint-conditional-unverified.svg +4 -0
- package/lib/browser/images/breakpoint-conditional.svg +4 -0
- package/lib/browser/images/breakpoint-disabled.svg +4 -0
- package/lib/browser/images/breakpoint-hint.svg +4 -0
- package/lib/browser/images/breakpoint-log-disabled.svg +4 -0
- package/lib/browser/images/breakpoint-log-unverified.svg +4 -0
- package/lib/browser/images/breakpoint-log.svg +4 -0
- package/lib/browser/images/breakpoint-unsupported.svg +4 -0
- package/lib/browser/images/breakpoint-unverified.svg +4 -0
- package/lib/browser/images/breakpoint.svg +4 -0
- package/lib/browser/images/class-dark.svg +3 -0
- package/lib/browser/images/class-light.svg +3 -0
- package/lib/browser/images/constant-dark.svg +4 -0
- package/lib/browser/images/constant-light.svg +4 -0
- package/lib/browser/images/current-and-breakpoint.svg +4 -0
- package/lib/browser/images/current-arrow.svg +4 -0
- package/lib/browser/images/enumerator-dark.svg +3 -0
- package/lib/browser/images/enumerator-item-dark.svg +3 -0
- package/lib/browser/images/enumerator-item-light.svg +3 -0
- package/lib/browser/images/enumerator-light.svg +3 -0
- package/lib/browser/images/event-dark.svg +3 -0
- package/lib/browser/images/event-light.svg +3 -0
- package/lib/browser/images/field-dark.svg +3 -0
- package/lib/browser/images/field-light.svg +3 -0
- package/lib/browser/images/file-dark.svg +3 -0
- package/lib/browser/images/file-light.svg +3 -0
- package/lib/browser/images/indexer-dark.svg +3 -0
- package/lib/browser/images/indexer-light.svg +3 -0
- package/lib/browser/images/interface-dark.svg +3 -0
- package/lib/browser/images/interface-light.svg +3 -0
- package/lib/browser/images/keyword-dark.svg +3 -0
- package/lib/browser/images/keyword-light.svg +3 -0
- package/lib/browser/images/loading-dark.svg +52 -0
- package/lib/browser/images/loading-hc.svg +52 -0
- package/lib/browser/images/loading.svg +52 -0
- package/lib/browser/images/logo.svg +1 -0
- package/lib/browser/images/method-dark.svg +3 -0
- package/lib/browser/images/method-light.svg +3 -0
- package/lib/browser/images/namespace-dark.svg +3 -0
- package/lib/browser/images/namespace-light.svg +3 -0
- package/lib/browser/images/numeric-dark.svg +3 -0
- package/lib/browser/images/numeric-light.svg +3 -0
- package/lib/browser/images/operator-dark.svg +3 -0
- package/lib/browser/images/operator-light.svg +3 -0
- package/lib/browser/images/property-dark.svg +3 -0
- package/lib/browser/images/property-light.svg +3 -0
- package/lib/browser/images/snippet-dark.svg +3 -0
- package/lib/browser/images/snippet-light.svg +3 -0
- package/lib/browser/images/stackframe-and-breakpoint.svg +4 -0
- package/lib/browser/images/stackframe-arrow.svg +4 -0
- package/lib/browser/images/string-dark.svg +3 -0
- package/lib/browser/images/string-light.svg +3 -0
- package/lib/browser/images/structure-dark.svg +3 -0
- package/lib/browser/images/structure-light.svg +3 -0
- package/lib/browser/images/template-dark.svg +3 -0
- package/lib/browser/images/template-light.svg +3 -0
- package/lib/browser/images/variable-dark.svg +3 -0
- package/lib/browser/images/variable-light.svg +3 -0
- package/lib/browser/index.html +42 -0
- package/lib/browser/loader.js +3 -0
- package/lib/browser/main.css +3 -0
- package/lib/browser/worker-host.js +1 -1
- package/lib/hosted/ext.process.js +1 -1
- package/package.json +10 -10
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(self.webpackChunk_opensumi_cli_engine=self.webpackChunk_opensumi_cli_engine||[]).push([[151],{42151:(we,Ae,be)=>{var ve=be(39907);(function(fe,ae){we.exports=ae()})(self,()=>(()=>{"use strict";var fe={965:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;const l=c(374),o=c(509),r=c(855),d=c(859),m=c(381),_=11,i=_*Float32Array.BYTES_PER_ELEMENT;let t,g=0,R=0,C=0;class b extends d.Disposable{constructor(n,p,u,h){super(),this._terminal=n,this._gl=p,this._dimensions=u,this._optionsService=h,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const s=this._gl;o.TextureAtlas.maxAtlasPages===void 0&&(o.TextureAtlas.maxAtlasPages=Math.min(32,(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),o.TextureAtlas.maxTextureSize=(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=(0,l.throwIfFalsy)((0,m.createProgram)(s,`#version 300 es
|
|
2
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
3
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
4
|
+
layout (location = 2) in vec2 a_offset;
|
|
5
|
+
layout (location = 3) in vec2 a_size;
|
|
6
|
+
layout (location = 4) in float a_texpage;
|
|
7
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
8
|
+
layout (location = 6) in vec2 a_texsize;
|
|
9
|
+
|
|
10
|
+
uniform mat4 u_projection;
|
|
11
|
+
uniform vec2 u_resolution;
|
|
12
|
+
|
|
13
|
+
out vec2 v_texcoord;
|
|
14
|
+
flat out int v_texpage;
|
|
15
|
+
|
|
16
|
+
void main() {
|
|
17
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
18
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
19
|
+
v_texpage = int(a_texpage);
|
|
20
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
21
|
+
}`,function(y){let M="";for(let w=1;w<y;w++)M+=` else if (v_texpage == ${w}) { outColor = texture(u_texture[${w}], v_texcoord); }`;return`#version 300 es
|
|
22
|
+
precision lowp float;
|
|
23
|
+
|
|
24
|
+
in vec2 v_texcoord;
|
|
25
|
+
flat in int v_texpage;
|
|
26
|
+
|
|
27
|
+
uniform sampler2D u_texture[${y}];
|
|
28
|
+
|
|
29
|
+
out vec4 outColor;
|
|
30
|
+
|
|
31
|
+
void main() {
|
|
32
|
+
if (v_texpage == 0) {
|
|
33
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
34
|
+
} ${M}
|
|
35
|
+
}`}(o.TextureAtlas.maxAtlasPages))),this.register((0,d.toDisposable)(()=>s.deleteProgram(this._program))),this._projectionLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);const v=new Float32Array([0,0,1,0,0,1,1,1]),a=s.createBuffer();this.register((0,d.toDisposable)(()=>s.deleteBuffer(a))),s.bindBuffer(s.ARRAY_BUFFER,a),s.bufferData(s.ARRAY_BUFFER,v,s.STATIC_DRAW),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const L=new Uint8Array([0,1,2,3]),f=s.createBuffer();this.register((0,d.toDisposable)(()=>s.deleteBuffer(f))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,f),s.bufferData(s.ELEMENT_ARRAY_BUFFER,L,s.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(s.createBuffer()),this.register((0,d.toDisposable)(()=>s.deleteBuffer(this._attributesBuffer))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,2,s.FLOAT,!1,i,0),s.vertexAttribDivisor(2,1),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,s.FLOAT,!1,i,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(3,1),s.enableVertexAttribArray(4),s.vertexAttribPointer(4,1,s.FLOAT,!1,i,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(4,1),s.enableVertexAttribArray(5),s.vertexAttribPointer(5,2,s.FLOAT,!1,i,5*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(5,1),s.enableVertexAttribArray(6),s.vertexAttribPointer(6,2,s.FLOAT,!1,i,7*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(6,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,i,9*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.useProgram(this._program);const A=new Int32Array(o.TextureAtlas.maxAtlasPages);for(let y=0;y<o.TextureAtlas.maxAtlasPages;y++)A[y]=y;s.uniform1iv(this._textureLocation,A),s.uniformMatrix4fv(this._projectionLocation,!1,m.PROJECTION_MATRIX),this._atlasTextures=[];for(let y=0;y<o.TextureAtlas.maxAtlasPages;y++){const M=new m.GLTexture((0,l.throwIfFalsy)(s.createTexture()));this.register((0,d.toDisposable)(()=>s.deleteTexture(M.texture))),s.activeTexture(s.TEXTURE0+y),s.bindTexture(s.TEXTURE_2D,M.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[y]=M}s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(n,p,u,h,s,v,a,L,f){this._updateCell(this._vertices.attributes,n,p,u,h,s,v,a,L,f)}_updateCell(n,p,u,h,s,v,a,L,f,A){g=(u*this._terminal.cols+p)*_,h!==r.NULL_CELL_CODE&&h!==void 0?this._atlas&&(t=L&&L.length>1?this._atlas.getRasterizedGlyphCombinedChar(L,s,v,a,!1):this._atlas.getRasterizedGlyph(h,s,v,a,!1),R=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),s!==A&&t.offset.x>R?(C=t.offset.x-R,n[g]=-(t.offset.x-C)+this._dimensions.device.char.left,n[g+1]=-t.offset.y+this._dimensions.device.char.top,n[g+2]=(t.size.x-C)/this._dimensions.device.canvas.width,n[g+3]=t.size.y/this._dimensions.device.canvas.height,n[g+4]=t.texturePage,n[g+5]=t.texturePositionClipSpace.x+C/this._atlas.pages[t.texturePage].canvas.width,n[g+6]=t.texturePositionClipSpace.y,n[g+7]=t.sizeClipSpace.x-C/this._atlas.pages[t.texturePage].canvas.width,n[g+8]=t.sizeClipSpace.y):(n[g]=-t.offset.x+this._dimensions.device.char.left,n[g+1]=-t.offset.y+this._dimensions.device.char.top,n[g+2]=t.size.x/this._dimensions.device.canvas.width,n[g+3]=t.size.y/this._dimensions.device.canvas.height,n[g+4]=t.texturePage,n[g+5]=t.texturePositionClipSpace.x,n[g+6]=t.texturePositionClipSpace.y,n[g+7]=t.sizeClipSpace.x,n[g+8]=t.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,l.allowRescaling)(h,f,t.size.x,this._dimensions.device.cell.width)&&(n[g+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):n.fill(0,g,g+_-1-2)}clear(){const n=this._terminal,p=n.cols*n.rows*_;this._vertices.count!==p?this._vertices.attributes=new Float32Array(p):this._vertices.attributes.fill(0);let u=0;for(;u<this._vertices.attributesBuffers.length;u++)this._vertices.count!==p?this._vertices.attributesBuffers[u]=new Float32Array(p):this._vertices.attributesBuffers[u].fill(0);this._vertices.count=p,u=0;for(let h=0;h<n.rows;h++)for(let s=0;s<n.cols;s++)this._vertices.attributes[u+9]=s/n.cols,this._vertices.attributes[u+10]=h/n.rows,u+=_}handleResize(){const n=this._gl;n.useProgram(this._program),n.viewport(0,0,n.canvas.width,n.canvas.height),n.uniform2f(this._resolutionLocation,n.canvas.width,n.canvas.height),this.clear()}render(n){if(!this._atlas)return;const p=this._gl;p.useProgram(this._program),p.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const u=this._vertices.attributesBuffers[this._activeBuffer];let h=0;for(let s=0;s<n.lineLengths.length;s++){const v=s*this._terminal.cols*_,a=this._vertices.attributes.subarray(v,v+n.lineLengths[s]*_);u.set(a,h),h+=a.length}p.bindBuffer(p.ARRAY_BUFFER,this._attributesBuffer),p.bufferData(p.ARRAY_BUFFER,u.subarray(0,h),p.STREAM_DRAW);for(let s=0;s<this._atlas.pages.length;s++)this._atlas.pages[s].version!==this._atlasTextures[s].version&&this._bindAtlasPageTexture(p,this._atlas,s);p.drawElementsInstanced(p.TRIANGLE_STRIP,4,p.UNSIGNED_BYTE,0,h/_)}setAtlas(n){this._atlas=n;for(const p of this._atlasTextures)p.version=-1}_bindAtlasPageTexture(n,p,u){n.activeTexture(n.TEXTURE0+u),n.bindTexture(n.TEXTURE_2D,this._atlasTextures[u].texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,p.pages[u].canvas),n.generateMipmap(n.TEXTURE_2D),this._atlasTextures[u].version=p.pages[u].version}setDimensions(n){this._dimensions=n}}e.GlyphRenderer=b},742:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleRenderer=void 0;const l=c(374),o=c(859),r=c(310),d=c(381),m=8*Float32Array.BYTES_PER_ELEMENT;class _{constructor(){this.attributes=new Float32Array(160),this.count=0}}let i=0,t=0,g=0,R=0,C=0,b=0,x=0;class n extends o.Disposable{constructor(u,h,s,v){super(),this._terminal=u,this._gl=h,this._dimensions=s,this._themeService=v,this._vertices=new _,this._verticesCursor=new _;const a=this._gl;this._program=(0,l.throwIfFalsy)((0,d.createProgram)(a,`#version 300 es
|
|
36
|
+
layout (location = 0) in vec2 a_position;
|
|
37
|
+
layout (location = 1) in vec2 a_size;
|
|
38
|
+
layout (location = 2) in vec4 a_color;
|
|
39
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
40
|
+
|
|
41
|
+
uniform mat4 u_projection;
|
|
42
|
+
|
|
43
|
+
out vec4 v_color;
|
|
44
|
+
|
|
45
|
+
void main() {
|
|
46
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
47
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
48
|
+
v_color = a_color;
|
|
49
|
+
}`,`#version 300 es
|
|
50
|
+
precision lowp float;
|
|
51
|
+
|
|
52
|
+
in vec4 v_color;
|
|
53
|
+
|
|
54
|
+
out vec4 outColor;
|
|
55
|
+
|
|
56
|
+
void main() {
|
|
57
|
+
outColor = v_color;
|
|
58
|
+
}`)),this.register((0,o.toDisposable)(()=>a.deleteProgram(this._program))),this._projectionLocation=(0,l.throwIfFalsy)(a.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=a.createVertexArray(),a.bindVertexArray(this._vertexArrayObject);const L=new Float32Array([0,0,1,0,0,1,1,1]),f=a.createBuffer();this.register((0,o.toDisposable)(()=>a.deleteBuffer(f))),a.bindBuffer(a.ARRAY_BUFFER,f),a.bufferData(a.ARRAY_BUFFER,L,a.STATIC_DRAW),a.enableVertexAttribArray(3),a.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const A=new Uint8Array([0,1,2,3]),y=a.createBuffer();this.register((0,o.toDisposable)(()=>a.deleteBuffer(y))),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,y),a.bufferData(a.ELEMENT_ARRAY_BUFFER,A,a.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(a.createBuffer()),this.register((0,o.toDisposable)(()=>a.deleteBuffer(this._attributesBuffer))),a.bindBuffer(a.ARRAY_BUFFER,this._attributesBuffer),a.enableVertexAttribArray(0),a.vertexAttribPointer(0,2,a.FLOAT,!1,m,0),a.vertexAttribDivisor(0,1),a.enableVertexAttribArray(1),a.vertexAttribPointer(1,2,a.FLOAT,!1,m,2*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(1,1),a.enableVertexAttribArray(2),a.vertexAttribPointer(2,4,a.FLOAT,!1,m,4*Float32Array.BYTES_PER_ELEMENT),a.vertexAttribDivisor(2,1),this._updateCachedColors(v.colors),this.register(this._themeService.onChangeColors(M=>{this._updateCachedColors(M),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(u){const h=this._gl;h.useProgram(this._program),h.bindVertexArray(this._vertexArrayObject),h.uniformMatrix4fv(this._projectionLocation,!1,d.PROJECTION_MATRIX),h.bindBuffer(h.ARRAY_BUFFER,this._attributesBuffer),h.bufferData(h.ARRAY_BUFFER,u.attributes,h.DYNAMIC_DRAW),h.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,h.UNSIGNED_BYTE,0,u.count)}handleResize(){this._updateViewportRectangle()}setDimensions(u){this._dimensions=u}_updateCachedColors(u){this._bgFloat=this._colorToFloat32Array(u.background),this._cursorFloat=this._colorToFloat32Array(u.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(u){const h=this._terminal,s=this._vertices;let v,a,L,f,A,y,M,w,S,E,O,B=1;for(v=0;v<h.rows;v++){for(L=-1,f=0,A=0,y=!1,a=0;a<h.cols;a++)M=(v*h.cols+a)*r.RENDER_MODEL_INDICIES_PER_CELL,w=u.cells[M+r.RENDER_MODEL_BG_OFFSET],S=u.cells[M+r.RENDER_MODEL_FG_OFFSET],E=!!(67108864&S),(w!==f||S!==A&&(y||E))&&((f!==0||y&&A!==0)&&(O=8*B++,this._updateRectangle(s,O,A,f,L,a,v)),L=a,f=w,A=S,y=E);(f!==0||y&&A!==0)&&(O=8*B++,this._updateRectangle(s,O,A,f,L,h.cols,v))}s.count=B}updateCursor(u){const h=this._verticesCursor,s=u.cursor;if(!s||s.style==="block")return void(h.count=0);let v,a=0;s.style!=="bar"&&s.style!=="outline"||(v=8*a++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.style==="bar"?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),s.style!=="underline"&&s.style!=="outline"||(v=8*a++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),s.style==="outline"&&(v=8*a++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),v=8*a++,this._addRectangleFloat(h.attributes,v,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),h.count=a}_updateRectangle(u,h,s,v,a,L,f){if(67108864&s)switch(50331648&s){case 16777216:case 33554432:i=this._themeService.colors.ansi[255&s].rgba;break;case 50331648:i=(16777215&s)<<8;break;default:i=this._themeService.colors.foreground.rgba}else switch(50331648&v){case 16777216:case 33554432:i=this._themeService.colors.ansi[255&v].rgba;break;case 50331648:i=(16777215&v)<<8;break;default:i=this._themeService.colors.background.rgba}u.attributes.length<h+4&&(u.attributes=(0,d.expandFloat32Array)(u.attributes,this._terminal.rows*this._terminal.cols*8)),t=a*this._dimensions.device.cell.width,g=f*this._dimensions.device.cell.height,R=(i>>24&255)/255,C=(i>>16&255)/255,b=(i>>8&255)/255,x=1,this._addRectangle(u.attributes,h,t,g,(L-a)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,R,C,b,x)}_addRectangle(u,h,s,v,a,L,f,A,y,M){u[h]=s/this._dimensions.device.canvas.width,u[h+1]=v/this._dimensions.device.canvas.height,u[h+2]=a/this._dimensions.device.canvas.width,u[h+3]=L/this._dimensions.device.canvas.height,u[h+4]=f,u[h+5]=A,u[h+6]=y,u[h+7]=M}_addRectangleFloat(u,h,s,v,a,L,f){u[h]=s/this._dimensions.device.canvas.width,u[h+1]=v/this._dimensions.device.canvas.height,u[h+2]=a/this._dimensions.device.canvas.width,u[h+3]=L/this._dimensions.device.canvas.height,u[h+4]=f[0],u[h+5]=f[1],u[h+6]=f[2],u[h+7]=f[3]}_colorToFloat32Array(u){return new Float32Array([(u.rgba>>24&255)/255,(u.rgba>>16&255)/255,(u.rgba>>8&255)/255,(255&u.rgba)/255])}}e.RectangleRenderer=n},310:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RenderModel=e.COMBINED_CHAR_BIT_MASK=e.RENDER_MODEL_EXT_OFFSET=e.RENDER_MODEL_FG_OFFSET=e.RENDER_MODEL_BG_OFFSET=e.RENDER_MODEL_INDICIES_PER_CELL=void 0;const l=c(296);e.RENDER_MODEL_INDICIES_PER_CELL=4,e.RENDER_MODEL_BG_OFFSET=1,e.RENDER_MODEL_FG_OFFSET=2,e.RENDER_MODEL_EXT_OFFSET=3,e.COMBINED_CHAR_BIT_MASK=2147483648,e.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,l.createSelectionRenderModel)()}resize(o,r){const d=o*r*e.RENDER_MODEL_INDICIES_PER_CELL;d!==this.cells.length&&(this.cells=new Uint32Array(d),this.lineLengths=new Uint32Array(r))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JoinedCellData=e.WebglRenderer=void 0;const l=c(820),o=c(274),r=c(627),d=c(457),m=c(56),_=c(374),i=c(345),t=c(859),g=c(147),R=c(782),C=c(855),b=c(965),x=c(742),n=c(310),p=c(733);class u extends t.Disposable{constructor(a,L,f,A,y,M,w,S,E){super(),this._terminal=a,this._characterJoinerService=L,this._charSizeService=f,this._coreBrowserService=A,this._coreService=y,this._decorationService=M,this._optionsService=w,this._themeService=S,this._cursorBlinkStateManager=new t.MutableDisposable,this._charAtlasDisposable=this.register(new t.MutableDisposable),this._observerDisposable=this.register(new t.MutableDisposable),this._model=new n.RenderModel,this._workCell=new R.CellData,this._workCell2=new R.CellData,this._rectangleRenderer=this.register(new t.MutableDisposable),this._glyphRenderer=this.register(new t.MutableDisposable),this._onChangeTextureAtlas=this.register(new i.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new i.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new i.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new i.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new i.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new o.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new p.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,w,this._themeService)],this.dimensions=(0,_.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(w.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const O={antialias:!1,depth:!1,preserveDrawingBuffer:E};if(this._gl=this._canvas.getContext("webgl2",O),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextlost",B=>{console.log("webglcontextlost event received"),B.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(B)},3e3)})),this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextrestored",B=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,r.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,m.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(B,W)=>this._setCanvasDevicePixelDimensions(B,W)),this.register(this._coreBrowserService.onWindowChange(B=>{this._observerDisposable.value=(0,m.observeDevicePixelDimensions)(this._canvas,B,(W,I)=>this._setCanvasDevicePixelDimensions(W,I))})),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,t.toDisposable)(()=>{for(const B of this._renderLayers)B.dispose();this._canvas.parentElement?.removeChild(this._canvas),(0,r.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(a,L){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const f of this._renderLayers)f.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(const a of this._renderLayers)a.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(const a of this._renderLayers)a.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(a,L,f){for(const A of this._renderLayers)A.handleSelectionChanged(this._terminal,a,L,f);this._model.selection.update(this._core,a,L,f),this._requestRedrawViewport()}handleCursorMove(){for(const a of this._renderLayers)a.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new b.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const a=(0,r.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!==a&&(this._onChangeTextureAtlas.fire(a.pages[0].canvas),this._charAtlasDisposable.value=(0,t.getDisposeArrayDisposable)([(0,i.forwardEvent)(a.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,i.forwardEvent)(a.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=a,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(a){this._model.clear(),a&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(const a of this._renderLayers)a.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(a){return-1}deregisterCharacterJoiner(a){return!1}renderRows(a,L){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 f of this._renderLayers)f.handleGridChanged(this._terminal,a,L);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(a,L),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(a,L){const f=this._core;let A,y,M,w,S,E,O,B,W,I,K,q,k,j,z=this._workCell;a=s(a,f.rows-1,0),L=s(L,f.rows-1,0);const V=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,_e=V-f.buffer.ydisp,Q=Math.min(this._terminal.buffer.active.cursorX,f.cols-1);let Z=-1;const U=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ee=!1;for(y=a;y<=L;y++)for(M=y+f.buffer.ydisp,w=f.buffer.lines.get(M),this._model.lineLengths[y]=0,S=this._characterJoinerService.getJoinedCharacters(M),k=0;k<f.cols;k++)if(A=this._cellColorResolver.result.bg,w.loadCell(k,z),k===0&&(A=this._cellColorResolver.result.bg),E=!1,O=k,S.length>0&&k===S[0][0]&&(E=!0,B=S.shift(),z=new h(z,w.translateToString(!0,B[0],B[1]),B[1]-B[0]),O=B[1]-1),W=z.getChars(),I=z.getCode(),q=(y*f.cols+k)*n.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(z,k,M,this.dimensions.device.cell.width),U&&M===V&&(k===Q&&(this._model.cursor={x:Q,y:_e,width:z.getWidth(),style:this._coreBrowserService.isFocused?f.options.cursorStyle||"block":f.options.cursorInactiveStyle,cursorWidth:f.options.cursorWidth,dpr:this._devicePixelRatio},Z=Q+z.getWidth()-1),k>=Q&&k<=Z&&(this._coreBrowserService.isFocused&&(f.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&f.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)),I!==C.NULL_CELL_CODE&&(this._model.lineLengths[y]=k+1),(this._model.cells[q]!==I||this._model.cells[q+n.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[q+n.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[q+n.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ee=!0,W.length>1&&(I|=n.COMBINED_CHAR_BIT_MASK),this._model.cells[q]=I,this._model.cells[q+n.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[q+n.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[q+n.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,K=z.getWidth(),this._glyphRenderer.value.updateCell(k,y,I,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,W,K,A),E))for(z=this._workCell,k++;k<O;k++)j=(y*f.cols+k)*n.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(k,y,C.NULL_CELL_CODE,0,0,0,C.NULL_CELL_CHAR,0,0),this._model.cells[j]=C.NULL_CELL_CODE,this._model.cells[j+n.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[j+n.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[j+n.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ee&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=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._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(a,L){this._canvas.width===a&&this._canvas.height===L||(this._canvas.width=a,this._canvas.height=L,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const a=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:a,end:a})}}e.WebglRenderer=u;class h extends g.AttributeData{constructor(a,L,f){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=L,this._width=f}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function s(v,a,L=0){return Math.max(Math.min(v,a),L)}e.JoinedCellData=h},381:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GLTexture=e.expandFloat32Array=e.createShader=e.createProgram=e.PROJECTION_MATRIX=void 0;const l=c(374);function o(r,d,m){const _=(0,l.throwIfFalsy)(r.createShader(d));if(r.shaderSource(_,m),r.compileShader(_),r.getShaderParameter(_,r.COMPILE_STATUS))return _;console.error(r.getShaderInfoLog(_)),r.deleteShader(_)}e.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),e.createProgram=function(r,d,m){const _=(0,l.throwIfFalsy)(r.createProgram());if(r.attachShader(_,(0,l.throwIfFalsy)(o(r,r.VERTEX_SHADER,d))),r.attachShader(_,(0,l.throwIfFalsy)(o(r,r.FRAGMENT_SHADER,m))),r.linkProgram(_),r.getProgramParameter(_,r.LINK_STATUS))return _;console.error(r.getProgramInfoLog(_)),r.deleteProgram(_)},e.createShader=o,e.expandFloat32Array=function(r,d){const m=Math.min(2*r.length,d),_=new Float32Array(m);for(let i=0;i<r.length;i++)_[i]=r[i];return _},e.GLTexture=class{constructor(r){this.texture=r,this.version=-1}}},592:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const l=c(627),o=c(237),r=c(374),d=c(859);class m extends d.Disposable{constructor(i,t,g,R,C,b,x,n){super(),this._container=t,this._alpha=C,this._coreBrowserService=b,this._optionsService=x,this._themeService=n,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-${g}-layer`),this._canvas.style.zIndex=R.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(p=>{this._refreshCharAtlas(i,p),this.reset(i)})),this.register((0,d.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,r.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(i){}handleFocus(i){}handleCursorMove(i){}handleGridChanged(i,t,g){}handleSelectionChanged(i,t,g,R=!1){}_setTransparency(i,t){if(t===this._alpha)return;const g=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(i,this._themeService.colors),this.handleGridChanged(i,0,i.rows-1)}_refreshCharAtlas(i,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,l.acquireTextureAtlas)(i,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(i,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(i,this._themeService.colors)}_fillBottomLineAtCells(i,t,g=1){this._ctx.fillRect(i*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,g*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(i,t,g,R){this._alpha?this._ctx.clearRect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,R*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,R*this._deviceCellHeight))}_fillCharTrueColor(i,t,g,R){this._ctx.font=this._getFont(i,!1,!1),this._ctx.textBaseline=o.TEXT_BASELINE,this._clipCell(g,R,t.getWidth()),this._ctx.fillText(t.getChars(),g*this._deviceCellWidth+this._deviceCharLeft,R*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(i,t,g){this._ctx.beginPath(),this._ctx.rect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(i,t,g){return`${g?"italic":""} ${t?i.options.fontWeightBold:i.options.fontWeight} ${i.options.fontSize*this._coreBrowserService.dpr}px ${i.options.fontFamily}`}}e.BaseRenderLayer=m},733:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const l=c(197),o=c(237),r=c(592);class d extends r.BaseRenderLayer{constructor(_,i,t,g,R,C,b){super(t,_,"link",i,!0,R,C,b),this.register(g.onShowLinkUnderline(x=>this._handleShowLinkUnderline(x))),this.register(g.onHideLinkUnderline(x=>this._handleHideLinkUnderline(x)))}resize(_,i){super.resize(_,i),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 _=this._state.y2-this._state.y1-1;_>0&&this._clearCells(0,this._state.y1+1,this._state.cols,_),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(_){if(_.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:_.fg!==void 0&&(0,l.is256Color)(_.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[_.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,_.y1===_.y2)this._fillBottomLineAtCells(_.x1,_.y1,_.x2-_.x1);else{this._fillBottomLineAtCells(_.x1,_.y1,_.cols-_.x1);for(let i=_.y1+1;i<_.y2;i++)this._fillBottomLineAtCells(0,i,_.cols);this._fillBottomLineAtCells(0,_.y2,_.x2)}this._state=_}_handleHideLinkUnderline(_){this._clearCurrentLink()}}e.LinkRenderLayer=d},820:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(c,l,o,r){c.addEventListener(l,o,r);let d=!1;return{dispose:()=>{d||(d=!0,c.removeEventListener(l,o,r))}}}},274:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellColorResolver=void 0;const l=c(855),o=c(160),r=c(374);let d,m=0,_=0,i=!1,t=!1,g=!1,R=0;e.CellColorResolver=class{constructor(C,b,x,n,p,u){this._terminal=C,this._optionService=b,this._selectionRenderModel=x,this._decorationService=n,this._coreBrowserService=p,this._themeService=u,this.result={fg:0,bg:0,ext:0}}resolve(C,b,x,n){if(this.result.bg=C.bg,this.result.fg=C.fg,this.result.ext=268435456&C.bg?C.extended.ext:0,_=0,m=0,t=!1,i=!1,g=!1,d=this._themeService.colors,R=0,C.getCode()!==l.NULL_CELL_CODE&&C.extended.underlineStyle===4){const p=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));R=b*n%(2*Math.round(p))}if(this._decorationService.forEachDecorationAtCell(b,x,"bottom",p=>{p.backgroundColorRGB&&(_=p.backgroundColorRGB.rgba>>8&16777215,t=!0),p.foregroundColorRGB&&(m=p.foregroundColorRGB.rgba>>8&16777215,i=!0)}),g=this._selectionRenderModel.isCellSelected(this._terminal,b,x),g){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:_=(16777215&this.result.fg)<<8|255;break;default:_=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:_=(16777215&this.result.bg)<<8|255}_=o.rgba.blend(_,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else _=(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(t=!0,d.selectionForeground&&(m=d.selectionForeground.rgba>>8&16777215,i=!0),(0,r.treatGlyphAsBackgroundColor)(C.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))m=(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:m=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:m=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:m=(16777215&this.result.fg)<<8|255;break;default:m=this._themeService.colors.foreground.rgba}m=o.rgba.blend(m,4294967040&(this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}i=!0}}this._decorationService.forEachDecorationAtCell(b,x,"top",p=>{p.backgroundColorRGB&&(_=p.backgroundColorRGB.rgba>>8&16777215,t=!0),p.foregroundColorRGB&&(m=p.foregroundColorRGB.rgba>>8&16777215,i=!0)}),t&&(_=g?-16777216&C.bg&-134217729|_|50331648:-16777216&C.bg|_|50331648),i&&(m=-16777216&C.fg&-67108865|m|50331648),67108864&this.result.fg&&(t&&!i&&(m=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&d.background.rgba>>8|50331648,i=!0),!t&&i&&(_=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&d.foreground.rgba>>8|50331648,t=!0)),d=void 0,this.result.bg=t?_:this.result.bg,this.result.fg=i?m:this.result.fg,this.result.ext&=536870911,this.result.ext|=R<<29&3758096384}}},627:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireTextureAtlas=void 0;const l=c(509),o=c(197),r=[];e.acquireTextureAtlas=function(d,m,_,i,t,g,R,C){const b=(0,o.generateConfig)(i,t,g,R,m,_,C);for(let p=0;p<r.length;p++){const u=r[p],h=u.ownedBy.indexOf(d);if(h>=0){if((0,o.configEquals)(u.config,b))return u.atlas;u.ownedBy.length===1?(u.atlas.dispose(),r.splice(p,1)):u.ownedBy.splice(h,1);break}}for(let p=0;p<r.length;p++){const u=r[p];if((0,o.configEquals)(u.config,b))return u.ownedBy.push(d),u.atlas}const x=d._core,n={atlas:new l.TextureAtlas(document,b,x.unicodeService),config:b,ownedBy:[d]};return r.push(n),n.atlas},e.removeTerminalFromCache=function(d){for(let m=0;m<r.length;m++){const _=r[m].ownedBy.indexOf(d);if(_!==-1){r[m].ownedBy.length===1?(r[m].atlas.dispose(),r.splice(m,1)):r[m].ownedBy.splice(_,1);break}}}},197:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const l=c(160);e.generateConfig=function(o,r,d,m,_,i,t){const g={foreground:i.foreground,background:i.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:i.ansi.slice(),contrastCache:i.contrastCache,halfContrastCache:i.halfContrastCache};return{customGlyphs:_.customGlyphs,devicePixelRatio:t,letterSpacing:_.letterSpacing,lineHeight:_.lineHeight,deviceCellWidth:o,deviceCellHeight:r,deviceCharWidth:d,deviceCharHeight:m,fontFamily:_.fontFamily,fontSize:_.fontSize,fontWeight:_.fontWeight,fontWeightBold:_.fontWeightBold,allowTransparency:_.allowTransparency,drawBoldTextInBrightColors:_.drawBoldTextInBrightColors,minimumContrastRatio:_.minimumContrastRatio,colors:g}},e.configEquals=function(o,r){for(let d=0;d<o.colors.ansi.length;d++)if(o.colors.ansi[d].rgba!==r.colors.ansi[d].rgba)return!1;return o.devicePixelRatio===r.devicePixelRatio&&o.customGlyphs===r.customGlyphs&&o.lineHeight===r.lineHeight&&o.letterSpacing===r.letterSpacing&&o.fontFamily===r.fontFamily&&o.fontSize===r.fontSize&&o.fontWeight===r.fontWeight&&o.fontWeightBold===r.fontWeightBold&&o.allowTransparency===r.allowTransparency&&o.deviceCharWidth===r.deviceCharWidth&&o.deviceCharHeight===r.deviceCharHeight&&o.drawBoldTextInBrightColors===r.drawBoldTextInBrightColors&&o.minimumContrastRatio===r.minimumContrastRatio&&o.colors.foreground.rgba===r.colors.foreground.rgba&&o.colors.background.rgba===r.colors.background.rgba},e.is256Color=function(o){return(50331648&o)==16777216||(50331648&o)==33554432}},237:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const l=c(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorBlinkStateManager=void 0,e.CursorBlinkStateManager=class{constructor(c,l){this._renderCallback=c,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(c=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)},c)}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:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const l=c(374);e.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:8,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const o={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"\u2500":{1:"M0,.5 L1,.5"},"\u2501":{3:"M0,.5 L1,.5"},"\u2502":{1:"M.5,0 L.5,1"},"\u2503":{3:"M.5,0 L.5,1"},"\u250C":{1:"M0.5,1 L.5,.5 L1,.5"},"\u250F":{3:"M0.5,1 L.5,.5 L1,.5"},"\u2510":{1:"M0,.5 L.5,.5 L.5,1"},"\u2513":{3:"M0,.5 L.5,.5 L.5,1"},"\u2514":{1:"M.5,0 L.5,.5 L1,.5"},"\u2517":{3:"M.5,0 L.5,.5 L1,.5"},"\u2518":{1:"M.5,0 L.5,.5 L0,.5"},"\u251B":{3:"M.5,0 L.5,.5 L0,.5"},"\u251C":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2523":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2524":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252B":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252C":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2533":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2534":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253B":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253C":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u254B":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u2574":{1:"M.5,.5 L0,.5"},"\u2578":{3:"M.5,.5 L0,.5"},"\u2575":{1:"M.5,.5 L.5,0"},"\u2579":{3:"M.5,.5 L.5,0"},"\u2576":{1:"M.5,.5 L1,.5"},"\u257A":{3:"M.5,.5 L1,.5"},"\u2577":{1:"M.5,.5 L.5,1"},"\u257B":{3:"M.5,.5 L.5,1"},"\u2550":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"\u2551":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"\u2552":{1:(i,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"\u2553":{1:(i,t)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`},"\u2554":{1:(i,t)=>`M1,${.5-t} L${.5-i},${.5-t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"\u2555":{1:(i,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"\u2556":{1:(i,t)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`},"\u2557":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5+i},${.5-t} L${.5+i},1`},"\u2558":{1:(i,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"\u2559":{1:(i,t)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"\u255A":{1:(i,t)=>`M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0 M1,${.5+t} L${.5-i},${.5+t} L${.5-i},0`},"\u255B":{1:(i,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"\u255C":{1:(i,t)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`},"\u255D":{1:(i,t)=>`M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M0,${.5+t} L${.5+i},${.5+t} L${.5+i},0`},"\u255E":{1:(i,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"\u255F":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`},"\u2560":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"\u2561":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"\u2562":{1:(i,t)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"\u2563":{1:(i,t)=>`M${.5+i},0 L${.5+i},1 M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0`},"\u2564":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"\u2565":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`},"\u2566":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"\u2567":{1:(i,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"\u2568":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"\u2569":{1:(i,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"\u256A":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"\u256B":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"\u256C":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"\u2571":{1:"M1,0 L0,1"},"\u2572":{1:"M0,0 L1,1"},"\u2573":{1:"M1,0 L0,1 M0,0 L1,1"},"\u257C":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u257D":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"\u257E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u257F":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u250D":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u250E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2511":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"\u2512":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2515":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"\u2516":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2519":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"\u251A":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"\u251D":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"\u251E":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u251F":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2520":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2521":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2522":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"\u2525":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"\u2526":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2527":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2528":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"\u2529":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"\u252A":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"\u252D":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u252E":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u252F":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"\u2530":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2531":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2532":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2535":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u2536":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u2537":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"\u2538":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2539":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u253A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"\u253D":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u253E":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u253F":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"\u2540":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2541":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2542":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2543":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u2544":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2545":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2546":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2547":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"\u2548":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2549":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u254A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u254C":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u254D":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u2504":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2505":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2508":{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"},"\u2509":{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"},"\u254E":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u254F":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u2506":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u2507":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u250A":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u250B":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u256D":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"\u256E":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"\u256F":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"\u2570":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"\uE0B1":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"\uE0B3":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B4":{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},"\uE0B5":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"\uE0B6":{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},"\uE0B7":{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},"\uE0B8":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"\uE0B9":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BA":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"\uE0BC":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"\uE0BD":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BE":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},e.powerlineDefinitions["\uE0BB"]=e.powerlineDefinitions["\uE0BD"],e.powerlineDefinitions["\uE0BF"]=e.powerlineDefinitions["\uE0B9"],e.tryDrawCustomChar=function(i,t,g,R,C,b,x,n){const p=e.blockElementDefinitions[t];if(p)return function(v,a,L,f,A,y){for(let M=0;M<a.length;M++){const w=a[M],S=A/8,E=y/8;v.fillRect(L+w.x*S,f+w.y*E,w.w*S,w.h*E)}}(i,p,g,R,C,b),!0;const u=o[t];if(u)return function(v,a,L,f,A,y){let M=r.get(a);M||(M=new Map,r.set(a,M));const w=v.fillStyle;if(typeof w!="string")throw new Error(`Unexpected fillStyle type "${w}"`);let S=M.get(w);if(!S){const E=a[0].length,O=a.length,B=v.canvas.ownerDocument.createElement("canvas");B.width=E,B.height=O;const W=(0,l.throwIfFalsy)(B.getContext("2d")),I=new ImageData(E,O);let K,q,k,j;if(w.startsWith("#"))K=parseInt(w.slice(1,3),16),q=parseInt(w.slice(3,5),16),k=parseInt(w.slice(5,7),16),j=w.length>7&&parseInt(w.slice(7,9),16)||1;else{if(!w.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${w}" when drawing pattern glyph`);[K,q,k,j]=w.substring(5,w.length-1).split(",").map(z=>parseFloat(z))}for(let z=0;z<O;z++)for(let V=0;V<E;V++)I.data[4*(z*E+V)]=K,I.data[4*(z*E+V)+1]=q,I.data[4*(z*E+V)+2]=k,I.data[4*(z*E+V)+3]=a[z][V]*(255*j);W.putImageData(I,0,0),S=(0,l.throwIfFalsy)(v.createPattern(B,null)),M.set(w,S)}v.fillStyle=S,v.fillRect(L,f,A,y)}(i,u,g,R,C,b),!0;const h=e.boxDrawingDefinitions[t];if(h)return function(v,a,L,f,A,y,M){v.strokeStyle=v.fillStyle;for(const[w,S]of Object.entries(a)){let E;v.beginPath(),v.lineWidth=M*Number.parseInt(w),E=typeof S=="function"?S(.15,.15/y*A):S;for(const O of E.split(" ")){const B=O[0],W=m[B];if(!W){console.error(`Could not find drawing instructions for "${B}"`);continue}const I=O.substring(1).split(",");I[0]&&I[1]&&W(v,_(I,A,y,L,f,!0,M))}v.stroke(),v.closePath()}}(i,h,g,R,C,b,n),!0;const s=e.powerlineDefinitions[t];return!!s&&(function(v,a,L,f,A,y,M,w){const S=new Path2D;S.rect(L,f,A,y),v.clip(S),v.beginPath();const E=M/12;v.lineWidth=w*E;for(const O of a.d.split(" ")){const B=O[0],W=m[B];if(!W){console.error(`Could not find drawing instructions for "${B}"`);continue}const I=O.substring(1).split(",");I[0]&&I[1]&&W(v,_(I,A,y,L,f,!1,w,(a.leftPadding??0)*(E/2),(a.rightPadding??0)*(E/2)))}a.type===1?(v.strokeStyle=v.fillStyle,v.stroke()):v.fill(),v.closePath()}(i,s,g,R,C,b,x,n),!0)};const r=new Map;function d(i,t,g=0){return Math.max(Math.min(i,t),g)}const m={C:(i,t)=>i.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(i,t)=>i.lineTo(t[0],t[1]),M:(i,t)=>i.moveTo(t[0],t[1])};function _(i,t,g,R,C,b,x,n=0,p=0){const u=i.map(h=>parseFloat(h)||parseInt(h));if(u.length<2)throw new Error("Too few arguments for instruction");for(let h=0;h<u.length;h+=2)u[h]*=t-n*x-p*x,b&&u[h]!==0&&(u[h]=d(Math.round(u[h]+.5)-.5,t,0)),u[h]+=R+n*x;for(let h=1;h<u.length;h+=2)u[h]*=g,b&&u[h]!==0&&(u[h]=d(Math.round(u[h]+.5)-.5,g,0)),u[h]+=C;return u}},56:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const l=c(859);e.observeDevicePixelDimensions=function(o,r,d){let m=new r.ResizeObserver(_=>{const i=_.find(R=>R.target===o);if(!i)return;if(!("devicePixelContentBoxSize"in i))return m?.disconnect(),void(m=void 0);const t=i.devicePixelContentBoxSize[0].inlineSize,g=i.devicePixelContentBoxSize[0].blockSize;t>0&&g>0&&d(t,g)});try{m.observe(o,{box:["device-pixel-content-box"]})}catch{m.disconnect(),m=void 0}return(0,l.toDisposable)(()=>m?.disconnect())}},374:(D,e)=>{function c(o){return 57508<=o&&o<=57558}function l(o){return o>=128512&&o<=128591||o>=127744&&o<=128511||o>=128640&&o<=128767||o>=9728&&o<=9983||o>=9984&&o<=10175||o>=65024&&o<=65039||o>=129280&&o<=129535||o>=127462&&o<=127487}Object.defineProperty(e,"__esModule",{value:!0}),e.computeNextVariantOffset=e.createRenderDimensions=e.treatGlyphAsBackgroundColor=e.allowRescaling=e.isEmoji=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(o){if(!o)throw new Error("value must not be falsy");return o},e.isPowerlineGlyph=c,e.isRestrictedPowerlineGlyph=function(o){return 57520<=o&&o<=57527},e.isEmoji=l,e.allowRescaling=function(o,r,d,m){return r===1&&d>Math.ceil(1.5*m)&&o!==void 0&&o>255&&!l(o)&&!c(o)&&!function(_){return 57344<=_&&_<=63743}(o)},e.treatGlyphAsBackgroundColor=function(o){return c(o)||function(r){return 9472<=r&&r<=9631}(o)},e.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}}}},e.computeNextVariantOffset=function(o,r,d=0){return(o-(2*Math.round(r)-d))%(2*Math.round(r))}},296:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSelectionRenderModel=void 0;class c{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(o,r,d,m=!1){if(this.selectionStart=r,this.selectionEnd=d,!r||!d||r[0]===d[0]&&r[1]===d[1])return void this.clear();const _=o.buffers.active.ydisp,i=r[1]-_,t=d[1]-_,g=Math.max(i,0),R=Math.min(t,o.rows-1);g>=o.rows||R<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=i,this.viewportEndRow=t,this.viewportCappedStartRow=g,this.viewportCappedEndRow=R,this.startCol=r[0],this.endCol=d[0])}isCellSelected(o,r,d){return!!this.hasSelection&&(d-=o.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?r>=this.startCol&&d>=this.viewportCappedStartRow&&r<this.endCol&&d<=this.viewportCappedEndRow:r<this.startCol&&d>=this.viewportCappedStartRow&&r>=this.endCol&&d<=this.viewportCappedEndRow:d>this.viewportStartRow&&d<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&d===this.viewportStartRow&&r>=this.startCol&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&d===this.viewportEndRow&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&d===this.viewportStartRow&&r>=this.startCol)}}e.createSelectionRenderModel=function(){return new c}},509:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextureAtlas=void 0;const l=c(237),o=c(860),r=c(374),d=c(160),m=c(345),_=c(485),i=c(385),t=c(147),g=c(855),R={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 C;class b{get pages(){return this._pages}constructor(h,s,v){this._document=h,this._config=s,this._unicodeService=v,this._didWarmUp=!1,this._cacheMap=new _.FourKeyMap,this._cacheMapCombined=new _.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new t.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new m.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new m.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=p(h,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,r.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const h of this.pages)h.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const h=new i.IdleTaskQueue;for(let s=33;s<126;s++)h.enqueue(()=>{if(!this._cacheMap.get(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT)){const v=this._drawToCache(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT);this._cacheMap.set(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT,v)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const h of this._pages)h.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(b.maxAtlasPages&&this._pages.length>=Math.max(4,b.maxAtlasPages)){const s=this._pages.filter(M=>2*M.canvas.width<=(b.maxTextureSize||4096)).sort((M,w)=>w.canvas.width!==M.canvas.width?w.canvas.width-M.canvas.width:w.percentageUsed-M.percentageUsed);let v=-1,a=0;for(let M=0;M<s.length;M++)if(s[M].canvas.width!==a)v=M,a=s[M].canvas.width;else if(M-v==3)break;const L=s.slice(v,v+4),f=L.map(M=>M.glyphs[0].texturePage).sort((M,w)=>M>w?1:-1),A=this.pages.length-L.length,y=this._mergePages(L,A);y.version++;for(let M=f.length-1;M>=0;M--)this._deletePage(f[M]);this.pages.push(y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(y.canvas)}const h=new x(this._document,this._textureSize);return this._pages.push(h),this._activePages.push(h),this._onAddTextureAtlasCanvas.fire(h.canvas),h}_mergePages(h,s){const v=2*h[0].canvas.width,a=new x(this._document,v,h);for(const[L,f]of h.entries()){const A=L*f.canvas.width%v,y=Math.floor(L/2)*f.canvas.height;a.ctx.drawImage(f.canvas,A,y);for(const w of f.glyphs)w.texturePage=s,w.sizeClipSpace.x=w.size.x/v,w.sizeClipSpace.y=w.size.y/v,w.texturePosition.x+=A,w.texturePosition.y+=y,w.texturePositionClipSpace.x=w.texturePosition.x/v,w.texturePositionClipSpace.y=w.texturePosition.y/v;this._onRemoveTextureAtlasCanvas.fire(f.canvas);const M=this._activePages.indexOf(f);M!==-1&&this._activePages.splice(M,1)}return a}_deletePage(h){this._pages.splice(h,1);for(let s=h;s<this._pages.length;s++){const v=this._pages[s];for(const a of v.glyphs)a.texturePage--;v.version++}}getRasterizedGlyphCombinedChar(h,s,v,a,L){return this._getFromCacheMap(this._cacheMapCombined,h,s,v,a,L)}getRasterizedGlyph(h,s,v,a,L){return this._getFromCacheMap(this._cacheMap,h,s,v,a,L)}_getFromCacheMap(h,s,v,a,L,f=!1){return C=h.get(s,v,a,L),C||(C=this._drawToCache(s,v,a,L,f),h.set(s,v,a,L,C)),C}_getColorFromAnsiIndex(h){if(h>=this._config.colors.ansi.length)throw new Error("No color found for idx "+h);return this._config.colors.ansi[h]}_getBackgroundColor(h,s,v,a){if(this._config.allowTransparency)return d.NULL_COLOR;let L;switch(h){case 16777216:case 33554432:L=this._getColorFromAnsiIndex(s);break;case 50331648:const f=t.AttributeData.toColorRGB(s);L=d.channels.toColor(f[0],f[1],f[2]);break;default:L=v?d.color.opaque(this._config.colors.foreground):this._config.colors.background}return L}_getForegroundColor(h,s,v,a,L,f,A,y,M,w){const S=this._getMinimumContrastColor(h,s,v,a,L,f,A,M,y,w);if(S)return S;let E;switch(L){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&M&&f<8&&(f+=8),E=this._getColorFromAnsiIndex(f);break;case 50331648:const O=t.AttributeData.toColorRGB(f);E=d.channels.toColor(O[0],O[1],O[2]);break;default:E=A?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(E=d.color.opaque(E)),y&&(E=d.color.multiplyOpacity(E,l.DIM_OPACITY)),E}_resolveBackgroundRgba(h,s,v){switch(h){case 16777216:case 33554432:return this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return v?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(h,s,v,a){switch(h){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&a&&s<8&&(s+=8),this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return v?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(h,s,v,a,L,f,A,y,M,w){if(this._config.minimumContrastRatio===1||w)return;const S=this._getContrastCache(M),E=S.getColor(h,a);if(E!==void 0)return E||void 0;const O=this._resolveBackgroundRgba(s,v,A),B=this._resolveForegroundRgba(L,f,A,y),W=d.rgba.ensureContrastRatio(O,B,this._config.minimumContrastRatio/(M?2:1));if(!W)return void S.setColor(h,a,null);const I=d.channels.toColor(W>>24&255,W>>16&255,W>>8&255);return S.setColor(h,a,I),I}_getContrastCache(h){return h?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(h,s,v,a,L=!1){const f=typeof h=="number"?String.fromCharCode(h):h,A=Math.min(this._config.deviceCellWidth*Math.max(f.length,2)+4,this._textureSize);this._tmpCanvas.width<A&&(this._tmpCanvas.width=A);const y=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<y&&(this._tmpCanvas.height=y),this._tmpCtx.save(),this._workAttributeData.fg=v,this._workAttributeData.bg=s,this._workAttributeData.extended.ext=a,this._workAttributeData.isInvisible())return R;const M=!!this._workAttributeData.isBold(),w=!!this._workAttributeData.isInverse(),S=!!this._workAttributeData.isDim(),E=!!this._workAttributeData.isItalic(),O=!!this._workAttributeData.isUnderline(),B=!!this._workAttributeData.isStrikethrough(),W=!!this._workAttributeData.isOverline();let I=this._workAttributeData.getFgColor(),K=this._workAttributeData.getFgColorMode(),q=this._workAttributeData.getBgColor(),k=this._workAttributeData.getBgColorMode();if(w){const T=I;I=q,q=T;const N=K;K=k,k=N}const j=this._getBackgroundColor(k,q,w,S);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=j.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const z=M?this._config.fontWeightBold:this._config.fontWeight,V=E?"italic":"";this._tmpCtx.font=`${V} ${z} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=l.TEXT_BASELINE;const _e=f.length===1&&(0,r.isPowerlineGlyph)(f.charCodeAt(0)),Q=f.length===1&&(0,r.isRestrictedPowerlineGlyph)(f.charCodeAt(0)),Z=this._getForegroundColor(s,k,q,v,K,I,w,S,M,(0,r.treatGlyphAsBackgroundColor)(f.charCodeAt(0)));this._tmpCtx.fillStyle=Z.css;const U=Q?0:4;let ee=!1;this._config.customGlyphs!==!1&&(ee=(0,o.tryDrawCustomChar)(this._tmpCtx,f,U,U,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let se,re=!_e;if(se=typeof h=="number"?this._unicodeService.wcwidth(h):this._unicodeService.getStringCellWidth(h),O){this._tmpCtx.save();const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),N=T%2==1?.5:0;if(this._tmpCtx.lineWidth=T,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())re=!1,this._tmpCtx.strokeStyle=`rgb(${t.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{re=!1;let J=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&J<8&&(J+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(J).css}this._tmpCtx.beginPath();const Y=U,G=Math.ceil(U+this._config.deviceCharHeight)-N-(L?2*T:0),oe=G+T,ne=G+2*T;let te=this._workAttributeData.getUnderlineVariantOffset();for(let J=0;J<se;J++){this._tmpCtx.save();const H=Y+J*this._config.deviceCellWidth,X=Y+(J+1)*this._config.deviceCellWidth,ue=H+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G),this._tmpCtx.moveTo(H,ne),this._tmpCtx.lineTo(X,ne);break;case 3:const le=T<=1?ne:Math.ceil(U+this._config.deviceCharHeight-T/2)-N,ce=T<=1?G:Math.ceil(U+this._config.deviceCharHeight+T/2)-N,me=new Path2D;me.rect(H,G,this._config.deviceCellWidth,ne-G),this._tmpCtx.clip(me),this._tmpCtx.moveTo(H-this._config.deviceCellWidth/2,oe),this._tmpCtx.bezierCurveTo(H-this._config.deviceCellWidth/2,ce,H,ce,H,oe),this._tmpCtx.bezierCurveTo(H,le,ue,le,ue,oe),this._tmpCtx.bezierCurveTo(ue,ce,X,ce,X,oe),this._tmpCtx.bezierCurveTo(X,le,X+this._config.deviceCellWidth/2,le,X+this._config.deviceCellWidth/2,oe);break;case 4:const de=te===0?0:te>=T?2*T-te:T-te;te>=T||de===0?(this._tmpCtx.setLineDash([Math.round(T),Math.round(T)]),this._tmpCtx.moveTo(H+de,G),this._tmpCtx.lineTo(X,G)):(this._tmpCtx.setLineDash([Math.round(T),Math.round(T)]),this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(H+de,G),this._tmpCtx.moveTo(H+de+T,G),this._tmpCtx.lineTo(X,G)),te=(0,r.computeNextVariantOffset)(X-H,T,te);break;case 5:const Me=.6,Re=.3,ge=X-H,Le=Math.floor(Me*ge),xe=Math.floor(Re*ge),ye=ge-Le-xe;this._tmpCtx.setLineDash([Le,xe,ye]),this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G);break;default:this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ee&&this._config.fontSize>=12&&!this._config.allowTransparency&&f!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const J=this._tmpCtx.measureText(f);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in J&&J.actualBoundingBoxDescent>0){this._tmpCtx.save();const H=new Path2D;H.rect(Y,G-Math.ceil(T/2),this._config.deviceCellWidth*se,ne-G+Math.ceil(T/2)),this._tmpCtx.clip(H),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=j.css,this._tmpCtx.strokeText(f,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(W){const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),N=T%2==1?.5:0;this._tmpCtx.lineWidth=T,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+N),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*se,U+N),this._tmpCtx.stroke()}if(ee||this._tmpCtx.fillText(f,U,U+this._config.deviceCharHeight),f==="_"&&!this._config.allowTransparency){let T=n(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),j,Z,re);if(T)for(let N=1;N<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=j.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(f,U,U+this._config.deviceCharHeight-N),T=n(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),j,Z,re),T);N++);}if(B){const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),N=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=T,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-N),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*se,U+Math.floor(this._config.deviceCharHeight/2)-N),this._tmpCtx.stroke()}this._tmpCtx.restore();const he=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ce;if(Ce=this._config.allowTransparency?function(T){for(let N=0;N<T.data.length;N+=4)if(T.data[N+3]>0)return!1;return!0}(he):n(he,j,Z,re),Ce)return R;const $=this._findGlyphBoundingBox(he,this._workBoundingBox,A,Q,ee,U);let F,P;for(;;){if(this._activePages.length===0){const T=this._createNewPage();F=T,P=T.currentRow,P.height=$.size.y;break}F=this._activePages[this._activePages.length-1],P=F.currentRow;for(const T of this._activePages)$.size.y<=T.currentRow.height&&(F=T,P=T.currentRow);for(let T=this._activePages.length-1;T>=0;T--)for(const N of this._activePages[T].fixedRows)N.height<=P.height&&$.size.y<=N.height&&(F=this._activePages[T],P=N);if(P.y+$.size.y>=F.canvas.height||P.height>$.size.y+2){let T=!1;if(F.currentRow.y+F.currentRow.height+$.size.y>=F.canvas.height){let N;for(const Y of this._activePages)if(Y.currentRow.y+Y.currentRow.height+$.size.y<Y.canvas.height){N=Y;break}if(N)F=N;else if(b.maxAtlasPages&&this._pages.length>=b.maxAtlasPages&&P.y+$.size.y<=F.canvas.height&&P.height>=$.size.y&&P.x+$.size.x<=F.canvas.width)T=!0;else{const Y=this._createNewPage();F=Y,P=Y.currentRow,P.height=$.size.y,T=!0}}T||(F.currentRow.height>0&&F.fixedRows.push(F.currentRow),P={x:0,y:F.currentRow.y+F.currentRow.height,height:$.size.y},F.fixedRows.push(P),F.currentRow={x:0,y:P.y+P.height,height:0})}if(P.x+$.size.x<=F.canvas.width)break;P===F.currentRow?(P.x=0,P.y+=P.height,P.height=0):F.fixedRows.splice(F.fixedRows.indexOf(P),1)}return $.texturePage=this._pages.indexOf(F),$.texturePosition.x=P.x,$.texturePosition.y=P.y,$.texturePositionClipSpace.x=P.x/F.canvas.width,$.texturePositionClipSpace.y=P.y/F.canvas.height,$.sizeClipSpace.x/=F.canvas.width,$.sizeClipSpace.y/=F.canvas.height,P.height=Math.max(P.height,$.size.y),P.x+=$.size.x,F.ctx.putImageData(he,$.texturePosition.x-this._workBoundingBox.left,$.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,$.size.x,$.size.y),F.addGlyph($),F.version++,$}_findGlyphBoundingBox(h,s,v,a,L,f){s.top=0;const A=a?this._config.deviceCellHeight:this._tmpCanvas.height,y=a?this._config.deviceCellWidth:v;let M=!1;for(let w=0;w<A;w++){for(let S=0;S<y;S++){const E=w*this._tmpCanvas.width*4+4*S+3;if(h.data[E]!==0){s.top=w,M=!0;break}}if(M)break}s.left=0,M=!1;for(let w=0;w<f+y;w++){for(let S=0;S<A;S++){const E=S*this._tmpCanvas.width*4+4*w+3;if(h.data[E]!==0){s.left=w,M=!0;break}}if(M)break}s.right=y,M=!1;for(let w=f+y-1;w>=f;w--){for(let S=0;S<A;S++){const E=S*this._tmpCanvas.width*4+4*w+3;if(h.data[E]!==0){s.right=w,M=!0;break}}if(M)break}s.bottom=A,M=!1;for(let w=A-1;w>=0;w--){for(let S=0;S<y;S++){const E=w*this._tmpCanvas.width*4+4*S+3;if(h.data[E]!==0){s.bottom=w,M=!0;break}}if(M)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:s.right-s.left+1,y:s.bottom-s.top+1},sizeClipSpace:{x:s.right-s.left+1,y:s.bottom-s.top+1},offset:{x:-s.left+f+(a||L?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-s.top+f+(a||L?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}e.TextureAtlas=b;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(h){this._glyphs.push(h),this._usedPixels+=h.size.x*h.size.y}constructor(h,s,v){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],v)for(const a of v)this._glyphs.push(...a.glyphs),this._usedPixels+=a._usedPixels;this.canvas=p(h,s,s),this.ctx=(0,r.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function n(u,h,s,v){const a=h.rgba>>>24,L=h.rgba>>>16&255,f=h.rgba>>>8&255,A=s.rgba>>>24,y=s.rgba>>>16&255,M=s.rgba>>>8&255,w=Math.floor((Math.abs(a-A)+Math.abs(L-y)+Math.abs(f-M))/12);let S=!0;for(let E=0;E<u.data.length;E+=4)u.data[E]===a&&u.data[E+1]===L&&u.data[E+2]===f||v&&Math.abs(u.data[E]-a)+Math.abs(u.data[E+1]-L)+Math.abs(u.data[E+2]-f)<w?u.data[E+3]=0:S=!1;return S}function p(u,h,s){const v=u.createElement("canvas");return v.width=h,v.height=s,v}},160:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=e.NULL_COLOR=void 0;let c=0,l=0,o=0,r=0;var d,m,_,i,t;function g(C){const b=C.toString(16);return b.length<2?"0"+b:b}function R(C,b){return C<b?(b+.05)/(C+.05):(C+.05)/(b+.05)}e.NULL_COLOR={css:"#00000000",rgba:0},function(C){C.toCss=function(b,x,n,p){return p!==void 0?`#${g(b)}${g(x)}${g(n)}${g(p)}`:`#${g(b)}${g(x)}${g(n)}`},C.toRgba=function(b,x,n,p=255){return(b<<24|x<<16|n<<8|p)>>>0},C.toColor=function(b,x,n,p){return{css:C.toCss(b,x,n,p),rgba:C.toRgba(b,x,n,p)}}}(d||(e.channels=d={})),function(C){function b(x,n){return r=Math.round(255*n),[c,l,o]=t.toChannels(x.rgba),{css:d.toCss(c,l,o,r),rgba:d.toRgba(c,l,o,r)}}C.blend=function(x,n){if(r=(255&n.rgba)/255,r===1)return{css:n.css,rgba:n.rgba};const p=n.rgba>>24&255,u=n.rgba>>16&255,h=n.rgba>>8&255,s=x.rgba>>24&255,v=x.rgba>>16&255,a=x.rgba>>8&255;return c=s+Math.round((p-s)*r),l=v+Math.round((u-v)*r),o=a+Math.round((h-a)*r),{css:d.toCss(c,l,o),rgba:d.toRgba(c,l,o)}},C.isOpaque=function(x){return(255&x.rgba)==255},C.ensureContrastRatio=function(x,n,p){const u=t.ensureContrastRatio(x.rgba,n.rgba,p);if(u)return d.toColor(u>>24&255,u>>16&255,u>>8&255)},C.opaque=function(x){const n=(255|x.rgba)>>>0;return[c,l,o]=t.toChannels(n),{css:d.toCss(c,l,o),rgba:n}},C.opacity=b,C.multiplyOpacity=function(x,n){return r=255&x.rgba,b(x,r*n/255)},C.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}}(m||(e.color=m={})),function(C){let b,x;try{const n=document.createElement("canvas");n.width=1,n.height=1;const p=n.getContext("2d",{willReadFrequently:!0});p&&(b=p,b.globalCompositeOperation="copy",x=b.createLinearGradient(0,0,1,1))}catch{}C.toColor=function(n){if(n.match(/#[\da-f]{3,8}/i))switch(n.length){case 4:return c=parseInt(n.slice(1,2).repeat(2),16),l=parseInt(n.slice(2,3).repeat(2),16),o=parseInt(n.slice(3,4).repeat(2),16),d.toColor(c,l,o);case 5:return c=parseInt(n.slice(1,2).repeat(2),16),l=parseInt(n.slice(2,3).repeat(2),16),o=parseInt(n.slice(3,4).repeat(2),16),r=parseInt(n.slice(4,5).repeat(2),16),d.toColor(c,l,o,r);case 7:return{css:n,rgba:(parseInt(n.slice(1),16)<<8|255)>>>0};case 9:return{css:n,rgba:parseInt(n.slice(1),16)>>>0}}const p=n.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(p)return c=parseInt(p[1]),l=parseInt(p[2]),o=parseInt(p[3]),r=Math.round(255*(p[5]===void 0?1:parseFloat(p[5]))),d.toColor(c,l,o,r);if(!b||!x)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=x,b.fillStyle=n,typeof b.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(b.fillRect(0,0,1,1),[c,l,o,r]=b.getImageData(0,0,1,1).data,r!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:d.toRgba(c,l,o,r),css:n}}}(_||(e.css=_={})),function(C){function b(x,n,p){const u=x/255,h=n/255,s=p/255;return .2126*(u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4))+.7152*(h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4))+.0722*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))}C.relativeLuminance=function(x){return b(x>>16&255,x>>8&255,255&x)},C.relativeLuminance2=b}(i||(e.rgb=i={})),function(C){function b(n,p,u){const h=n>>24&255,s=n>>16&255,v=n>>8&255;let a=p>>24&255,L=p>>16&255,f=p>>8&255,A=R(i.relativeLuminance2(a,L,f),i.relativeLuminance2(h,s,v));for(;A<u&&(a>0||L>0||f>0);)a-=Math.max(0,Math.ceil(.1*a)),L-=Math.max(0,Math.ceil(.1*L)),f-=Math.max(0,Math.ceil(.1*f)),A=R(i.relativeLuminance2(a,L,f),i.relativeLuminance2(h,s,v));return(a<<24|L<<16|f<<8|255)>>>0}function x(n,p,u){const h=n>>24&255,s=n>>16&255,v=n>>8&255;let a=p>>24&255,L=p>>16&255,f=p>>8&255,A=R(i.relativeLuminance2(a,L,f),i.relativeLuminance2(h,s,v));for(;A<u&&(a<255||L<255||f<255);)a=Math.min(255,a+Math.ceil(.1*(255-a))),L=Math.min(255,L+Math.ceil(.1*(255-L))),f=Math.min(255,f+Math.ceil(.1*(255-f))),A=R(i.relativeLuminance2(a,L,f),i.relativeLuminance2(h,s,v));return(a<<24|L<<16|f<<8|255)>>>0}C.blend=function(n,p){if(r=(255&p)/255,r===1)return p;const u=p>>24&255,h=p>>16&255,s=p>>8&255,v=n>>24&255,a=n>>16&255,L=n>>8&255;return c=v+Math.round((u-v)*r),l=a+Math.round((h-a)*r),o=L+Math.round((s-L)*r),d.toRgba(c,l,o)},C.ensureContrastRatio=function(n,p,u){const h=i.relativeLuminance(n>>8),s=i.relativeLuminance(p>>8);if(R(h,s)<u){if(s<h){const L=b(n,p,u),f=R(h,i.relativeLuminance(L>>8));if(f<u){const A=x(n,p,u);return f>R(h,i.relativeLuminance(A>>8))?L:A}return L}const v=x(n,p,u),a=R(h,i.relativeLuminance(v>>8));if(a<u){const L=b(n,p,u);return a>R(h,i.relativeLuminance(L>>8))?v:L}return v}},C.reduceLuminance=b,C.increaseLuminance=x,C.toChannels=function(n){return[n>>24&255,n>>16&255,n>>8&255,255&n]}}(t||(e.rgba=t={})),e.toPaddedHex=g,e.contrastRatio=R},345:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.runAndSubscribe=e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let l=0;l<this._listeners.length;l++)if(this._listeners[l]===c)return void this._listeners.splice(l,1)}}})),this._event}fire(c,l){const o=[];for(let r=0;r<this._listeners.length;r++)o.push(this._listeners[r]);for(let r=0;r<o.length;r++)o[r].call(void 0,c,l)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},e.forwardEvent=function(c,l){return c(o=>l.fire(o))},e.runAndSubscribe=function(c,l){return l(void 0),c(o=>l(o))}},859:(D,e)=>{function c(l){for(const o of l)o.dispose();l.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.MutableDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const o=this._disposables.indexOf(l);o!==-1&&this._disposables.splice(o,1)}},e.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){this._isDisposed||l===this._value||(this._value?.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},e.toDisposable=function(l){return{dispose:l}},e.disposeArray=c,e.getDisposeArrayDisposable=function(l){return{dispose:()=>c(l)}}},485:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(o,r,d){this._data[o]||(this._data[o]={}),this._data[o][r]=d}get(o,r){return this._data[o]?this._data[o][r]:void 0}clear(){this._data={}}}e.TwoKeyMap=c,e.FourKeyMap=class{constructor(){this._data=new c}set(l,o,r,d,m){this._data.get(l,o)||this._data.set(l,o,new c),this._data.get(l,o).set(r,d,m)}get(l,o,r,d){return this._data.get(l,o)?.get(r,d)}clear(){this._data.clear()}}},399:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChromeOS=e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.getSafariVersion=e.isSafari=e.isLegacyEdge=e.isFirefox=e.isNode=void 0,e.isNode=typeof ve<"u"&&"title"in ve;const c=e.isNode?"node":navigator.userAgent,l=e.isNode?"node":navigator.platform;e.isFirefox=c.includes("Firefox"),e.isLegacyEdge=c.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(c),e.getSafariVersion=function(){if(!e.isSafari)return 0;const o=c.match(/Version\/(\d+)/);return o===null||o.length<2?0:parseInt(o[1])},e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),e.isIpad=l==="iPad",e.isIphone=l==="iPhone",e.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),e.isLinux=l.indexOf("Linux")>=0,e.isChromeOS=/\bCrOS\b/.test(c)},385:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DebouncedIdleTask=e.IdleTaskQueue=e.PriorityTaskQueue=void 0;const l=c(399);class o{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(m){this._idleCallback=void 0;let _=0,i=0,t=m.timeRemaining(),g=0;for(;this._i<this._tasks.length;){if(_=Date.now(),this._tasks[this._i]()||this._i++,_=Math.max(1,Date.now()-_),i=Math.max(_,i),g=m.timeRemaining(),1.5*i>g)return t-_<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(t-_))}ms`),void this._start();t=g}this.clear()}}class r extends o{_requestCallback(m){return setTimeout(()=>m(this._createDeadline(16)))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const _=Date.now()+m;return{timeRemaining:()=>Math.max(0,_-Date.now())}}}e.PriorityTaskQueue=r,e.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends o{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:r,e.DebouncedIdleTask=class{constructor(){this._queue=new e.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},147:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(r){return[r>>>16&255,r>>>8&255,255&r]}static fromColorRGB(r){return(255&r[0])<<16|(255&r[1])<<8|255&r[2]}clone(){const r=new c;return r.fg=this.fg,r.bg=this.bg,r.extended=this.extended.clone(),r}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}}e.AttributeData=c;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(r){this._ext=r}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(r){this._ext&=-469762049,this._ext|=r<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(r){this._ext&=-67108864,this._ext|=67108863&r}get urlId(){return this._urlId}set urlId(r){this._urlId=r}get underlineVariantOffset(){const r=(3758096384&this._ext)>>29;return r<0?4294967288^r:r}set underlineVariantOffset(r){this._ext&=536870911,this._ext|=r<<29&3758096384}constructor(r=0,d=0){this._ext=0,this._urlId=0,this._ext=r,this._urlId=d}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}e.ExtendedAttrs=l},782:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const l=c(133),o=c(855),r=c(147);class d extends r.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new r.ExtendedAttrs,this.combinedData=""}static fromCharData(_){const i=new d;return i.setFromCharData(_),i}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(_){this.fg=_[o.CHAR_DATA_ATTR_INDEX],this.bg=0;let i=!1;if(_[o.CHAR_DATA_CHAR_INDEX].length>2)i=!0;else if(_[o.CHAR_DATA_CHAR_INDEX].length===2){const t=_[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const g=_[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=g&&g<=57343?this.content=1024*(t-55296)+g-56320+65536|_[o.CHAR_DATA_WIDTH_INDEX]<<22:i=!0}else i=!0}else this.content=_[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[o.CHAR_DATA_WIDTH_INDEX]<<22;i&&(this.combinedData=_[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|_[o.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=d},855:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=0,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},e.utf32ToString=function(c,l=0,o=c.length){let r="";for(let d=l;d<o;++d){let m=c[d];m>65535?(m-=65536,r+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):r+=String.fromCharCode(m)}return r},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,l){const o=c.length;if(!o)return 0;let r=0,d=0;if(this._interim){const m=c.charCodeAt(d++);56320<=m&&m<=57343?l[r++]=1024*(this._interim-55296)+m-56320+65536:(l[r++]=this._interim,l[r++]=m),this._interim=0}for(let m=d;m<o;++m){const _=c.charCodeAt(m);if(55296<=_&&_<=56319){if(++m>=o)return this._interim=_,r;const i=c.charCodeAt(m);56320<=i&&i<=57343?l[r++]=1024*(_-55296)+i-56320+65536:(l[r++]=_,l[r++]=i)}else _!==65279&&(l[r++]=_)}return r}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,l){const o=c.length;if(!o)return 0;let r,d,m,_,i=0,t=0,g=0;if(this.interim[0]){let b=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let n,p=0;for(;(n=63&this.interim[++p])&&p<4;)x<<=6,x|=n;const u=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,h=u-p;for(;g<h;){if(g>=o)return 0;if(n=c[g++],(192&n)!=128){g--,b=!0;break}this.interim[p++]=n,x<<=6,x|=63&n}b||(u===2?x<128?g--:l[i++]=x:u===3?x<2048||x>=55296&&x<=57343||x===65279||(l[i++]=x):x<65536||x>1114111||(l[i++]=x)),this.interim.fill(0)}const R=o-4;let C=g;for(;C<o;){for(;!(!(C<R)||128&(r=c[C])||128&(d=c[C+1])||128&(m=c[C+2])||128&(_=c[C+3]));)l[i++]=r,l[i++]=d,l[i++]=m,l[i++]=_,C+=4;if(r=c[C++],r<128)l[i++]=r;else if((224&r)==192){if(C>=o)return this.interim[0]=r,i;if(d=c[C++],(192&d)!=128){C--;continue}if(t=(31&r)<<6|63&d,t<128){C--;continue}l[i++]=t}else if((240&r)==224){if(C>=o)return this.interim[0]=r,i;if(d=c[C++],(192&d)!=128){C--;continue}if(C>=o)return this.interim[0]=r,this.interim[1]=d,i;if(m=c[C++],(192&m)!=128){C--;continue}if(t=(15&r)<<12|(63&d)<<6|63&m,t<2048||t>=55296&&t<=57343||t===65279)continue;l[i++]=t}else if((248&r)==240){if(C>=o)return this.interim[0]=r,i;if(d=c[C++],(192&d)!=128){C--;continue}if(C>=o)return this.interim[0]=r,this.interim[1]=d,i;if(m=c[C++],(192&m)!=128){C--;continue}if(C>=o)return this.interim[0]=r,this.interim[1]=d,this.interim[2]=m,i;if(_=c[C++],(192&_)!=128){C--;continue}if(t=(7&r)<<18|(63&d)<<12|(63&m)<<6|63&_,t<65536||t>1114111)continue;l[i++]=t}}return i}}},776:function(D,e,c){var l=this&&this.__decorate||function(t,g,R,C){var b,x=arguments.length,n=x<3?g:C===null?C=Object.getOwnPropertyDescriptor(g,R):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,g,R,C);else for(var p=t.length-1;p>=0;p--)(b=t[p])&&(n=(x<3?b(n):x>3?b(g,R,n):b(g,R))||n);return x>3&&n&&Object.defineProperty(g,R,n),n},o=this&&this.__param||function(t,g){return function(R,C){g(R,C,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.traceCall=e.setTraceLogger=e.LogService=void 0;const r=c(859),d=c(97),m={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 _,i=e.LogService=class extends r.Disposable{get logLevel(){return this._logLevel}constructor(t){super(),this._optionsService=t,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),_=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let g=0;g<t.length;g++)typeof t[g]=="function"&&(t[g]=t[g]())}_log(t,g,R){this._evalLazyOptionalParams(R),t.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+g,...R)}trace(t,...g){this._logLevel<=d.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,t,g)}debug(t,...g){this._logLevel<=d.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,t,g)}info(t,...g){this._logLevel<=d.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,t,g)}warn(t,...g){this._logLevel<=d.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,t,g)}error(t,...g){this._logLevel<=d.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,t,g)}};e.LogService=i=l([o(0,d.IOptionsService)],i),e.setTraceLogger=function(t){_=t},e.traceCall=function(t,g,R){if(typeof R.value!="function")throw new Error("not supported");const C=R.value;R.value=function(...b){if(_.logLevel!==d.LogLevelEnum.TRACE)return C.apply(this,b);_.trace(`GlyphRenderer#${C.name}(${b.map(n=>JSON.stringify(n)).join(", ")})`);const x=C.apply(this,b);return _.trace(`GlyphRenderer#${C.name} return`,x),x}}},726:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0;const c="di$target",l="di$dependencies";e.serviceRegistry=new Map,e.getServiceDependencies=function(o){return o[l]||[]},e.createDecorator=function(o){if(e.serviceRegistry.has(o))return e.serviceRegistry.get(o);const r=function(d,m,_){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(i,t,g){t[c]===t?t[l].push({id:i,index:g}):(t[l]=[{id:i,index:g}],t[c]=t)})(r,d,_)};return r.toString=()=>o,e.serviceRegistry.set(o,r),r}},97:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationService=e.IUnicodeService=e.IOscLinkService=e.IOptionsService=e.ILogService=e.LogLevelEnum=e.IInstantiationService=e.ICharsetService=e.ICoreService=e.ICoreMouseService=e.IBufferService=void 0;const l=c(726);var o;e.IBufferService=(0,l.createDecorator)("BufferService"),e.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),e.ICoreService=(0,l.createDecorator)("CoreService"),e.ICharsetService=(0,l.createDecorator)("CharsetService"),e.IInstantiationService=(0,l.createDecorator)("InstantiationService"),function(r){r[r.TRACE=0]="TRACE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.OFF=5]="OFF"}(o||(e.LogLevelEnum=o={})),e.ILogService=(0,l.createDecorator)("LogService"),e.IOptionsService=(0,l.createDecorator)("OptionsService"),e.IOscLinkService=(0,l.createDecorator)("OscLinkService"),e.IUnicodeService=(0,l.createDecorator)("UnicodeService"),e.IDecorationService=(0,l.createDecorator)("DecorationService")}},ae={};function ie(D){var e=ae[D];if(e!==void 0)return e.exports;var c=ae[D]={exports:{}};return fe[D].call(c.exports,c,c.exports,ie),c.exports}var pe={};return(()=>{var D=pe;Object.defineProperty(D,"__esModule",{value:!0}),D.WebglAddon=void 0;const e=ie(345),c=ie(859),l=ie(399),o=ie(666),r=ie(776);class d extends c.Disposable{constructor(_){if(l.isSafari&&(0,l.getSafariVersion)()<16){const i={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",i))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=_,this._onChangeTextureAtlas=this.register(new e.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new e.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new e.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new e.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(_){const i=_._core;if(!_.element)return void this.register(i.onWillOpen(()=>this.activate(_)));this._terminal=_;const t=i.coreService,g=i.optionsService,R=i,C=R._renderService,b=R._characterJoinerService,x=R._charSizeService,n=R._coreBrowserService,p=R._decorationService,u=R._logService,h=R._themeService;(0,r.setTraceLogger)(u),this._renderer=this.register(new o.WebglRenderer(_,b,x,n,t,p,g,h,this._preserveDrawingBuffer)),this.register((0,e.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,e.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,e.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,e.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),C.setRenderer(this._renderer),this.register((0,c.toDisposable)(()=>{const s=this._terminal._core._renderService;s.setRenderer(this._terminal._core._createRenderer()),s.handleResize(_.cols,_.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}}D.WebglAddon=d})(),pe})())}}]);
|