@dev-anywhere/proxy 0.11.1 → 0.11.3
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/dist/{autostart-5DRDZ5QQ.js → autostart-4ODG6HXY.js} +1 -1
- package/dist/{chunk-RSHWLFLA.js → chunk-AS3GTK55.js} +2 -2
- package/dist/{chunk-GBNUJCH4.js → chunk-DMYLOWNT.js} +651 -222
- package/dist/chunk-DMYLOWNT.js.map +1 -0
- package/dist/{chunk-5DGT5OCO.js → chunk-VU5TZ24H.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/serve.js +2 -2
- package/dist/{terminal-F66K6FB2.js → terminal-RTUZIOM5.js} +3 -3
- package/dist/terminal-worker.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-GBNUJCH4.js.map +0 -1
- /package/dist/{autostart-5DRDZ5QQ.js.map → autostart-4ODG6HXY.js.map} +0 -0
- /package/dist/{chunk-RSHWLFLA.js.map → chunk-AS3GTK55.js.map} +0 -0
- /package/dist/{chunk-5DGT5OCO.js.map → chunk-VU5TZ24H.js.map} +0 -0
- /package/dist/{terminal-F66K6FB2.js.map → terminal-RTUZIOM5.js.map} +0 -0
|
@@ -279,12 +279,440 @@ function shouldStartPtyTurnOnInput(currentState, data) {
|
|
|
279
279
|
|
|
280
280
|
// src/common/pty-render-sequencer.ts
|
|
281
281
|
import pkg from "@xterm/headless";
|
|
282
|
-
|
|
282
|
+
|
|
283
|
+
// ../../node_modules/.pnpm/@xterm+addon-serialize@0.14.0_patch_hash=h2cawg7hfvsnhwinj7ekv35cuq/node_modules/@xterm/addon-serialize/lib/addon-serialize.mjs
|
|
284
|
+
function fileLinkUri(terminal, attr) {
|
|
285
|
+
const id = attr.hasExtendedAttrs() && attr.extended?.urlId;
|
|
286
|
+
const uri = id && terminal._core?._oscLinkService?.getLinkData(id)?.uri;
|
|
287
|
+
return typeof uri === "string" && /^file:\/\//i.test(uri) && !/[\x00-\x1f\x7f-\x9f]/.test(uri) ? uri : "";
|
|
288
|
+
}
|
|
289
|
+
function oscFileLink(uri) {
|
|
290
|
+
return "\x1B]8;;" + uri + "\x1B\\";
|
|
291
|
+
}
|
|
292
|
+
function updateSerializedFileLink(handler, cell) {
|
|
293
|
+
const uri = fileLinkUri(handler._terminal, cell);
|
|
294
|
+
if (uri !== (handler._fileLink || "")) {
|
|
295
|
+
handler._currentRow += oscFileLink(uri);
|
|
296
|
+
handler._fileLink = uri;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
function restoreSerializedFileLink(terminal, options) {
|
|
300
|
+
if (options?.range || options?.excludeAltBuffer && terminal.buffer.active.type === "alternate") return "";
|
|
301
|
+
const uri = fileLinkUri(terminal, terminal._core._inputHandler._curAttrData);
|
|
302
|
+
return uri ? oscFileLink(uri) : "";
|
|
303
|
+
}
|
|
304
|
+
var m = 0;
|
|
305
|
+
var p = 0;
|
|
306
|
+
var g = 0;
|
|
307
|
+
var b = 0;
|
|
308
|
+
var I;
|
|
309
|
+
((r) => {
|
|
310
|
+
function u(t, a, s, i) {
|
|
311
|
+
return i !== void 0 ? `#${B(t)}${B(a)}${B(s)}${B(i)}` : `#${B(t)}${B(a)}${B(s)}`;
|
|
312
|
+
}
|
|
313
|
+
r.toCss = u;
|
|
314
|
+
function o(t, a, s, i = 255) {
|
|
315
|
+
return (t << 24 | a << 16 | s << 8 | i) >>> 0;
|
|
316
|
+
}
|
|
317
|
+
r.toRgba = o;
|
|
318
|
+
function e(t, a, s, i) {
|
|
319
|
+
return { css: r.toCss(t, a, s, i), rgba: r.toRgba(t, a, s, i) };
|
|
320
|
+
}
|
|
321
|
+
r.toColor = e;
|
|
322
|
+
})(I ||= {});
|
|
323
|
+
var $;
|
|
324
|
+
((i) => {
|
|
325
|
+
function u(n5, l) {
|
|
326
|
+
if (b = (l.rgba & 255) / 255, b === 1) return { css: l.css, rgba: l.rgba };
|
|
327
|
+
let f = l.rgba >> 24 & 255, d = l.rgba >> 16 & 255, c = l.rgba >> 8 & 255, C2 = n5.rgba >> 24 & 255, h = n5.rgba >> 16 & 255, x = n5.rgba >> 8 & 255;
|
|
328
|
+
m = C2 + Math.round((f - C2) * b), p = h + Math.round((d - h) * b), g = x + Math.round((c - x) * b);
|
|
329
|
+
let R2 = I.toCss(m, p, g), L = I.toRgba(m, p, g);
|
|
330
|
+
return { css: R2, rgba: L };
|
|
331
|
+
}
|
|
332
|
+
i.blend = u;
|
|
333
|
+
function o(n5) {
|
|
334
|
+
return (n5.rgba & 255) === 255;
|
|
335
|
+
}
|
|
336
|
+
i.isOpaque = o;
|
|
337
|
+
function e(n5, l, f) {
|
|
338
|
+
let d = y.ensureContrastRatio(n5.rgba, l.rgba, f);
|
|
339
|
+
if (d) return I.toColor(d >> 24 & 255, d >> 16 & 255, d >> 8 & 255);
|
|
340
|
+
}
|
|
341
|
+
i.ensureContrastRatio = e;
|
|
342
|
+
function r(n5) {
|
|
343
|
+
let l = (n5.rgba | 255) >>> 0;
|
|
344
|
+
return [m, p, g] = y.toChannels(l), { css: I.toCss(m, p, g), rgba: l };
|
|
345
|
+
}
|
|
346
|
+
i.opaque = r;
|
|
347
|
+
function t(n5, l) {
|
|
348
|
+
return b = Math.round(l * 255), [m, p, g] = y.toChannels(n5.rgba), { css: I.toCss(m, p, g, b), rgba: I.toRgba(m, p, g, b) };
|
|
349
|
+
}
|
|
350
|
+
i.opacity = t;
|
|
351
|
+
function a(n5, l) {
|
|
352
|
+
return b = n5.rgba & 255, t(n5, b * l / 255);
|
|
353
|
+
}
|
|
354
|
+
i.multiplyOpacity = a;
|
|
355
|
+
function s(n5) {
|
|
356
|
+
return [n5.rgba >> 24 & 255, n5.rgba >> 16 & 255, n5.rgba >> 8 & 255];
|
|
357
|
+
}
|
|
358
|
+
i.toColorRGB = s;
|
|
359
|
+
})($ ||= {});
|
|
360
|
+
var _;
|
|
361
|
+
((r) => {
|
|
362
|
+
let u, o;
|
|
363
|
+
try {
|
|
364
|
+
let t = document.createElement("canvas");
|
|
365
|
+
t.width = 1, t.height = 1;
|
|
366
|
+
let a = t.getContext("2d", { willReadFrequently: true });
|
|
367
|
+
a && (u = a, u.globalCompositeOperation = "copy", o = u.createLinearGradient(0, 0, 1, 1));
|
|
368
|
+
} catch {
|
|
369
|
+
}
|
|
370
|
+
function e(t) {
|
|
371
|
+
if (t.match(/#[\da-f]{3,8}/i)) switch (t.length) {
|
|
372
|
+
case 4:
|
|
373
|
+
return m = parseInt(t.slice(1, 2).repeat(2), 16), p = parseInt(t.slice(2, 3).repeat(2), 16), g = parseInt(t.slice(3, 4).repeat(2), 16), I.toColor(m, p, g);
|
|
374
|
+
case 5:
|
|
375
|
+
return m = parseInt(t.slice(1, 2).repeat(2), 16), p = parseInt(t.slice(2, 3).repeat(2), 16), g = parseInt(t.slice(3, 4).repeat(2), 16), b = parseInt(t.slice(4, 5).repeat(2), 16), I.toColor(m, p, g, b);
|
|
376
|
+
case 7:
|
|
377
|
+
return { css: t, rgba: (parseInt(t.slice(1), 16) << 8 | 255) >>> 0 };
|
|
378
|
+
case 9:
|
|
379
|
+
return { css: t, rgba: parseInt(t.slice(1), 16) >>> 0 };
|
|
380
|
+
}
|
|
381
|
+
let a = t.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
|
|
382
|
+
if (a) return m = parseInt(a[1]), p = parseInt(a[2]), g = parseInt(a[3]), b = Math.round((a[5] === void 0 ? 1 : parseFloat(a[5])) * 255), I.toColor(m, p, g, b);
|
|
383
|
+
if (!u || !o) throw new Error("css.toColor: Unsupported css format");
|
|
384
|
+
if (u.fillStyle = o, u.fillStyle = t, typeof u.fillStyle != "string") throw new Error("css.toColor: Unsupported css format");
|
|
385
|
+
if (u.fillRect(0, 0, 1, 1), [m, p, g, b] = u.getImageData(0, 0, 1, 1).data, b !== 255) throw new Error("css.toColor: Unsupported css format");
|
|
386
|
+
return { rgba: I.toRgba(m, p, g, b), css: t };
|
|
387
|
+
}
|
|
388
|
+
r.toColor = e;
|
|
389
|
+
})(_ ||= {});
|
|
390
|
+
var v;
|
|
391
|
+
((e) => {
|
|
392
|
+
function u(r) {
|
|
393
|
+
return o(r >> 16 & 255, r >> 8 & 255, r & 255);
|
|
394
|
+
}
|
|
395
|
+
e.relativeLuminance = u;
|
|
396
|
+
function o(r, t, a) {
|
|
397
|
+
let s = r / 255, i = t / 255, n5 = a / 255, l = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4), f = i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4), d = n5 <= 0.03928 ? n5 / 12.92 : Math.pow((n5 + 0.055) / 1.055, 2.4);
|
|
398
|
+
return l * 0.2126 + f * 0.7152 + d * 0.0722;
|
|
399
|
+
}
|
|
400
|
+
e.relativeLuminance2 = o;
|
|
401
|
+
})(v ||= {});
|
|
402
|
+
var y;
|
|
403
|
+
((a) => {
|
|
404
|
+
function u(s, i) {
|
|
405
|
+
if (b = (i & 255) / 255, b === 1) return i;
|
|
406
|
+
let n5 = i >> 24 & 255, l = i >> 16 & 255, f = i >> 8 & 255, d = s >> 24 & 255, c = s >> 16 & 255, C2 = s >> 8 & 255;
|
|
407
|
+
return m = d + Math.round((n5 - d) * b), p = c + Math.round((l - c) * b), g = C2 + Math.round((f - C2) * b), I.toRgba(m, p, g);
|
|
408
|
+
}
|
|
409
|
+
a.blend = u;
|
|
410
|
+
function o(s, i, n5) {
|
|
411
|
+
let l = v.relativeLuminance(s >> 8), f = v.relativeLuminance(i >> 8);
|
|
412
|
+
if (F(l, f) < n5) {
|
|
413
|
+
if (f < l) {
|
|
414
|
+
let h = e(s, i, n5), x = F(l, v.relativeLuminance(h >> 8));
|
|
415
|
+
if (x < n5) {
|
|
416
|
+
let R2 = r(s, i, n5), L = F(l, v.relativeLuminance(R2 >> 8));
|
|
417
|
+
return x > L ? h : R2;
|
|
418
|
+
}
|
|
419
|
+
return h;
|
|
420
|
+
}
|
|
421
|
+
let c = r(s, i, n5), C2 = F(l, v.relativeLuminance(c >> 8));
|
|
422
|
+
if (C2 < n5) {
|
|
423
|
+
let h = e(s, i, n5), x = F(l, v.relativeLuminance(h >> 8));
|
|
424
|
+
return C2 > x ? c : h;
|
|
425
|
+
}
|
|
426
|
+
return c;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
a.ensureContrastRatio = o;
|
|
430
|
+
function e(s, i, n5) {
|
|
431
|
+
let l = s >> 24 & 255, f = s >> 16 & 255, d = s >> 8 & 255, c = i >> 24 & 255, C2 = i >> 16 & 255, h = i >> 8 & 255, x = F(v.relativeLuminance2(c, C2, h), v.relativeLuminance2(l, f, d));
|
|
432
|
+
for (; x < n5 && (c > 0 || C2 > 0 || h > 0); ) c -= Math.max(0, Math.ceil(c * 0.1)), C2 -= Math.max(0, Math.ceil(C2 * 0.1)), h -= Math.max(0, Math.ceil(h * 0.1)), x = F(v.relativeLuminance2(c, C2, h), v.relativeLuminance2(l, f, d));
|
|
433
|
+
return (c << 24 | C2 << 16 | h << 8 | 255) >>> 0;
|
|
434
|
+
}
|
|
435
|
+
a.reduceLuminance = e;
|
|
436
|
+
function r(s, i, n5) {
|
|
437
|
+
let l = s >> 24 & 255, f = s >> 16 & 255, d = s >> 8 & 255, c = i >> 24 & 255, C2 = i >> 16 & 255, h = i >> 8 & 255, x = F(v.relativeLuminance2(c, C2, h), v.relativeLuminance2(l, f, d));
|
|
438
|
+
for (; x < n5 && (c < 255 || C2 < 255 || h < 255); ) c = Math.min(255, c + Math.ceil((255 - c) * 0.1)), C2 = Math.min(255, C2 + Math.ceil((255 - C2) * 0.1)), h = Math.min(255, h + Math.ceil((255 - h) * 0.1)), x = F(v.relativeLuminance2(c, C2, h), v.relativeLuminance2(l, f, d));
|
|
439
|
+
return (c << 24 | C2 << 16 | h << 8 | 255) >>> 0;
|
|
440
|
+
}
|
|
441
|
+
a.increaseLuminance = r;
|
|
442
|
+
function t(s) {
|
|
443
|
+
return [s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
444
|
+
}
|
|
445
|
+
a.toChannels = t;
|
|
446
|
+
})(y ||= {});
|
|
447
|
+
function B(u) {
|
|
448
|
+
let o = u.toString(16);
|
|
449
|
+
return o.length < 2 ? "0" + o : o;
|
|
450
|
+
}
|
|
451
|
+
function F(u, o) {
|
|
452
|
+
return u < o ? (o + 0.05) / (u + 0.05) : (u + 0.05) / (o + 0.05);
|
|
453
|
+
}
|
|
454
|
+
var E = Object.freeze((() => {
|
|
455
|
+
let u = [_.toColor("#2e3436"), _.toColor("#cc0000"), _.toColor("#4e9a06"), _.toColor("#c4a000"), _.toColor("#3465a4"), _.toColor("#75507b"), _.toColor("#06989a"), _.toColor("#d3d7cf"), _.toColor("#555753"), _.toColor("#ef2929"), _.toColor("#8ae234"), _.toColor("#fce94f"), _.toColor("#729fcf"), _.toColor("#ad7fa8"), _.toColor("#34e2e2"), _.toColor("#eeeeec")], o = [0, 95, 135, 175, 215, 255];
|
|
456
|
+
for (let e = 0; e < 216; e++) {
|
|
457
|
+
let r = o[e / 36 % 6 | 0], t = o[e / 6 % 6 | 0], a = o[e % 6];
|
|
458
|
+
u.push({ css: I.toCss(r, t, a), rgba: I.toRgba(r, t, a) });
|
|
459
|
+
}
|
|
460
|
+
for (let e = 0; e < 24; e++) {
|
|
461
|
+
let r = 8 + e * 10;
|
|
462
|
+
u.push({ css: I.toCss(r, r, r), rgba: I.toRgba(r, r, r) });
|
|
463
|
+
}
|
|
464
|
+
return u;
|
|
465
|
+
})());
|
|
466
|
+
function A(u, o, e) {
|
|
467
|
+
return Math.max(o, Math.min(u, e));
|
|
468
|
+
}
|
|
469
|
+
function O(u) {
|
|
470
|
+
switch (u) {
|
|
471
|
+
case "&":
|
|
472
|
+
return "&";
|
|
473
|
+
case "<":
|
|
474
|
+
return "<";
|
|
475
|
+
}
|
|
476
|
+
return u;
|
|
477
|
+
}
|
|
478
|
+
var S = class {
|
|
479
|
+
constructor(o) {
|
|
480
|
+
this._buffer = o;
|
|
481
|
+
}
|
|
482
|
+
serialize(o, e) {
|
|
483
|
+
let r = this._buffer.getNullCell(), t = this._buffer.getNullCell(), a = r, s = o.start.y, i = o.end.y, n5 = o.start.x, l = o.end.x;
|
|
484
|
+
this._beforeSerialize(i - s, s, i);
|
|
485
|
+
for (let f = s; f <= i; f++) {
|
|
486
|
+
let d = this._buffer.getLine(f);
|
|
487
|
+
if (d) {
|
|
488
|
+
let c = f === o.start.y ? n5 : 0, C2 = f === o.end.y ? l : d.length;
|
|
489
|
+
for (let h = c; h < C2; h++) {
|
|
490
|
+
let x = d.getCell(h, a === r ? t : r);
|
|
491
|
+
if (!x) {
|
|
492
|
+
console.warn(`Can't get cell at row=${f}, col=${h}`);
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
this._nextCell(x, a, f, h), a = x;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
this._rowEnd(f, f === i);
|
|
499
|
+
}
|
|
500
|
+
return this._afterSerialize(), this._serializeString(e);
|
|
501
|
+
}
|
|
502
|
+
_nextCell(o, e, r, t) {
|
|
503
|
+
}
|
|
504
|
+
_rowEnd(o, e) {
|
|
505
|
+
}
|
|
506
|
+
_beforeSerialize(o, e, r) {
|
|
507
|
+
}
|
|
508
|
+
_afterSerialize() {
|
|
509
|
+
}
|
|
510
|
+
_serializeString(o) {
|
|
511
|
+
return "";
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
function T(u, o) {
|
|
515
|
+
return u.getFgColorMode() === o.getFgColorMode() && u.getFgColor() === o.getFgColor();
|
|
516
|
+
}
|
|
517
|
+
function w(u, o) {
|
|
518
|
+
return u.getBgColorMode() === o.getBgColorMode() && u.getBgColor() === o.getBgColor();
|
|
519
|
+
}
|
|
520
|
+
function z(u, o) {
|
|
521
|
+
return u.isInverse() === o.isInverse() && u.isBold() === o.isBold() && u.isUnderline() === o.isUnderline() && u.isOverline() === o.isOverline() && u.isBlink() === o.isBlink() && u.isInvisible() === o.isInvisible() && u.isItalic() === o.isItalic() && u.isDim() === o.isDim() && u.isStrikethrough() === o.isStrikethrough();
|
|
522
|
+
}
|
|
523
|
+
var k = class extends S {
|
|
524
|
+
constructor(e, r) {
|
|
525
|
+
super(e);
|
|
526
|
+
this._terminal = r;
|
|
527
|
+
this._rowIndex = 0;
|
|
528
|
+
this._allRows = new Array();
|
|
529
|
+
this._allRowSeparators = new Array();
|
|
530
|
+
this._currentRow = "";
|
|
531
|
+
this._nullCellCount = 0;
|
|
532
|
+
this._cursorStyle = this._buffer.getNullCell();
|
|
533
|
+
this._cursorStyleRow = 0;
|
|
534
|
+
this._cursorStyleCol = 0;
|
|
535
|
+
this._backgroundCell = this._buffer.getNullCell();
|
|
536
|
+
this._firstRow = 0;
|
|
537
|
+
this._lastCursorRow = 0;
|
|
538
|
+
this._lastCursorCol = 0;
|
|
539
|
+
this._lastContentCursorRow = 0;
|
|
540
|
+
this._lastContentCursorCol = 0;
|
|
541
|
+
this._thisRowLastChar = this._buffer.getNullCell();
|
|
542
|
+
this._thisRowLastSecondChar = this._buffer.getNullCell();
|
|
543
|
+
this._nextRowFirstChar = this._buffer.getNullCell();
|
|
544
|
+
}
|
|
545
|
+
_beforeSerialize(e, r, t) {
|
|
546
|
+
this._allRows = new Array(e), this._lastContentCursorRow = r, this._lastCursorRow = r, this._firstRow = r;
|
|
547
|
+
}
|
|
548
|
+
_rowEnd(e, r) {
|
|
549
|
+
this._nullCellCount > 0 && !w(this._cursorStyle, this._backgroundCell) && (this._currentRow += `\x1B[${this._nullCellCount}X`);
|
|
550
|
+
let t = "";
|
|
551
|
+
if (!r) {
|
|
552
|
+
e - this._firstRow >= this._terminal.rows && this._buffer.getLine(this._cursorStyleRow)?.getCell(this._cursorStyleCol, this._backgroundCell);
|
|
553
|
+
let a = this._buffer.getLine(e), s = this._buffer.getLine(e + 1);
|
|
554
|
+
if (!s.isWrapped) t = `\r
|
|
555
|
+
`, this._lastCursorRow = e + 1, this._lastCursorCol = 0;
|
|
556
|
+
else {
|
|
557
|
+
t = "";
|
|
558
|
+
let i = a.getCell(a.length - 1, this._thisRowLastChar), n5 = a.getCell(a.length - 2, this._thisRowLastSecondChar), l = s.getCell(0, this._nextRowFirstChar), f = l.getWidth() > 1, d = false;
|
|
559
|
+
(l.getChars() && f ? this._nullCellCount <= 1 : this._nullCellCount <= 0) && ((i.getChars() || i.getWidth() === 0) && w(i, l) && (d = true), f && (n5.getChars() || n5.getWidth() === 0) && w(i, l) && w(n5, l) && (d = true)), d || (t = "-".repeat(this._nullCellCount + 1), t += "\x1B[1D\x1B[1X", this._nullCellCount > 0 && (t += "\x1B[A", t += `\x1B[${a.length - this._nullCellCount}C`, t += `\x1B[${this._nullCellCount}X`, t += `\x1B[${a.length - this._nullCellCount}D`, t += "\x1B[B"), this._lastContentCursorRow = e + 1, this._lastContentCursorCol = 0, this._lastCursorRow = e + 1, this._lastCursorCol = 0);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
this._allRows[this._rowIndex] = this._currentRow, this._allRowSeparators[this._rowIndex++] = t, this._currentRow = "", this._nullCellCount = 0;
|
|
563
|
+
}
|
|
564
|
+
_diffStyle(e, r) {
|
|
565
|
+
let t = [], a = !T(e, r), s = !w(e, r), i = !z(e, r);
|
|
566
|
+
if (a || s || i) if (e.isAttributeDefault()) r.isAttributeDefault() || t.push(0);
|
|
567
|
+
else {
|
|
568
|
+
if (a) {
|
|
569
|
+
let n5 = e.getFgColor();
|
|
570
|
+
e.isFgRGB() ? t.push(38, 2, n5 >>> 16 & 255, n5 >>> 8 & 255, n5 & 255) : e.isFgPalette() ? n5 >= 16 ? t.push(38, 5, n5) : t.push(n5 & 8 ? 90 + (n5 & 7) : 30 + (n5 & 7)) : t.push(39);
|
|
571
|
+
}
|
|
572
|
+
if (s) {
|
|
573
|
+
let n5 = e.getBgColor();
|
|
574
|
+
e.isBgRGB() ? t.push(48, 2, n5 >>> 16 & 255, n5 >>> 8 & 255, n5 & 255) : e.isBgPalette() ? n5 >= 16 ? t.push(48, 5, n5) : t.push(n5 & 8 ? 100 + (n5 & 7) : 40 + (n5 & 7)) : t.push(49);
|
|
575
|
+
}
|
|
576
|
+
i && (e.isInverse() !== r.isInverse() && t.push(e.isInverse() ? 7 : 27), e.isBold() !== r.isBold() && t.push(e.isBold() ? 1 : 22), e.isUnderline() !== r.isUnderline() && t.push(e.isUnderline() ? 4 : 24), e.isOverline() !== r.isOverline() && t.push(e.isOverline() ? 53 : 55), e.isBlink() !== r.isBlink() && t.push(e.isBlink() ? 5 : 25), e.isInvisible() !== r.isInvisible() && t.push(e.isInvisible() ? 8 : 28), e.isItalic() !== r.isItalic() && t.push(e.isItalic() ? 3 : 23), e.isDim() !== r.isDim() && t.push(e.isDim() ? 2 : 22), e.isStrikethrough() !== r.isStrikethrough() && t.push(e.isStrikethrough() ? 9 : 29));
|
|
577
|
+
}
|
|
578
|
+
return t;
|
|
579
|
+
}
|
|
580
|
+
_nextCell(e, r, t, a) {
|
|
581
|
+
if (e.getWidth() === 0) return;
|
|
582
|
+
let i = e.getChars() === "", n5 = this._diffStyle(e, this._cursorStyle);
|
|
583
|
+
if (i ? !w(this._cursorStyle, e) : n5.length > 0) {
|
|
584
|
+
this._nullCellCount > 0 && (w(this._cursorStyle, this._backgroundCell) || (this._currentRow += `\x1B[${this._nullCellCount}X`), this._currentRow += `\x1B[${this._nullCellCount}C`, this._nullCellCount = 0), this._lastContentCursorRow = this._lastCursorRow = t, this._lastContentCursorCol = this._lastCursorCol = a, this._currentRow += `\x1B[${n5.join(";")}m`;
|
|
585
|
+
let f = this._buffer.getLine(t);
|
|
586
|
+
f !== void 0 && (f.getCell(a, this._cursorStyle), this._cursorStyleRow = t, this._cursorStyleCol = a);
|
|
587
|
+
}
|
|
588
|
+
i ? this._nullCellCount += e.getWidth() : (this._nullCellCount > 0 && (w(this._cursorStyle, this._backgroundCell) ? this._currentRow += `\x1B[${this._nullCellCount}C` : (this._currentRow += `\x1B[${this._nullCellCount}X`, this._currentRow += `\x1B[${this._nullCellCount}C`), this._nullCellCount = 0), updateSerializedFileLink(this, e), this._currentRow += e.getChars(), this._lastContentCursorRow = this._lastCursorRow = t, this._lastContentCursorCol = this._lastCursorCol = a + e.getWidth());
|
|
589
|
+
}
|
|
590
|
+
_serializeString(e) {
|
|
591
|
+
let r = this._allRows.length;
|
|
592
|
+
this._buffer.length - this._firstRow <= this._terminal.rows && (r = this._lastContentCursorRow + 1 - this._firstRow, this._lastCursorCol = this._lastContentCursorCol, this._lastCursorRow = this._lastContentCursorRow);
|
|
593
|
+
let t = "";
|
|
594
|
+
for (let i = 0; i < r; i++) t += this._allRows[i], i + 1 < r && (t += this._allRowSeparators[i]);
|
|
595
|
+
if (!e) {
|
|
596
|
+
let i = this._buffer.baseY + this._buffer.cursorY, n5 = this._buffer.cursorX, l = i !== this._lastCursorRow || n5 !== this._lastCursorCol, f = (c) => {
|
|
597
|
+
c > 0 ? t += `\x1B[${c}C` : c < 0 && (t += `\x1B[${-c}D`);
|
|
598
|
+
};
|
|
599
|
+
l && (((c) => {
|
|
600
|
+
c > 0 ? t += `\x1B[${c}B` : c < 0 && (t += `\x1B[${-c}A`);
|
|
601
|
+
})(i - this._lastCursorRow), f(n5 - this._lastCursorCol));
|
|
602
|
+
}
|
|
603
|
+
if (this._fileLink) t += oscFileLink("");
|
|
604
|
+
let a = this._terminal._core._inputHandler._curAttrData, s = this._diffStyle(a, this._cursorStyle);
|
|
605
|
+
return s.length > 0 && (t += `\x1B[${s.join(";")}m`), t;
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
var D = class {
|
|
609
|
+
activate(o) {
|
|
610
|
+
this._terminal = o;
|
|
611
|
+
}
|
|
612
|
+
_serializeBufferByScrollback(o, e, r) {
|
|
613
|
+
let t = e.length, a = r === void 0 ? t : A(r + o.rows, 0, t);
|
|
614
|
+
return this._serializeBufferByRange(o, e, { start: t - a, end: t - 1 }, false);
|
|
615
|
+
}
|
|
616
|
+
_serializeBufferByRange(o, e, r, t) {
|
|
617
|
+
return new k(e, o).serialize({ start: { x: 0, y: typeof r.start == "number" ? r.start : r.start.line }, end: { x: o.cols, y: typeof r.end == "number" ? r.end : r.end.line } }, t);
|
|
618
|
+
}
|
|
619
|
+
_serializeBufferAsHTML(o, e) {
|
|
620
|
+
let r = o.buffer.active, t = new M(r, o, e), a = e.onlySelection ?? false, s = e.range;
|
|
621
|
+
if (s) return t.serialize({ start: { x: s.startCol, y: (typeof s.startLine == "number", s.startLine) }, end: { x: o.cols, y: (typeof s.endLine == "number", s.endLine) } });
|
|
622
|
+
if (!a) {
|
|
623
|
+
let n5 = r.length, l = e.scrollback, f = l === void 0 ? n5 : A(l + o.rows, 0, n5);
|
|
624
|
+
return t.serialize({ start: { x: 0, y: n5 - f }, end: { x: o.cols, y: n5 - 1 } });
|
|
625
|
+
}
|
|
626
|
+
let i = this._terminal?.getSelectionPosition();
|
|
627
|
+
return i !== void 0 ? t.serialize({ start: { x: i.start.x, y: i.start.y }, end: { x: i.end.x, y: i.end.y } }) : "";
|
|
628
|
+
}
|
|
629
|
+
_serializeModes(o) {
|
|
630
|
+
let e = "", r = o.modes;
|
|
631
|
+
if (r.applicationCursorKeysMode && (e += "\x1B[?1h"), r.applicationKeypadMode && (e += "\x1B[?66h"), r.bracketedPasteMode && (e += "\x1B[?2004h"), r.insertMode && (e += "\x1B[4h"), r.originMode && (e += "\x1B[?6h"), r.reverseWraparoundMode && (e += "\x1B[?45h"), r.sendFocusMode && (e += "\x1B[?1004h"), r.wraparoundMode === false && (e += "\x1B[?7l"), r.mouseTrackingMode !== "none") switch (r.mouseTrackingMode) {
|
|
632
|
+
case "x10":
|
|
633
|
+
e += "\x1B[?9h";
|
|
634
|
+
break;
|
|
635
|
+
case "vt200":
|
|
636
|
+
e += "\x1B[?1000h";
|
|
637
|
+
break;
|
|
638
|
+
case "drag":
|
|
639
|
+
e += "\x1B[?1002h";
|
|
640
|
+
break;
|
|
641
|
+
case "any":
|
|
642
|
+
e += "\x1B[?1003h";
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
return e;
|
|
646
|
+
}
|
|
647
|
+
serialize(o) {
|
|
648
|
+
if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
|
|
649
|
+
let e = o?.range ? this._serializeBufferByRange(this._terminal, this._terminal.buffer.normal, o.range, true) : this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.normal, o?.scrollback);
|
|
650
|
+
if (!o?.excludeAltBuffer && this._terminal.buffer.active.type === "alternate") {
|
|
651
|
+
let r = this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.alternate, void 0);
|
|
652
|
+
e += `\x1B[?1049h\x1B[H${r}`;
|
|
653
|
+
}
|
|
654
|
+
return o?.excludeModes || (e += this._serializeModes(this._terminal)), e + restoreSerializedFileLink(this._terminal, o);
|
|
655
|
+
}
|
|
656
|
+
serializeAsHTML(o) {
|
|
657
|
+
if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
|
|
658
|
+
return this._serializeBufferAsHTML(this._terminal, o || {});
|
|
659
|
+
}
|
|
660
|
+
dispose() {
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
var M = class extends S {
|
|
664
|
+
constructor(e, r, t) {
|
|
665
|
+
super(e);
|
|
666
|
+
this._terminal = r;
|
|
667
|
+
this._options = t;
|
|
668
|
+
this._currentRow = "";
|
|
669
|
+
this._htmlContent = "";
|
|
670
|
+
r._core._themeService ? this._ansiColors = r._core._themeService.colors.ansi : this._ansiColors = E;
|
|
671
|
+
}
|
|
672
|
+
_padStart(e, r, t) {
|
|
673
|
+
return r = r >> 0, t = t ?? " ", e.length > r ? e : (r -= e.length, r > t.length && (t += t.repeat(r / t.length)), t.slice(0, r) + e);
|
|
674
|
+
}
|
|
675
|
+
_beforeSerialize(e, r, t) {
|
|
676
|
+
this._htmlContent += "<html><body><!--StartFragment--><pre>";
|
|
677
|
+
let a = "#000000", s = "#ffffff";
|
|
678
|
+
(this._options.includeGlobalBackground ?? false) && (a = this._terminal.options.theme?.foreground ?? "#ffffff", s = this._terminal.options.theme?.background ?? "#000000");
|
|
679
|
+
let i = [];
|
|
680
|
+
i.push("color: " + a + ";"), i.push("background-color: " + s + ";"), i.push("font-family: " + this._terminal.options.fontFamily + ";"), i.push("font-size: " + this._terminal.options.fontSize + "px;"), this._htmlContent += "<div style='" + i.join(" ") + "'>";
|
|
681
|
+
}
|
|
682
|
+
_afterSerialize() {
|
|
683
|
+
this._htmlContent += "</div>", this._htmlContent += "</pre><!--EndFragment--></body></html>";
|
|
684
|
+
}
|
|
685
|
+
_rowEnd(e, r) {
|
|
686
|
+
this._htmlContent += "<div><span>" + this._currentRow + "</span></div>", this._currentRow = "";
|
|
687
|
+
}
|
|
688
|
+
_getHexColor(e, r) {
|
|
689
|
+
let t = r ? e.getFgColor() : e.getBgColor();
|
|
690
|
+
if (r ? e.isFgRGB() : e.isBgRGB()) return "#" + [t >> 16 & 255, t >> 8 & 255, t & 255].map((s) => this._padStart(s.toString(16), 2, "0")).join("");
|
|
691
|
+
if (r ? e.isFgPalette() : e.isBgPalette()) return this._ansiColors[t].css;
|
|
692
|
+
}
|
|
693
|
+
_diffStyle(e, r) {
|
|
694
|
+
let t = [], a = !T(e, r), s = !w(e, r), i = !z(e, r);
|
|
695
|
+
if (a || s || i) {
|
|
696
|
+
let n5 = this._getHexColor(e, true);
|
|
697
|
+
n5 && t.push("color: " + n5 + ";");
|
|
698
|
+
let l = this._getHexColor(e, false);
|
|
699
|
+
return l && t.push("background-color: " + l + ";"), e.isInverse() && t.push("color: #000000; background-color: #BFBFBF;"), e.isBold() && t.push("font-weight: bold;"), e.isUnderline() && e.isOverline() ? t.push("text-decoration: overline underline;") : e.isUnderline() ? t.push("text-decoration: underline;") : e.isOverline() && t.push("text-decoration: overline;"), e.isBlink() && t.push("text-decoration: blink;"), e.isInvisible() && t.push("visibility: hidden;"), e.isItalic() && t.push("font-style: italic;"), e.isDim() && t.push("opacity: 0.5;"), e.isStrikethrough() && t.push("text-decoration: line-through;"), t;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
_nextCell(e, r, t, a) {
|
|
703
|
+
if (e.getWidth() === 0) return;
|
|
704
|
+
let i = e.getChars() === "", n5 = this._diffStyle(e, r);
|
|
705
|
+
n5 && (this._currentRow += n5.length === 0 ? "</span><span>" : "</span><span style='" + n5.join(" ") + "'>"), i ? this._currentRow += " " : this._currentRow += O(e.getChars());
|
|
706
|
+
}
|
|
707
|
+
_serializeString() {
|
|
708
|
+
return this._htmlContent;
|
|
709
|
+
}
|
|
710
|
+
};
|
|
283
711
|
|
|
284
712
|
// ../../node_modules/.pnpm/@xterm+addon-unicode-graphemes@0.4.0_patch_hash=ii5qcsnajlhye26zd4cjwwjuxu/node_modules/@xterm/addon-unicode-graphemes/lib/addon-unicode-graphemes.mjs
|
|
285
713
|
var be = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]];
|
|
286
714
|
var Lt = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
|
|
287
|
-
var
|
|
715
|
+
var y2;
|
|
288
716
|
function Ft(n5, e) {
|
|
289
717
|
let t = 0, r = e.length - 1, i;
|
|
290
718
|
if (n5 < e[0][0] || n5 > e[r][1]) return false;
|
|
@@ -296,21 +724,21 @@ function Ft(n5, e) {
|
|
|
296
724
|
var J = class {
|
|
297
725
|
constructor() {
|
|
298
726
|
this.version = "6";
|
|
299
|
-
if (!
|
|
300
|
-
|
|
301
|
-
for (let e = 0; e < be.length; ++e)
|
|
727
|
+
if (!y2) {
|
|
728
|
+
y2 = new Uint8Array(65536), y2.fill(1), y2[0] = 0, y2.fill(0, 1, 32), y2.fill(0, 127, 160), y2.fill(2, 4352, 4448), y2[9001] = 2, y2[9002] = 2, y2.fill(2, 11904, 42192), y2[12351] = 1, y2.fill(2, 44032, 55204), y2.fill(2, 63744, 64256), y2.fill(2, 65040, 65050), y2.fill(2, 65072, 65136), y2.fill(2, 65280, 65377), y2.fill(2, 65504, 65511);
|
|
729
|
+
for (let e = 0; e < be.length; ++e) y2.fill(0, be[e][0], be[e][1] + 1);
|
|
302
730
|
}
|
|
303
731
|
}
|
|
304
732
|
wcwidth(e) {
|
|
305
|
-
return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ?
|
|
733
|
+
return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ? y2[e] : Ft(e, Lt) ? 0 : e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141 ? 2 : 1;
|
|
306
734
|
}
|
|
307
735
|
charProperties(e, t) {
|
|
308
736
|
let r = this.wcwidth(e), i = r === 0 && t !== 0;
|
|
309
737
|
if (i) {
|
|
310
|
-
let o =
|
|
738
|
+
let o = w2.extractWidth(t);
|
|
311
739
|
o === 0 ? i = false : o > r && (r = o);
|
|
312
740
|
}
|
|
313
|
-
return
|
|
741
|
+
return w2.createPropertyValue(0, r, i);
|
|
314
742
|
}
|
|
315
743
|
};
|
|
316
744
|
var ve = class {
|
|
@@ -357,9 +785,9 @@ function te(n5) {
|
|
|
357
785
|
}
|
|
358
786
|
var me = "Canceled";
|
|
359
787
|
function Ut(n5) {
|
|
360
|
-
return n5 instanceof $ ? true : n5 instanceof Error && n5.name === me && n5.message === me;
|
|
788
|
+
return n5 instanceof $2 ? true : n5 instanceof Error && n5.name === me && n5.message === me;
|
|
361
789
|
}
|
|
362
|
-
var $ = class extends Error {
|
|
790
|
+
var $2 = class extends Error {
|
|
363
791
|
constructor() {
|
|
364
792
|
super(me), this.name = this.message;
|
|
365
793
|
}
|
|
@@ -416,29 +844,29 @@ var ne = class ne2 {
|
|
|
416
844
|
};
|
|
417
845
|
ne.assertInvariants = false;
|
|
418
846
|
var $e;
|
|
419
|
-
((
|
|
420
|
-
function n5(
|
|
421
|
-
return
|
|
847
|
+
((T2) => {
|
|
848
|
+
function n5(p2) {
|
|
849
|
+
return p2 < 0;
|
|
422
850
|
}
|
|
423
|
-
|
|
424
|
-
function e(
|
|
425
|
-
return
|
|
851
|
+
T2.isLessThan = n5;
|
|
852
|
+
function e(p2) {
|
|
853
|
+
return p2 <= 0;
|
|
426
854
|
}
|
|
427
|
-
|
|
428
|
-
function t(
|
|
429
|
-
return
|
|
855
|
+
T2.isLessThanOrEqual = e;
|
|
856
|
+
function t(p2) {
|
|
857
|
+
return p2 > 0;
|
|
430
858
|
}
|
|
431
|
-
|
|
432
|
-
function r(
|
|
433
|
-
return
|
|
859
|
+
T2.isGreaterThan = t;
|
|
860
|
+
function r(p2) {
|
|
861
|
+
return p2 === 0;
|
|
434
862
|
}
|
|
435
|
-
|
|
863
|
+
T2.isNeitherLessOrGreaterThan = r, T2.greaterThan = 1, T2.lessThan = -1, T2.neitherLessOrGreaterThan = 0;
|
|
436
864
|
})($e ||= {});
|
|
437
865
|
function et(n5, e) {
|
|
438
866
|
return (t, r) => e(n5(t), n5(r));
|
|
439
867
|
}
|
|
440
868
|
var tt = (n5, e) => n5 - e;
|
|
441
|
-
var
|
|
869
|
+
var M2 = class M3 {
|
|
442
870
|
constructor(e) {
|
|
443
871
|
this.iterate = e;
|
|
444
872
|
}
|
|
@@ -450,10 +878,10 @@ var M = class M2 {
|
|
|
450
878
|
return this.iterate((t) => (e.push(t), true)), e;
|
|
451
879
|
}
|
|
452
880
|
filter(e) {
|
|
453
|
-
return new
|
|
881
|
+
return new M3((t) => this.iterate((r) => e(r) ? t(r) : true));
|
|
454
882
|
}
|
|
455
883
|
map(e) {
|
|
456
|
-
return new
|
|
884
|
+
return new M3((t) => this.iterate((r) => t(e(r))));
|
|
457
885
|
}
|
|
458
886
|
some(e) {
|
|
459
887
|
let t = false;
|
|
@@ -472,7 +900,7 @@ var M = class M2 {
|
|
|
472
900
|
return this.iterate((i) => ((r || $e.isGreaterThan(e(i, t))) && (r = false, t = i), true)), t;
|
|
473
901
|
}
|
|
474
902
|
};
|
|
475
|
-
|
|
903
|
+
M2.empty = new M2((e) => {
|
|
476
904
|
});
|
|
477
905
|
function st(n5, e) {
|
|
478
906
|
let t = /* @__PURE__ */ Object.create(null);
|
|
@@ -568,78 +996,78 @@ var _e;
|
|
|
568
996
|
}
|
|
569
997
|
Te.from = o;
|
|
570
998
|
function* f(c) {
|
|
571
|
-
for (let
|
|
999
|
+
for (let b2 = c.length - 1; b2 >= 0; b2--) yield c[b2];
|
|
572
1000
|
}
|
|
573
1001
|
Te.reverse = f;
|
|
574
|
-
function
|
|
1002
|
+
function T2(c) {
|
|
575
1003
|
return !c || c[Symbol.iterator]().next().done === true;
|
|
576
1004
|
}
|
|
577
|
-
Te.isEmpty =
|
|
578
|
-
function
|
|
1005
|
+
Te.isEmpty = T2;
|
|
1006
|
+
function p2(c) {
|
|
579
1007
|
return c[Symbol.iterator]().next().value;
|
|
580
1008
|
}
|
|
581
|
-
Te.first =
|
|
582
|
-
function
|
|
583
|
-
let
|
|
584
|
-
for (let
|
|
1009
|
+
Te.first = p2;
|
|
1010
|
+
function m2(c, b2) {
|
|
1011
|
+
let g2 = 0;
|
|
1012
|
+
for (let D2 of c) if (b2(D2, g2++)) return true;
|
|
585
1013
|
return false;
|
|
586
1014
|
}
|
|
587
|
-
Te.some =
|
|
588
|
-
function
|
|
589
|
-
for (let
|
|
1015
|
+
Te.some = m2;
|
|
1016
|
+
function _2(c, b2) {
|
|
1017
|
+
for (let g2 of c) if (b2(g2)) return g2;
|
|
590
1018
|
}
|
|
591
|
-
Te.find =
|
|
592
|
-
function* x(c,
|
|
593
|
-
for (let
|
|
1019
|
+
Te.find = _2;
|
|
1020
|
+
function* x(c, b2) {
|
|
1021
|
+
for (let g2 of c) b2(g2) && (yield g2);
|
|
594
1022
|
}
|
|
595
1023
|
Te.filter = x;
|
|
596
|
-
function* L(c,
|
|
597
|
-
let
|
|
598
|
-
for (let
|
|
1024
|
+
function* L(c, b2) {
|
|
1025
|
+
let g2 = 0;
|
|
1026
|
+
for (let D2 of c) yield b2(D2, g2++);
|
|
599
1027
|
}
|
|
600
1028
|
Te.map = L;
|
|
601
|
-
function*
|
|
602
|
-
let
|
|
603
|
-
for (let
|
|
1029
|
+
function* O2(c, b2) {
|
|
1030
|
+
let g2 = 0;
|
|
1031
|
+
for (let D2 of c) yield* b2(D2, g2++);
|
|
604
1032
|
}
|
|
605
|
-
Te.flatMap =
|
|
1033
|
+
Te.flatMap = O2;
|
|
606
1034
|
function* pe(...c) {
|
|
607
|
-
for (let
|
|
1035
|
+
for (let b2 of c) yield* b2;
|
|
608
1036
|
}
|
|
609
1037
|
Te.concat = pe;
|
|
610
|
-
function X(c,
|
|
611
|
-
let
|
|
612
|
-
for (let
|
|
613
|
-
return
|
|
1038
|
+
function X(c, b2, g2) {
|
|
1039
|
+
let D2 = g2;
|
|
1040
|
+
for (let z2 of c) D2 = b2(D2, z2);
|
|
1041
|
+
return D2;
|
|
614
1042
|
}
|
|
615
1043
|
Te.reduce = X;
|
|
616
|
-
function*
|
|
617
|
-
for (
|
|
618
|
-
}
|
|
619
|
-
Te.slice =
|
|
620
|
-
function he(c,
|
|
621
|
-
let
|
|
622
|
-
if (
|
|
623
|
-
let
|
|
624
|
-
for (let
|
|
625
|
-
let xe =
|
|
626
|
-
if (xe.done) return [
|
|
627
|
-
|
|
628
|
-
}
|
|
629
|
-
return [
|
|
630
|
-
return
|
|
1044
|
+
function* F2(c, b2, g2 = c.length) {
|
|
1045
|
+
for (b2 < 0 && (b2 += c.length), g2 < 0 ? g2 += c.length : g2 > c.length && (g2 = c.length); b2 < g2; b2++) yield c[b2];
|
|
1046
|
+
}
|
|
1047
|
+
Te.slice = F2;
|
|
1048
|
+
function he(c, b2 = Number.POSITIVE_INFINITY) {
|
|
1049
|
+
let g2 = [];
|
|
1050
|
+
if (b2 === 0) return [g2, c];
|
|
1051
|
+
let D2 = c[Symbol.iterator]();
|
|
1052
|
+
for (let z2 = 0; z2 < b2; z2++) {
|
|
1053
|
+
let xe = D2.next();
|
|
1054
|
+
if (xe.done) return [g2, Te.empty()];
|
|
1055
|
+
g2.push(xe.value);
|
|
1056
|
+
}
|
|
1057
|
+
return [g2, { [Symbol.iterator]() {
|
|
1058
|
+
return D2;
|
|
631
1059
|
} }];
|
|
632
1060
|
}
|
|
633
1061
|
Te.consume = he;
|
|
634
1062
|
async function K(c) {
|
|
635
|
-
let
|
|
636
|
-
for await (let
|
|
637
|
-
return Promise.resolve(
|
|
1063
|
+
let b2 = [];
|
|
1064
|
+
for await (let g2 of c) b2.push(g2);
|
|
1065
|
+
return Promise.resolve(b2);
|
|
638
1066
|
}
|
|
639
1067
|
Te.asyncToArray = K;
|
|
640
1068
|
})(_e ||= {});
|
|
641
1069
|
var Pt = false;
|
|
642
|
-
var
|
|
1070
|
+
var B2 = null;
|
|
643
1071
|
var ie = class ie2 {
|
|
644
1072
|
constructor() {
|
|
645
1073
|
this.livingDisposables = /* @__PURE__ */ new Map();
|
|
@@ -676,46 +1104,46 @@ var ie = class ie2 {
|
|
|
676
1104
|
let r;
|
|
677
1105
|
if (t) r = t;
|
|
678
1106
|
else {
|
|
679
|
-
let
|
|
680
|
-
if (
|
|
681
|
-
let
|
|
682
|
-
if (r =
|
|
1107
|
+
let p2 = /* @__PURE__ */ new Map(), m2 = [...this.livingDisposables.values()].filter((x) => x.source !== null && !this.getRootParent(x, p2).isSingleton);
|
|
1108
|
+
if (m2.length === 0) return;
|
|
1109
|
+
let _2 = new Set(m2.map((x) => x.value));
|
|
1110
|
+
if (r = m2.filter((x) => !(x.parent && _2.has(x.parent))), r.length === 0) throw new Error("There are cyclic diposable chains!");
|
|
683
1111
|
}
|
|
684
1112
|
if (!r) return;
|
|
685
|
-
function i(
|
|
686
|
-
function
|
|
687
|
-
for (; x.length > 0 && L.some((
|
|
1113
|
+
function i(p2) {
|
|
1114
|
+
function m2(x, L) {
|
|
1115
|
+
for (; x.length > 0 && L.some((O2) => typeof O2 == "string" ? O2 === x[0] : x[0].match(O2)); ) x.shift();
|
|
688
1116
|
}
|
|
689
|
-
let
|
|
1117
|
+
let _2 = p2.source.split(`
|
|
690
1118
|
`).map((x) => x.trim().replace("at ", "")).filter((x) => x !== "");
|
|
691
|
-
return
|
|
1119
|
+
return m2(_2, ["Error", /^trackDisposable \(.*\)$/, /^DisposableTracker.trackDisposable \(.*\)$/]), _2.reverse();
|
|
692
1120
|
}
|
|
693
1121
|
let o = new re();
|
|
694
|
-
for (let
|
|
695
|
-
let
|
|
696
|
-
for (let
|
|
697
|
-
`),
|
|
698
|
-
}
|
|
699
|
-
r.sort(et((
|
|
700
|
-
let f = "",
|
|
701
|
-
for (let
|
|
702
|
-
|
|
703
|
-
let
|
|
704
|
-
for (let x = 0; x <
|
|
705
|
-
let L =
|
|
706
|
-
L = `(shared with ${o.get(
|
|
1122
|
+
for (let p2 of r) {
|
|
1123
|
+
let m2 = i(p2);
|
|
1124
|
+
for (let _2 = 0; _2 <= m2.length; _2++) o.add(m2.slice(0, _2).join(`
|
|
1125
|
+
`), p2);
|
|
1126
|
+
}
|
|
1127
|
+
r.sort(et((p2) => p2.idx, tt));
|
|
1128
|
+
let f = "", T2 = 0;
|
|
1129
|
+
for (let p2 of r.slice(0, e)) {
|
|
1130
|
+
T2++;
|
|
1131
|
+
let m2 = i(p2), _2 = [];
|
|
1132
|
+
for (let x = 0; x < m2.length; x++) {
|
|
1133
|
+
let L = m2[x];
|
|
1134
|
+
L = `(shared with ${o.get(m2.slice(0, x + 1).join(`
|
|
707
1135
|
`)).size}/${r.length} leaks) at ${L}`;
|
|
708
|
-
let pe = o.get(
|
|
709
|
-
`)), X = st([...pe].map((
|
|
710
|
-
delete X[
|
|
711
|
-
for (let [
|
|
712
|
-
|
|
1136
|
+
let pe = o.get(m2.slice(0, x).join(`
|
|
1137
|
+
`)), X = st([...pe].map((F2) => i(F2)[x]), (F2) => F2);
|
|
1138
|
+
delete X[m2[x]];
|
|
1139
|
+
for (let [F2, he] of Object.entries(X)) _2.unshift(` - stacktraces of ${he.length} other leaks continue with ${F2}`);
|
|
1140
|
+
_2.unshift(L);
|
|
713
1141
|
}
|
|
714
1142
|
f += `
|
|
715
1143
|
|
|
716
1144
|
|
|
717
|
-
==================== Leaking disposable ${
|
|
718
|
-
${
|
|
1145
|
+
==================== Leaking disposable ${T2}/${r.length}: ${p2.value.constructor.name} ====================
|
|
1146
|
+
${_2.join(`
|
|
719
1147
|
`)}
|
|
720
1148
|
============================================================
|
|
721
1149
|
|
|
@@ -731,7 +1159,7 @@ ${_.join(`
|
|
|
731
1159
|
};
|
|
732
1160
|
ie.idx = 0;
|
|
733
1161
|
function Mt(n5) {
|
|
734
|
-
|
|
1162
|
+
B2 = n5;
|
|
735
1163
|
}
|
|
736
1164
|
if (Pt) {
|
|
737
1165
|
let n5 = "__is_disposable_tracked__";
|
|
@@ -743,13 +1171,13 @@ if (Pt) {
|
|
|
743
1171
|
}, 3e3);
|
|
744
1172
|
}
|
|
745
1173
|
setParent(e, t) {
|
|
746
|
-
if (e && e !==
|
|
1174
|
+
if (e && e !== k2.None) try {
|
|
747
1175
|
e[n5] = true;
|
|
748
1176
|
} catch {
|
|
749
1177
|
}
|
|
750
1178
|
}
|
|
751
1179
|
markAsDisposed(e) {
|
|
752
|
-
if (e && e !==
|
|
1180
|
+
if (e && e !== k2.None) try {
|
|
753
1181
|
e[n5] = true;
|
|
754
1182
|
} catch {
|
|
755
1183
|
}
|
|
@@ -759,16 +1187,16 @@ if (Pt) {
|
|
|
759
1187
|
}());
|
|
760
1188
|
}
|
|
761
1189
|
function Ee(n5) {
|
|
762
|
-
return
|
|
1190
|
+
return B2?.trackDisposable(n5), n5;
|
|
763
1191
|
}
|
|
764
1192
|
function Ie(n5) {
|
|
765
|
-
|
|
1193
|
+
B2?.markAsDisposed(n5);
|
|
766
1194
|
}
|
|
767
1195
|
function ye(n5, e) {
|
|
768
|
-
|
|
1196
|
+
B2?.setParent(n5, e);
|
|
769
1197
|
}
|
|
770
1198
|
function Bt(n5, e) {
|
|
771
|
-
if (
|
|
1199
|
+
if (B2) for (let t of n5) B2.setParent(t, e);
|
|
772
1200
|
}
|
|
773
1201
|
function at(n5) {
|
|
774
1202
|
if (_e.is(n5)) {
|
|
@@ -829,7 +1257,7 @@ var se = class se2 {
|
|
|
829
1257
|
};
|
|
830
1258
|
se.DISABLE_DISPOSED_WARNING = false;
|
|
831
1259
|
var N = se;
|
|
832
|
-
var
|
|
1260
|
+
var k2 = class {
|
|
833
1261
|
constructor() {
|
|
834
1262
|
this._store = new N();
|
|
835
1263
|
Ee(this), ye(this._store, this);
|
|
@@ -842,7 +1270,7 @@ var k = class {
|
|
|
842
1270
|
return this._store.add(e);
|
|
843
1271
|
}
|
|
844
1272
|
};
|
|
845
|
-
|
|
1273
|
+
k2.None = Object.freeze({ dispose() {
|
|
846
1274
|
} });
|
|
847
1275
|
var W = class W2 {
|
|
848
1276
|
constructor(e) {
|
|
@@ -873,7 +1301,7 @@ var dt = false;
|
|
|
873
1301
|
var Vt = false;
|
|
874
1302
|
var Ht;
|
|
875
1303
|
((q) => {
|
|
876
|
-
q.None = () =>
|
|
1304
|
+
q.None = () => k2.None;
|
|
877
1305
|
function e(u) {
|
|
878
1306
|
if (Vt) {
|
|
879
1307
|
let { onDidAddListener: s } = u, l = j.create(), a = 0;
|
|
@@ -890,82 +1318,82 @@ var Ht;
|
|
|
890
1318
|
function r(u) {
|
|
891
1319
|
return (s, l = null, a) => {
|
|
892
1320
|
let d = false, h;
|
|
893
|
-
return h = u((
|
|
894
|
-
if (!d) return h ? h.dispose() : d = true, s.call(l,
|
|
1321
|
+
return h = u((v2) => {
|
|
1322
|
+
if (!d) return h ? h.dispose() : d = true, s.call(l, v2);
|
|
895
1323
|
}, null, a), d && h.dispose(), h;
|
|
896
1324
|
};
|
|
897
1325
|
}
|
|
898
1326
|
q.once = r;
|
|
899
1327
|
function i(u, s, l) {
|
|
900
|
-
return
|
|
1328
|
+
return _2((a, d = null, h) => u((v2) => a.call(d, s(v2)), null, h), l);
|
|
901
1329
|
}
|
|
902
1330
|
q.map = i;
|
|
903
1331
|
function o(u, s, l) {
|
|
904
|
-
return
|
|
905
|
-
s(
|
|
1332
|
+
return _2((a, d = null, h) => u((v2) => {
|
|
1333
|
+
s(v2), a.call(d, v2);
|
|
906
1334
|
}, null, h), l);
|
|
907
1335
|
}
|
|
908
1336
|
q.forEach = o;
|
|
909
1337
|
function f(u, s, l) {
|
|
910
|
-
return
|
|
1338
|
+
return _2((a, d = null, h) => u((v2) => s(v2) && a.call(d, v2), null, h), l);
|
|
911
1339
|
}
|
|
912
1340
|
q.filter = f;
|
|
913
|
-
function
|
|
1341
|
+
function T2(u) {
|
|
914
1342
|
return u;
|
|
915
1343
|
}
|
|
916
|
-
q.signal =
|
|
917
|
-
function
|
|
1344
|
+
q.signal = T2;
|
|
1345
|
+
function p2(...u) {
|
|
918
1346
|
return (s, l = null, a) => {
|
|
919
|
-
let d = lt(...u.map((h) => h((
|
|
1347
|
+
let d = lt(...u.map((h) => h((v2) => s.call(l, v2))));
|
|
920
1348
|
return x(d, a);
|
|
921
1349
|
};
|
|
922
1350
|
}
|
|
923
|
-
q.any =
|
|
924
|
-
function
|
|
1351
|
+
q.any = p2;
|
|
1352
|
+
function m2(u, s, l, a) {
|
|
925
1353
|
let d = l;
|
|
926
1354
|
return i(u, (h) => (d = s(d, h), d), a);
|
|
927
1355
|
}
|
|
928
|
-
q.reduce =
|
|
929
|
-
function
|
|
1356
|
+
q.reduce = m2;
|
|
1357
|
+
function _2(u, s) {
|
|
930
1358
|
let l, a = { onWillAddFirstListener() {
|
|
931
1359
|
l = u(d.fire, d);
|
|
932
1360
|
}, onDidRemoveLastListener() {
|
|
933
1361
|
l?.dispose();
|
|
934
1362
|
} };
|
|
935
1363
|
s || e(a);
|
|
936
|
-
let d = new
|
|
1364
|
+
let d = new A2(a);
|
|
937
1365
|
return s?.add(d), d.event;
|
|
938
1366
|
}
|
|
939
1367
|
function x(u, s) {
|
|
940
1368
|
return s instanceof Array ? s.push(u) : s && s.add(u), u;
|
|
941
1369
|
}
|
|
942
|
-
function L(u, s, l = 100, a = false, d = false, h,
|
|
943
|
-
let
|
|
944
|
-
|
|
945
|
-
Z++,
|
|
946
|
-
let kt =
|
|
947
|
-
|
|
1370
|
+
function L(u, s, l = 100, a = false, d = false, h, v2) {
|
|
1371
|
+
let E2, I2, P, Z = 0, G, Ze = { leakWarningThreshold: h, onWillAddFirstListener() {
|
|
1372
|
+
E2 = u((Rt) => {
|
|
1373
|
+
Z++, I2 = s(I2, Rt), a && !P && (Y.fire(I2), I2 = void 0), G = () => {
|
|
1374
|
+
let kt = I2;
|
|
1375
|
+
I2 = void 0, P = void 0, (!a || Z > 1) && Y.fire(kt), Z = 0;
|
|
948
1376
|
}, typeof l == "number" ? (clearTimeout(P), P = setTimeout(G, l)) : P === void 0 && (P = 0, queueMicrotask(G));
|
|
949
1377
|
});
|
|
950
1378
|
}, onWillRemoveListener() {
|
|
951
1379
|
d && Z > 0 && G?.();
|
|
952
1380
|
}, onDidRemoveLastListener() {
|
|
953
|
-
G = void 0,
|
|
1381
|
+
G = void 0, E2.dispose();
|
|
954
1382
|
} };
|
|
955
|
-
|
|
956
|
-
let Y = new
|
|
957
|
-
return
|
|
1383
|
+
v2 || e(Ze);
|
|
1384
|
+
let Y = new A2(Ze);
|
|
1385
|
+
return v2?.add(Y), Y.event;
|
|
958
1386
|
}
|
|
959
1387
|
q.debounce = L;
|
|
960
|
-
function
|
|
1388
|
+
function O2(u, s = 0, l) {
|
|
961
1389
|
return q.debounce(u, (a, d) => a ? (a.push(d), a) : [d], s, void 0, true, void 0, l);
|
|
962
1390
|
}
|
|
963
|
-
q.accumulate =
|
|
1391
|
+
q.accumulate = O2;
|
|
964
1392
|
function pe(u, s = (a, d) => a === d, l) {
|
|
965
1393
|
let a = true, d;
|
|
966
1394
|
return f(u, (h) => {
|
|
967
|
-
let
|
|
968
|
-
return a = false, d = h,
|
|
1395
|
+
let v2 = a || !s(h, d);
|
|
1396
|
+
return a = false, d = h, v2;
|
|
969
1397
|
}, l);
|
|
970
1398
|
}
|
|
971
1399
|
q.latch = pe;
|
|
@@ -973,29 +1401,29 @@ var Ht;
|
|
|
973
1401
|
return [q.filter(u, s, l), q.filter(u, (a) => !s(a), l)];
|
|
974
1402
|
}
|
|
975
1403
|
q.split = X;
|
|
976
|
-
function
|
|
977
|
-
let d = l.slice(), h = u((
|
|
978
|
-
d ? d.push(
|
|
1404
|
+
function F2(u, s = false, l = [], a) {
|
|
1405
|
+
let d = l.slice(), h = u((I2) => {
|
|
1406
|
+
d ? d.push(I2) : E2.fire(I2);
|
|
979
1407
|
});
|
|
980
1408
|
a && a.add(h);
|
|
981
|
-
let
|
|
982
|
-
d?.forEach((
|
|
983
|
-
},
|
|
984
|
-
h || (h = u((
|
|
1409
|
+
let v2 = () => {
|
|
1410
|
+
d?.forEach((I2) => E2.fire(I2)), d = null;
|
|
1411
|
+
}, E2 = new A2({ onWillAddFirstListener() {
|
|
1412
|
+
h || (h = u((I2) => E2.fire(I2)), a && a.add(h));
|
|
985
1413
|
}, onDidAddFirstListener() {
|
|
986
|
-
d && (s ? setTimeout(
|
|
1414
|
+
d && (s ? setTimeout(v2) : v2());
|
|
987
1415
|
}, onDidRemoveLastListener() {
|
|
988
1416
|
h && h.dispose(), h = null;
|
|
989
1417
|
} });
|
|
990
|
-
return a && a.add(
|
|
1418
|
+
return a && a.add(E2), E2.event;
|
|
991
1419
|
}
|
|
992
|
-
q.buffer =
|
|
1420
|
+
q.buffer = F2;
|
|
993
1421
|
function he(u, s) {
|
|
994
1422
|
return (a, d, h) => {
|
|
995
|
-
let
|
|
996
|
-
return u(function(
|
|
997
|
-
let
|
|
998
|
-
|
|
1423
|
+
let v2 = s(new Te());
|
|
1424
|
+
return u(function(E2) {
|
|
1425
|
+
let I2 = v2.evaluate(E2);
|
|
1426
|
+
I2 !== K && a.call(d, I2);
|
|
999
1427
|
}, void 0, h);
|
|
1000
1428
|
};
|
|
1001
1429
|
}
|
|
@@ -1031,21 +1459,21 @@ var Ht;
|
|
|
1031
1459
|
}
|
|
1032
1460
|
}
|
|
1033
1461
|
function c(u, s, l = (a) => a) {
|
|
1034
|
-
let a = (...
|
|
1035
|
-
return
|
|
1462
|
+
let a = (...E2) => v2.fire(l(...E2)), d = () => u.on(s, a), h = () => u.removeListener(s, a), v2 = new A2({ onWillAddFirstListener: d, onDidRemoveLastListener: h });
|
|
1463
|
+
return v2.event;
|
|
1036
1464
|
}
|
|
1037
1465
|
q.fromNodeEventEmitter = c;
|
|
1038
|
-
function
|
|
1039
|
-
let a = (...
|
|
1040
|
-
return
|
|
1466
|
+
function b2(u, s, l = (a) => a) {
|
|
1467
|
+
let a = (...E2) => v2.fire(l(...E2)), d = () => u.addEventListener(s, a), h = () => u.removeEventListener(s, a), v2 = new A2({ onWillAddFirstListener: d, onDidRemoveLastListener: h });
|
|
1468
|
+
return v2.event;
|
|
1041
1469
|
}
|
|
1042
|
-
q.fromDOMEventEmitter =
|
|
1043
|
-
function
|
|
1470
|
+
q.fromDOMEventEmitter = b2;
|
|
1471
|
+
function g2(u) {
|
|
1044
1472
|
return new Promise((s) => r(u)(s));
|
|
1045
1473
|
}
|
|
1046
|
-
q.toPromise =
|
|
1047
|
-
function
|
|
1048
|
-
let s = new
|
|
1474
|
+
q.toPromise = g2;
|
|
1475
|
+
function D2(u) {
|
|
1476
|
+
let s = new A2();
|
|
1049
1477
|
return u.then((l) => {
|
|
1050
1478
|
s.fire(l);
|
|
1051
1479
|
}, () => {
|
|
@@ -1054,11 +1482,11 @@ var Ht;
|
|
|
1054
1482
|
s.dispose();
|
|
1055
1483
|
}), s.event;
|
|
1056
1484
|
}
|
|
1057
|
-
q.fromPromise =
|
|
1058
|
-
function
|
|
1485
|
+
q.fromPromise = D2;
|
|
1486
|
+
function z2(u, s) {
|
|
1059
1487
|
return u((l) => s.fire(l));
|
|
1060
1488
|
}
|
|
1061
|
-
q.forward =
|
|
1489
|
+
q.forward = z2;
|
|
1062
1490
|
function xe(u, s, l) {
|
|
1063
1491
|
return s(l), u((a) => s(a));
|
|
1064
1492
|
}
|
|
@@ -1073,7 +1501,7 @@ var Ht;
|
|
|
1073
1501
|
}, onDidRemoveLastListener: () => {
|
|
1074
1502
|
s.removeObserver(this);
|
|
1075
1503
|
} };
|
|
1076
|
-
l || e(a), this.emitter = new
|
|
1504
|
+
l || e(a), this.emitter = new A2(a), l && l.add(this.emitter);
|
|
1077
1505
|
}
|
|
1078
1506
|
beginUpdate(s) {
|
|
1079
1507
|
this._counter++;
|
|
@@ -1093,7 +1521,7 @@ var Ht;
|
|
|
1093
1521
|
q.fromObservable = _n;
|
|
1094
1522
|
function yn(u) {
|
|
1095
1523
|
return (s, l, a) => {
|
|
1096
|
-
let d = 0, h = false,
|
|
1524
|
+
let d = 0, h = false, v2 = { beginUpdate() {
|
|
1097
1525
|
d++;
|
|
1098
1526
|
}, endUpdate() {
|
|
1099
1527
|
d--, d === 0 && (u.reportChanges(), h && (h = false, s.call(l)));
|
|
@@ -1101,11 +1529,11 @@ var Ht;
|
|
|
1101
1529
|
}, handleChange() {
|
|
1102
1530
|
h = true;
|
|
1103
1531
|
} };
|
|
1104
|
-
u.addObserver(
|
|
1105
|
-
let
|
|
1106
|
-
u.removeObserver(
|
|
1532
|
+
u.addObserver(v2), u.reportChanges();
|
|
1533
|
+
let E2 = { dispose() {
|
|
1534
|
+
u.removeObserver(v2);
|
|
1107
1535
|
} };
|
|
1108
|
-
return a instanceof N ? a.add(
|
|
1536
|
+
return a instanceof N ? a.add(E2) : Array.isArray(a) && a.push(E2), E2;
|
|
1109
1537
|
};
|
|
1110
1538
|
}
|
|
1111
1539
|
q.fromObservableLight = yn;
|
|
@@ -1148,10 +1576,10 @@ var le = class le2 {
|
|
|
1148
1576
|
let i = this._stacks.get(e.value) || 0;
|
|
1149
1577
|
if (this._stacks.set(e.value, i + 1), this._warnCountdown -= 1, this._warnCountdown <= 0) {
|
|
1150
1578
|
this._warnCountdown = r * 0.5;
|
|
1151
|
-
let [o, f] = this.getMostFrequentStack(),
|
|
1152
|
-
console.warn(
|
|
1153
|
-
let
|
|
1154
|
-
this._errorHandler(
|
|
1579
|
+
let [o, f] = this.getMostFrequentStack(), T2 = `[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${f}):`;
|
|
1580
|
+
console.warn(T2), console.warn(o);
|
|
1581
|
+
let p2 = new Ce(T2, o);
|
|
1582
|
+
this._errorHandler(p2);
|
|
1155
1583
|
}
|
|
1156
1584
|
return () => {
|
|
1157
1585
|
let o = this._stacks.get(e.value) || 0;
|
|
@@ -1216,7 +1644,7 @@ if (Wt) {
|
|
|
1216
1644
|
typeof e == "string" && n5.push(e);
|
|
1217
1645
|
});
|
|
1218
1646
|
}
|
|
1219
|
-
var
|
|
1647
|
+
var A2 = class {
|
|
1220
1648
|
constructor(e) {
|
|
1221
1649
|
this._size = 0;
|
|
1222
1650
|
this._options = e, this._leakageMon = ct > 0 || this._options?.leakWarningThreshold ? new we(e?.onListenerError ?? te, this._options?.leakWarningThreshold ?? ct) : void 0, this._perfMon = this._options?._profName ? new Ae(this._options._profName) : void 0, this._deliveryQueue = this._options?.deliveryQueue;
|
|
@@ -1238,25 +1666,25 @@ var A = class {
|
|
|
1238
1666
|
get event() {
|
|
1239
1667
|
return this._event ??= (e, t, r) => {
|
|
1240
1668
|
if (this._leakageMon && this._size > this._leakageMon.threshold ** 2) {
|
|
1241
|
-
let
|
|
1242
|
-
console.warn(
|
|
1243
|
-
let
|
|
1244
|
-
return (this._options?.onListenerError || te)(
|
|
1669
|
+
let p2 = `[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;
|
|
1670
|
+
console.warn(p2);
|
|
1671
|
+
let m2 = this._leakageMon.getMostFrequentStack() ?? ["UNKNOWN stack", -1], _2 = new Re(`${p2}. HINT: Stack shows most frequent listener (${m2[1]}-times)`, m2[0]);
|
|
1672
|
+
return (this._options?.onListenerError || te)(_2), k2.None;
|
|
1245
1673
|
}
|
|
1246
|
-
if (this._disposed) return
|
|
1674
|
+
if (this._disposed) return k2.None;
|
|
1247
1675
|
t && (e = e.bind(t));
|
|
1248
1676
|
let i = new H(e), o, f;
|
|
1249
1677
|
this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && (i.stack = j.create(), o = this._leakageMon.check(i.stack, this._size + 1)), dt && (i.stack = f ?? j.create()), this._listeners ? this._listeners instanceof H ? (this._deliveryQueue ??= new ke(), this._listeners = [this._listeners, i]) : this._listeners.push(i) : (this._options?.onWillAddFirstListener?.(this), this._listeners = i, this._options?.onDidAddFirstListener?.(this)), this._size++;
|
|
1250
|
-
let
|
|
1251
|
-
ae?.unregister(
|
|
1678
|
+
let T2 = De(() => {
|
|
1679
|
+
ae?.unregister(T2), o?.(), this._removeListener(i);
|
|
1252
1680
|
});
|
|
1253
|
-
if (r instanceof N ? r.add(
|
|
1254
|
-
let
|
|
1681
|
+
if (r instanceof N ? r.add(T2) : Array.isArray(r) && r.push(T2), ae) {
|
|
1682
|
+
let p2 = new Error().stack.split(`
|
|
1255
1683
|
`).slice(2, 3).join(`
|
|
1256
|
-
`).trim(),
|
|
1257
|
-
ae.register(
|
|
1684
|
+
`).trim(), m2 = /(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(p2);
|
|
1685
|
+
ae.register(T2, m2?.[2] ?? p2, T2);
|
|
1258
1686
|
}
|
|
1259
|
-
return
|
|
1687
|
+
return T2;
|
|
1260
1688
|
}, this._event;
|
|
1261
1689
|
}
|
|
1262
1690
|
_removeListener(e) {
|
|
@@ -1317,11 +1745,11 @@ var ke = class {
|
|
|
1317
1745
|
this.i = this.end, this.current = void 0, this.value = void 0;
|
|
1318
1746
|
}
|
|
1319
1747
|
};
|
|
1320
|
-
var
|
|
1748
|
+
var w2 = class n4 {
|
|
1321
1749
|
constructor() {
|
|
1322
1750
|
this._providers = /* @__PURE__ */ Object.create(null);
|
|
1323
1751
|
this._active = "";
|
|
1324
|
-
this._onChange = new
|
|
1752
|
+
this._onChange = new A2();
|
|
1325
1753
|
this.onChange = this._onChange.event;
|
|
1326
1754
|
let e = new J();
|
|
1327
1755
|
this.register(e), this._active = e.version, this._activeProvider = e;
|
|
@@ -1363,11 +1791,11 @@ var w = class n4 {
|
|
|
1363
1791
|
let f = e.charCodeAt(o);
|
|
1364
1792
|
if (55296 <= f && f <= 56319) {
|
|
1365
1793
|
if (++o >= i) return t + this.wcwidth(f);
|
|
1366
|
-
let
|
|
1367
|
-
56320 <=
|
|
1794
|
+
let m2 = e.charCodeAt(o);
|
|
1795
|
+
56320 <= m2 && m2 <= 57343 ? f = (f - 55296) * 1024 + m2 - 56320 + 65536 : t += this.wcwidth(m2);
|
|
1368
1796
|
}
|
|
1369
|
-
let
|
|
1370
|
-
n4.extractShouldJoin(
|
|
1797
|
+
let T2 = this.charProperties(f, r), p2 = n4.extractWidth(T2);
|
|
1798
|
+
n4.extractShouldJoin(T2) && (p2 -= n4.extractWidth(r)), t += p2, r = T2;
|
|
1371
1799
|
}
|
|
1372
1800
|
return t;
|
|
1373
1801
|
}
|
|
@@ -1377,7 +1805,7 @@ var w = class n4 {
|
|
|
1377
1805
|
};
|
|
1378
1806
|
var Ue = 0;
|
|
1379
1807
|
var Tt = -3;
|
|
1380
|
-
var
|
|
1808
|
+
var S2 = class {
|
|
1381
1809
|
constructor() {
|
|
1382
1810
|
this.table = new Uint16Array(16);
|
|
1383
1811
|
this.trans = new Uint16Array(288);
|
|
@@ -1389,17 +1817,17 @@ var Fe = class {
|
|
|
1389
1817
|
this.bitcount = 0;
|
|
1390
1818
|
this.destLen = 0;
|
|
1391
1819
|
this.sourceIndex = 0;
|
|
1392
|
-
this.source = e, this.dest = t, this.ltree = new
|
|
1820
|
+
this.source = e, this.dest = t, this.ltree = new S2(), this.dtree = new S2();
|
|
1393
1821
|
}
|
|
1394
1822
|
};
|
|
1395
|
-
var xt = new
|
|
1396
|
-
var bt = new
|
|
1823
|
+
var xt = new S2();
|
|
1824
|
+
var bt = new S2();
|
|
1397
1825
|
var Oe = new Uint8Array(30);
|
|
1398
1826
|
var Pe = new Uint16Array(30);
|
|
1399
1827
|
var vt = new Uint8Array(30);
|
|
1400
1828
|
var mt = new Uint16Array(30);
|
|
1401
1829
|
var jt = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
|
1402
|
-
var ft = new
|
|
1830
|
+
var ft = new S2();
|
|
1403
1831
|
var C = new Uint8Array(320);
|
|
1404
1832
|
function gt(n5, e, t, r) {
|
|
1405
1833
|
var i, o;
|
|
@@ -1445,27 +1873,27 @@ function Se(n5, e) {
|
|
|
1445
1873
|
return n5.tag = o, n5.bitcount -= i, e.trans[t + r];
|
|
1446
1874
|
}
|
|
1447
1875
|
function qt(n5, e, t) {
|
|
1448
|
-
var r, i, o, f,
|
|
1876
|
+
var r, i, o, f, T2, p2;
|
|
1449
1877
|
for (r = R(n5, 5, 257), i = R(n5, 5, 1), o = R(n5, 4, 4), f = 0; f < 19; ++f) C[f] = 0;
|
|
1450
1878
|
for (f = 0; f < o; ++f) {
|
|
1451
|
-
var
|
|
1452
|
-
C[jt[f]] =
|
|
1879
|
+
var m2 = R(n5, 3, 0);
|
|
1880
|
+
C[jt[f]] = m2;
|
|
1453
1881
|
}
|
|
1454
|
-
for (Le(ft, C, 0, 19),
|
|
1455
|
-
var
|
|
1456
|
-
switch (
|
|
1882
|
+
for (Le(ft, C, 0, 19), T2 = 0; T2 < r + i; ) {
|
|
1883
|
+
var _2 = Se(n5, ft);
|
|
1884
|
+
switch (_2) {
|
|
1457
1885
|
case 16:
|
|
1458
|
-
var x = C[
|
|
1459
|
-
for (
|
|
1886
|
+
var x = C[T2 - 1];
|
|
1887
|
+
for (p2 = R(n5, 2, 3); p2; --p2) C[T2++] = x;
|
|
1460
1888
|
break;
|
|
1461
1889
|
case 17:
|
|
1462
|
-
for (
|
|
1890
|
+
for (p2 = R(n5, 3, 3); p2; --p2) C[T2++] = 0;
|
|
1463
1891
|
break;
|
|
1464
1892
|
case 18:
|
|
1465
|
-
for (
|
|
1893
|
+
for (p2 = R(n5, 7, 11); p2; --p2) C[T2++] = 0;
|
|
1466
1894
|
break;
|
|
1467
1895
|
default:
|
|
1468
|
-
C[
|
|
1896
|
+
C[T2++] = _2;
|
|
1469
1897
|
break;
|
|
1470
1898
|
}
|
|
1471
1899
|
}
|
|
@@ -1477,8 +1905,8 @@ function ht(n5, e, t) {
|
|
|
1477
1905
|
if (r === 256) return Ue;
|
|
1478
1906
|
if (r < 256) n5.dest[n5.destLen++] = r;
|
|
1479
1907
|
else {
|
|
1480
|
-
var i, o, f,
|
|
1481
|
-
for (r -= 257, i = R(n5, Oe[r], Pe[r]), o = Se(n5, t), f = n5.destLen - R(n5, vt[o], mt[o]),
|
|
1908
|
+
var i, o, f, T2;
|
|
1909
|
+
for (r -= 257, i = R(n5, Oe[r], Pe[r]), o = Se(n5, t), f = n5.destLen - R(n5, vt[o], mt[o]), T2 = f; T2 < f + i; ++T2) n5.dest[n5.destLen++] = n5.dest[T2];
|
|
1482
1910
|
}
|
|
1483
1911
|
}
|
|
1484
1912
|
}
|
|
@@ -1541,8 +1969,8 @@ var Ne = class {
|
|
|
1541
1969
|
for (let o = 0; o < i; o += 4) {
|
|
1542
1970
|
let f = e[o];
|
|
1543
1971
|
e[o] = e[o + 3], e[o + 3] = f;
|
|
1544
|
-
let
|
|
1545
|
-
e[o + 1] = e[o + 2], e[o + 2] =
|
|
1972
|
+
let T2 = e[o + 1];
|
|
1973
|
+
e[o + 1] = e[o + 2], e[o + 2] = T2;
|
|
1546
1974
|
}
|
|
1547
1975
|
}
|
|
1548
1976
|
this.data = new Uint32Array(e.buffer);
|
|
@@ -1600,17 +2028,17 @@ var fe = class fe2 {
|
|
|
1600
2028
|
if (e >= 32 && e < 127 && t >> 3 === 0) return fe2._plainNarrowProperties;
|
|
1601
2029
|
let r = qe(e), i = Xe(r), o = false;
|
|
1602
2030
|
if (i >= 2 ? i = i === 3 || this.ambiguousCharsAreWide || e === 65039 ? 2 : 1 : i = 1, t !== 0) {
|
|
1603
|
-
let f =
|
|
1604
|
-
this.handleGraphemes ? r = At(
|
|
2031
|
+
let f = w2.extractWidth(t);
|
|
2032
|
+
this.handleGraphemes ? r = At(w2.extractCharKind(t), r) : r = i === 0 ? 1 : 0, o = r > 0, o && (f > i ? i = f : r === 32 && (i = 2));
|
|
1605
2033
|
}
|
|
1606
|
-
return
|
|
2034
|
+
return w2.createPropertyValue(r, i, o);
|
|
1607
2035
|
}
|
|
1608
2036
|
wcwidth(e) {
|
|
1609
2037
|
let t = qe(e), r = Xe(t), i = (t & de) >> ce;
|
|
1610
2038
|
return i === Qe || i === je ? 0 : r >= 2 && (r === 3 || this.ambiguousCharsAreWide) ? 2 : 1;
|
|
1611
2039
|
}
|
|
1612
2040
|
};
|
|
1613
|
-
fe._plainNarrowProperties =
|
|
2041
|
+
fe._plainNarrowProperties = w2.createPropertyValue(Dt, 1, false);
|
|
1614
2042
|
var Q = fe;
|
|
1615
2043
|
var wt = class {
|
|
1616
2044
|
constructor() {
|
|
@@ -1672,7 +2100,7 @@ function attachPtyDefaultColorResponder(terminal, respond) {
|
|
|
1672
2100
|
var { Terminal: HeadlessTerminal } = pkg;
|
|
1673
2101
|
var PtyRenderSequencer = class {
|
|
1674
2102
|
terminal;
|
|
1675
|
-
serializeAddon = new
|
|
2103
|
+
serializeAddon = new D();
|
|
1676
2104
|
outputSeq = 0;
|
|
1677
2105
|
disposed = false;
|
|
1678
2106
|
constructor(options) {
|
|
@@ -2284,6 +2712,7 @@ export {
|
|
|
2284
2712
|
};
|
|
2285
2713
|
/*! Bundled license information:
|
|
2286
2714
|
|
|
2715
|
+
@xterm/addon-serialize/lib/addon-serialize.mjs:
|
|
2287
2716
|
@xterm/addon-unicode-graphemes/lib/addon-unicode-graphemes.mjs:
|
|
2288
2717
|
(**
|
|
2289
2718
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -2298,4 +2727,4 @@ export {
|
|
|
2298
2727
|
* Copyright (c) 2011 Fabrice Bellard
|
|
2299
2728
|
*)
|
|
2300
2729
|
*/
|
|
2301
|
-
//# sourceMappingURL=chunk-
|
|
2730
|
+
//# sourceMappingURL=chunk-DMYLOWNT.js.map
|