@rajat-rastogi/maestro 0.1.6 → 0.2.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/app/index.html +13 -0
- package/app/out/main/main.js +1805 -0
- package/app/out/preload/preload.js +105 -0
- package/app/out/renderer/assets/addon-canvas-CszGAohT.js +1977 -0
- package/app/out/renderer/assets/addon-fit-DhSl_-7V.js +58 -0
- package/app/out/renderer/assets/index-D3bMGKAV.js +12209 -0
- package/app/out/renderer/assets/index-DBLgxEKP.css +437 -0
- package/app/out/renderer/assets/xterm-BgoKG_Sn.js +6076 -0
- package/app/out/renderer/index.html +14 -0
- package/app/package-lock.json +4616 -0
- package/app/package.json +38 -0
- package/dist/agent/install.d.ts +2 -0
- package/dist/agent/install.d.ts.map +1 -0
- package/dist/agent/install.js +384 -0
- package/dist/agent/install.js.map +1 -0
- package/dist/dashboard/assets/dashboard.html +70 -5
- package/dist/dashboard/replay-parser.d.ts.map +1 -1
- package/dist/dashboard/replay-parser.js +16 -2
- package/dist/dashboard/replay-parser.js.map +1 -1
- package/dist/main.js +56 -1
- package/dist/main.js.map +1 -1
- package/package.json +12 -4
|
@@ -0,0 +1,1977 @@
|
|
|
1
|
+
function _mergeNamespaces(n, m) {
|
|
2
|
+
for (var i = 0; i < m.length; i++) {
|
|
3
|
+
const e = m[i];
|
|
4
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
5
|
+
for (const k in e) {
|
|
6
|
+
if (k !== "default" && !(k in n)) {
|
|
7
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
if (d) {
|
|
9
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: () => e[k]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
+
}
|
|
20
|
+
var addonCanvas$1 = { exports: {} };
|
|
21
|
+
(function(module, exports$1) {
|
|
22
|
+
!function(e, t) {
|
|
23
|
+
module.exports = t();
|
|
24
|
+
}(self, () => (() => {
|
|
25
|
+
var e = { 903: (e2, t2, i2) => {
|
|
26
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BaseRenderLayer = void 0;
|
|
27
|
+
const s2 = i2(274), r = i2(627), o = i2(237), n = i2(860), a = i2(374), h = i2(296), l = i2(345), c = i2(859), d = i2(399), _ = i2(855);
|
|
28
|
+
class u extends c.Disposable {
|
|
29
|
+
get canvas() {
|
|
30
|
+
return this._canvas;
|
|
31
|
+
}
|
|
32
|
+
get cacheCanvas() {
|
|
33
|
+
return this._charAtlas?.pages[0].canvas;
|
|
34
|
+
}
|
|
35
|
+
constructor(e3, t3, i3, r2, o2, n2, a2, d2, _2, u2) {
|
|
36
|
+
super(), this._terminal = e3, this._container = t3, this._alpha = o2, this._themeService = n2, this._bufferService = a2, this._optionsService = d2, this._decorationService = _2, this._coreBrowserService = u2, this._deviceCharWidth = 0, this._deviceCharHeight = 0, this._deviceCellWidth = 0, this._deviceCellHeight = 0, this._deviceCharLeft = 0, this._deviceCharTop = 0, this._selectionModel = (0, h.createSelectionRenderModel)(), this._bitmapGenerator = [], this._charAtlasDisposable = this.register(new c.MutableDisposable()), this._onAddTextureAtlasCanvas = this.register(new l.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._cellColorResolver = new s2.CellColorResolver(this._terminal, this._optionsService, this._selectionModel, this._decorationService, this._coreBrowserService, this._themeService), this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add(`xterm-${i3}-layer`), this._canvas.style.zIndex = r2.toString(), this._initCanvas(), this._container.appendChild(this._canvas), this._refreshCharAtlas(this._themeService.colors), this.register(this._themeService.onChangeColors((e4) => {
|
|
37
|
+
this._refreshCharAtlas(e4), this.reset(), this.handleSelectionChanged(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
|
|
38
|
+
})), this.register((0, c.toDisposable)(() => {
|
|
39
|
+
this._canvas.remove();
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
_initCanvas() {
|
|
43
|
+
this._ctx = (0, a.throwIfFalsy)(this._canvas.getContext("2d", { alpha: this._alpha })), this._alpha || this._clearAll();
|
|
44
|
+
}
|
|
45
|
+
handleBlur() {
|
|
46
|
+
}
|
|
47
|
+
handleFocus() {
|
|
48
|
+
}
|
|
49
|
+
handleCursorMove() {
|
|
50
|
+
}
|
|
51
|
+
handleGridChanged(e3, t3) {
|
|
52
|
+
}
|
|
53
|
+
handleSelectionChanged(e3, t3, i3 = false) {
|
|
54
|
+
this._selectionModel.update(this._terminal._core, e3, t3, i3);
|
|
55
|
+
}
|
|
56
|
+
_setTransparency(e3) {
|
|
57
|
+
if (e3 === this._alpha) return;
|
|
58
|
+
const t3 = this._canvas;
|
|
59
|
+
this._alpha = e3, this._canvas = this._canvas.cloneNode(), this._initCanvas(), this._container.replaceChild(this._canvas, t3), this._refreshCharAtlas(this._themeService.colors), this.handleGridChanged(0, this._bufferService.rows - 1);
|
|
60
|
+
}
|
|
61
|
+
_refreshCharAtlas(e3) {
|
|
62
|
+
if (!(this._deviceCharWidth <= 0 && this._deviceCharHeight <= 0)) {
|
|
63
|
+
this._charAtlas = (0, r.acquireTextureAtlas)(this._terminal, this._optionsService.rawOptions, e3, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr), this._charAtlasDisposable.value = (0, l.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas), this._charAtlas.warmUp();
|
|
64
|
+
for (let e4 = 0; e4 < this._charAtlas.pages.length; e4++) this._bitmapGenerator[e4] = new g(this._charAtlas.pages[e4].canvas);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
resize(e3) {
|
|
68
|
+
this._deviceCellWidth = e3.device.cell.width, this._deviceCellHeight = e3.device.cell.height, this._deviceCharWidth = e3.device.char.width, this._deviceCharHeight = e3.device.char.height, this._deviceCharLeft = e3.device.char.left, this._deviceCharTop = e3.device.char.top, this._canvas.width = e3.device.canvas.width, this._canvas.height = e3.device.canvas.height, this._canvas.style.width = `${e3.css.canvas.width}px`, this._canvas.style.height = `${e3.css.canvas.height}px`, this._alpha || this._clearAll(), this._refreshCharAtlas(this._themeService.colors);
|
|
69
|
+
}
|
|
70
|
+
clearTextureAtlas() {
|
|
71
|
+
this._charAtlas?.clearTexture();
|
|
72
|
+
}
|
|
73
|
+
_fillCells(e3, t3, i3, s3) {
|
|
74
|
+
this._ctx.fillRect(e3 * this._deviceCellWidth, t3 * this._deviceCellHeight, i3 * this._deviceCellWidth, s3 * this._deviceCellHeight);
|
|
75
|
+
}
|
|
76
|
+
_fillMiddleLineAtCells(e3, t3, i3 = 1) {
|
|
77
|
+
const s3 = Math.ceil(0.5 * this._deviceCellHeight);
|
|
78
|
+
this._ctx.fillRect(e3 * this._deviceCellWidth, (t3 + 1) * this._deviceCellHeight - s3 - this._coreBrowserService.dpr, i3 * this._deviceCellWidth, this._coreBrowserService.dpr);
|
|
79
|
+
}
|
|
80
|
+
_fillBottomLineAtCells(e3, t3, i3 = 1, s3 = 0) {
|
|
81
|
+
this._ctx.fillRect(e3 * this._deviceCellWidth, (t3 + 1) * this._deviceCellHeight + s3 - this._coreBrowserService.dpr - 1, i3 * this._deviceCellWidth, this._coreBrowserService.dpr);
|
|
82
|
+
}
|
|
83
|
+
_curlyUnderlineAtCell(e3, t3, i3 = 1) {
|
|
84
|
+
this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
|
|
85
|
+
const s3 = this._coreBrowserService.dpr;
|
|
86
|
+
this._ctx.lineWidth = s3;
|
|
87
|
+
for (let r2 = 0; r2 < i3; r2++) {
|
|
88
|
+
const i4 = (e3 + r2) * this._deviceCellWidth, o2 = (e3 + r2 + 0.5) * this._deviceCellWidth, n2 = (e3 + r2 + 1) * this._deviceCellWidth, a2 = (t3 + 1) * this._deviceCellHeight - s3 - 1, h2 = a2 - s3, l2 = a2 + s3;
|
|
89
|
+
this._ctx.moveTo(i4, a2), this._ctx.bezierCurveTo(i4, h2, o2, h2, o2, a2), this._ctx.bezierCurveTo(o2, l2, n2, l2, n2, a2);
|
|
90
|
+
}
|
|
91
|
+
this._ctx.stroke(), this._ctx.restore();
|
|
92
|
+
}
|
|
93
|
+
_dottedUnderlineAtCell(e3, t3, i3 = 1) {
|
|
94
|
+
this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
|
|
95
|
+
const s3 = this._coreBrowserService.dpr;
|
|
96
|
+
this._ctx.lineWidth = s3, this._ctx.setLineDash([2 * s3, s3]);
|
|
97
|
+
const r2 = e3 * this._deviceCellWidth, o2 = (t3 + 1) * this._deviceCellHeight - s3 - 1;
|
|
98
|
+
this._ctx.moveTo(r2, o2);
|
|
99
|
+
for (let t4 = 0; t4 < i3; t4++) {
|
|
100
|
+
const s4 = (e3 + i3 + t4) * this._deviceCellWidth;
|
|
101
|
+
this._ctx.lineTo(s4, o2);
|
|
102
|
+
}
|
|
103
|
+
this._ctx.stroke(), this._ctx.closePath(), this._ctx.restore();
|
|
104
|
+
}
|
|
105
|
+
_dashedUnderlineAtCell(e3, t3, i3 = 1) {
|
|
106
|
+
this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
|
|
107
|
+
const s3 = this._coreBrowserService.dpr;
|
|
108
|
+
this._ctx.lineWidth = s3, this._ctx.setLineDash([4 * s3, 3 * s3]);
|
|
109
|
+
const r2 = e3 * this._deviceCellWidth, o2 = (e3 + i3) * this._deviceCellWidth, n2 = (t3 + 1) * this._deviceCellHeight - s3 - 1;
|
|
110
|
+
this._ctx.moveTo(r2, n2), this._ctx.lineTo(o2, n2), this._ctx.stroke(), this._ctx.closePath(), this._ctx.restore();
|
|
111
|
+
}
|
|
112
|
+
_fillLeftLineAtCell(e3, t3, i3) {
|
|
113
|
+
this._ctx.fillRect(e3 * this._deviceCellWidth, t3 * this._deviceCellHeight, this._coreBrowserService.dpr * i3, this._deviceCellHeight);
|
|
114
|
+
}
|
|
115
|
+
_strokeRectAtCell(e3, t3, i3, s3) {
|
|
116
|
+
const r2 = this._coreBrowserService.dpr;
|
|
117
|
+
this._ctx.lineWidth = r2, this._ctx.strokeRect(e3 * this._deviceCellWidth + r2 / 2, t3 * this._deviceCellHeight + r2 / 2, i3 * this._deviceCellWidth - r2, s3 * this._deviceCellHeight - r2);
|
|
118
|
+
}
|
|
119
|
+
_clearAll() {
|
|
120
|
+
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));
|
|
121
|
+
}
|
|
122
|
+
_clearCells(e3, t3, i3, s3) {
|
|
123
|
+
this._alpha ? this._ctx.clearRect(e3 * this._deviceCellWidth, t3 * this._deviceCellHeight, i3 * this._deviceCellWidth, s3 * this._deviceCellHeight) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(e3 * this._deviceCellWidth, t3 * this._deviceCellHeight, i3 * this._deviceCellWidth, s3 * this._deviceCellHeight));
|
|
124
|
+
}
|
|
125
|
+
_fillCharTrueColor(e3, t3, i3) {
|
|
126
|
+
this._ctx.font = this._getFont(false, false), this._ctx.textBaseline = o.TEXT_BASELINE, this._clipRow(i3);
|
|
127
|
+
let s3 = false;
|
|
128
|
+
false !== this._optionsService.rawOptions.customGlyphs && (s3 = (0, n.tryDrawCustomChar)(this._ctx, e3.getChars(), t3 * this._deviceCellWidth, i3 * this._deviceCellHeight, this._deviceCellWidth, this._deviceCellHeight, this._optionsService.rawOptions.fontSize, this._coreBrowserService.dpr)), s3 || this._ctx.fillText(e3.getChars(), t3 * this._deviceCellWidth + this._deviceCharLeft, i3 * this._deviceCellHeight + this._deviceCharTop + this._deviceCharHeight);
|
|
129
|
+
}
|
|
130
|
+
_drawChars(e3, t3, i3) {
|
|
131
|
+
const s3 = e3.getChars(), r2 = e3.getCode(), o2 = e3.getWidth();
|
|
132
|
+
if (this._cellColorResolver.resolve(e3, t3, this._bufferService.buffer.ydisp + i3, this._deviceCellWidth), !this._charAtlas) return;
|
|
133
|
+
let n2;
|
|
134
|
+
if (n2 = s3 && s3.length > 1 ? this._charAtlas.getRasterizedGlyphCombinedChar(s3, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext, true) : this._charAtlas.getRasterizedGlyph(e3.getCode() || _.WHITESPACE_CELL_CODE, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext, true), !n2.size.x || !n2.size.y) return;
|
|
135
|
+
this._ctx.save(), this._clipRow(i3), this._bitmapGenerator[n2.texturePage] && this._charAtlas.pages[n2.texturePage].canvas !== this._bitmapGenerator[n2.texturePage].canvas && (this._bitmapGenerator[n2.texturePage]?.bitmap?.close(), delete this._bitmapGenerator[n2.texturePage]), this._charAtlas.pages[n2.texturePage].version !== this._bitmapGenerator[n2.texturePage]?.version && (this._bitmapGenerator[n2.texturePage] || (this._bitmapGenerator[n2.texturePage] = new g(this._charAtlas.pages[n2.texturePage].canvas)), this._bitmapGenerator[n2.texturePage].refresh(), this._bitmapGenerator[n2.texturePage].version = this._charAtlas.pages[n2.texturePage].version);
|
|
136
|
+
let h2 = n2.size.x;
|
|
137
|
+
this._optionsService.rawOptions.rescaleOverlappingGlyphs && (0, a.allowRescaling)(r2, o2, n2.size.x, this._deviceCellWidth) && (h2 = this._deviceCellWidth - 1), this._ctx.drawImage(this._bitmapGenerator[n2.texturePage]?.bitmap || this._charAtlas.pages[n2.texturePage].canvas, n2.texturePosition.x, n2.texturePosition.y, n2.size.x, n2.size.y, t3 * this._deviceCellWidth + this._deviceCharLeft - n2.offset.x, i3 * this._deviceCellHeight + this._deviceCharTop - n2.offset.y, h2, n2.size.y), this._ctx.restore();
|
|
138
|
+
}
|
|
139
|
+
_clipRow(e3) {
|
|
140
|
+
this._ctx.beginPath(), this._ctx.rect(0, e3 * this._deviceCellHeight, this._bufferService.cols * this._deviceCellWidth, this._deviceCellHeight), this._ctx.clip();
|
|
141
|
+
}
|
|
142
|
+
_getFont(e3, t3) {
|
|
143
|
+
return `${t3 ? "italic" : ""} ${e3 ? this._optionsService.rawOptions.fontWeightBold : this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize * this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
t2.BaseRenderLayer = u;
|
|
147
|
+
class g {
|
|
148
|
+
get bitmap() {
|
|
149
|
+
return this._bitmap;
|
|
150
|
+
}
|
|
151
|
+
constructor(e3) {
|
|
152
|
+
this.canvas = e3, this._state = 0, this._commitTimeout = void 0, this._bitmap = void 0, this.version = -1;
|
|
153
|
+
}
|
|
154
|
+
refresh() {
|
|
155
|
+
this._bitmap?.close(), this._bitmap = void 0, d.isSafari || (void 0 === this._commitTimeout && (this._commitTimeout = window.setTimeout(() => this._generate(), 100)), 1 === this._state && (this._state = 2));
|
|
156
|
+
}
|
|
157
|
+
_generate() {
|
|
158
|
+
0 === this._state && (this._bitmap?.close(), this._bitmap = void 0, this._state = 1, window.createImageBitmap(this.canvas).then((e3) => {
|
|
159
|
+
2 === this._state ? this.refresh() : this._bitmap = e3, this._state = 0;
|
|
160
|
+
}), this._commitTimeout && (this._commitTimeout = void 0));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}, 949: (e2, t2, i2) => {
|
|
164
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CanvasRenderer = void 0;
|
|
165
|
+
const s2 = i2(627), r = i2(56), o = i2(374), n = i2(345), a = i2(859), h = i2(873), l = i2(43), c = i2(630), d = i2(744);
|
|
166
|
+
class _ extends a.Disposable {
|
|
167
|
+
constructor(e3, t3, i3, _2, u, g, f, v, C, p, m) {
|
|
168
|
+
super(), this._terminal = e3, this._screenElement = t3, this._bufferService = _2, this._charSizeService = u, this._optionsService = g, this._coreBrowserService = C, this._themeService = m, this._observerDisposable = this.register(new a.MutableDisposable()), this._onRequestRedraw = this.register(new n.EventEmitter()), this.onRequestRedraw = this._onRequestRedraw.event, this._onChangeTextureAtlas = this.register(new n.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new n.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
|
|
169
|
+
const x = this._optionsService.rawOptions.allowTransparency;
|
|
170
|
+
this._renderLayers = [new d.TextRenderLayer(this._terminal, this._screenElement, 0, x, this._bufferService, this._optionsService, f, p, this._coreBrowserService, m), new c.SelectionRenderLayer(this._terminal, this._screenElement, 1, this._bufferService, this._coreBrowserService, p, this._optionsService, m), new l.LinkRenderLayer(this._terminal, this._screenElement, 2, i3, this._bufferService, this._optionsService, p, this._coreBrowserService, m), new h.CursorRenderLayer(this._terminal, this._screenElement, 3, this._onRequestRedraw, this._bufferService, this._optionsService, v, this._coreBrowserService, p, m)];
|
|
171
|
+
for (const e4 of this._renderLayers) (0, n.forwardEvent)(e4.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas);
|
|
172
|
+
this.dimensions = (0, o.createRenderDimensions)(), this._devicePixelRatio = this._coreBrowserService.dpr, this._updateDimensions(), this._observerDisposable.value = (0, r.observeDevicePixelDimensions)(this._renderLayers[0].canvas, this._coreBrowserService.window, (e4, t4) => this._setCanvasDevicePixelDimensions(e4, t4)), this.register(this._coreBrowserService.onWindowChange((e4) => {
|
|
173
|
+
this._observerDisposable.value = (0, r.observeDevicePixelDimensions)(this._renderLayers[0].canvas, e4, (e5, t4) => this._setCanvasDevicePixelDimensions(e5, t4));
|
|
174
|
+
})), this.register((0, a.toDisposable)(() => {
|
|
175
|
+
for (const e4 of this._renderLayers) e4.dispose();
|
|
176
|
+
(0, s2.removeTerminalFromCache)(this._terminal);
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
get textureAtlas() {
|
|
180
|
+
return this._renderLayers[0].cacheCanvas;
|
|
181
|
+
}
|
|
182
|
+
handleDevicePixelRatioChange() {
|
|
183
|
+
this._devicePixelRatio !== this._coreBrowserService.dpr && (this._devicePixelRatio = this._coreBrowserService.dpr, this.handleResize(this._bufferService.cols, this._bufferService.rows));
|
|
184
|
+
}
|
|
185
|
+
handleResize(e3, t3) {
|
|
186
|
+
this._updateDimensions();
|
|
187
|
+
for (const e4 of this._renderLayers) e4.resize(this.dimensions);
|
|
188
|
+
this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
|
|
189
|
+
}
|
|
190
|
+
handleCharSizeChanged() {
|
|
191
|
+
this.handleResize(this._bufferService.cols, this._bufferService.rows);
|
|
192
|
+
}
|
|
193
|
+
handleBlur() {
|
|
194
|
+
this._runOperation((e3) => e3.handleBlur());
|
|
195
|
+
}
|
|
196
|
+
handleFocus() {
|
|
197
|
+
this._runOperation((e3) => e3.handleFocus());
|
|
198
|
+
}
|
|
199
|
+
handleSelectionChanged(e3, t3, i3 = false) {
|
|
200
|
+
this._runOperation((s3) => s3.handleSelectionChanged(e3, t3, i3)), this._themeService.colors.selectionForeground && this._onRequestRedraw.fire({ start: 0, end: this._bufferService.rows - 1 });
|
|
201
|
+
}
|
|
202
|
+
handleCursorMove() {
|
|
203
|
+
this._runOperation((e3) => e3.handleCursorMove());
|
|
204
|
+
}
|
|
205
|
+
clear() {
|
|
206
|
+
this._runOperation((e3) => e3.reset());
|
|
207
|
+
}
|
|
208
|
+
_runOperation(e3) {
|
|
209
|
+
for (const t3 of this._renderLayers) e3(t3);
|
|
210
|
+
}
|
|
211
|
+
renderRows(e3, t3) {
|
|
212
|
+
for (const i3 of this._renderLayers) i3.handleGridChanged(e3, t3);
|
|
213
|
+
}
|
|
214
|
+
clearTextureAtlas() {
|
|
215
|
+
for (const e3 of this._renderLayers) e3.clearTextureAtlas();
|
|
216
|
+
}
|
|
217
|
+
_updateDimensions() {
|
|
218
|
+
if (!this._charSizeService.hasValidSize) return;
|
|
219
|
+
const e3 = this._coreBrowserService.dpr;
|
|
220
|
+
this.dimensions.device.char.width = Math.floor(this._charSizeService.width * e3), this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * e3), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.top = 1 === this._optionsService.rawOptions.lineHeight ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.char.left = Math.floor(this._optionsService.rawOptions.letterSpacing / 2), this.dimensions.device.canvas.height = this._bufferService.rows * this.dimensions.device.cell.height, this.dimensions.device.canvas.width = this._bufferService.cols * this.dimensions.device.cell.width, this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / e3), this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / e3), this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows, this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols;
|
|
221
|
+
}
|
|
222
|
+
_setCanvasDevicePixelDimensions(e3, t3) {
|
|
223
|
+
this.dimensions.device.canvas.height = t3, this.dimensions.device.canvas.width = e3;
|
|
224
|
+
for (const e4 of this._renderLayers) e4.resize(this.dimensions);
|
|
225
|
+
this._requestRedrawViewport();
|
|
226
|
+
}
|
|
227
|
+
_requestRedrawViewport() {
|
|
228
|
+
this._onRequestRedraw.fire({ start: 0, end: this._bufferService.rows - 1 });
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
t2.CanvasRenderer = _;
|
|
232
|
+
}, 873: (e2, t2, i2) => {
|
|
233
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CursorRenderLayer = void 0;
|
|
234
|
+
const s2 = i2(457), r = i2(859), o = i2(399), n = i2(782), a = i2(903);
|
|
235
|
+
class h extends a.BaseRenderLayer {
|
|
236
|
+
constructor(e3, t3, i3, s3, o2, a2, h2, l, c, d) {
|
|
237
|
+
super(e3, t3, "cursor", i3, true, d, o2, a2, c, l), this._onRequestRedraw = s3, this._coreService = h2, this._cursorBlinkStateManager = this.register(new r.MutableDisposable()), this._cell = new n.CellData(), this._state = { x: 0, y: 0, isFocused: false, style: "", width: 0 }, this._cursorRenderers = { bar: this._renderBarCursor.bind(this), block: this._renderBlockCursor.bind(this), underline: this._renderUnderlineCursor.bind(this), outline: this._renderOutlineCursor.bind(this) }, this.register(a2.onOptionChange(() => this._handleOptionsChanged())), this._handleOptionsChanged();
|
|
238
|
+
}
|
|
239
|
+
resize(e3) {
|
|
240
|
+
super.resize(e3), this._state = { x: 0, y: 0, isFocused: false, style: "", width: 0 };
|
|
241
|
+
}
|
|
242
|
+
reset() {
|
|
243
|
+
this._clearCursor(), this._cursorBlinkStateManager.value?.restartBlinkAnimation(), this._handleOptionsChanged();
|
|
244
|
+
}
|
|
245
|
+
handleBlur() {
|
|
246
|
+
this._cursorBlinkStateManager.value?.pause(), this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
|
|
247
|
+
}
|
|
248
|
+
handleFocus() {
|
|
249
|
+
this._cursorBlinkStateManager.value?.resume(), this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
|
|
250
|
+
}
|
|
251
|
+
_handleOptionsChanged() {
|
|
252
|
+
this._optionsService.rawOptions.cursorBlink ? this._cursorBlinkStateManager.value || (this._cursorBlinkStateManager.value = new s2.CursorBlinkStateManager(() => this._render(true), this._coreBrowserService)) : this._cursorBlinkStateManager.clear(), this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
|
|
253
|
+
}
|
|
254
|
+
handleCursorMove() {
|
|
255
|
+
this._cursorBlinkStateManager.value?.restartBlinkAnimation();
|
|
256
|
+
}
|
|
257
|
+
handleGridChanged(e3, t3) {
|
|
258
|
+
!this._cursorBlinkStateManager.value || this._cursorBlinkStateManager.value.isPaused ? this._render(false) : this._cursorBlinkStateManager.value.restartBlinkAnimation();
|
|
259
|
+
}
|
|
260
|
+
_render(e3) {
|
|
261
|
+
if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) return void this._clearCursor();
|
|
262
|
+
const t3 = this._bufferService.buffer.ybase + this._bufferService.buffer.y, i3 = t3 - this._bufferService.buffer.ydisp;
|
|
263
|
+
if (i3 < 0 || i3 >= this._bufferService.rows) return void this._clearCursor();
|
|
264
|
+
const s3 = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);
|
|
265
|
+
if (this._bufferService.buffer.lines.get(t3).loadCell(s3, this._cell), void 0 !== this._cell.content) {
|
|
266
|
+
if (!this._coreBrowserService.isFocused) {
|
|
267
|
+
this._clearCursor(), this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css;
|
|
268
|
+
const e4 = this._optionsService.rawOptions.cursorStyle, t4 = this._optionsService.rawOptions.cursorInactiveStyle;
|
|
269
|
+
return t4 && "none" !== t4 && this._cursorRenderers[t4](s3, i3, this._cell), this._ctx.restore(), this._state.x = s3, this._state.y = i3, this._state.isFocused = false, this._state.style = e4, void (this._state.width = this._cell.getWidth());
|
|
270
|
+
}
|
|
271
|
+
if (!this._cursorBlinkStateManager.value || this._cursorBlinkStateManager.value.isCursorVisible) {
|
|
272
|
+
if (this._state) {
|
|
273
|
+
if (this._state.x === s3 && this._state.y === i3 && this._state.isFocused === this._coreBrowserService.isFocused && this._state.style === this._optionsService.rawOptions.cursorStyle && this._state.width === this._cell.getWidth()) return;
|
|
274
|
+
this._clearCursor();
|
|
275
|
+
}
|
|
276
|
+
this._ctx.save(), this._cursorRenderers[this._optionsService.rawOptions.cursorStyle || "block"](s3, i3, this._cell), this._ctx.restore(), this._state.x = s3, this._state.y = i3, this._state.isFocused = false, this._state.style = this._optionsService.rawOptions.cursorStyle, this._state.width = this._cell.getWidth();
|
|
277
|
+
} else this._clearCursor();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
_clearCursor() {
|
|
281
|
+
this._state && (o.isFirefox || this._coreBrowserService.dpr < 1 ? this._clearAll() : this._clearCells(this._state.x, this._state.y, this._state.width, 1), this._state = { x: 0, y: 0, isFocused: false, style: "", width: 0 });
|
|
282
|
+
}
|
|
283
|
+
_renderBarCursor(e3, t3, i3) {
|
|
284
|
+
this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillLeftLineAtCell(e3, t3, this._optionsService.rawOptions.cursorWidth), this._ctx.restore();
|
|
285
|
+
}
|
|
286
|
+
_renderBlockCursor(e3, t3, i3) {
|
|
287
|
+
this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillCells(e3, t3, i3.getWidth(), 1), this._ctx.fillStyle = this._themeService.colors.cursorAccent.css, this._fillCharTrueColor(i3, e3, t3), this._ctx.restore();
|
|
288
|
+
}
|
|
289
|
+
_renderUnderlineCursor(e3, t3, i3) {
|
|
290
|
+
this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillBottomLineAtCells(e3, t3), this._ctx.restore();
|
|
291
|
+
}
|
|
292
|
+
_renderOutlineCursor(e3, t3, i3) {
|
|
293
|
+
this._ctx.save(), this._ctx.strokeStyle = this._themeService.colors.cursor.css, this._strokeRectAtCell(e3, t3, i3.getWidth(), 1), this._ctx.restore();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
t2.CursorRenderLayer = h;
|
|
297
|
+
}, 574: (e2, t2) => {
|
|
298
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.GridCache = void 0, t2.GridCache = class {
|
|
299
|
+
constructor() {
|
|
300
|
+
this.cache = [];
|
|
301
|
+
}
|
|
302
|
+
resize(e3, t3) {
|
|
303
|
+
for (let i2 = 0; i2 < e3; i2++) {
|
|
304
|
+
this.cache.length <= i2 && this.cache.push([]);
|
|
305
|
+
for (let e4 = this.cache[i2].length; e4 < t3; e4++) this.cache[i2].push(void 0);
|
|
306
|
+
this.cache[i2].length = t3;
|
|
307
|
+
}
|
|
308
|
+
this.cache.length = e3;
|
|
309
|
+
}
|
|
310
|
+
clear() {
|
|
311
|
+
for (let e3 = 0; e3 < this.cache.length; e3++) for (let t3 = 0; t3 < this.cache[e3].length; t3++) this.cache[e3][t3] = void 0;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
}, 43: (e2, t2, i2) => {
|
|
315
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.LinkRenderLayer = void 0;
|
|
316
|
+
const s2 = i2(197), r = i2(237), o = i2(903);
|
|
317
|
+
class n extends o.BaseRenderLayer {
|
|
318
|
+
constructor(e3, t3, i3, s3, r2, o2, n2, a, h) {
|
|
319
|
+
super(e3, t3, "link", i3, true, h, r2, o2, n2, a), this.register(s3.onShowLinkUnderline((e4) => this._handleShowLinkUnderline(e4))), this.register(s3.onHideLinkUnderline((e4) => this._handleHideLinkUnderline(e4)));
|
|
320
|
+
}
|
|
321
|
+
resize(e3) {
|
|
322
|
+
super.resize(e3), this._state = void 0;
|
|
323
|
+
}
|
|
324
|
+
reset() {
|
|
325
|
+
this._clearCurrentLink();
|
|
326
|
+
}
|
|
327
|
+
_clearCurrentLink() {
|
|
328
|
+
if (this._state) {
|
|
329
|
+
this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);
|
|
330
|
+
const e3 = this._state.y2 - this._state.y1 - 1;
|
|
331
|
+
e3 > 0 && this._clearCells(0, this._state.y1 + 1, this._state.cols, e3), this._clearCells(0, this._state.y2, this._state.x2, 1), this._state = void 0;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
_handleShowLinkUnderline(e3) {
|
|
335
|
+
if (e3.fg === r.INVERTED_DEFAULT_COLOR ? this._ctx.fillStyle = this._themeService.colors.background.css : e3.fg && (0, s2.is256Color)(e3.fg) ? this._ctx.fillStyle = this._themeService.colors.ansi[e3.fg].css : this._ctx.fillStyle = this._themeService.colors.foreground.css, e3.y1 === e3.y2) this._fillBottomLineAtCells(e3.x1, e3.y1, e3.x2 - e3.x1);
|
|
336
|
+
else {
|
|
337
|
+
this._fillBottomLineAtCells(e3.x1, e3.y1, e3.cols - e3.x1);
|
|
338
|
+
for (let t3 = e3.y1 + 1; t3 < e3.y2; t3++) this._fillBottomLineAtCells(0, t3, e3.cols);
|
|
339
|
+
this._fillBottomLineAtCells(0, e3.y2, e3.x2);
|
|
340
|
+
}
|
|
341
|
+
this._state = e3;
|
|
342
|
+
}
|
|
343
|
+
_handleHideLinkUnderline(e3) {
|
|
344
|
+
this._clearCurrentLink();
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
t2.LinkRenderLayer = n;
|
|
348
|
+
}, 630: (e2, t2, i2) => {
|
|
349
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.SelectionRenderLayer = void 0;
|
|
350
|
+
const s2 = i2(903);
|
|
351
|
+
class r extends s2.BaseRenderLayer {
|
|
352
|
+
constructor(e3, t3, i3, s3, r2, o, n, a) {
|
|
353
|
+
super(e3, t3, "selection", i3, true, a, s3, n, o, r2), this._clearState();
|
|
354
|
+
}
|
|
355
|
+
_clearState() {
|
|
356
|
+
this._state = { start: void 0, end: void 0, columnSelectMode: void 0, ydisp: void 0 };
|
|
357
|
+
}
|
|
358
|
+
resize(e3) {
|
|
359
|
+
super.resize(e3), this._selectionModel.selectionStart && this._selectionModel.selectionEnd && (this._clearState(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode));
|
|
360
|
+
}
|
|
361
|
+
reset() {
|
|
362
|
+
this._state.start && this._state.end && (this._clearState(), this._clearAll());
|
|
363
|
+
}
|
|
364
|
+
handleBlur() {
|
|
365
|
+
this.reset(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
|
|
366
|
+
}
|
|
367
|
+
handleFocus() {
|
|
368
|
+
this.reset(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
|
|
369
|
+
}
|
|
370
|
+
handleSelectionChanged(e3, t3, i3) {
|
|
371
|
+
super.handleSelectionChanged(e3, t3, i3), this._redrawSelection(e3, t3, i3);
|
|
372
|
+
}
|
|
373
|
+
_redrawSelection(e3, t3, i3) {
|
|
374
|
+
if (!this._didStateChange(e3, t3, i3, this._bufferService.buffer.ydisp)) return;
|
|
375
|
+
if (this._clearAll(), !e3 || !t3) return void this._clearState();
|
|
376
|
+
const s3 = e3[1] - this._bufferService.buffer.ydisp, r2 = t3[1] - this._bufferService.buffer.ydisp, o = Math.max(s3, 0), n = Math.min(r2, this._bufferService.rows - 1);
|
|
377
|
+
if (o >= this._bufferService.rows || n < 0) this._state.ydisp = this._bufferService.buffer.ydisp;
|
|
378
|
+
else {
|
|
379
|
+
if (this._ctx.fillStyle = (this._coreBrowserService.isFocused ? this._themeService.colors.selectionBackgroundTransparent : this._themeService.colors.selectionInactiveBackgroundTransparent).css, i3) {
|
|
380
|
+
const i4 = e3[0], s4 = t3[0] - i4, r3 = n - o + 1;
|
|
381
|
+
this._fillCells(i4, o, s4, r3);
|
|
382
|
+
} else {
|
|
383
|
+
const i4 = s3 === o ? e3[0] : 0, a = o === r2 ? t3[0] : this._bufferService.cols;
|
|
384
|
+
this._fillCells(i4, o, a - i4, 1);
|
|
385
|
+
const h = Math.max(n - o - 1, 0);
|
|
386
|
+
if (this._fillCells(0, o + 1, this._bufferService.cols, h), o !== n) {
|
|
387
|
+
const e4 = r2 === n ? t3[0] : this._bufferService.cols;
|
|
388
|
+
this._fillCells(0, n, e4, 1);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
this._state.start = [e3[0], e3[1]], this._state.end = [t3[0], t3[1]], this._state.columnSelectMode = i3, this._state.ydisp = this._bufferService.buffer.ydisp;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
_didStateChange(e3, t3, i3, s3) {
|
|
395
|
+
return !this._areCoordinatesEqual(e3, this._state.start) || !this._areCoordinatesEqual(t3, this._state.end) || i3 !== this._state.columnSelectMode || s3 !== this._state.ydisp;
|
|
396
|
+
}
|
|
397
|
+
_areCoordinatesEqual(e3, t3) {
|
|
398
|
+
return !(!e3 || !t3) && e3[0] === t3[0] && e3[1] === t3[1];
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
t2.SelectionRenderLayer = r;
|
|
402
|
+
}, 744: (e2, t2, i2) => {
|
|
403
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.TextRenderLayer = void 0;
|
|
404
|
+
const s2 = i2(577), r = i2(147), o = i2(782), n = i2(855), a = i2(903), h = i2(574);
|
|
405
|
+
class l extends a.BaseRenderLayer {
|
|
406
|
+
constructor(e3, t3, i3, s3, r2, n2, a2, l2, c, d) {
|
|
407
|
+
super(e3, t3, "text", i3, s3, d, r2, n2, l2, c), this._characterJoinerService = a2, this._characterWidth = 0, this._characterFont = "", this._characterOverlapCache = {}, this._workCell = new o.CellData(), this._state = new h.GridCache(), this.register(n2.onSpecificOptionChange("allowTransparency", (e4) => this._setTransparency(e4)));
|
|
408
|
+
}
|
|
409
|
+
resize(e3) {
|
|
410
|
+
super.resize(e3);
|
|
411
|
+
const t3 = this._getFont(false, false);
|
|
412
|
+
this._characterWidth === e3.device.char.width && this._characterFont === t3 || (this._characterWidth = e3.device.char.width, this._characterFont = t3, this._characterOverlapCache = {}), this._state.clear(), this._state.resize(this._bufferService.cols, this._bufferService.rows);
|
|
413
|
+
}
|
|
414
|
+
reset() {
|
|
415
|
+
this._state.clear(), this._clearAll();
|
|
416
|
+
}
|
|
417
|
+
_forEachCell(e3, t3, i3) {
|
|
418
|
+
for (let r2 = e3; r2 <= t3; r2++) {
|
|
419
|
+
const e4 = r2 + this._bufferService.buffer.ydisp, t4 = this._bufferService.buffer.lines.get(e4), o2 = this._characterJoinerService.getJoinedCharacters(e4);
|
|
420
|
+
for (let e5 = 0; e5 < this._bufferService.cols; e5++) {
|
|
421
|
+
t4.loadCell(e5, this._workCell);
|
|
422
|
+
let a2 = this._workCell, h2 = false, l2 = e5;
|
|
423
|
+
if (0 !== a2.getWidth()) {
|
|
424
|
+
if (o2.length > 0 && e5 === o2[0][0]) {
|
|
425
|
+
h2 = true;
|
|
426
|
+
const e6 = o2.shift();
|
|
427
|
+
a2 = new s2.JoinedCellData(this._workCell, t4.translateToString(true, e6[0], e6[1]), e6[1] - e6[0]), l2 = e6[1] - 1;
|
|
428
|
+
}
|
|
429
|
+
!h2 && this._isOverlapping(a2) && l2 < t4.length - 1 && t4.getCodePoint(l2 + 1) === n.NULL_CELL_CODE && (a2.content &= -12582913, a2.content |= 2 << 22), i3(a2, e5, r2), e5 = l2;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
_drawBackground(e3, t3) {
|
|
435
|
+
const i3 = this._ctx, s3 = this._bufferService.cols;
|
|
436
|
+
let o2 = 0, n2 = 0, a2 = null;
|
|
437
|
+
i3.save(), this._forEachCell(e3, t3, (e4, t4, h2) => {
|
|
438
|
+
let l2 = null;
|
|
439
|
+
e4.isInverse() ? l2 = e4.isFgDefault() ? this._themeService.colors.foreground.css : e4.isFgRGB() ? `rgb(${r.AttributeData.toColorRGB(e4.getFgColor()).join(",")})` : this._themeService.colors.ansi[e4.getFgColor()].css : e4.isBgRGB() ? l2 = `rgb(${r.AttributeData.toColorRGB(e4.getBgColor()).join(",")})` : e4.isBgPalette() && (l2 = this._themeService.colors.ansi[e4.getBgColor()].css);
|
|
440
|
+
let c = false;
|
|
441
|
+
this._decorationService.forEachDecorationAtCell(t4, this._bufferService.buffer.ydisp + h2, void 0, (e5) => {
|
|
442
|
+
"top" !== e5.options.layer && c || (e5.backgroundColorRGB && (l2 = e5.backgroundColorRGB.css), c = "top" === e5.options.layer);
|
|
443
|
+
}), null === a2 && (o2 = t4, n2 = h2), h2 !== n2 ? (i3.fillStyle = a2 || "", this._fillCells(o2, n2, s3 - o2, 1), o2 = t4, n2 = h2) : a2 !== l2 && (i3.fillStyle = a2 || "", this._fillCells(o2, n2, t4 - o2, 1), o2 = t4, n2 = h2), a2 = l2;
|
|
444
|
+
}), null !== a2 && (i3.fillStyle = a2, this._fillCells(o2, n2, s3 - o2, 1)), i3.restore();
|
|
445
|
+
}
|
|
446
|
+
_drawForeground(e3, t3) {
|
|
447
|
+
this._forEachCell(e3, t3, (e4, t4, i3) => this._drawChars(e4, t4, i3));
|
|
448
|
+
}
|
|
449
|
+
handleGridChanged(e3, t3) {
|
|
450
|
+
0 !== this._state.cache.length && (this._charAtlas && this._charAtlas.beginFrame(), this._clearCells(0, e3, this._bufferService.cols, t3 - e3 + 1), this._drawBackground(e3, t3), this._drawForeground(e3, t3));
|
|
451
|
+
}
|
|
452
|
+
_isOverlapping(e3) {
|
|
453
|
+
if (1 !== e3.getWidth()) return false;
|
|
454
|
+
if (e3.getCode() < 256) return false;
|
|
455
|
+
const t3 = e3.getChars();
|
|
456
|
+
if (this._characterOverlapCache.hasOwnProperty(t3)) return this._characterOverlapCache[t3];
|
|
457
|
+
this._ctx.save(), this._ctx.font = this._characterFont;
|
|
458
|
+
const i3 = Math.floor(this._ctx.measureText(t3).width) > this._characterWidth;
|
|
459
|
+
return this._ctx.restore(), this._characterOverlapCache[t3] = i3, i3;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
t2.TextRenderLayer = l;
|
|
463
|
+
}, 274: (e2, t2, i2) => {
|
|
464
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CellColorResolver = void 0;
|
|
465
|
+
const s2 = i2(855), r = i2(160), o = i2(374);
|
|
466
|
+
let n, a = 0, h = 0, l = false, c = false, d = false, _ = 0;
|
|
467
|
+
t2.CellColorResolver = class {
|
|
468
|
+
constructor(e3, t3, i3, s3, r2, o2) {
|
|
469
|
+
this._terminal = e3, this._optionService = t3, this._selectionRenderModel = i3, this._decorationService = s3, this._coreBrowserService = r2, this._themeService = o2, this.result = { fg: 0, bg: 0, ext: 0 };
|
|
470
|
+
}
|
|
471
|
+
resolve(e3, t3, i3, u) {
|
|
472
|
+
if (this.result.bg = e3.bg, this.result.fg = e3.fg, this.result.ext = 268435456 & e3.bg ? e3.extended.ext : 0, h = 0, a = 0, c = false, l = false, d = false, n = this._themeService.colors, _ = 0, e3.getCode() !== s2.NULL_CELL_CODE && 4 === e3.extended.underlineStyle) {
|
|
473
|
+
const e4 = Math.max(1, Math.floor(this._optionService.rawOptions.fontSize * this._coreBrowserService.dpr / 15));
|
|
474
|
+
_ = t3 * u % (2 * Math.round(e4));
|
|
475
|
+
}
|
|
476
|
+
if (this._decorationService.forEachDecorationAtCell(t3, i3, "bottom", (e4) => {
|
|
477
|
+
e4.backgroundColorRGB && (h = e4.backgroundColorRGB.rgba >> 8 & 16777215, c = true), e4.foregroundColorRGB && (a = e4.foregroundColorRGB.rgba >> 8 & 16777215, l = true);
|
|
478
|
+
}), d = this._selectionRenderModel.isCellSelected(this._terminal, t3, i3), d) {
|
|
479
|
+
if (67108864 & this.result.fg || 0 != (50331648 & this.result.bg)) {
|
|
480
|
+
if (67108864 & this.result.fg) switch (50331648 & this.result.fg) {
|
|
481
|
+
case 16777216:
|
|
482
|
+
case 33554432:
|
|
483
|
+
h = this._themeService.colors.ansi[255 & this.result.fg].rgba;
|
|
484
|
+
break;
|
|
485
|
+
case 50331648:
|
|
486
|
+
h = (16777215 & this.result.fg) << 8 | 255;
|
|
487
|
+
break;
|
|
488
|
+
default:
|
|
489
|
+
h = this._themeService.colors.foreground.rgba;
|
|
490
|
+
}
|
|
491
|
+
else switch (50331648 & this.result.bg) {
|
|
492
|
+
case 16777216:
|
|
493
|
+
case 33554432:
|
|
494
|
+
h = this._themeService.colors.ansi[255 & this.result.bg].rgba;
|
|
495
|
+
break;
|
|
496
|
+
case 50331648:
|
|
497
|
+
h = (16777215 & this.result.bg) << 8 | 255;
|
|
498
|
+
}
|
|
499
|
+
h = r.rgba.blend(h, 4294967040 & (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba | 128) >> 8 & 16777215;
|
|
500
|
+
} else h = (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215;
|
|
501
|
+
if (c = true, n.selectionForeground && (a = n.selectionForeground.rgba >> 8 & 16777215, l = true), (0, o.treatGlyphAsBackgroundColor)(e3.getCode())) {
|
|
502
|
+
if (67108864 & this.result.fg && 0 == (50331648 & this.result.bg)) a = (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215;
|
|
503
|
+
else {
|
|
504
|
+
if (67108864 & this.result.fg) switch (50331648 & this.result.bg) {
|
|
505
|
+
case 16777216:
|
|
506
|
+
case 33554432:
|
|
507
|
+
a = this._themeService.colors.ansi[255 & this.result.bg].rgba;
|
|
508
|
+
break;
|
|
509
|
+
case 50331648:
|
|
510
|
+
a = (16777215 & this.result.bg) << 8 | 255;
|
|
511
|
+
}
|
|
512
|
+
else switch (50331648 & this.result.fg) {
|
|
513
|
+
case 16777216:
|
|
514
|
+
case 33554432:
|
|
515
|
+
a = this._themeService.colors.ansi[255 & this.result.fg].rgba;
|
|
516
|
+
break;
|
|
517
|
+
case 50331648:
|
|
518
|
+
a = (16777215 & this.result.fg) << 8 | 255;
|
|
519
|
+
break;
|
|
520
|
+
default:
|
|
521
|
+
a = this._themeService.colors.foreground.rgba;
|
|
522
|
+
}
|
|
523
|
+
a = r.rgba.blend(a, 4294967040 & (this._coreBrowserService.isFocused ? n.selectionBackgroundOpaque : n.selectionInactiveBackgroundOpaque).rgba | 128) >> 8 & 16777215;
|
|
524
|
+
}
|
|
525
|
+
l = true;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
this._decorationService.forEachDecorationAtCell(t3, i3, "top", (e4) => {
|
|
529
|
+
e4.backgroundColorRGB && (h = e4.backgroundColorRGB.rgba >> 8 & 16777215, c = true), e4.foregroundColorRGB && (a = e4.foregroundColorRGB.rgba >> 8 & 16777215, l = true);
|
|
530
|
+
}), c && (h = d ? -16777216 & e3.bg & -134217729 | h | 50331648 : -16777216 & e3.bg | h | 50331648), l && (a = -16777216 & e3.fg & -67108865 | a | 50331648), 67108864 & this.result.fg && (c && !l && (a = 0 == (50331648 & this.result.bg) ? -134217728 & this.result.fg | 16777215 & n.background.rgba >> 8 | 50331648 : -134217728 & this.result.fg | 67108863 & this.result.bg, l = true), !c && l && (h = 0 == (50331648 & this.result.fg) ? -67108864 & this.result.bg | 16777215 & n.foreground.rgba >> 8 | 50331648 : -67108864 & this.result.bg | 67108863 & this.result.fg, c = true)), n = void 0, this.result.bg = c ? h : this.result.bg, this.result.fg = l ? a : this.result.fg, this.result.ext &= 536870911, this.result.ext |= _ << 29 & 3758096384;
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
}, 627: (e2, t2, i2) => {
|
|
534
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.removeTerminalFromCache = t2.acquireTextureAtlas = void 0;
|
|
535
|
+
const s2 = i2(509), r = i2(197), o = [];
|
|
536
|
+
t2.acquireTextureAtlas = function(e3, t3, i3, n, a, h, l, c) {
|
|
537
|
+
const d = (0, r.generateConfig)(n, a, h, l, t3, i3, c);
|
|
538
|
+
for (let t4 = 0; t4 < o.length; t4++) {
|
|
539
|
+
const i4 = o[t4], s3 = i4.ownedBy.indexOf(e3);
|
|
540
|
+
if (s3 >= 0) {
|
|
541
|
+
if ((0, r.configEquals)(i4.config, d)) return i4.atlas;
|
|
542
|
+
1 === i4.ownedBy.length ? (i4.atlas.dispose(), o.splice(t4, 1)) : i4.ownedBy.splice(s3, 1);
|
|
543
|
+
break;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
for (let t4 = 0; t4 < o.length; t4++) {
|
|
547
|
+
const i4 = o[t4];
|
|
548
|
+
if ((0, r.configEquals)(i4.config, d)) return i4.ownedBy.push(e3), i4.atlas;
|
|
549
|
+
}
|
|
550
|
+
const _ = e3._core, u = { atlas: new s2.TextureAtlas(document, d, _.unicodeService), config: d, ownedBy: [e3] };
|
|
551
|
+
return o.push(u), u.atlas;
|
|
552
|
+
}, t2.removeTerminalFromCache = function(e3) {
|
|
553
|
+
for (let t3 = 0; t3 < o.length; t3++) {
|
|
554
|
+
const i3 = o[t3].ownedBy.indexOf(e3);
|
|
555
|
+
if (-1 !== i3) {
|
|
556
|
+
1 === o[t3].ownedBy.length ? (o[t3].atlas.dispose(), o.splice(t3, 1)) : o[t3].ownedBy.splice(i3, 1);
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
}, 197: (e2, t2, i2) => {
|
|
562
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.is256Color = t2.configEquals = t2.generateConfig = void 0;
|
|
563
|
+
const s2 = i2(160);
|
|
564
|
+
t2.generateConfig = function(e3, t3, i3, r, o, n, a) {
|
|
565
|
+
const h = { foreground: n.foreground, background: n.background, cursor: s2.NULL_COLOR, cursorAccent: s2.NULL_COLOR, selectionForeground: s2.NULL_COLOR, selectionBackgroundTransparent: s2.NULL_COLOR, selectionBackgroundOpaque: s2.NULL_COLOR, selectionInactiveBackgroundTransparent: s2.NULL_COLOR, selectionInactiveBackgroundOpaque: s2.NULL_COLOR, ansi: n.ansi.slice(), contrastCache: n.contrastCache, halfContrastCache: n.halfContrastCache };
|
|
566
|
+
return { customGlyphs: o.customGlyphs, devicePixelRatio: a, letterSpacing: o.letterSpacing, lineHeight: o.lineHeight, deviceCellWidth: e3, deviceCellHeight: t3, deviceCharWidth: i3, deviceCharHeight: r, fontFamily: o.fontFamily, fontSize: o.fontSize, fontWeight: o.fontWeight, fontWeightBold: o.fontWeightBold, allowTransparency: o.allowTransparency, drawBoldTextInBrightColors: o.drawBoldTextInBrightColors, minimumContrastRatio: o.minimumContrastRatio, colors: h };
|
|
567
|
+
}, t2.configEquals = function(e3, t3) {
|
|
568
|
+
for (let i3 = 0; i3 < e3.colors.ansi.length; i3++) if (e3.colors.ansi[i3].rgba !== t3.colors.ansi[i3].rgba) return false;
|
|
569
|
+
return e3.devicePixelRatio === t3.devicePixelRatio && e3.customGlyphs === t3.customGlyphs && e3.lineHeight === t3.lineHeight && e3.letterSpacing === t3.letterSpacing && e3.fontFamily === t3.fontFamily && e3.fontSize === t3.fontSize && e3.fontWeight === t3.fontWeight && e3.fontWeightBold === t3.fontWeightBold && e3.allowTransparency === t3.allowTransparency && e3.deviceCharWidth === t3.deviceCharWidth && e3.deviceCharHeight === t3.deviceCharHeight && e3.drawBoldTextInBrightColors === t3.drawBoldTextInBrightColors && e3.minimumContrastRatio === t3.minimumContrastRatio && e3.colors.foreground.rgba === t3.colors.foreground.rgba && e3.colors.background.rgba === t3.colors.background.rgba;
|
|
570
|
+
}, t2.is256Color = function(e3) {
|
|
571
|
+
return 16777216 == (50331648 & e3) || 33554432 == (50331648 & e3);
|
|
572
|
+
};
|
|
573
|
+
}, 237: (e2, t2, i2) => {
|
|
574
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.TEXT_BASELINE = t2.DIM_OPACITY = t2.INVERTED_DEFAULT_COLOR = void 0;
|
|
575
|
+
const s2 = i2(399);
|
|
576
|
+
t2.INVERTED_DEFAULT_COLOR = 257, t2.DIM_OPACITY = 0.5, t2.TEXT_BASELINE = s2.isFirefox || s2.isLegacyEdge ? "bottom" : "ideographic";
|
|
577
|
+
}, 457: (e2, t2) => {
|
|
578
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CursorBlinkStateManager = void 0;
|
|
579
|
+
t2.CursorBlinkStateManager = class {
|
|
580
|
+
constructor(e3, t3) {
|
|
581
|
+
this._renderCallback = e3, this._coreBrowserService = t3, this.isCursorVisible = true, this._coreBrowserService.isFocused && this._restartInterval();
|
|
582
|
+
}
|
|
583
|
+
get isPaused() {
|
|
584
|
+
return !(this._blinkStartTimeout || this._blinkInterval);
|
|
585
|
+
}
|
|
586
|
+
dispose() {
|
|
587
|
+
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);
|
|
588
|
+
}
|
|
589
|
+
restartBlinkAnimation() {
|
|
590
|
+
this.isPaused || (this._animationTimeRestarted = Date.now(), this.isCursorVisible = true, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
|
|
591
|
+
this._renderCallback(), this._animationFrame = void 0;
|
|
592
|
+
})));
|
|
593
|
+
}
|
|
594
|
+
_restartInterval(e3 = 600) {
|
|
595
|
+
this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout = this._coreBrowserService.window.setTimeout(() => {
|
|
596
|
+
if (this._animationTimeRestarted) {
|
|
597
|
+
const e4 = 600 - (Date.now() - this._animationTimeRestarted);
|
|
598
|
+
if (this._animationTimeRestarted = void 0, e4 > 0) return void this._restartInterval(e4);
|
|
599
|
+
}
|
|
600
|
+
this.isCursorVisible = false, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
|
|
601
|
+
this._renderCallback(), this._animationFrame = void 0;
|
|
602
|
+
}), this._blinkInterval = this._coreBrowserService.window.setInterval(() => {
|
|
603
|
+
if (this._animationTimeRestarted) {
|
|
604
|
+
const e4 = 600 - (Date.now() - this._animationTimeRestarted);
|
|
605
|
+
return this._animationTimeRestarted = void 0, void this._restartInterval(e4);
|
|
606
|
+
}
|
|
607
|
+
this.isCursorVisible = !this.isCursorVisible, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
|
|
608
|
+
this._renderCallback(), this._animationFrame = void 0;
|
|
609
|
+
});
|
|
610
|
+
}, 600);
|
|
611
|
+
}, e3);
|
|
612
|
+
}
|
|
613
|
+
pause() {
|
|
614
|
+
this.isCursorVisible = true, 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);
|
|
615
|
+
}
|
|
616
|
+
resume() {
|
|
617
|
+
this.pause(), this._animationTimeRestarted = void 0, this._restartInterval(), this.restartBlinkAnimation();
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
}, 860: (e2, t2, i2) => {
|
|
621
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.tryDrawCustomChar = t2.powerlineDefinitions = t2.boxDrawingDefinitions = t2.blockElementDefinitions = void 0;
|
|
622
|
+
const s2 = i2(374);
|
|
623
|
+
t2.blockElementDefinitions = { "▀": [{ x: 0, y: 0, w: 8, h: 4 }], "▁": [{ x: 0, y: 7, w: 8, h: 1 }], "▂": [{ x: 0, y: 6, w: 8, h: 2 }], "▃": [{ x: 0, y: 5, w: 8, h: 3 }], "▄": [{ x: 0, y: 4, w: 8, h: 4 }], "▅": [{ x: 0, y: 3, w: 8, h: 5 }], "▆": [{ x: 0, y: 2, w: 8, h: 6 }], "▇": [{ x: 0, y: 1, w: 8, h: 7 }], "█": [{ x: 0, y: 0, w: 8, h: 8 }], "▉": [{ x: 0, y: 0, w: 7, h: 8 }], "▊": [{ x: 0, y: 0, w: 6, h: 8 }], "▋": [{ x: 0, y: 0, w: 5, h: 8 }], "▌": [{ x: 0, y: 0, w: 4, h: 8 }], "▍": [{ x: 0, y: 0, w: 3, h: 8 }], "▎": [{ x: 0, y: 0, w: 2, h: 8 }], "▏": [{ x: 0, y: 0, w: 1, h: 8 }], "▐": [{ x: 4, y: 0, w: 4, h: 8 }], "▔": [{ x: 0, y: 0, w: 8, h: 1 }], "▕": [{ x: 7, y: 0, w: 1, h: 8 }], "▖": [{ x: 0, y: 4, w: 4, h: 4 }], "▗": [{ x: 4, y: 4, w: 4, h: 4 }], "▘": [{ x: 0, y: 0, w: 4, h: 4 }], "▙": [{ x: 0, y: 0, w: 4, h: 8 }, { x: 0, y: 4, w: 8, h: 4 }], "▚": [{ x: 0, y: 0, w: 4, h: 4 }, { x: 4, y: 4, w: 4, h: 4 }], "▛": [{ x: 0, y: 0, w: 4, h: 8 }, { x: 4, y: 0, w: 4, h: 4 }], "▜": [{ x: 0, y: 0, w: 8, h: 4 }, { x: 4, y: 0, w: 4, h: 8 }], "▝": [{ x: 4, y: 0, w: 4, h: 4 }], "▞": [{ x: 4, y: 0, w: 4, h: 4 }, { x: 0, y: 4, w: 4, h: 4 }], "▟": [{ x: 4, y: 0, w: 4, h: 8 }, { x: 0, y: 4, w: 8, h: 4 }], "🭰": [{ x: 1, y: 0, w: 1, h: 8 }], "🭱": [{ x: 2, y: 0, w: 1, h: 8 }], "🭲": [{ x: 3, y: 0, w: 1, h: 8 }], "🭳": [{ x: 4, y: 0, w: 1, h: 8 }], "🭴": [{ x: 5, y: 0, w: 1, h: 8 }], "🭵": [{ x: 6, y: 0, w: 1, h: 8 }], "🭶": [{ x: 0, y: 1, w: 8, h: 1 }], "🭷": [{ x: 0, y: 2, w: 8, h: 1 }], "🭸": [{ x: 0, y: 3, w: 8, h: 1 }], "🭹": [{ x: 0, y: 4, w: 8, h: 1 }], "🭺": [{ x: 0, y: 5, w: 8, h: 1 }], "🭻": [{ x: 0, y: 6, w: 8, h: 1 }], "🭼": [{ x: 0, y: 0, w: 1, h: 8 }, { x: 0, y: 7, w: 8, h: 1 }], "🭽": [{ x: 0, y: 0, w: 1, h: 8 }, { x: 0, y: 0, w: 8, h: 1 }], "🭾": [{ x: 7, y: 0, w: 1, h: 8 }, { x: 0, y: 0, w: 8, h: 1 }], "🭿": [{ x: 7, y: 0, w: 1, h: 8 }, { x: 0, y: 7, w: 8, h: 1 }], "🮀": [{ x: 0, y: 0, w: 8, h: 1 }, { x: 0, y: 7, w: 8, h: 1 }], "🮁": [{ x: 0, y: 0, w: 8, h: 1 }, { x: 0, y: 2, w: 8, h: 1 }, { x: 0, y: 4, w: 8, h: 1 }, { x: 0, y: 7, w: 8, h: 1 }], "🮂": [{ x: 0, y: 0, w: 8, h: 2 }], "🮃": [{ x: 0, y: 0, w: 8, h: 3 }], "🮄": [{ x: 0, y: 0, w: 8, h: 5 }], "🮅": [{ x: 0, y: 0, w: 8, h: 6 }], "🮆": [{ x: 0, y: 0, w: 8, h: 7 }], "🮇": [{ x: 6, y: 0, w: 2, h: 8 }], "🮈": [{ x: 5, y: 0, w: 3, h: 8 }], "🮉": [{ x: 3, y: 0, w: 5, h: 8 }], "🮊": [{ x: 2, y: 0, w: 6, h: 8 }], "🮋": [{ x: 1, y: 0, w: 7, h: 8 }], "🮕": [{ x: 0, y: 0, w: 2, h: 2 }, { x: 4, y: 0, w: 2, h: 2 }, { x: 2, y: 2, w: 2, h: 2 }, { x: 6, y: 2, w: 2, h: 2 }, { x: 0, y: 4, w: 2, h: 2 }, { x: 4, y: 4, w: 2, h: 2 }, { x: 2, y: 6, w: 2, h: 2 }, { x: 6, y: 6, w: 2, h: 2 }], "🮖": [{ x: 2, y: 0, w: 2, h: 2 }, { x: 6, y: 0, w: 2, h: 2 }, { x: 0, y: 2, w: 2, h: 2 }, { x: 4, y: 2, w: 2, h: 2 }, { x: 2, y: 4, w: 2, h: 2 }, { x: 6, y: 4, w: 2, h: 2 }, { x: 0, y: 6, w: 2, h: 2 }, { x: 4, y: 6, w: 2, h: 2 }], "🮗": [{ x: 0, y: 2, w: 8, h: 2 }, { x: 0, y: 6, w: 8, h: 2 }] };
|
|
624
|
+
const r = { "░": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]], "▒": [[1, 0], [0, 0], [0, 1], [0, 0]], "▓": [[0, 1], [1, 1], [1, 0], [1, 1]] };
|
|
625
|
+
t2.boxDrawingDefinitions = { "─": { 1: "M0,.5 L1,.5" }, "━": { 3: "M0,.5 L1,.5" }, "│": { 1: "M.5,0 L.5,1" }, "┃": { 3: "M.5,0 L.5,1" }, "┌": { 1: "M0.5,1 L.5,.5 L1,.5" }, "┏": { 3: "M0.5,1 L.5,.5 L1,.5" }, "┐": { 1: "M0,.5 L.5,.5 L.5,1" }, "┓": { 3: "M0,.5 L.5,.5 L.5,1" }, "└": { 1: "M.5,0 L.5,.5 L1,.5" }, "┗": { 3: "M.5,0 L.5,.5 L1,.5" }, "┘": { 1: "M.5,0 L.5,.5 L0,.5" }, "┛": { 3: "M.5,0 L.5,.5 L0,.5" }, "├": { 1: "M.5,0 L.5,1 M.5,.5 L1,.5" }, "┣": { 3: "M.5,0 L.5,1 M.5,.5 L1,.5" }, "┤": { 1: "M.5,0 L.5,1 M.5,.5 L0,.5" }, "┫": { 3: "M.5,0 L.5,1 M.5,.5 L0,.5" }, "┬": { 1: "M0,.5 L1,.5 M.5,.5 L.5,1" }, "┳": { 3: "M0,.5 L1,.5 M.5,.5 L.5,1" }, "┴": { 1: "M0,.5 L1,.5 M.5,.5 L.5,0" }, "┻": { 3: "M0,.5 L1,.5 M.5,.5 L.5,0" }, "┼": { 1: "M0,.5 L1,.5 M.5,0 L.5,1" }, "╋": { 3: "M0,.5 L1,.5 M.5,0 L.5,1" }, "╴": { 1: "M.5,.5 L0,.5" }, "╸": { 3: "M.5,.5 L0,.5" }, "╵": { 1: "M.5,.5 L.5,0" }, "╹": { 3: "M.5,.5 L.5,0" }, "╶": { 1: "M.5,.5 L1,.5" }, "╺": { 3: "M.5,.5 L1,.5" }, "╷": { 1: "M.5,.5 L.5,1" }, "╻": { 3: "M.5,.5 L.5,1" }, "═": { 1: (e3, t3) => `M0,${0.5 - t3} L1,${0.5 - t3} M0,${0.5 + t3} L1,${0.5 + t3}` }, "║": { 1: (e3, t3) => `M${0.5 - e3},0 L${0.5 - e3},1 M${0.5 + e3},0 L${0.5 + e3},1` }, "╒": { 1: (e3, t3) => `M.5,1 L.5,${0.5 - t3} L1,${0.5 - t3} M.5,${0.5 + t3} L1,${0.5 + t3}` }, "╓": { 1: (e3, t3) => `M${0.5 - e3},1 L${0.5 - e3},.5 L1,.5 M${0.5 + e3},.5 L${0.5 + e3},1` }, "╔": { 1: (e3, t3) => `M1,${0.5 - t3} L${0.5 - e3},${0.5 - t3} L${0.5 - e3},1 M1,${0.5 + t3} L${0.5 + e3},${0.5 + t3} L${0.5 + e3},1` }, "╕": { 1: (e3, t3) => `M0,${0.5 - t3} L.5,${0.5 - t3} L.5,1 M0,${0.5 + t3} L.5,${0.5 + t3}` }, "╖": { 1: (e3, t3) => `M${0.5 + e3},1 L${0.5 + e3},.5 L0,.5 M${0.5 - e3},.5 L${0.5 - e3},1` }, "╗": { 1: (e3, t3) => `M0,${0.5 + t3} L${0.5 - e3},${0.5 + t3} L${0.5 - e3},1 M0,${0.5 - t3} L${0.5 + e3},${0.5 - t3} L${0.5 + e3},1` }, "╘": { 1: (e3, t3) => `M.5,0 L.5,${0.5 + t3} L1,${0.5 + t3} M.5,${0.5 - t3} L1,${0.5 - t3}` }, "╙": { 1: (e3, t3) => `M1,.5 L${0.5 - e3},.5 L${0.5 - e3},0 M${0.5 + e3},.5 L${0.5 + e3},0` }, "╚": { 1: (e3, t3) => `M1,${0.5 - t3} L${0.5 + e3},${0.5 - t3} L${0.5 + e3},0 M1,${0.5 + t3} L${0.5 - e3},${0.5 + t3} L${0.5 - e3},0` }, "╛": { 1: (e3, t3) => `M0,${0.5 + t3} L.5,${0.5 + t3} L.5,0 M0,${0.5 - t3} L.5,${0.5 - t3}` }, "╜": { 1: (e3, t3) => `M0,.5 L${0.5 + e3},.5 L${0.5 + e3},0 M${0.5 - e3},.5 L${0.5 - e3},0` }, "╝": { 1: (e3, t3) => `M0,${0.5 - t3} L${0.5 - e3},${0.5 - t3} L${0.5 - e3},0 M0,${0.5 + t3} L${0.5 + e3},${0.5 + t3} L${0.5 + e3},0` }, "╞": { 1: (e3, t3) => `M.5,0 L.5,1 M.5,${0.5 - t3} L1,${0.5 - t3} M.5,${0.5 + t3} L1,${0.5 + t3}` }, "╟": { 1: (e3, t3) => `M${0.5 - e3},0 L${0.5 - e3},1 M${0.5 + e3},0 L${0.5 + e3},1 M${0.5 + e3},.5 L1,.5` }, "╠": { 1: (e3, t3) => `M${0.5 - e3},0 L${0.5 - e3},1 M1,${0.5 + t3} L${0.5 + e3},${0.5 + t3} L${0.5 + e3},1 M1,${0.5 - t3} L${0.5 + e3},${0.5 - t3} L${0.5 + e3},0` }, "╡": { 1: (e3, t3) => `M.5,0 L.5,1 M0,${0.5 - t3} L.5,${0.5 - t3} M0,${0.5 + t3} L.5,${0.5 + t3}` }, "╢": { 1: (e3, t3) => `M0,.5 L${0.5 - e3},.5 M${0.5 - e3},0 L${0.5 - e3},1 M${0.5 + e3},0 L${0.5 + e3},1` }, "╣": { 1: (e3, t3) => `M${0.5 + e3},0 L${0.5 + e3},1 M0,${0.5 + t3} L${0.5 - e3},${0.5 + t3} L${0.5 - e3},1 M0,${0.5 - t3} L${0.5 - e3},${0.5 - t3} L${0.5 - e3},0` }, "╤": { 1: (e3, t3) => `M0,${0.5 - t3} L1,${0.5 - t3} M0,${0.5 + t3} L1,${0.5 + t3} M.5,${0.5 + t3} L.5,1` }, "╥": { 1: (e3, t3) => `M0,.5 L1,.5 M${0.5 - e3},.5 L${0.5 - e3},1 M${0.5 + e3},.5 L${0.5 + e3},1` }, "╦": { 1: (e3, t3) => `M0,${0.5 - t3} L1,${0.5 - t3} M0,${0.5 + t3} L${0.5 - e3},${0.5 + t3} L${0.5 - e3},1 M1,${0.5 + t3} L${0.5 + e3},${0.5 + t3} L${0.5 + e3},1` }, "╧": { 1: (e3, t3) => `M.5,0 L.5,${0.5 - t3} M0,${0.5 - t3} L1,${0.5 - t3} M0,${0.5 + t3} L1,${0.5 + t3}` }, "╨": { 1: (e3, t3) => `M0,.5 L1,.5 M${0.5 - e3},.5 L${0.5 - e3},0 M${0.5 + e3},.5 L${0.5 + e3},0` }, "╩": { 1: (e3, t3) => `M0,${0.5 + t3} L1,${0.5 + t3} M0,${0.5 - t3} L${0.5 - e3},${0.5 - t3} L${0.5 - e3},0 M1,${0.5 - t3} L${0.5 + e3},${0.5 - t3} L${0.5 + e3},0` }, "╪": { 1: (e3, t3) => `M.5,0 L.5,1 M0,${0.5 - t3} L1,${0.5 - t3} M0,${0.5 + t3} L1,${0.5 + t3}` }, "╫": { 1: (e3, t3) => `M0,.5 L1,.5 M${0.5 - e3},0 L${0.5 - e3},1 M${0.5 + e3},0 L${0.5 + e3},1` }, "╬": { 1: (e3, t3) => `M0,${0.5 + t3} L${0.5 - e3},${0.5 + t3} L${0.5 - e3},1 M1,${0.5 + t3} L${0.5 + e3},${0.5 + t3} L${0.5 + e3},1 M0,${0.5 - t3} L${0.5 - e3},${0.5 - t3} L${0.5 - e3},0 M1,${0.5 - t3} L${0.5 + e3},${0.5 - t3} L${0.5 + e3},0` }, "╱": { 1: "M1,0 L0,1" }, "╲": { 1: "M0,0 L1,1" }, "╳": { 1: "M1,0 L0,1 M0,0 L1,1" }, "╼": { 1: "M.5,.5 L0,.5", 3: "M.5,.5 L1,.5" }, "╽": { 1: "M.5,.5 L.5,0", 3: "M.5,.5 L.5,1" }, "╾": { 1: "M.5,.5 L1,.5", 3: "M.5,.5 L0,.5" }, "╿": { 1: "M.5,.5 L.5,1", 3: "M.5,.5 L.5,0" }, "┍": { 1: "M.5,.5 L.5,1", 3: "M.5,.5 L1,.5" }, "┎": { 1: "M.5,.5 L1,.5", 3: "M.5,.5 L.5,1" }, "┑": { 1: "M.5,.5 L.5,1", 3: "M.5,.5 L0,.5" }, "┒": { 1: "M.5,.5 L0,.5", 3: "M.5,.5 L.5,1" }, "┕": { 1: "M.5,.5 L.5,0", 3: "M.5,.5 L1,.5" }, "┖": { 1: "M.5,.5 L1,.5", 3: "M.5,.5 L.5,0" }, "┙": { 1: "M.5,.5 L.5,0", 3: "M.5,.5 L0,.5" }, "┚": { 1: "M.5,.5 L0,.5", 3: "M.5,.5 L.5,0" }, "┝": { 1: "M.5,0 L.5,1", 3: "M.5,.5 L1,.5" }, "┞": { 1: "M0.5,1 L.5,.5 L1,.5", 3: "M.5,.5 L.5,0" }, "┟": { 1: "M.5,0 L.5,.5 L1,.5", 3: "M.5,.5 L.5,1" }, "┠": { 1: "M.5,.5 L1,.5", 3: "M.5,0 L.5,1" }, "┡": { 1: "M.5,.5 L.5,1", 3: "M.5,0 L.5,.5 L1,.5" }, "┢": { 1: "M.5,.5 L.5,0", 3: "M0.5,1 L.5,.5 L1,.5" }, "┥": { 1: "M.5,0 L.5,1", 3: "M.5,.5 L0,.5" }, "┦": { 1: "M0,.5 L.5,.5 L.5,1", 3: "M.5,.5 L.5,0" }, "┧": { 1: "M.5,0 L.5,.5 L0,.5", 3: "M.5,.5 L.5,1" }, "┨": { 1: "M.5,.5 L0,.5", 3: "M.5,0 L.5,1" }, "┩": { 1: "M.5,.5 L.5,1", 3: "M.5,0 L.5,.5 L0,.5" }, "┪": { 1: "M.5,.5 L.5,0", 3: "M0,.5 L.5,.5 L.5,1" }, "┭": { 1: "M0.5,1 L.5,.5 L1,.5", 3: "M.5,.5 L0,.5" }, "┮": { 1: "M0,.5 L.5,.5 L.5,1", 3: "M.5,.5 L1,.5" }, "┯": { 1: "M.5,.5 L.5,1", 3: "M0,.5 L1,.5" }, "┰": { 1: "M0,.5 L1,.5", 3: "M.5,.5 L.5,1" }, "┱": { 1: "M.5,.5 L1,.5", 3: "M0,.5 L.5,.5 L.5,1" }, "┲": { 1: "M.5,.5 L0,.5", 3: "M0.5,1 L.5,.5 L1,.5" }, "┵": { 1: "M.5,0 L.5,.5 L1,.5", 3: "M.5,.5 L0,.5" }, "┶": { 1: "M.5,0 L.5,.5 L0,.5", 3: "M.5,.5 L1,.5" }, "┷": { 1: "M.5,.5 L.5,0", 3: "M0,.5 L1,.5" }, "┸": { 1: "M0,.5 L1,.5", 3: "M.5,.5 L.5,0" }, "┹": { 1: "M.5,.5 L1,.5", 3: "M.5,0 L.5,.5 L0,.5" }, "┺": { 1: "M.5,.5 L0,.5", 3: "M.5,0 L.5,.5 L1,.5" }, "┽": { 1: "M.5,0 L.5,1 M.5,.5 L1,.5", 3: "M.5,.5 L0,.5" }, "┾": { 1: "M.5,0 L.5,1 M.5,.5 L0,.5", 3: "M.5,.5 L1,.5" }, "┿": { 1: "M.5,0 L.5,1", 3: "M0,.5 L1,.5" }, "╀": { 1: "M0,.5 L1,.5 M.5,.5 L.5,1", 3: "M.5,.5 L.5,0" }, "╁": { 1: "M.5,.5 L.5,0 M0,.5 L1,.5", 3: "M.5,.5 L.5,1" }, "╂": { 1: "M0,.5 L1,.5", 3: "M.5,0 L.5,1" }, "╃": { 1: "M0.5,1 L.5,.5 L1,.5", 3: "M.5,0 L.5,.5 L0,.5" }, "╄": { 1: "M0,.5 L.5,.5 L.5,1", 3: "M.5,0 L.5,.5 L1,.5" }, "╅": { 1: "M.5,0 L.5,.5 L1,.5", 3: "M0,.5 L.5,.5 L.5,1" }, "╆": { 1: "M.5,0 L.5,.5 L0,.5", 3: "M0.5,1 L.5,.5 L1,.5" }, "╇": { 1: "M.5,.5 L.5,1", 3: "M.5,.5 L.5,0 M0,.5 L1,.5" }, "╈": { 1: "M.5,.5 L.5,0", 3: "M0,.5 L1,.5 M.5,.5 L.5,1" }, "╉": { 1: "M.5,.5 L1,.5", 3: "M.5,0 L.5,1 M.5,.5 L0,.5" }, "╊": { 1: "M.5,.5 L0,.5", 3: "M.5,0 L.5,1 M.5,.5 L1,.5" }, "╌": { 1: "M.1,.5 L.4,.5 M.6,.5 L.9,.5" }, "╍": { 3: "M.1,.5 L.4,.5 M.6,.5 L.9,.5" }, "┄": { 1: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5" }, "┅": { 3: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5" }, "┈": { 1: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5" }, "┉": { 3: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5" }, "╎": { 1: "M.5,.1 L.5,.4 M.5,.6 L.5,.9" }, "╏": { 3: "M.5,.1 L.5,.4 M.5,.6 L.5,.9" }, "┆": { 1: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333" }, "┇": { 3: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333" }, "┊": { 1: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95" }, "┋": { 3: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95" }, "╭": { 1: (e3, t3) => `M.5,1 L.5,${0.5 + t3 / 0.15 * 0.5} C.5,${0.5 + t3 / 0.15 * 0.5},.5,.5,1,.5` }, "╮": { 1: (e3, t3) => `M.5,1 L.5,${0.5 + t3 / 0.15 * 0.5} C.5,${0.5 + t3 / 0.15 * 0.5},.5,.5,0,.5` }, "╯": { 1: (e3, t3) => `M.5,0 L.5,${0.5 - t3 / 0.15 * 0.5} C.5,${0.5 - t3 / 0.15 * 0.5},.5,.5,0,.5` }, "╰": { 1: (e3, t3) => `M.5,0 L.5,${0.5 - t3 / 0.15 * 0.5} C.5,${0.5 - t3 / 0.15 * 0.5},.5,.5,1,.5` } }, t2.powerlineDefinitions = { "": { d: "M0,0 L1,.5 L0,1", type: 0, rightPadding: 2 }, "": { d: "M-1,-.5 L1,.5 L-1,1.5", type: 1, leftPadding: 1, rightPadding: 1 }, "": { d: "M1,0 L0,.5 L1,1", type: 0, leftPadding: 2 }, "": { d: "M2,-.5 L0,.5 L2,1.5", type: 1, leftPadding: 1, rightPadding: 1 }, "": { d: "M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0", type: 0, rightPadding: 1 }, "": { d: "M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0", type: 1, rightPadding: 1 }, "": { d: "M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0", type: 0, leftPadding: 1 }, "": { d: "M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0", type: 1, leftPadding: 1 }, "": { d: "M-.5,-.5 L1.5,1.5 L-.5,1.5", type: 0 }, "": { d: "M-.5,-.5 L1.5,1.5", type: 1, leftPadding: 1, rightPadding: 1 }, "": { d: "M1.5,-.5 L-.5,1.5 L1.5,1.5", type: 0 }, "": { d: "M1.5,-.5 L-.5,1.5 L-.5,-.5", type: 0 }, "": { d: "M1.5,-.5 L-.5,1.5", type: 1, leftPadding: 1, rightPadding: 1 }, "": { d: "M-.5,-.5 L1.5,1.5 L1.5,-.5", type: 0 } }, t2.powerlineDefinitions[""] = t2.powerlineDefinitions[""], t2.powerlineDefinitions[""] = t2.powerlineDefinitions[""], t2.tryDrawCustomChar = function(e3, i3, n2, l, c, d, _, u) {
|
|
626
|
+
const g = t2.blockElementDefinitions[i3];
|
|
627
|
+
if (g) return function(e4, t3, i4, s3, r2, o2) {
|
|
628
|
+
for (let n3 = 0; n3 < t3.length; n3++) {
|
|
629
|
+
const a2 = t3[n3], h2 = r2 / 8, l2 = o2 / 8;
|
|
630
|
+
e4.fillRect(i4 + a2.x * h2, s3 + a2.y * l2, a2.w * h2, a2.h * l2);
|
|
631
|
+
}
|
|
632
|
+
}(e3, g, n2, l, c, d), true;
|
|
633
|
+
const f = r[i3];
|
|
634
|
+
if (f) return function(e4, t3, i4, r2, n3, a2) {
|
|
635
|
+
let h2 = o.get(t3);
|
|
636
|
+
h2 || (h2 = /* @__PURE__ */ new Map(), o.set(t3, h2));
|
|
637
|
+
const l2 = e4.fillStyle;
|
|
638
|
+
if ("string" != typeof l2) throw new Error(`Unexpected fillStyle type "${l2}"`);
|
|
639
|
+
let c2 = h2.get(l2);
|
|
640
|
+
if (!c2) {
|
|
641
|
+
const i5 = t3[0].length, r3 = t3.length, o2 = e4.canvas.ownerDocument.createElement("canvas");
|
|
642
|
+
o2.width = i5, o2.height = r3;
|
|
643
|
+
const n4 = (0, s2.throwIfFalsy)(o2.getContext("2d")), a3 = new ImageData(i5, r3);
|
|
644
|
+
let d2, _2, u2, g2;
|
|
645
|
+
if (l2.startsWith("#")) d2 = parseInt(l2.slice(1, 3), 16), _2 = parseInt(l2.slice(3, 5), 16), u2 = parseInt(l2.slice(5, 7), 16), g2 = l2.length > 7 && parseInt(l2.slice(7, 9), 16) || 1;
|
|
646
|
+
else {
|
|
647
|
+
if (!l2.startsWith("rgba")) throw new Error(`Unexpected fillStyle color format "${l2}" when drawing pattern glyph`);
|
|
648
|
+
[d2, _2, u2, g2] = l2.substring(5, l2.length - 1).split(",").map((e5) => parseFloat(e5));
|
|
649
|
+
}
|
|
650
|
+
for (let e5 = 0; e5 < r3; e5++) for (let s3 = 0; s3 < i5; s3++) a3.data[4 * (e5 * i5 + s3)] = d2, a3.data[4 * (e5 * i5 + s3) + 1] = _2, a3.data[4 * (e5 * i5 + s3) + 2] = u2, a3.data[4 * (e5 * i5 + s3) + 3] = t3[e5][s3] * (255 * g2);
|
|
651
|
+
n4.putImageData(a3, 0, 0), c2 = (0, s2.throwIfFalsy)(e4.createPattern(o2, null)), h2.set(l2, c2);
|
|
652
|
+
}
|
|
653
|
+
e4.fillStyle = c2, e4.fillRect(i4, r2, n3, a2);
|
|
654
|
+
}(e3, f, n2, l, c, d), true;
|
|
655
|
+
const v = t2.boxDrawingDefinitions[i3];
|
|
656
|
+
if (v) return function(e4, t3, i4, s3, r2, o2, n3) {
|
|
657
|
+
e4.strokeStyle = e4.fillStyle;
|
|
658
|
+
for (const [l2, c2] of Object.entries(t3)) {
|
|
659
|
+
let t4;
|
|
660
|
+
e4.beginPath(), e4.lineWidth = n3 * Number.parseInt(l2), t4 = "function" == typeof c2 ? c2(0.15, 0.15 / o2 * r2) : c2;
|
|
661
|
+
for (const l3 of t4.split(" ")) {
|
|
662
|
+
const t5 = l3[0], c3 = a[t5];
|
|
663
|
+
if (!c3) {
|
|
664
|
+
console.error(`Could not find drawing instructions for "${t5}"`);
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
const d2 = l3.substring(1).split(",");
|
|
668
|
+
d2[0] && d2[1] && c3(e4, h(d2, r2, o2, i4, s3, true, n3));
|
|
669
|
+
}
|
|
670
|
+
e4.stroke(), e4.closePath();
|
|
671
|
+
}
|
|
672
|
+
}(e3, v, n2, l, c, d, u), true;
|
|
673
|
+
const C = t2.powerlineDefinitions[i3];
|
|
674
|
+
return !!C && (function(e4, t3, i4, s3, r2, o2, n3, l2) {
|
|
675
|
+
const c2 = new Path2D();
|
|
676
|
+
c2.rect(i4, s3, r2, o2), e4.clip(c2), e4.beginPath();
|
|
677
|
+
const d2 = n3 / 12;
|
|
678
|
+
e4.lineWidth = l2 * d2;
|
|
679
|
+
for (const n4 of t3.d.split(" ")) {
|
|
680
|
+
const c3 = n4[0], _2 = a[c3];
|
|
681
|
+
if (!_2) {
|
|
682
|
+
console.error(`Could not find drawing instructions for "${c3}"`);
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
const u2 = n4.substring(1).split(",");
|
|
686
|
+
u2[0] && u2[1] && _2(e4, h(u2, r2, o2, i4, s3, false, l2, (t3.leftPadding ?? 0) * (d2 / 2), (t3.rightPadding ?? 0) * (d2 / 2)));
|
|
687
|
+
}
|
|
688
|
+
1 === t3.type ? (e4.strokeStyle = e4.fillStyle, e4.stroke()) : e4.fill(), e4.closePath();
|
|
689
|
+
}(e3, C, n2, l, c, d, _, u), true);
|
|
690
|
+
};
|
|
691
|
+
const o = /* @__PURE__ */ new Map();
|
|
692
|
+
function n(e3, t3, i3 = 0) {
|
|
693
|
+
return Math.max(Math.min(e3, t3), i3);
|
|
694
|
+
}
|
|
695
|
+
const a = { C: (e3, t3) => e3.bezierCurveTo(t3[0], t3[1], t3[2], t3[3], t3[4], t3[5]), L: (e3, t3) => e3.lineTo(t3[0], t3[1]), M: (e3, t3) => e3.moveTo(t3[0], t3[1]) };
|
|
696
|
+
function h(e3, t3, i3, s3, r2, o2, a2, h2 = 0, l = 0) {
|
|
697
|
+
const c = e3.map((e4) => parseFloat(e4) || parseInt(e4));
|
|
698
|
+
if (c.length < 2) throw new Error("Too few arguments for instruction");
|
|
699
|
+
for (let e4 = 0; e4 < c.length; e4 += 2) c[e4] *= t3 - h2 * a2 - l * a2, o2 && 0 !== c[e4] && (c[e4] = n(Math.round(c[e4] + 0.5) - 0.5, t3, 0)), c[e4] += s3 + h2 * a2;
|
|
700
|
+
for (let e4 = 1; e4 < c.length; e4 += 2) c[e4] *= i3, o2 && 0 !== c[e4] && (c[e4] = n(Math.round(c[e4] + 0.5) - 0.5, i3, 0)), c[e4] += r2;
|
|
701
|
+
return c;
|
|
702
|
+
}
|
|
703
|
+
}, 56: (e2, t2, i2) => {
|
|
704
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.observeDevicePixelDimensions = void 0;
|
|
705
|
+
const s2 = i2(859);
|
|
706
|
+
t2.observeDevicePixelDimensions = function(e3, t3, i3) {
|
|
707
|
+
let r = new t3.ResizeObserver((t4) => {
|
|
708
|
+
const s3 = t4.find((t5) => t5.target === e3);
|
|
709
|
+
if (!s3) return;
|
|
710
|
+
if (!("devicePixelContentBoxSize" in s3)) return r?.disconnect(), void (r = void 0);
|
|
711
|
+
const o = s3.devicePixelContentBoxSize[0].inlineSize, n = s3.devicePixelContentBoxSize[0].blockSize;
|
|
712
|
+
o > 0 && n > 0 && i3(o, n);
|
|
713
|
+
});
|
|
714
|
+
try {
|
|
715
|
+
r.observe(e3, { box: ["device-pixel-content-box"] });
|
|
716
|
+
} catch {
|
|
717
|
+
r.disconnect(), r = void 0;
|
|
718
|
+
}
|
|
719
|
+
return (0, s2.toDisposable)(() => r?.disconnect());
|
|
720
|
+
};
|
|
721
|
+
}, 374: (e2, t2) => {
|
|
722
|
+
function i2(e3) {
|
|
723
|
+
return 57508 <= e3 && e3 <= 57558;
|
|
724
|
+
}
|
|
725
|
+
function s2(e3) {
|
|
726
|
+
return e3 >= 128512 && e3 <= 128591 || e3 >= 127744 && e3 <= 128511 || e3 >= 128640 && e3 <= 128767 || e3 >= 9728 && e3 <= 9983 || e3 >= 9984 && e3 <= 10175 || e3 >= 65024 && e3 <= 65039 || e3 >= 129280 && e3 <= 129535 || e3 >= 127462 && e3 <= 127487;
|
|
727
|
+
}
|
|
728
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.computeNextVariantOffset = t2.createRenderDimensions = t2.treatGlyphAsBackgroundColor = t2.allowRescaling = t2.isEmoji = t2.isRestrictedPowerlineGlyph = t2.isPowerlineGlyph = t2.throwIfFalsy = void 0, t2.throwIfFalsy = function(e3) {
|
|
729
|
+
if (!e3) throw new Error("value must not be falsy");
|
|
730
|
+
return e3;
|
|
731
|
+
}, t2.isPowerlineGlyph = i2, t2.isRestrictedPowerlineGlyph = function(e3) {
|
|
732
|
+
return 57520 <= e3 && e3 <= 57527;
|
|
733
|
+
}, t2.isEmoji = s2, t2.allowRescaling = function(e3, t3, r, o) {
|
|
734
|
+
return 1 === t3 && r > Math.ceil(1.5 * o) && void 0 !== e3 && e3 > 255 && !s2(e3) && !i2(e3) && !function(e4) {
|
|
735
|
+
return 57344 <= e4 && e4 <= 63743;
|
|
736
|
+
}(e3);
|
|
737
|
+
}, t2.treatGlyphAsBackgroundColor = function(e3) {
|
|
738
|
+
return i2(e3) || function(e4) {
|
|
739
|
+
return 9472 <= e4 && e4 <= 9631;
|
|
740
|
+
}(e3);
|
|
741
|
+
}, t2.createRenderDimensions = function() {
|
|
742
|
+
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 } } };
|
|
743
|
+
}, t2.computeNextVariantOffset = function(e3, t3, i3 = 0) {
|
|
744
|
+
return (e3 - (2 * Math.round(t3) - i3)) % (2 * Math.round(t3));
|
|
745
|
+
};
|
|
746
|
+
}, 296: (e2, t2) => {
|
|
747
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.createSelectionRenderModel = void 0;
|
|
748
|
+
class i2 {
|
|
749
|
+
constructor() {
|
|
750
|
+
this.clear();
|
|
751
|
+
}
|
|
752
|
+
clear() {
|
|
753
|
+
this.hasSelection = false, this.columnSelectMode = false, 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;
|
|
754
|
+
}
|
|
755
|
+
update(e3, t3, i3, s2 = false) {
|
|
756
|
+
if (this.selectionStart = t3, this.selectionEnd = i3, !t3 || !i3 || t3[0] === i3[0] && t3[1] === i3[1]) return void this.clear();
|
|
757
|
+
const r = e3.buffers.active.ydisp, o = t3[1] - r, n = i3[1] - r, a = Math.max(o, 0), h = Math.min(n, e3.rows - 1);
|
|
758
|
+
a >= e3.rows || h < 0 ? this.clear() : (this.hasSelection = true, this.columnSelectMode = s2, this.viewportStartRow = o, this.viewportEndRow = n, this.viewportCappedStartRow = a, this.viewportCappedEndRow = h, this.startCol = t3[0], this.endCol = i3[0]);
|
|
759
|
+
}
|
|
760
|
+
isCellSelected(e3, t3, i3) {
|
|
761
|
+
return !!this.hasSelection && (i3 -= e3.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t3 >= this.startCol && i3 >= this.viewportCappedStartRow && t3 < this.endCol && i3 <= this.viewportCappedEndRow : t3 < this.startCol && i3 >= this.viewportCappedStartRow && t3 >= this.endCol && i3 <= this.viewportCappedEndRow : i3 > this.viewportStartRow && i3 < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i3 === this.viewportStartRow && t3 >= this.startCol && t3 < this.endCol || this.viewportStartRow < this.viewportEndRow && i3 === this.viewportEndRow && t3 < this.endCol || this.viewportStartRow < this.viewportEndRow && i3 === this.viewportStartRow && t3 >= this.startCol);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
t2.createSelectionRenderModel = function() {
|
|
765
|
+
return new i2();
|
|
766
|
+
};
|
|
767
|
+
}, 509: (e2, t2, i2) => {
|
|
768
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.TextureAtlas = void 0;
|
|
769
|
+
const s2 = i2(237), r = i2(860), o = i2(374), n = i2(160), a = i2(345), h = i2(485), l = i2(385), c = i2(147), d = i2(855), _ = { 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 } };
|
|
770
|
+
let u;
|
|
771
|
+
class g {
|
|
772
|
+
get pages() {
|
|
773
|
+
return this._pages;
|
|
774
|
+
}
|
|
775
|
+
constructor(e3, t3, i3) {
|
|
776
|
+
this._document = e3, this._config = t3, this._unicodeService = i3, this._didWarmUp = false, this._cacheMap = new h.FourKeyMap(), this._cacheMapCombined = new h.FourKeyMap(), this._pages = [], this._activePages = [], this._workBoundingBox = { top: 0, left: 0, bottom: 0, right: 0 }, this._workAttributeData = new c.AttributeData(), this._textureSize = 512, this._onAddTextureAtlasCanvas = new a.EventEmitter(), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = new a.EventEmitter(), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._requestClearModel = false, this._createNewPage(), this._tmpCanvas = C(e3, 4 * this._config.deviceCellWidth + 4, this._config.deviceCellHeight + 4), this._tmpCtx = (0, o.throwIfFalsy)(this._tmpCanvas.getContext("2d", { alpha: this._config.allowTransparency, willReadFrequently: true }));
|
|
777
|
+
}
|
|
778
|
+
dispose() {
|
|
779
|
+
for (const e3 of this.pages) e3.canvas.remove();
|
|
780
|
+
this._onAddTextureAtlasCanvas.dispose();
|
|
781
|
+
}
|
|
782
|
+
warmUp() {
|
|
783
|
+
this._didWarmUp || (this._doWarmUp(), this._didWarmUp = true);
|
|
784
|
+
}
|
|
785
|
+
_doWarmUp() {
|
|
786
|
+
const e3 = new l.IdleTaskQueue();
|
|
787
|
+
for (let t3 = 33; t3 < 126; t3++) e3.enqueue(() => {
|
|
788
|
+
if (!this._cacheMap.get(t3, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT)) {
|
|
789
|
+
const e4 = this._drawToCache(t3, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT);
|
|
790
|
+
this._cacheMap.set(t3, d.DEFAULT_COLOR, d.DEFAULT_COLOR, d.DEFAULT_EXT, e4);
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
beginFrame() {
|
|
795
|
+
return this._requestClearModel;
|
|
796
|
+
}
|
|
797
|
+
clearTexture() {
|
|
798
|
+
if (0 !== this._pages[0].currentRow.x || 0 !== this._pages[0].currentRow.y) {
|
|
799
|
+
for (const e3 of this._pages) e3.clear();
|
|
800
|
+
this._cacheMap.clear(), this._cacheMapCombined.clear(), this._didWarmUp = false;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
_createNewPage() {
|
|
804
|
+
if (g.maxAtlasPages && this._pages.length >= Math.max(4, g.maxAtlasPages)) {
|
|
805
|
+
const e4 = this._pages.filter((e5) => 2 * e5.canvas.width <= (g.maxTextureSize || 4096)).sort((e5, t4) => t4.canvas.width !== e5.canvas.width ? t4.canvas.width - e5.canvas.width : t4.percentageUsed - e5.percentageUsed);
|
|
806
|
+
let t3 = -1, i3 = 0;
|
|
807
|
+
for (let s4 = 0; s4 < e4.length; s4++) if (e4[s4].canvas.width !== i3) t3 = s4, i3 = e4[s4].canvas.width;
|
|
808
|
+
else if (s4 - t3 == 3) break;
|
|
809
|
+
const s3 = e4.slice(t3, t3 + 4), r2 = s3.map((e5) => e5.glyphs[0].texturePage).sort((e5, t4) => e5 > t4 ? 1 : -1), o2 = this.pages.length - s3.length, n2 = this._mergePages(s3, o2);
|
|
810
|
+
n2.version++;
|
|
811
|
+
for (let e5 = r2.length - 1; e5 >= 0; e5--) this._deletePage(r2[e5]);
|
|
812
|
+
this.pages.push(n2), this._requestClearModel = true, this._onAddTextureAtlasCanvas.fire(n2.canvas);
|
|
813
|
+
}
|
|
814
|
+
const e3 = new f(this._document, this._textureSize);
|
|
815
|
+
return this._pages.push(e3), this._activePages.push(e3), this._onAddTextureAtlasCanvas.fire(e3.canvas), e3;
|
|
816
|
+
}
|
|
817
|
+
_mergePages(e3, t3) {
|
|
818
|
+
const i3 = 2 * e3[0].canvas.width, s3 = new f(this._document, i3, e3);
|
|
819
|
+
for (const [r2, o2] of e3.entries()) {
|
|
820
|
+
const e4 = r2 * o2.canvas.width % i3, n2 = Math.floor(r2 / 2) * o2.canvas.height;
|
|
821
|
+
s3.ctx.drawImage(o2.canvas, e4, n2);
|
|
822
|
+
for (const s4 of o2.glyphs) s4.texturePage = t3, s4.sizeClipSpace.x = s4.size.x / i3, s4.sizeClipSpace.y = s4.size.y / i3, s4.texturePosition.x += e4, s4.texturePosition.y += n2, s4.texturePositionClipSpace.x = s4.texturePosition.x / i3, s4.texturePositionClipSpace.y = s4.texturePosition.y / i3;
|
|
823
|
+
this._onRemoveTextureAtlasCanvas.fire(o2.canvas);
|
|
824
|
+
const a2 = this._activePages.indexOf(o2);
|
|
825
|
+
-1 !== a2 && this._activePages.splice(a2, 1);
|
|
826
|
+
}
|
|
827
|
+
return s3;
|
|
828
|
+
}
|
|
829
|
+
_deletePage(e3) {
|
|
830
|
+
this._pages.splice(e3, 1);
|
|
831
|
+
for (let t3 = e3; t3 < this._pages.length; t3++) {
|
|
832
|
+
const e4 = this._pages[t3];
|
|
833
|
+
for (const t4 of e4.glyphs) t4.texturePage--;
|
|
834
|
+
e4.version++;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
getRasterizedGlyphCombinedChar(e3, t3, i3, s3, r2) {
|
|
838
|
+
return this._getFromCacheMap(this._cacheMapCombined, e3, t3, i3, s3, r2);
|
|
839
|
+
}
|
|
840
|
+
getRasterizedGlyph(e3, t3, i3, s3, r2) {
|
|
841
|
+
return this._getFromCacheMap(this._cacheMap, e3, t3, i3, s3, r2);
|
|
842
|
+
}
|
|
843
|
+
_getFromCacheMap(e3, t3, i3, s3, r2, o2 = false) {
|
|
844
|
+
return u = e3.get(t3, i3, s3, r2), u || (u = this._drawToCache(t3, i3, s3, r2, o2), e3.set(t3, i3, s3, r2, u)), u;
|
|
845
|
+
}
|
|
846
|
+
_getColorFromAnsiIndex(e3) {
|
|
847
|
+
if (e3 >= this._config.colors.ansi.length) throw new Error("No color found for idx " + e3);
|
|
848
|
+
return this._config.colors.ansi[e3];
|
|
849
|
+
}
|
|
850
|
+
_getBackgroundColor(e3, t3, i3, s3) {
|
|
851
|
+
if (this._config.allowTransparency) return n.NULL_COLOR;
|
|
852
|
+
let r2;
|
|
853
|
+
switch (e3) {
|
|
854
|
+
case 16777216:
|
|
855
|
+
case 33554432:
|
|
856
|
+
r2 = this._getColorFromAnsiIndex(t3);
|
|
857
|
+
break;
|
|
858
|
+
case 50331648:
|
|
859
|
+
const e4 = c.AttributeData.toColorRGB(t3);
|
|
860
|
+
r2 = n.channels.toColor(e4[0], e4[1], e4[2]);
|
|
861
|
+
break;
|
|
862
|
+
default:
|
|
863
|
+
r2 = i3 ? n.color.opaque(this._config.colors.foreground) : this._config.colors.background;
|
|
864
|
+
}
|
|
865
|
+
return r2;
|
|
866
|
+
}
|
|
867
|
+
_getForegroundColor(e3, t3, i3, r2, o2, a2, h2, l2, d2, _2) {
|
|
868
|
+
const u2 = this._getMinimumContrastColor(e3, t3, i3, r2, o2, a2, h2, d2, l2, _2);
|
|
869
|
+
if (u2) return u2;
|
|
870
|
+
let g2;
|
|
871
|
+
switch (o2) {
|
|
872
|
+
case 16777216:
|
|
873
|
+
case 33554432:
|
|
874
|
+
this._config.drawBoldTextInBrightColors && d2 && a2 < 8 && (a2 += 8), g2 = this._getColorFromAnsiIndex(a2);
|
|
875
|
+
break;
|
|
876
|
+
case 50331648:
|
|
877
|
+
const e4 = c.AttributeData.toColorRGB(a2);
|
|
878
|
+
g2 = n.channels.toColor(e4[0], e4[1], e4[2]);
|
|
879
|
+
break;
|
|
880
|
+
default:
|
|
881
|
+
g2 = h2 ? this._config.colors.background : this._config.colors.foreground;
|
|
882
|
+
}
|
|
883
|
+
return this._config.allowTransparency && (g2 = n.color.opaque(g2)), l2 && (g2 = n.color.multiplyOpacity(g2, s2.DIM_OPACITY)), g2;
|
|
884
|
+
}
|
|
885
|
+
_resolveBackgroundRgba(e3, t3, i3) {
|
|
886
|
+
switch (e3) {
|
|
887
|
+
case 16777216:
|
|
888
|
+
case 33554432:
|
|
889
|
+
return this._getColorFromAnsiIndex(t3).rgba;
|
|
890
|
+
case 50331648:
|
|
891
|
+
return t3 << 8;
|
|
892
|
+
default:
|
|
893
|
+
return i3 ? this._config.colors.foreground.rgba : this._config.colors.background.rgba;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
_resolveForegroundRgba(e3, t3, i3, s3) {
|
|
897
|
+
switch (e3) {
|
|
898
|
+
case 16777216:
|
|
899
|
+
case 33554432:
|
|
900
|
+
return this._config.drawBoldTextInBrightColors && s3 && t3 < 8 && (t3 += 8), this._getColorFromAnsiIndex(t3).rgba;
|
|
901
|
+
case 50331648:
|
|
902
|
+
return t3 << 8;
|
|
903
|
+
default:
|
|
904
|
+
return i3 ? this._config.colors.background.rgba : this._config.colors.foreground.rgba;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
_getMinimumContrastColor(e3, t3, i3, s3, r2, o2, a2, h2, l2, c2) {
|
|
908
|
+
if (1 === this._config.minimumContrastRatio || c2) return;
|
|
909
|
+
const d2 = this._getContrastCache(l2), _2 = d2.getColor(e3, s3);
|
|
910
|
+
if (void 0 !== _2) return _2 || void 0;
|
|
911
|
+
const u2 = this._resolveBackgroundRgba(t3, i3, a2), g2 = this._resolveForegroundRgba(r2, o2, a2, h2), f2 = n.rgba.ensureContrastRatio(u2, g2, this._config.minimumContrastRatio / (l2 ? 2 : 1));
|
|
912
|
+
if (!f2) return void d2.setColor(e3, s3, null);
|
|
913
|
+
const v2 = n.channels.toColor(f2 >> 24 & 255, f2 >> 16 & 255, f2 >> 8 & 255);
|
|
914
|
+
return d2.setColor(e3, s3, v2), v2;
|
|
915
|
+
}
|
|
916
|
+
_getContrastCache(e3) {
|
|
917
|
+
return e3 ? this._config.colors.halfContrastCache : this._config.colors.contrastCache;
|
|
918
|
+
}
|
|
919
|
+
_drawToCache(e3, t3, i3, n2, a2 = false) {
|
|
920
|
+
const h2 = "number" == typeof e3 ? String.fromCharCode(e3) : e3, l2 = Math.min(this._config.deviceCellWidth * Math.max(h2.length, 2) + 4, this._textureSize);
|
|
921
|
+
this._tmpCanvas.width < l2 && (this._tmpCanvas.width = l2);
|
|
922
|
+
const d2 = Math.min(this._config.deviceCellHeight + 8, this._textureSize);
|
|
923
|
+
if (this._tmpCanvas.height < d2 && (this._tmpCanvas.height = d2), this._tmpCtx.save(), this._workAttributeData.fg = i3, this._workAttributeData.bg = t3, this._workAttributeData.extended.ext = n2, this._workAttributeData.isInvisible()) return _;
|
|
924
|
+
const u2 = !!this._workAttributeData.isBold(), f2 = !!this._workAttributeData.isInverse(), C2 = !!this._workAttributeData.isDim(), p = !!this._workAttributeData.isItalic(), m = !!this._workAttributeData.isUnderline(), x = !!this._workAttributeData.isStrikethrough(), w = !!this._workAttributeData.isOverline();
|
|
925
|
+
let L = this._workAttributeData.getFgColor(), b = this._workAttributeData.getFgColorMode(), M = this._workAttributeData.getBgColor(), S = this._workAttributeData.getBgColorMode();
|
|
926
|
+
if (f2) {
|
|
927
|
+
const e4 = L;
|
|
928
|
+
L = M, M = e4;
|
|
929
|
+
const t4 = b;
|
|
930
|
+
b = S, S = t4;
|
|
931
|
+
}
|
|
932
|
+
const y = this._getBackgroundColor(S, M, f2, C2);
|
|
933
|
+
this._tmpCtx.globalCompositeOperation = "copy", this._tmpCtx.fillStyle = y.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.globalCompositeOperation = "source-over";
|
|
934
|
+
const R = u2 ? this._config.fontWeightBold : this._config.fontWeight, A = p ? "italic" : "";
|
|
935
|
+
this._tmpCtx.font = `${A} ${R} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`, this._tmpCtx.textBaseline = s2.TEXT_BASELINE;
|
|
936
|
+
const D = 1 === h2.length && (0, o.isPowerlineGlyph)(h2.charCodeAt(0)), T = 1 === h2.length && (0, o.isRestrictedPowerlineGlyph)(h2.charCodeAt(0)), k = this._getForegroundColor(t3, S, M, i3, b, L, f2, C2, u2, (0, o.treatGlyphAsBackgroundColor)(h2.charCodeAt(0)));
|
|
937
|
+
this._tmpCtx.fillStyle = k.css;
|
|
938
|
+
const E = T ? 0 : 4;
|
|
939
|
+
let B = false;
|
|
940
|
+
false !== this._config.customGlyphs && (B = (0, r.tryDrawCustomChar)(this._tmpCtx, h2, E, E, this._config.deviceCellWidth, this._config.deviceCellHeight, this._config.fontSize, this._config.devicePixelRatio));
|
|
941
|
+
let $, P = !D;
|
|
942
|
+
if ($ = "number" == typeof e3 ? this._unicodeService.wcwidth(e3) : this._unicodeService.getStringCellWidth(e3), m) {
|
|
943
|
+
this._tmpCtx.save();
|
|
944
|
+
const e4 = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)), t4 = e4 % 2 == 1 ? 0.5 : 0;
|
|
945
|
+
if (this._tmpCtx.lineWidth = e4, this._workAttributeData.isUnderlineColorDefault()) this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle;
|
|
946
|
+
else if (this._workAttributeData.isUnderlineColorRGB()) P = false, this._tmpCtx.strokeStyle = `rgb(${c.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;
|
|
947
|
+
else {
|
|
948
|
+
P = false;
|
|
949
|
+
let e5 = this._workAttributeData.getUnderlineColor();
|
|
950
|
+
this._config.drawBoldTextInBrightColors && this._workAttributeData.isBold() && e5 < 8 && (e5 += 8), this._tmpCtx.strokeStyle = this._getColorFromAnsiIndex(e5).css;
|
|
951
|
+
}
|
|
952
|
+
this._tmpCtx.beginPath();
|
|
953
|
+
const i4 = E, s3 = Math.ceil(E + this._config.deviceCharHeight) - t4 - (a2 ? 2 * e4 : 0), r2 = s3 + e4, n3 = s3 + 2 * e4;
|
|
954
|
+
let l3 = this._workAttributeData.getUnderlineVariantOffset();
|
|
955
|
+
for (let a3 = 0; a3 < $; a3++) {
|
|
956
|
+
this._tmpCtx.save();
|
|
957
|
+
const h3 = i4 + a3 * this._config.deviceCellWidth, c2 = i4 + (a3 + 1) * this._config.deviceCellWidth, d3 = h3 + this._config.deviceCellWidth / 2;
|
|
958
|
+
switch (this._workAttributeData.extended.underlineStyle) {
|
|
959
|
+
case 2:
|
|
960
|
+
this._tmpCtx.moveTo(h3, s3), this._tmpCtx.lineTo(c2, s3), this._tmpCtx.moveTo(h3, n3), this._tmpCtx.lineTo(c2, n3);
|
|
961
|
+
break;
|
|
962
|
+
case 3:
|
|
963
|
+
const i5 = e4 <= 1 ? n3 : Math.ceil(E + this._config.deviceCharHeight - e4 / 2) - t4, a4 = e4 <= 1 ? s3 : Math.ceil(E + this._config.deviceCharHeight + e4 / 2) - t4, _2 = new Path2D();
|
|
964
|
+
_2.rect(h3, s3, this._config.deviceCellWidth, n3 - s3), this._tmpCtx.clip(_2), this._tmpCtx.moveTo(h3 - this._config.deviceCellWidth / 2, r2), this._tmpCtx.bezierCurveTo(h3 - this._config.deviceCellWidth / 2, a4, h3, a4, h3, r2), this._tmpCtx.bezierCurveTo(h3, i5, d3, i5, d3, r2), this._tmpCtx.bezierCurveTo(d3, a4, c2, a4, c2, r2), this._tmpCtx.bezierCurveTo(c2, i5, c2 + this._config.deviceCellWidth / 2, i5, c2 + this._config.deviceCellWidth / 2, r2);
|
|
965
|
+
break;
|
|
966
|
+
case 4:
|
|
967
|
+
const u3 = 0 === l3 ? 0 : l3 >= e4 ? 2 * e4 - l3 : e4 - l3;
|
|
968
|
+
false == !(l3 >= e4) || 0 === u3 ? (this._tmpCtx.setLineDash([Math.round(e4), Math.round(e4)]), this._tmpCtx.moveTo(h3 + u3, s3), this._tmpCtx.lineTo(c2, s3)) : (this._tmpCtx.setLineDash([Math.round(e4), Math.round(e4)]), this._tmpCtx.moveTo(h3, s3), this._tmpCtx.lineTo(h3 + u3, s3), this._tmpCtx.moveTo(h3 + u3 + e4, s3), this._tmpCtx.lineTo(c2, s3)), l3 = (0, o.computeNextVariantOffset)(c2 - h3, e4, l3);
|
|
969
|
+
break;
|
|
970
|
+
case 5:
|
|
971
|
+
const g2 = 0.6, f3 = 0.3, v2 = c2 - h3, C3 = Math.floor(g2 * v2), p2 = Math.floor(f3 * v2), m2 = v2 - C3 - p2;
|
|
972
|
+
this._tmpCtx.setLineDash([C3, p2, m2]), this._tmpCtx.moveTo(h3, s3), this._tmpCtx.lineTo(c2, s3);
|
|
973
|
+
break;
|
|
974
|
+
default:
|
|
975
|
+
this._tmpCtx.moveTo(h3, s3), this._tmpCtx.lineTo(c2, s3);
|
|
976
|
+
}
|
|
977
|
+
this._tmpCtx.stroke(), this._tmpCtx.restore();
|
|
978
|
+
}
|
|
979
|
+
if (this._tmpCtx.restore(), !B && this._config.fontSize >= 12 && !this._config.allowTransparency && " " !== h2) {
|
|
980
|
+
this._tmpCtx.save(), this._tmpCtx.textBaseline = "alphabetic";
|
|
981
|
+
const t5 = this._tmpCtx.measureText(h2);
|
|
982
|
+
if (this._tmpCtx.restore(), "actualBoundingBoxDescent" in t5 && t5.actualBoundingBoxDescent > 0) {
|
|
983
|
+
this._tmpCtx.save();
|
|
984
|
+
const t6 = new Path2D();
|
|
985
|
+
t6.rect(i4, s3 - Math.ceil(e4 / 2), this._config.deviceCellWidth * $, n3 - s3 + Math.ceil(e4 / 2)), this._tmpCtx.clip(t6), this._tmpCtx.lineWidth = 3 * this._config.devicePixelRatio, this._tmpCtx.strokeStyle = y.css, this._tmpCtx.strokeText(h2, E, E + this._config.deviceCharHeight), this._tmpCtx.restore();
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
if (w) {
|
|
990
|
+
const e4 = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)), t4 = e4 % 2 == 1 ? 0.5 : 0;
|
|
991
|
+
this._tmpCtx.lineWidth = e4, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(E, E + t4), this._tmpCtx.lineTo(E + this._config.deviceCharWidth * $, E + t4), this._tmpCtx.stroke();
|
|
992
|
+
}
|
|
993
|
+
if (B || this._tmpCtx.fillText(h2, E, E + this._config.deviceCharHeight), "_" === h2 && !this._config.allowTransparency) {
|
|
994
|
+
let e4 = v(this._tmpCtx.getImageData(E, E, this._config.deviceCellWidth, this._config.deviceCellHeight), y, k, P);
|
|
995
|
+
if (e4) for (let t4 = 1; t4 <= 5 && (this._tmpCtx.save(), this._tmpCtx.fillStyle = y.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.restore(), this._tmpCtx.fillText(h2, E, E + this._config.deviceCharHeight - t4), e4 = v(this._tmpCtx.getImageData(E, E, this._config.deviceCellWidth, this._config.deviceCellHeight), y, k, P), e4); t4++) ;
|
|
996
|
+
}
|
|
997
|
+
if (x) {
|
|
998
|
+
const e4 = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 10)), t4 = this._tmpCtx.lineWidth % 2 == 1 ? 0.5 : 0;
|
|
999
|
+
this._tmpCtx.lineWidth = e4, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(E, E + Math.floor(this._config.deviceCharHeight / 2) - t4), this._tmpCtx.lineTo(E + this._config.deviceCharWidth * $, E + Math.floor(this._config.deviceCharHeight / 2) - t4), this._tmpCtx.stroke();
|
|
1000
|
+
}
|
|
1001
|
+
this._tmpCtx.restore();
|
|
1002
|
+
const O = this._tmpCtx.getImageData(0, 0, this._tmpCanvas.width, this._tmpCanvas.height);
|
|
1003
|
+
let I;
|
|
1004
|
+
if (I = this._config.allowTransparency ? function(e4) {
|
|
1005
|
+
for (let t4 = 0; t4 < e4.data.length; t4 += 4) if (e4.data[t4 + 3] > 0) return false;
|
|
1006
|
+
return true;
|
|
1007
|
+
}(O) : v(O, y, k, P), I) return _;
|
|
1008
|
+
const F = this._findGlyphBoundingBox(O, this._workBoundingBox, l2, T, B, E);
|
|
1009
|
+
let W, H;
|
|
1010
|
+
for (; ; ) {
|
|
1011
|
+
if (0 === this._activePages.length) {
|
|
1012
|
+
const e4 = this._createNewPage();
|
|
1013
|
+
W = e4, H = e4.currentRow, H.height = F.size.y;
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
W = this._activePages[this._activePages.length - 1], H = W.currentRow;
|
|
1017
|
+
for (const e4 of this._activePages) F.size.y <= e4.currentRow.height && (W = e4, H = e4.currentRow);
|
|
1018
|
+
for (let e4 = this._activePages.length - 1; e4 >= 0; e4--) for (const t4 of this._activePages[e4].fixedRows) t4.height <= H.height && F.size.y <= t4.height && (W = this._activePages[e4], H = t4);
|
|
1019
|
+
if (H.y + F.size.y >= W.canvas.height || H.height > F.size.y + 2) {
|
|
1020
|
+
let e4 = false;
|
|
1021
|
+
if (W.currentRow.y + W.currentRow.height + F.size.y >= W.canvas.height) {
|
|
1022
|
+
let t4;
|
|
1023
|
+
for (const e5 of this._activePages) if (e5.currentRow.y + e5.currentRow.height + F.size.y < e5.canvas.height) {
|
|
1024
|
+
t4 = e5;
|
|
1025
|
+
break;
|
|
1026
|
+
}
|
|
1027
|
+
if (t4) W = t4;
|
|
1028
|
+
else if (g.maxAtlasPages && this._pages.length >= g.maxAtlasPages && H.y + F.size.y <= W.canvas.height && H.height >= F.size.y && H.x + F.size.x <= W.canvas.width) e4 = true;
|
|
1029
|
+
else {
|
|
1030
|
+
const t5 = this._createNewPage();
|
|
1031
|
+
W = t5, H = t5.currentRow, H.height = F.size.y, e4 = true;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
e4 || (W.currentRow.height > 0 && W.fixedRows.push(W.currentRow), H = { x: 0, y: W.currentRow.y + W.currentRow.height, height: F.size.y }, W.fixedRows.push(H), W.currentRow = { x: 0, y: H.y + H.height, height: 0 });
|
|
1035
|
+
}
|
|
1036
|
+
if (H.x + F.size.x <= W.canvas.width) break;
|
|
1037
|
+
H === W.currentRow ? (H.x = 0, H.y += H.height, H.height = 0) : W.fixedRows.splice(W.fixedRows.indexOf(H), 1);
|
|
1038
|
+
}
|
|
1039
|
+
return F.texturePage = this._pages.indexOf(W), F.texturePosition.x = H.x, F.texturePosition.y = H.y, F.texturePositionClipSpace.x = H.x / W.canvas.width, F.texturePositionClipSpace.y = H.y / W.canvas.height, F.sizeClipSpace.x /= W.canvas.width, F.sizeClipSpace.y /= W.canvas.height, H.height = Math.max(H.height, F.size.y), H.x += F.size.x, W.ctx.putImageData(O, F.texturePosition.x - this._workBoundingBox.left, F.texturePosition.y - this._workBoundingBox.top, this._workBoundingBox.left, this._workBoundingBox.top, F.size.x, F.size.y), W.addGlyph(F), W.version++, F;
|
|
1040
|
+
}
|
|
1041
|
+
_findGlyphBoundingBox(e3, t3, i3, s3, r2, o2) {
|
|
1042
|
+
t3.top = 0;
|
|
1043
|
+
const n2 = s3 ? this._config.deviceCellHeight : this._tmpCanvas.height, a2 = s3 ? this._config.deviceCellWidth : i3;
|
|
1044
|
+
let h2 = false;
|
|
1045
|
+
for (let i4 = 0; i4 < n2; i4++) {
|
|
1046
|
+
for (let s4 = 0; s4 < a2; s4++) {
|
|
1047
|
+
const r3 = i4 * this._tmpCanvas.width * 4 + 4 * s4 + 3;
|
|
1048
|
+
if (0 !== e3.data[r3]) {
|
|
1049
|
+
t3.top = i4, h2 = true;
|
|
1050
|
+
break;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
if (h2) break;
|
|
1054
|
+
}
|
|
1055
|
+
t3.left = 0, h2 = false;
|
|
1056
|
+
for (let i4 = 0; i4 < o2 + a2; i4++) {
|
|
1057
|
+
for (let s4 = 0; s4 < n2; s4++) {
|
|
1058
|
+
const r3 = s4 * this._tmpCanvas.width * 4 + 4 * i4 + 3;
|
|
1059
|
+
if (0 !== e3.data[r3]) {
|
|
1060
|
+
t3.left = i4, h2 = true;
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
if (h2) break;
|
|
1065
|
+
}
|
|
1066
|
+
t3.right = a2, h2 = false;
|
|
1067
|
+
for (let i4 = o2 + a2 - 1; i4 >= o2; i4--) {
|
|
1068
|
+
for (let s4 = 0; s4 < n2; s4++) {
|
|
1069
|
+
const r3 = s4 * this._tmpCanvas.width * 4 + 4 * i4 + 3;
|
|
1070
|
+
if (0 !== e3.data[r3]) {
|
|
1071
|
+
t3.right = i4, h2 = true;
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
if (h2) break;
|
|
1076
|
+
}
|
|
1077
|
+
t3.bottom = n2, h2 = false;
|
|
1078
|
+
for (let i4 = n2 - 1; i4 >= 0; i4--) {
|
|
1079
|
+
for (let s4 = 0; s4 < a2; s4++) {
|
|
1080
|
+
const r3 = i4 * this._tmpCanvas.width * 4 + 4 * s4 + 3;
|
|
1081
|
+
if (0 !== e3.data[r3]) {
|
|
1082
|
+
t3.bottom = i4, h2 = true;
|
|
1083
|
+
break;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
if (h2) break;
|
|
1087
|
+
}
|
|
1088
|
+
return { texturePage: 0, texturePosition: { x: 0, y: 0 }, texturePositionClipSpace: { x: 0, y: 0 }, size: { x: t3.right - t3.left + 1, y: t3.bottom - t3.top + 1 }, sizeClipSpace: { x: t3.right - t3.left + 1, y: t3.bottom - t3.top + 1 }, offset: { x: -t3.left + o2 + (s3 || r2 ? Math.floor((this._config.deviceCellWidth - this._config.deviceCharWidth) / 2) : 0), y: -t3.top + o2 + (s3 || r2 ? 1 === this._config.lineHeight ? 0 : Math.round((this._config.deviceCellHeight - this._config.deviceCharHeight) / 2) : 0) } };
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
t2.TextureAtlas = g;
|
|
1092
|
+
class f {
|
|
1093
|
+
get percentageUsed() {
|
|
1094
|
+
return this._usedPixels / (this.canvas.width * this.canvas.height);
|
|
1095
|
+
}
|
|
1096
|
+
get glyphs() {
|
|
1097
|
+
return this._glyphs;
|
|
1098
|
+
}
|
|
1099
|
+
addGlyph(e3) {
|
|
1100
|
+
this._glyphs.push(e3), this._usedPixels += e3.size.x * e3.size.y;
|
|
1101
|
+
}
|
|
1102
|
+
constructor(e3, t3, i3) {
|
|
1103
|
+
if (this._usedPixels = 0, this._glyphs = [], this.version = 0, this.currentRow = { x: 0, y: 0, height: 0 }, this.fixedRows = [], i3) for (const e4 of i3) this._glyphs.push(...e4.glyphs), this._usedPixels += e4._usedPixels;
|
|
1104
|
+
this.canvas = C(e3, t3, t3), this.ctx = (0, o.throwIfFalsy)(this.canvas.getContext("2d", { alpha: true }));
|
|
1105
|
+
}
|
|
1106
|
+
clear() {
|
|
1107
|
+
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++;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
function v(e3, t3, i3, s3) {
|
|
1111
|
+
const r2 = t3.rgba >>> 24, o2 = t3.rgba >>> 16 & 255, n2 = t3.rgba >>> 8 & 255, a2 = i3.rgba >>> 24, h2 = i3.rgba >>> 16 & 255, l2 = i3.rgba >>> 8 & 255, c2 = Math.floor((Math.abs(r2 - a2) + Math.abs(o2 - h2) + Math.abs(n2 - l2)) / 12);
|
|
1112
|
+
let d2 = true;
|
|
1113
|
+
for (let t4 = 0; t4 < e3.data.length; t4 += 4) e3.data[t4] === r2 && e3.data[t4 + 1] === o2 && e3.data[t4 + 2] === n2 || s3 && Math.abs(e3.data[t4] - r2) + Math.abs(e3.data[t4 + 1] - o2) + Math.abs(e3.data[t4 + 2] - n2) < c2 ? e3.data[t4 + 3] = 0 : d2 = false;
|
|
1114
|
+
return d2;
|
|
1115
|
+
}
|
|
1116
|
+
function C(e3, t3, i3) {
|
|
1117
|
+
const s3 = e3.createElement("canvas");
|
|
1118
|
+
return s3.width = t3, s3.height = i3, s3;
|
|
1119
|
+
}
|
|
1120
|
+
}, 577: function(e2, t2, i2) {
|
|
1121
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
1122
|
+
var r2, o2 = arguments.length, n2 = o2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
1123
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n2 = Reflect.decorate(e3, t3, i3, s3);
|
|
1124
|
+
else for (var a2 = e3.length - 1; a2 >= 0; a2--) (r2 = e3[a2]) && (n2 = (o2 < 3 ? r2(n2) : o2 > 3 ? r2(t3, i3, n2) : r2(t3, i3)) || n2);
|
|
1125
|
+
return o2 > 3 && n2 && Object.defineProperty(t3, i3, n2), n2;
|
|
1126
|
+
}, r = this && this.__param || function(e3, t3) {
|
|
1127
|
+
return function(i3, s3) {
|
|
1128
|
+
t3(i3, s3, e3);
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CharacterJoinerService = t2.JoinedCellData = void 0;
|
|
1132
|
+
const o = i2(147), n = i2(855), a = i2(782), h = i2(97);
|
|
1133
|
+
class l extends o.AttributeData {
|
|
1134
|
+
constructor(e3, t3, i3) {
|
|
1135
|
+
super(), this.content = 0, this.combinedData = "", this.fg = e3.fg, this.bg = e3.bg, this.combinedData = t3, this._width = i3;
|
|
1136
|
+
}
|
|
1137
|
+
isCombined() {
|
|
1138
|
+
return 2097152;
|
|
1139
|
+
}
|
|
1140
|
+
getWidth() {
|
|
1141
|
+
return this._width;
|
|
1142
|
+
}
|
|
1143
|
+
getChars() {
|
|
1144
|
+
return this.combinedData;
|
|
1145
|
+
}
|
|
1146
|
+
getCode() {
|
|
1147
|
+
return 2097151;
|
|
1148
|
+
}
|
|
1149
|
+
setFromCharData(e3) {
|
|
1150
|
+
throw new Error("not implemented");
|
|
1151
|
+
}
|
|
1152
|
+
getAsCharData() {
|
|
1153
|
+
return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
t2.JoinedCellData = l;
|
|
1157
|
+
let c = t2.CharacterJoinerService = class e3 {
|
|
1158
|
+
constructor(e4) {
|
|
1159
|
+
this._bufferService = e4, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new a.CellData();
|
|
1160
|
+
}
|
|
1161
|
+
register(e4) {
|
|
1162
|
+
const t3 = { id: this._nextCharacterJoinerId++, handler: e4 };
|
|
1163
|
+
return this._characterJoiners.push(t3), t3.id;
|
|
1164
|
+
}
|
|
1165
|
+
deregister(e4) {
|
|
1166
|
+
for (let t3 = 0; t3 < this._characterJoiners.length; t3++) if (this._characterJoiners[t3].id === e4) return this._characterJoiners.splice(t3, 1), true;
|
|
1167
|
+
return false;
|
|
1168
|
+
}
|
|
1169
|
+
getJoinedCharacters(e4) {
|
|
1170
|
+
if (0 === this._characterJoiners.length) return [];
|
|
1171
|
+
const t3 = this._bufferService.buffer.lines.get(e4);
|
|
1172
|
+
if (!t3 || 0 === t3.length) return [];
|
|
1173
|
+
const i3 = [], s3 = t3.translateToString(true);
|
|
1174
|
+
let r2 = 0, o2 = 0, a2 = 0, h2 = t3.getFg(0), l2 = t3.getBg(0);
|
|
1175
|
+
for (let e5 = 0; e5 < t3.getTrimmedLength(); e5++) if (t3.loadCell(e5, this._workCell), 0 !== this._workCell.getWidth()) {
|
|
1176
|
+
if (this._workCell.fg !== h2 || this._workCell.bg !== l2) {
|
|
1177
|
+
if (e5 - r2 > 1) {
|
|
1178
|
+
const e6 = this._getJoinedRanges(s3, a2, o2, t3, r2);
|
|
1179
|
+
for (let t4 = 0; t4 < e6.length; t4++) i3.push(e6[t4]);
|
|
1180
|
+
}
|
|
1181
|
+
r2 = e5, a2 = o2, h2 = this._workCell.fg, l2 = this._workCell.bg;
|
|
1182
|
+
}
|
|
1183
|
+
o2 += this._workCell.getChars().length || n.WHITESPACE_CELL_CHAR.length;
|
|
1184
|
+
}
|
|
1185
|
+
if (this._bufferService.cols - r2 > 1) {
|
|
1186
|
+
const e5 = this._getJoinedRanges(s3, a2, o2, t3, r2);
|
|
1187
|
+
for (let t4 = 0; t4 < e5.length; t4++) i3.push(e5[t4]);
|
|
1188
|
+
}
|
|
1189
|
+
return i3;
|
|
1190
|
+
}
|
|
1191
|
+
_getJoinedRanges(t3, i3, s3, r2, o2) {
|
|
1192
|
+
const n2 = t3.substring(i3, s3);
|
|
1193
|
+
let a2 = [];
|
|
1194
|
+
try {
|
|
1195
|
+
a2 = this._characterJoiners[0].handler(n2);
|
|
1196
|
+
} catch (e4) {
|
|
1197
|
+
console.error(e4);
|
|
1198
|
+
}
|
|
1199
|
+
for (let t4 = 1; t4 < this._characterJoiners.length; t4++) try {
|
|
1200
|
+
const i4 = this._characterJoiners[t4].handler(n2);
|
|
1201
|
+
for (let t5 = 0; t5 < i4.length; t5++) e3._mergeRanges(a2, i4[t5]);
|
|
1202
|
+
} catch (e4) {
|
|
1203
|
+
console.error(e4);
|
|
1204
|
+
}
|
|
1205
|
+
return this._stringRangesToCellRanges(a2, r2, o2), a2;
|
|
1206
|
+
}
|
|
1207
|
+
_stringRangesToCellRanges(e4, t3, i3) {
|
|
1208
|
+
let s3 = 0, r2 = false, o2 = 0, a2 = e4[s3];
|
|
1209
|
+
if (a2) {
|
|
1210
|
+
for (let h2 = i3; h2 < this._bufferService.cols; h2++) {
|
|
1211
|
+
const i4 = t3.getWidth(h2), l2 = t3.getString(h2).length || n.WHITESPACE_CELL_CHAR.length;
|
|
1212
|
+
if (0 !== i4) {
|
|
1213
|
+
if (!r2 && a2[0] <= o2 && (a2[0] = h2, r2 = true), a2[1] <= o2) {
|
|
1214
|
+
if (a2[1] = h2, a2 = e4[++s3], !a2) break;
|
|
1215
|
+
a2[0] <= o2 ? (a2[0] = h2, r2 = true) : r2 = false;
|
|
1216
|
+
}
|
|
1217
|
+
o2 += l2;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
a2 && (a2[1] = this._bufferService.cols);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
static _mergeRanges(e4, t3) {
|
|
1224
|
+
let i3 = false;
|
|
1225
|
+
for (let s3 = 0; s3 < e4.length; s3++) {
|
|
1226
|
+
const r2 = e4[s3];
|
|
1227
|
+
if (i3) {
|
|
1228
|
+
if (t3[1] <= r2[0]) return e4[s3 - 1][1] = t3[1], e4;
|
|
1229
|
+
if (t3[1] <= r2[1]) return e4[s3 - 1][1] = Math.max(t3[1], r2[1]), e4.splice(s3, 1), e4;
|
|
1230
|
+
e4.splice(s3, 1), s3--;
|
|
1231
|
+
} else {
|
|
1232
|
+
if (t3[1] <= r2[0]) return e4.splice(s3, 0, t3), e4;
|
|
1233
|
+
if (t3[1] <= r2[1]) return r2[0] = Math.min(t3[0], r2[0]), e4;
|
|
1234
|
+
t3[0] < r2[1] && (r2[0] = Math.min(t3[0], r2[0]), i3 = true);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
return i3 ? e4[e4.length - 1][1] = t3[1] : e4.push(t3), e4;
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
t2.CharacterJoinerService = c = s2([r(0, h.IBufferService)], c);
|
|
1241
|
+
}, 160: (e2, t2) => {
|
|
1242
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.contrastRatio = t2.toPaddedHex = t2.rgba = t2.rgb = t2.css = t2.color = t2.channels = t2.NULL_COLOR = void 0;
|
|
1243
|
+
let i2 = 0, s2 = 0, r = 0, o = 0;
|
|
1244
|
+
var n, a, h, l, c;
|
|
1245
|
+
function d(e3) {
|
|
1246
|
+
const t3 = e3.toString(16);
|
|
1247
|
+
return t3.length < 2 ? "0" + t3 : t3;
|
|
1248
|
+
}
|
|
1249
|
+
function _(e3, t3) {
|
|
1250
|
+
return e3 < t3 ? (t3 + 0.05) / (e3 + 0.05) : (e3 + 0.05) / (t3 + 0.05);
|
|
1251
|
+
}
|
|
1252
|
+
t2.NULL_COLOR = { css: "#00000000", rgba: 0 }, function(e3) {
|
|
1253
|
+
e3.toCss = function(e4, t3, i3, s3) {
|
|
1254
|
+
return void 0 !== s3 ? `#${d(e4)}${d(t3)}${d(i3)}${d(s3)}` : `#${d(e4)}${d(t3)}${d(i3)}`;
|
|
1255
|
+
}, e3.toRgba = function(e4, t3, i3, s3 = 255) {
|
|
1256
|
+
return (e4 << 24 | t3 << 16 | i3 << 8 | s3) >>> 0;
|
|
1257
|
+
}, e3.toColor = function(t3, i3, s3, r2) {
|
|
1258
|
+
return { css: e3.toCss(t3, i3, s3, r2), rgba: e3.toRgba(t3, i3, s3, r2) };
|
|
1259
|
+
};
|
|
1260
|
+
}(n || (t2.channels = n = {})), function(e3) {
|
|
1261
|
+
function t3(e4, t4) {
|
|
1262
|
+
return o = Math.round(255 * t4), [i2, s2, r] = c.toChannels(e4.rgba), { css: n.toCss(i2, s2, r, o), rgba: n.toRgba(i2, s2, r, o) };
|
|
1263
|
+
}
|
|
1264
|
+
e3.blend = function(e4, t4) {
|
|
1265
|
+
if (o = (255 & t4.rgba) / 255, 1 === o) return { css: t4.css, rgba: t4.rgba };
|
|
1266
|
+
const a2 = t4.rgba >> 24 & 255, h2 = t4.rgba >> 16 & 255, l2 = t4.rgba >> 8 & 255, c2 = e4.rgba >> 24 & 255, d2 = e4.rgba >> 16 & 255, _2 = e4.rgba >> 8 & 255;
|
|
1267
|
+
return i2 = c2 + Math.round((a2 - c2) * o), s2 = d2 + Math.round((h2 - d2) * o), r = _2 + Math.round((l2 - _2) * o), { css: n.toCss(i2, s2, r), rgba: n.toRgba(i2, s2, r) };
|
|
1268
|
+
}, e3.isOpaque = function(e4) {
|
|
1269
|
+
return 255 == (255 & e4.rgba);
|
|
1270
|
+
}, e3.ensureContrastRatio = function(e4, t4, i3) {
|
|
1271
|
+
const s3 = c.ensureContrastRatio(e4.rgba, t4.rgba, i3);
|
|
1272
|
+
if (s3) return n.toColor(s3 >> 24 & 255, s3 >> 16 & 255, s3 >> 8 & 255);
|
|
1273
|
+
}, e3.opaque = function(e4) {
|
|
1274
|
+
const t4 = (255 | e4.rgba) >>> 0;
|
|
1275
|
+
return [i2, s2, r] = c.toChannels(t4), { css: n.toCss(i2, s2, r), rgba: t4 };
|
|
1276
|
+
}, e3.opacity = t3, e3.multiplyOpacity = function(e4, i3) {
|
|
1277
|
+
return o = 255 & e4.rgba, t3(e4, o * i3 / 255);
|
|
1278
|
+
}, e3.toColorRGB = function(e4) {
|
|
1279
|
+
return [e4.rgba >> 24 & 255, e4.rgba >> 16 & 255, e4.rgba >> 8 & 255];
|
|
1280
|
+
};
|
|
1281
|
+
}(a || (t2.color = a = {})), function(e3) {
|
|
1282
|
+
let t3, a2;
|
|
1283
|
+
try {
|
|
1284
|
+
const e4 = document.createElement("canvas");
|
|
1285
|
+
e4.width = 1, e4.height = 1;
|
|
1286
|
+
const i3 = e4.getContext("2d", { willReadFrequently: true });
|
|
1287
|
+
i3 && (t3 = i3, t3.globalCompositeOperation = "copy", a2 = t3.createLinearGradient(0, 0, 1, 1));
|
|
1288
|
+
} catch {
|
|
1289
|
+
}
|
|
1290
|
+
e3.toColor = function(e4) {
|
|
1291
|
+
if (e4.match(/#[\da-f]{3,8}/i)) switch (e4.length) {
|
|
1292
|
+
case 4:
|
|
1293
|
+
return i2 = parseInt(e4.slice(1, 2).repeat(2), 16), s2 = parseInt(e4.slice(2, 3).repeat(2), 16), r = parseInt(e4.slice(3, 4).repeat(2), 16), n.toColor(i2, s2, r);
|
|
1294
|
+
case 5:
|
|
1295
|
+
return i2 = parseInt(e4.slice(1, 2).repeat(2), 16), s2 = parseInt(e4.slice(2, 3).repeat(2), 16), r = parseInt(e4.slice(3, 4).repeat(2), 16), o = parseInt(e4.slice(4, 5).repeat(2), 16), n.toColor(i2, s2, r, o);
|
|
1296
|
+
case 7:
|
|
1297
|
+
return { css: e4, rgba: (parseInt(e4.slice(1), 16) << 8 | 255) >>> 0 };
|
|
1298
|
+
case 9:
|
|
1299
|
+
return { css: e4, rgba: parseInt(e4.slice(1), 16) >>> 0 };
|
|
1300
|
+
}
|
|
1301
|
+
const h2 = e4.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
|
|
1302
|
+
if (h2) return i2 = parseInt(h2[1]), s2 = parseInt(h2[2]), r = parseInt(h2[3]), o = Math.round(255 * (void 0 === h2[5] ? 1 : parseFloat(h2[5]))), n.toColor(i2, s2, r, o);
|
|
1303
|
+
if (!t3 || !a2) throw new Error("css.toColor: Unsupported css format");
|
|
1304
|
+
if (t3.fillStyle = a2, t3.fillStyle = e4, "string" != typeof t3.fillStyle) throw new Error("css.toColor: Unsupported css format");
|
|
1305
|
+
if (t3.fillRect(0, 0, 1, 1), [i2, s2, r, o] = t3.getImageData(0, 0, 1, 1).data, 255 !== o) throw new Error("css.toColor: Unsupported css format");
|
|
1306
|
+
return { rgba: n.toRgba(i2, s2, r, o), css: e4 };
|
|
1307
|
+
};
|
|
1308
|
+
}(h || (t2.css = h = {})), function(e3) {
|
|
1309
|
+
function t3(e4, t4, i3) {
|
|
1310
|
+
const s3 = e4 / 255, r2 = t4 / 255, o2 = i3 / 255;
|
|
1311
|
+
return 0.2126 * (s3 <= 0.03928 ? s3 / 12.92 : Math.pow((s3 + 0.055) / 1.055, 2.4)) + 0.7152 * (r2 <= 0.03928 ? r2 / 12.92 : Math.pow((r2 + 0.055) / 1.055, 2.4)) + 0.0722 * (o2 <= 0.03928 ? o2 / 12.92 : Math.pow((o2 + 0.055) / 1.055, 2.4));
|
|
1312
|
+
}
|
|
1313
|
+
e3.relativeLuminance = function(e4) {
|
|
1314
|
+
return t3(e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4);
|
|
1315
|
+
}, e3.relativeLuminance2 = t3;
|
|
1316
|
+
}(l || (t2.rgb = l = {})), function(e3) {
|
|
1317
|
+
function t3(e4, t4, i3) {
|
|
1318
|
+
const s3 = e4 >> 24 & 255, r2 = e4 >> 16 & 255, o2 = e4 >> 8 & 255;
|
|
1319
|
+
let n2 = t4 >> 24 & 255, a3 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, c2 = _(l.relativeLuminance2(n2, a3, h2), l.relativeLuminance2(s3, r2, o2));
|
|
1320
|
+
for (; c2 < i3 && (n2 > 0 || a3 > 0 || h2 > 0); ) n2 -= Math.max(0, Math.ceil(0.1 * n2)), a3 -= Math.max(0, Math.ceil(0.1 * a3)), h2 -= Math.max(0, Math.ceil(0.1 * h2)), c2 = _(l.relativeLuminance2(n2, a3, h2), l.relativeLuminance2(s3, r2, o2));
|
|
1321
|
+
return (n2 << 24 | a3 << 16 | h2 << 8 | 255) >>> 0;
|
|
1322
|
+
}
|
|
1323
|
+
function a2(e4, t4, i3) {
|
|
1324
|
+
const s3 = e4 >> 24 & 255, r2 = e4 >> 16 & 255, o2 = e4 >> 8 & 255;
|
|
1325
|
+
let n2 = t4 >> 24 & 255, a3 = t4 >> 16 & 255, h2 = t4 >> 8 & 255, c2 = _(l.relativeLuminance2(n2, a3, h2), l.relativeLuminance2(s3, r2, o2));
|
|
1326
|
+
for (; c2 < i3 && (n2 < 255 || a3 < 255 || h2 < 255); ) n2 = Math.min(255, n2 + Math.ceil(0.1 * (255 - n2))), a3 = Math.min(255, a3 + Math.ceil(0.1 * (255 - a3))), h2 = Math.min(255, h2 + Math.ceil(0.1 * (255 - h2))), c2 = _(l.relativeLuminance2(n2, a3, h2), l.relativeLuminance2(s3, r2, o2));
|
|
1327
|
+
return (n2 << 24 | a3 << 16 | h2 << 8 | 255) >>> 0;
|
|
1328
|
+
}
|
|
1329
|
+
e3.blend = function(e4, t4) {
|
|
1330
|
+
if (o = (255 & t4) / 255, 1 === o) return t4;
|
|
1331
|
+
const a3 = t4 >> 24 & 255, h2 = t4 >> 16 & 255, l2 = t4 >> 8 & 255, c2 = e4 >> 24 & 255, d2 = e4 >> 16 & 255, _2 = e4 >> 8 & 255;
|
|
1332
|
+
return i2 = c2 + Math.round((a3 - c2) * o), s2 = d2 + Math.round((h2 - d2) * o), r = _2 + Math.round((l2 - _2) * o), n.toRgba(i2, s2, r);
|
|
1333
|
+
}, e3.ensureContrastRatio = function(e4, i3, s3) {
|
|
1334
|
+
const r2 = l.relativeLuminance(e4 >> 8), o2 = l.relativeLuminance(i3 >> 8);
|
|
1335
|
+
if (_(r2, o2) < s3) {
|
|
1336
|
+
if (o2 < r2) {
|
|
1337
|
+
const o3 = t3(e4, i3, s3), n3 = _(r2, l.relativeLuminance(o3 >> 8));
|
|
1338
|
+
if (n3 < s3) {
|
|
1339
|
+
const t4 = a2(e4, i3, s3);
|
|
1340
|
+
return n3 > _(r2, l.relativeLuminance(t4 >> 8)) ? o3 : t4;
|
|
1341
|
+
}
|
|
1342
|
+
return o3;
|
|
1343
|
+
}
|
|
1344
|
+
const n2 = a2(e4, i3, s3), h2 = _(r2, l.relativeLuminance(n2 >> 8));
|
|
1345
|
+
if (h2 < s3) {
|
|
1346
|
+
const o3 = t3(e4, i3, s3);
|
|
1347
|
+
return h2 > _(r2, l.relativeLuminance(o3 >> 8)) ? n2 : o3;
|
|
1348
|
+
}
|
|
1349
|
+
return n2;
|
|
1350
|
+
}
|
|
1351
|
+
}, e3.reduceLuminance = t3, e3.increaseLuminance = a2, e3.toChannels = function(e4) {
|
|
1352
|
+
return [e4 >> 24 & 255, e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4];
|
|
1353
|
+
};
|
|
1354
|
+
}(c || (t2.rgba = c = {})), t2.toPaddedHex = d, t2.contrastRatio = _;
|
|
1355
|
+
}, 345: (e2, t2) => {
|
|
1356
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
|
|
1357
|
+
constructor() {
|
|
1358
|
+
this._listeners = [], this._disposed = false;
|
|
1359
|
+
}
|
|
1360
|
+
get event() {
|
|
1361
|
+
return this._event || (this._event = (e3) => (this._listeners.push(e3), { dispose: () => {
|
|
1362
|
+
if (!this._disposed) {
|
|
1363
|
+
for (let t3 = 0; t3 < this._listeners.length; t3++) if (this._listeners[t3] === e3) return void this._listeners.splice(t3, 1);
|
|
1364
|
+
}
|
|
1365
|
+
} })), this._event;
|
|
1366
|
+
}
|
|
1367
|
+
fire(e3, t3) {
|
|
1368
|
+
const i2 = [];
|
|
1369
|
+
for (let e4 = 0; e4 < this._listeners.length; e4++) i2.push(this._listeners[e4]);
|
|
1370
|
+
for (let s2 = 0; s2 < i2.length; s2++) i2[s2].call(void 0, e3, t3);
|
|
1371
|
+
}
|
|
1372
|
+
dispose() {
|
|
1373
|
+
this.clearListeners(), this._disposed = true;
|
|
1374
|
+
}
|
|
1375
|
+
clearListeners() {
|
|
1376
|
+
this._listeners && (this._listeners.length = 0);
|
|
1377
|
+
}
|
|
1378
|
+
}, t2.forwardEvent = function(e3, t3) {
|
|
1379
|
+
return e3((e4) => t3.fire(e4));
|
|
1380
|
+
}, t2.runAndSubscribe = function(e3, t3) {
|
|
1381
|
+
return t3(void 0), e3((e4) => t3(e4));
|
|
1382
|
+
};
|
|
1383
|
+
}, 859: (e2, t2) => {
|
|
1384
|
+
function i2(e3) {
|
|
1385
|
+
for (const t3 of e3) t3.dispose();
|
|
1386
|
+
e3.length = 0;
|
|
1387
|
+
}
|
|
1388
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.getDisposeArrayDisposable = t2.disposeArray = t2.toDisposable = t2.MutableDisposable = t2.Disposable = void 0, t2.Disposable = class {
|
|
1389
|
+
constructor() {
|
|
1390
|
+
this._disposables = [], this._isDisposed = false;
|
|
1391
|
+
}
|
|
1392
|
+
dispose() {
|
|
1393
|
+
this._isDisposed = true;
|
|
1394
|
+
for (const e3 of this._disposables) e3.dispose();
|
|
1395
|
+
this._disposables.length = 0;
|
|
1396
|
+
}
|
|
1397
|
+
register(e3) {
|
|
1398
|
+
return this._disposables.push(e3), e3;
|
|
1399
|
+
}
|
|
1400
|
+
unregister(e3) {
|
|
1401
|
+
const t3 = this._disposables.indexOf(e3);
|
|
1402
|
+
-1 !== t3 && this._disposables.splice(t3, 1);
|
|
1403
|
+
}
|
|
1404
|
+
}, t2.MutableDisposable = class {
|
|
1405
|
+
constructor() {
|
|
1406
|
+
this._isDisposed = false;
|
|
1407
|
+
}
|
|
1408
|
+
get value() {
|
|
1409
|
+
return this._isDisposed ? void 0 : this._value;
|
|
1410
|
+
}
|
|
1411
|
+
set value(e3) {
|
|
1412
|
+
this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3);
|
|
1413
|
+
}
|
|
1414
|
+
clear() {
|
|
1415
|
+
this.value = void 0;
|
|
1416
|
+
}
|
|
1417
|
+
dispose() {
|
|
1418
|
+
this._isDisposed = true, this._value?.dispose(), this._value = void 0;
|
|
1419
|
+
}
|
|
1420
|
+
}, t2.toDisposable = function(e3) {
|
|
1421
|
+
return { dispose: e3 };
|
|
1422
|
+
}, t2.disposeArray = i2, t2.getDisposeArrayDisposable = function(e3) {
|
|
1423
|
+
return { dispose: () => i2(e3) };
|
|
1424
|
+
};
|
|
1425
|
+
}, 485: (e2, t2) => {
|
|
1426
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.FourKeyMap = t2.TwoKeyMap = void 0;
|
|
1427
|
+
class i2 {
|
|
1428
|
+
constructor() {
|
|
1429
|
+
this._data = {};
|
|
1430
|
+
}
|
|
1431
|
+
set(e3, t3, i3) {
|
|
1432
|
+
this._data[e3] || (this._data[e3] = {}), this._data[e3][t3] = i3;
|
|
1433
|
+
}
|
|
1434
|
+
get(e3, t3) {
|
|
1435
|
+
return this._data[e3] ? this._data[e3][t3] : void 0;
|
|
1436
|
+
}
|
|
1437
|
+
clear() {
|
|
1438
|
+
this._data = {};
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
t2.TwoKeyMap = i2, t2.FourKeyMap = class {
|
|
1442
|
+
constructor() {
|
|
1443
|
+
this._data = new i2();
|
|
1444
|
+
}
|
|
1445
|
+
set(e3, t3, s2, r, o) {
|
|
1446
|
+
this._data.get(e3, t3) || this._data.set(e3, t3, new i2()), this._data.get(e3, t3).set(s2, r, o);
|
|
1447
|
+
}
|
|
1448
|
+
get(e3, t3, i3, s2) {
|
|
1449
|
+
return this._data.get(e3, t3)?.get(i3, s2);
|
|
1450
|
+
}
|
|
1451
|
+
clear() {
|
|
1452
|
+
this._data.clear();
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
}, 399: (e2, t2) => {
|
|
1456
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.isChromeOS = t2.isLinux = t2.isWindows = t2.isIphone = t2.isIpad = t2.isMac = t2.getSafariVersion = t2.isSafari = t2.isLegacyEdge = t2.isFirefox = t2.isNode = void 0, t2.isNode = "undefined" != typeof process && "title" in process;
|
|
1457
|
+
const i2 = t2.isNode ? "node" : navigator.userAgent, s2 = t2.isNode ? "node" : navigator.platform;
|
|
1458
|
+
t2.isFirefox = i2.includes("Firefox"), t2.isLegacyEdge = i2.includes("Edge"), t2.isSafari = /^((?!chrome|android).)*safari/i.test(i2), t2.getSafariVersion = function() {
|
|
1459
|
+
if (!t2.isSafari) return 0;
|
|
1460
|
+
const e3 = i2.match(/Version\/(\d+)/);
|
|
1461
|
+
return null === e3 || e3.length < 2 ? 0 : parseInt(e3[1]);
|
|
1462
|
+
}, t2.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s2), t2.isIpad = "iPad" === s2, t2.isIphone = "iPhone" === s2, t2.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s2), t2.isLinux = s2.indexOf("Linux") >= 0, t2.isChromeOS = /\bCrOS\b/.test(i2);
|
|
1463
|
+
}, 385: (e2, t2, i2) => {
|
|
1464
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.DebouncedIdleTask = t2.IdleTaskQueue = t2.PriorityTaskQueue = void 0;
|
|
1465
|
+
const s2 = i2(399);
|
|
1466
|
+
class r {
|
|
1467
|
+
constructor() {
|
|
1468
|
+
this._tasks = [], this._i = 0;
|
|
1469
|
+
}
|
|
1470
|
+
enqueue(e3) {
|
|
1471
|
+
this._tasks.push(e3), this._start();
|
|
1472
|
+
}
|
|
1473
|
+
flush() {
|
|
1474
|
+
for (; this._i < this._tasks.length; ) this._tasks[this._i]() || this._i++;
|
|
1475
|
+
this.clear();
|
|
1476
|
+
}
|
|
1477
|
+
clear() {
|
|
1478
|
+
this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
|
|
1479
|
+
}
|
|
1480
|
+
_start() {
|
|
1481
|
+
this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
|
|
1482
|
+
}
|
|
1483
|
+
_process(e3) {
|
|
1484
|
+
this._idleCallback = void 0;
|
|
1485
|
+
let t3 = 0, i3 = 0, s3 = e3.timeRemaining(), r2 = 0;
|
|
1486
|
+
for (; this._i < this._tasks.length; ) {
|
|
1487
|
+
if (t3 = Date.now(), this._tasks[this._i]() || this._i++, t3 = Math.max(1, Date.now() - t3), i3 = Math.max(t3, i3), r2 = e3.timeRemaining(), 1.5 * i3 > r2) return s3 - t3 < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s3 - t3))}ms`), void this._start();
|
|
1488
|
+
s3 = r2;
|
|
1489
|
+
}
|
|
1490
|
+
this.clear();
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
class o extends r {
|
|
1494
|
+
_requestCallback(e3) {
|
|
1495
|
+
return setTimeout(() => e3(this._createDeadline(16)));
|
|
1496
|
+
}
|
|
1497
|
+
_cancelCallback(e3) {
|
|
1498
|
+
clearTimeout(e3);
|
|
1499
|
+
}
|
|
1500
|
+
_createDeadline(e3) {
|
|
1501
|
+
const t3 = Date.now() + e3;
|
|
1502
|
+
return { timeRemaining: () => Math.max(0, t3 - Date.now()) };
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
t2.PriorityTaskQueue = o, t2.IdleTaskQueue = !s2.isNode && "requestIdleCallback" in window ? class extends r {
|
|
1506
|
+
_requestCallback(e3) {
|
|
1507
|
+
return requestIdleCallback(e3);
|
|
1508
|
+
}
|
|
1509
|
+
_cancelCallback(e3) {
|
|
1510
|
+
cancelIdleCallback(e3);
|
|
1511
|
+
}
|
|
1512
|
+
} : o, t2.DebouncedIdleTask = class {
|
|
1513
|
+
constructor() {
|
|
1514
|
+
this._queue = new t2.IdleTaskQueue();
|
|
1515
|
+
}
|
|
1516
|
+
set(e3) {
|
|
1517
|
+
this._queue.clear(), this._queue.enqueue(e3);
|
|
1518
|
+
}
|
|
1519
|
+
flush() {
|
|
1520
|
+
this._queue.flush();
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
}, 147: (e2, t2) => {
|
|
1524
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.ExtendedAttrs = t2.AttributeData = void 0;
|
|
1525
|
+
class i2 {
|
|
1526
|
+
constructor() {
|
|
1527
|
+
this.fg = 0, this.bg = 0, this.extended = new s2();
|
|
1528
|
+
}
|
|
1529
|
+
static toColorRGB(e3) {
|
|
1530
|
+
return [e3 >>> 16 & 255, e3 >>> 8 & 255, 255 & e3];
|
|
1531
|
+
}
|
|
1532
|
+
static fromColorRGB(e3) {
|
|
1533
|
+
return (255 & e3[0]) << 16 | (255 & e3[1]) << 8 | 255 & e3[2];
|
|
1534
|
+
}
|
|
1535
|
+
clone() {
|
|
1536
|
+
const e3 = new i2();
|
|
1537
|
+
return e3.fg = this.fg, e3.bg = this.bg, e3.extended = this.extended.clone(), e3;
|
|
1538
|
+
}
|
|
1539
|
+
isInverse() {
|
|
1540
|
+
return 67108864 & this.fg;
|
|
1541
|
+
}
|
|
1542
|
+
isBold() {
|
|
1543
|
+
return 134217728 & this.fg;
|
|
1544
|
+
}
|
|
1545
|
+
isUnderline() {
|
|
1546
|
+
return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 1 : 268435456 & this.fg;
|
|
1547
|
+
}
|
|
1548
|
+
isBlink() {
|
|
1549
|
+
return 536870912 & this.fg;
|
|
1550
|
+
}
|
|
1551
|
+
isInvisible() {
|
|
1552
|
+
return 1073741824 & this.fg;
|
|
1553
|
+
}
|
|
1554
|
+
isItalic() {
|
|
1555
|
+
return 67108864 & this.bg;
|
|
1556
|
+
}
|
|
1557
|
+
isDim() {
|
|
1558
|
+
return 134217728 & this.bg;
|
|
1559
|
+
}
|
|
1560
|
+
isStrikethrough() {
|
|
1561
|
+
return 2147483648 & this.fg;
|
|
1562
|
+
}
|
|
1563
|
+
isProtected() {
|
|
1564
|
+
return 536870912 & this.bg;
|
|
1565
|
+
}
|
|
1566
|
+
isOverline() {
|
|
1567
|
+
return 1073741824 & this.bg;
|
|
1568
|
+
}
|
|
1569
|
+
getFgColorMode() {
|
|
1570
|
+
return 50331648 & this.fg;
|
|
1571
|
+
}
|
|
1572
|
+
getBgColorMode() {
|
|
1573
|
+
return 50331648 & this.bg;
|
|
1574
|
+
}
|
|
1575
|
+
isFgRGB() {
|
|
1576
|
+
return 50331648 == (50331648 & this.fg);
|
|
1577
|
+
}
|
|
1578
|
+
isBgRGB() {
|
|
1579
|
+
return 50331648 == (50331648 & this.bg);
|
|
1580
|
+
}
|
|
1581
|
+
isFgPalette() {
|
|
1582
|
+
return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
|
|
1583
|
+
}
|
|
1584
|
+
isBgPalette() {
|
|
1585
|
+
return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
|
|
1586
|
+
}
|
|
1587
|
+
isFgDefault() {
|
|
1588
|
+
return 0 == (50331648 & this.fg);
|
|
1589
|
+
}
|
|
1590
|
+
isBgDefault() {
|
|
1591
|
+
return 0 == (50331648 & this.bg);
|
|
1592
|
+
}
|
|
1593
|
+
isAttributeDefault() {
|
|
1594
|
+
return 0 === this.fg && 0 === this.bg;
|
|
1595
|
+
}
|
|
1596
|
+
getFgColor() {
|
|
1597
|
+
switch (50331648 & this.fg) {
|
|
1598
|
+
case 16777216:
|
|
1599
|
+
case 33554432:
|
|
1600
|
+
return 255 & this.fg;
|
|
1601
|
+
case 50331648:
|
|
1602
|
+
return 16777215 & this.fg;
|
|
1603
|
+
default:
|
|
1604
|
+
return -1;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
getBgColor() {
|
|
1608
|
+
switch (50331648 & this.bg) {
|
|
1609
|
+
case 16777216:
|
|
1610
|
+
case 33554432:
|
|
1611
|
+
return 255 & this.bg;
|
|
1612
|
+
case 50331648:
|
|
1613
|
+
return 16777215 & this.bg;
|
|
1614
|
+
default:
|
|
1615
|
+
return -1;
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
hasExtendedAttrs() {
|
|
1619
|
+
return 268435456 & this.bg;
|
|
1620
|
+
}
|
|
1621
|
+
updateExtended() {
|
|
1622
|
+
this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
|
|
1623
|
+
}
|
|
1624
|
+
getUnderlineColor() {
|
|
1625
|
+
if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
|
|
1626
|
+
case 16777216:
|
|
1627
|
+
case 33554432:
|
|
1628
|
+
return 255 & this.extended.underlineColor;
|
|
1629
|
+
case 50331648:
|
|
1630
|
+
return 16777215 & this.extended.underlineColor;
|
|
1631
|
+
default:
|
|
1632
|
+
return this.getFgColor();
|
|
1633
|
+
}
|
|
1634
|
+
return this.getFgColor();
|
|
1635
|
+
}
|
|
1636
|
+
getUnderlineColorMode() {
|
|
1637
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
|
|
1638
|
+
}
|
|
1639
|
+
isUnderlineColorRGB() {
|
|
1640
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
|
|
1641
|
+
}
|
|
1642
|
+
isUnderlineColorPalette() {
|
|
1643
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
|
|
1644
|
+
}
|
|
1645
|
+
isUnderlineColorDefault() {
|
|
1646
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
|
|
1647
|
+
}
|
|
1648
|
+
getUnderlineStyle() {
|
|
1649
|
+
return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
|
|
1650
|
+
}
|
|
1651
|
+
getUnderlineVariantOffset() {
|
|
1652
|
+
return this.extended.underlineVariantOffset;
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
t2.AttributeData = i2;
|
|
1656
|
+
class s2 {
|
|
1657
|
+
get ext() {
|
|
1658
|
+
return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
|
|
1659
|
+
}
|
|
1660
|
+
set ext(e3) {
|
|
1661
|
+
this._ext = e3;
|
|
1662
|
+
}
|
|
1663
|
+
get underlineStyle() {
|
|
1664
|
+
return this._urlId ? 5 : (469762048 & this._ext) >> 26;
|
|
1665
|
+
}
|
|
1666
|
+
set underlineStyle(e3) {
|
|
1667
|
+
this._ext &= -469762049, this._ext |= e3 << 26 & 469762048;
|
|
1668
|
+
}
|
|
1669
|
+
get underlineColor() {
|
|
1670
|
+
return 67108863 & this._ext;
|
|
1671
|
+
}
|
|
1672
|
+
set underlineColor(e3) {
|
|
1673
|
+
this._ext &= -67108864, this._ext |= 67108863 & e3;
|
|
1674
|
+
}
|
|
1675
|
+
get urlId() {
|
|
1676
|
+
return this._urlId;
|
|
1677
|
+
}
|
|
1678
|
+
set urlId(e3) {
|
|
1679
|
+
this._urlId = e3;
|
|
1680
|
+
}
|
|
1681
|
+
get underlineVariantOffset() {
|
|
1682
|
+
const e3 = (3758096384 & this._ext) >> 29;
|
|
1683
|
+
return e3 < 0 ? 4294967288 ^ e3 : e3;
|
|
1684
|
+
}
|
|
1685
|
+
set underlineVariantOffset(e3) {
|
|
1686
|
+
this._ext &= 536870911, this._ext |= e3 << 29 & 3758096384;
|
|
1687
|
+
}
|
|
1688
|
+
constructor(e3 = 0, t3 = 0) {
|
|
1689
|
+
this._ext = 0, this._urlId = 0, this._ext = e3, this._urlId = t3;
|
|
1690
|
+
}
|
|
1691
|
+
clone() {
|
|
1692
|
+
return new s2(this._ext, this._urlId);
|
|
1693
|
+
}
|
|
1694
|
+
isEmpty() {
|
|
1695
|
+
return 0 === this.underlineStyle && 0 === this._urlId;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
t2.ExtendedAttrs = s2;
|
|
1699
|
+
}, 782: (e2, t2, i2) => {
|
|
1700
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CellData = void 0;
|
|
1701
|
+
const s2 = i2(133), r = i2(855), o = i2(147);
|
|
1702
|
+
class n extends o.AttributeData {
|
|
1703
|
+
constructor() {
|
|
1704
|
+
super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new o.ExtendedAttrs(), this.combinedData = "";
|
|
1705
|
+
}
|
|
1706
|
+
static fromCharData(e3) {
|
|
1707
|
+
const t3 = new n();
|
|
1708
|
+
return t3.setFromCharData(e3), t3;
|
|
1709
|
+
}
|
|
1710
|
+
isCombined() {
|
|
1711
|
+
return 2097152 & this.content;
|
|
1712
|
+
}
|
|
1713
|
+
getWidth() {
|
|
1714
|
+
return this.content >> 22;
|
|
1715
|
+
}
|
|
1716
|
+
getChars() {
|
|
1717
|
+
return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s2.stringFromCodePoint)(2097151 & this.content) : "";
|
|
1718
|
+
}
|
|
1719
|
+
getCode() {
|
|
1720
|
+
return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
|
|
1721
|
+
}
|
|
1722
|
+
setFromCharData(e3) {
|
|
1723
|
+
this.fg = e3[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
|
|
1724
|
+
let t3 = false;
|
|
1725
|
+
if (e3[r.CHAR_DATA_CHAR_INDEX].length > 2) t3 = true;
|
|
1726
|
+
else if (2 === e3[r.CHAR_DATA_CHAR_INDEX].length) {
|
|
1727
|
+
const i3 = e3[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
|
|
1728
|
+
if (55296 <= i3 && i3 <= 56319) {
|
|
1729
|
+
const s3 = e3[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
|
|
1730
|
+
56320 <= s3 && s3 <= 57343 ? this.content = 1024 * (i3 - 55296) + s3 - 56320 + 65536 | e3[r.CHAR_DATA_WIDTH_INDEX] << 22 : t3 = true;
|
|
1731
|
+
} else t3 = true;
|
|
1732
|
+
} else this.content = e3[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e3[r.CHAR_DATA_WIDTH_INDEX] << 22;
|
|
1733
|
+
t3 && (this.combinedData = e3[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e3[r.CHAR_DATA_WIDTH_INDEX] << 22);
|
|
1734
|
+
}
|
|
1735
|
+
getAsCharData() {
|
|
1736
|
+
return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
t2.CellData = n;
|
|
1740
|
+
}, 855: (e2, t2) => {
|
|
1741
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.WHITESPACE_CELL_CODE = t2.WHITESPACE_CELL_WIDTH = t2.WHITESPACE_CELL_CHAR = t2.NULL_CELL_CODE = t2.NULL_CELL_WIDTH = t2.NULL_CELL_CHAR = t2.CHAR_DATA_CODE_INDEX = t2.CHAR_DATA_WIDTH_INDEX = t2.CHAR_DATA_CHAR_INDEX = t2.CHAR_DATA_ATTR_INDEX = t2.DEFAULT_EXT = t2.DEFAULT_ATTR = t2.DEFAULT_COLOR = void 0, t2.DEFAULT_COLOR = 0, t2.DEFAULT_ATTR = 256 | t2.DEFAULT_COLOR << 9, t2.DEFAULT_EXT = 0, t2.CHAR_DATA_ATTR_INDEX = 0, t2.CHAR_DATA_CHAR_INDEX = 1, t2.CHAR_DATA_WIDTH_INDEX = 2, t2.CHAR_DATA_CODE_INDEX = 3, t2.NULL_CELL_CHAR = "", t2.NULL_CELL_WIDTH = 1, t2.NULL_CELL_CODE = 0, t2.WHITESPACE_CELL_CHAR = " ", t2.WHITESPACE_CELL_WIDTH = 1, t2.WHITESPACE_CELL_CODE = 32;
|
|
1742
|
+
}, 133: (e2, t2) => {
|
|
1743
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Utf8ToUtf32 = t2.StringToUtf32 = t2.utf32ToString = t2.stringFromCodePoint = void 0, t2.stringFromCodePoint = function(e3) {
|
|
1744
|
+
return e3 > 65535 ? (e3 -= 65536, String.fromCharCode(55296 + (e3 >> 10)) + String.fromCharCode(e3 % 1024 + 56320)) : String.fromCharCode(e3);
|
|
1745
|
+
}, t2.utf32ToString = function(e3, t3 = 0, i2 = e3.length) {
|
|
1746
|
+
let s2 = "";
|
|
1747
|
+
for (let r = t3; r < i2; ++r) {
|
|
1748
|
+
let t4 = e3[r];
|
|
1749
|
+
t4 > 65535 ? (t4 -= 65536, s2 += String.fromCharCode(55296 + (t4 >> 10)) + String.fromCharCode(t4 % 1024 + 56320)) : s2 += String.fromCharCode(t4);
|
|
1750
|
+
}
|
|
1751
|
+
return s2;
|
|
1752
|
+
}, t2.StringToUtf32 = class {
|
|
1753
|
+
constructor() {
|
|
1754
|
+
this._interim = 0;
|
|
1755
|
+
}
|
|
1756
|
+
clear() {
|
|
1757
|
+
this._interim = 0;
|
|
1758
|
+
}
|
|
1759
|
+
decode(e3, t3) {
|
|
1760
|
+
const i2 = e3.length;
|
|
1761
|
+
if (!i2) return 0;
|
|
1762
|
+
let s2 = 0, r = 0;
|
|
1763
|
+
if (this._interim) {
|
|
1764
|
+
const i3 = e3.charCodeAt(r++);
|
|
1765
|
+
56320 <= i3 && i3 <= 57343 ? t3[s2++] = 1024 * (this._interim - 55296) + i3 - 56320 + 65536 : (t3[s2++] = this._interim, t3[s2++] = i3), this._interim = 0;
|
|
1766
|
+
}
|
|
1767
|
+
for (let o = r; o < i2; ++o) {
|
|
1768
|
+
const r2 = e3.charCodeAt(o);
|
|
1769
|
+
if (55296 <= r2 && r2 <= 56319) {
|
|
1770
|
+
if (++o >= i2) return this._interim = r2, s2;
|
|
1771
|
+
const n = e3.charCodeAt(o);
|
|
1772
|
+
56320 <= n && n <= 57343 ? t3[s2++] = 1024 * (r2 - 55296) + n - 56320 + 65536 : (t3[s2++] = r2, t3[s2++] = n);
|
|
1773
|
+
} else 65279 !== r2 && (t3[s2++] = r2);
|
|
1774
|
+
}
|
|
1775
|
+
return s2;
|
|
1776
|
+
}
|
|
1777
|
+
}, t2.Utf8ToUtf32 = class {
|
|
1778
|
+
constructor() {
|
|
1779
|
+
this.interim = new Uint8Array(3);
|
|
1780
|
+
}
|
|
1781
|
+
clear() {
|
|
1782
|
+
this.interim.fill(0);
|
|
1783
|
+
}
|
|
1784
|
+
decode(e3, t3) {
|
|
1785
|
+
const i2 = e3.length;
|
|
1786
|
+
if (!i2) return 0;
|
|
1787
|
+
let s2, r, o, n, a = 0, h = 0, l = 0;
|
|
1788
|
+
if (this.interim[0]) {
|
|
1789
|
+
let s3 = false, r2 = this.interim[0];
|
|
1790
|
+
r2 &= 192 == (224 & r2) ? 31 : 224 == (240 & r2) ? 15 : 7;
|
|
1791
|
+
let o2, n2 = 0;
|
|
1792
|
+
for (; (o2 = 63 & this.interim[++n2]) && n2 < 4; ) r2 <<= 6, r2 |= o2;
|
|
1793
|
+
const h2 = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4, c2 = h2 - n2;
|
|
1794
|
+
for (; l < c2; ) {
|
|
1795
|
+
if (l >= i2) return 0;
|
|
1796
|
+
if (o2 = e3[l++], 128 != (192 & o2)) {
|
|
1797
|
+
l--, s3 = true;
|
|
1798
|
+
break;
|
|
1799
|
+
}
|
|
1800
|
+
this.interim[n2++] = o2, r2 <<= 6, r2 |= 63 & o2;
|
|
1801
|
+
}
|
|
1802
|
+
s3 || (2 === h2 ? r2 < 128 ? l-- : t3[a++] = r2 : 3 === h2 ? r2 < 2048 || r2 >= 55296 && r2 <= 57343 || 65279 === r2 || (t3[a++] = r2) : r2 < 65536 || r2 > 1114111 || (t3[a++] = r2)), this.interim.fill(0);
|
|
1803
|
+
}
|
|
1804
|
+
const c = i2 - 4;
|
|
1805
|
+
let d = l;
|
|
1806
|
+
for (; d < i2; ) {
|
|
1807
|
+
for (; !(!(d < c) || 128 & (s2 = e3[d]) || 128 & (r = e3[d + 1]) || 128 & (o = e3[d + 2]) || 128 & (n = e3[d + 3])); ) t3[a++] = s2, t3[a++] = r, t3[a++] = o, t3[a++] = n, d += 4;
|
|
1808
|
+
if (s2 = e3[d++], s2 < 128) t3[a++] = s2;
|
|
1809
|
+
else if (192 == (224 & s2)) {
|
|
1810
|
+
if (d >= i2) return this.interim[0] = s2, a;
|
|
1811
|
+
if (r = e3[d++], 128 != (192 & r)) {
|
|
1812
|
+
d--;
|
|
1813
|
+
continue;
|
|
1814
|
+
}
|
|
1815
|
+
if (h = (31 & s2) << 6 | 63 & r, h < 128) {
|
|
1816
|
+
d--;
|
|
1817
|
+
continue;
|
|
1818
|
+
}
|
|
1819
|
+
t3[a++] = h;
|
|
1820
|
+
} else if (224 == (240 & s2)) {
|
|
1821
|
+
if (d >= i2) return this.interim[0] = s2, a;
|
|
1822
|
+
if (r = e3[d++], 128 != (192 & r)) {
|
|
1823
|
+
d--;
|
|
1824
|
+
continue;
|
|
1825
|
+
}
|
|
1826
|
+
if (d >= i2) return this.interim[0] = s2, this.interim[1] = r, a;
|
|
1827
|
+
if (o = e3[d++], 128 != (192 & o)) {
|
|
1828
|
+
d--;
|
|
1829
|
+
continue;
|
|
1830
|
+
}
|
|
1831
|
+
if (h = (15 & s2) << 12 | (63 & r) << 6 | 63 & o, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
|
|
1832
|
+
t3[a++] = h;
|
|
1833
|
+
} else if (240 == (248 & s2)) {
|
|
1834
|
+
if (d >= i2) return this.interim[0] = s2, a;
|
|
1835
|
+
if (r = e3[d++], 128 != (192 & r)) {
|
|
1836
|
+
d--;
|
|
1837
|
+
continue;
|
|
1838
|
+
}
|
|
1839
|
+
if (d >= i2) return this.interim[0] = s2, this.interim[1] = r, a;
|
|
1840
|
+
if (o = e3[d++], 128 != (192 & o)) {
|
|
1841
|
+
d--;
|
|
1842
|
+
continue;
|
|
1843
|
+
}
|
|
1844
|
+
if (d >= i2) return this.interim[0] = s2, this.interim[1] = r, this.interim[2] = o, a;
|
|
1845
|
+
if (n = e3[d++], 128 != (192 & n)) {
|
|
1846
|
+
d--;
|
|
1847
|
+
continue;
|
|
1848
|
+
}
|
|
1849
|
+
if (h = (7 & s2) << 18 | (63 & r) << 12 | (63 & o) << 6 | 63 & n, h < 65536 || h > 1114111) continue;
|
|
1850
|
+
t3[a++] = h;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
return a;
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
}, 776: function(e2, t2, i2) {
|
|
1857
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
1858
|
+
var r2, o2 = arguments.length, n2 = o2 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
1859
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n2 = Reflect.decorate(e3, t3, i3, s3);
|
|
1860
|
+
else for (var a2 = e3.length - 1; a2 >= 0; a2--) (r2 = e3[a2]) && (n2 = (o2 < 3 ? r2(n2) : o2 > 3 ? r2(t3, i3, n2) : r2(t3, i3)) || n2);
|
|
1861
|
+
return o2 > 3 && n2 && Object.defineProperty(t3, i3, n2), n2;
|
|
1862
|
+
}, r = this && this.__param || function(e3, t3) {
|
|
1863
|
+
return function(i3, s3) {
|
|
1864
|
+
t3(i3, s3, e3);
|
|
1865
|
+
};
|
|
1866
|
+
};
|
|
1867
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.traceCall = t2.setTraceLogger = t2.LogService = void 0;
|
|
1868
|
+
const o = i2(859), n = i2(97), a = { trace: n.LogLevelEnum.TRACE, debug: n.LogLevelEnum.DEBUG, info: n.LogLevelEnum.INFO, warn: n.LogLevelEnum.WARN, error: n.LogLevelEnum.ERROR, off: n.LogLevelEnum.OFF };
|
|
1869
|
+
let h, l = t2.LogService = class extends o.Disposable {
|
|
1870
|
+
get logLevel() {
|
|
1871
|
+
return this._logLevel;
|
|
1872
|
+
}
|
|
1873
|
+
constructor(e3) {
|
|
1874
|
+
super(), this._optionsService = e3, this._logLevel = n.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), h = this;
|
|
1875
|
+
}
|
|
1876
|
+
_updateLogLevel() {
|
|
1877
|
+
this._logLevel = a[this._optionsService.rawOptions.logLevel];
|
|
1878
|
+
}
|
|
1879
|
+
_evalLazyOptionalParams(e3) {
|
|
1880
|
+
for (let t3 = 0; t3 < e3.length; t3++) "function" == typeof e3[t3] && (e3[t3] = e3[t3]());
|
|
1881
|
+
}
|
|
1882
|
+
_log(e3, t3, i3) {
|
|
1883
|
+
this._evalLazyOptionalParams(i3), e3.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t3, ...i3);
|
|
1884
|
+
}
|
|
1885
|
+
trace(e3, ...t3) {
|
|
1886
|
+
this._logLevel <= n.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
|
|
1887
|
+
}
|
|
1888
|
+
debug(e3, ...t3) {
|
|
1889
|
+
this._logLevel <= n.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
|
|
1890
|
+
}
|
|
1891
|
+
info(e3, ...t3) {
|
|
1892
|
+
this._logLevel <= n.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e3, t3);
|
|
1893
|
+
}
|
|
1894
|
+
warn(e3, ...t3) {
|
|
1895
|
+
this._logLevel <= n.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e3, t3);
|
|
1896
|
+
}
|
|
1897
|
+
error(e3, ...t3) {
|
|
1898
|
+
this._logLevel <= n.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e3, t3);
|
|
1899
|
+
}
|
|
1900
|
+
};
|
|
1901
|
+
t2.LogService = l = s2([r(0, n.IOptionsService)], l), t2.setTraceLogger = function(e3) {
|
|
1902
|
+
h = e3;
|
|
1903
|
+
}, t2.traceCall = function(e3, t3, i3) {
|
|
1904
|
+
if ("function" != typeof i3.value) throw new Error("not supported");
|
|
1905
|
+
const s3 = i3.value;
|
|
1906
|
+
i3.value = function(...e4) {
|
|
1907
|
+
if (h.logLevel !== n.LogLevelEnum.TRACE) return s3.apply(this, e4);
|
|
1908
|
+
h.trace(`GlyphRenderer#${s3.name}(${e4.map((e5) => JSON.stringify(e5)).join(", ")})`);
|
|
1909
|
+
const t4 = s3.apply(this, e4);
|
|
1910
|
+
return h.trace(`GlyphRenderer#${s3.name} return`, t4), t4;
|
|
1911
|
+
};
|
|
1912
|
+
};
|
|
1913
|
+
}, 726: (e2, t2) => {
|
|
1914
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.createDecorator = t2.getServiceDependencies = t2.serviceRegistry = void 0;
|
|
1915
|
+
const i2 = "di$target", s2 = "di$dependencies";
|
|
1916
|
+
t2.serviceRegistry = /* @__PURE__ */ new Map(), t2.getServiceDependencies = function(e3) {
|
|
1917
|
+
return e3[s2] || [];
|
|
1918
|
+
}, t2.createDecorator = function(e3) {
|
|
1919
|
+
if (t2.serviceRegistry.has(e3)) return t2.serviceRegistry.get(e3);
|
|
1920
|
+
const r = function(e4, t3, o) {
|
|
1921
|
+
if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
|
|
1922
|
+
!function(e5, t4, r2) {
|
|
1923
|
+
t4[i2] === t4 ? t4[s2].push({ id: e5, index: r2 }) : (t4[s2] = [{ id: e5, index: r2 }], t4[i2] = t4);
|
|
1924
|
+
}(r, e4, o);
|
|
1925
|
+
};
|
|
1926
|
+
return r.toString = () => e3, t2.serviceRegistry.set(e3, r), r;
|
|
1927
|
+
};
|
|
1928
|
+
}, 97: (e2, t2, i2) => {
|
|
1929
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.IDecorationService = t2.IUnicodeService = t2.IOscLinkService = t2.IOptionsService = t2.ILogService = t2.LogLevelEnum = t2.IInstantiationService = t2.ICharsetService = t2.ICoreService = t2.ICoreMouseService = t2.IBufferService = void 0;
|
|
1930
|
+
const s2 = i2(726);
|
|
1931
|
+
var r;
|
|
1932
|
+
t2.IBufferService = (0, s2.createDecorator)("BufferService"), t2.ICoreMouseService = (0, s2.createDecorator)("CoreMouseService"), t2.ICoreService = (0, s2.createDecorator)("CoreService"), t2.ICharsetService = (0, s2.createDecorator)("CharsetService"), t2.IInstantiationService = (0, s2.createDecorator)("InstantiationService"), function(e3) {
|
|
1933
|
+
e3[e3.TRACE = 0] = "TRACE", e3[e3.DEBUG = 1] = "DEBUG", e3[e3.INFO = 2] = "INFO", e3[e3.WARN = 3] = "WARN", e3[e3.ERROR = 4] = "ERROR", e3[e3.OFF = 5] = "OFF";
|
|
1934
|
+
}(r || (t2.LogLevelEnum = r = {})), t2.ILogService = (0, s2.createDecorator)("LogService"), t2.IOptionsService = (0, s2.createDecorator)("OptionsService"), t2.IOscLinkService = (0, s2.createDecorator)("OscLinkService"), t2.IUnicodeService = (0, s2.createDecorator)("UnicodeService"), t2.IDecorationService = (0, s2.createDecorator)("DecorationService");
|
|
1935
|
+
} }, t = {};
|
|
1936
|
+
function i(s2) {
|
|
1937
|
+
var r = t[s2];
|
|
1938
|
+
if (void 0 !== r) return r.exports;
|
|
1939
|
+
var o = t[s2] = { exports: {} };
|
|
1940
|
+
return e[s2].call(o.exports, o, o.exports, i), o.exports;
|
|
1941
|
+
}
|
|
1942
|
+
var s = {};
|
|
1943
|
+
return (() => {
|
|
1944
|
+
var e2 = s;
|
|
1945
|
+
Object.defineProperty(e2, "__esModule", { value: true }), e2.CanvasAddon = void 0;
|
|
1946
|
+
const t2 = i(345), r = i(859), o = i(776), n = i(949);
|
|
1947
|
+
class a extends r.Disposable {
|
|
1948
|
+
constructor() {
|
|
1949
|
+
super(...arguments), this._onChangeTextureAtlas = this.register(new t2.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new t2.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
|
|
1950
|
+
}
|
|
1951
|
+
get textureAtlas() {
|
|
1952
|
+
return this._renderer?.textureAtlas;
|
|
1953
|
+
}
|
|
1954
|
+
activate(e3) {
|
|
1955
|
+
const i2 = e3._core;
|
|
1956
|
+
if (!e3.element) return void this.register(i2.onWillOpen(() => this.activate(e3)));
|
|
1957
|
+
this._terminal = e3;
|
|
1958
|
+
const s2 = i2.coreService, a2 = i2.optionsService, h = i2.screenElement, l = i2.linkifier, c = i2, d = c._bufferService, _ = c._renderService, u = c._characterJoinerService, g = c._charSizeService, f = c._coreBrowserService, v = c._decorationService, C = c._logService, p = c._themeService;
|
|
1959
|
+
(0, o.setTraceLogger)(C), this._renderer = new n.CanvasRenderer(e3, h, l, d, g, a2, u, s2, f, v, p), this.register((0, t2.forwardEvent)(this._renderer.onChangeTextureAtlas, this._onChangeTextureAtlas)), this.register((0, t2.forwardEvent)(this._renderer.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas)), _.setRenderer(this._renderer), _.handleResize(d.cols, d.rows), this.register((0, r.toDisposable)(() => {
|
|
1960
|
+
_.setRenderer(this._terminal._core._createRenderer()), _.handleResize(e3.cols, e3.rows), this._renderer?.dispose(), this._renderer = void 0;
|
|
1961
|
+
}));
|
|
1962
|
+
}
|
|
1963
|
+
clearTextureAtlas() {
|
|
1964
|
+
this._renderer?.clearTextureAtlas();
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
e2.CanvasAddon = a;
|
|
1968
|
+
})(), s;
|
|
1969
|
+
})());
|
|
1970
|
+
})(addonCanvas$1);
|
|
1971
|
+
var addonCanvasExports = addonCanvas$1.exports;
|
|
1972
|
+
const addonCanvas = /* @__PURE__ */ _mergeNamespaces({
|
|
1973
|
+
__proto__: null
|
|
1974
|
+
}, [addonCanvasExports]);
|
|
1975
|
+
export {
|
|
1976
|
+
addonCanvas as a
|
|
1977
|
+
};
|