clauder-hub 0.1.7 → 0.1.9
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/package.json +1 -1
- package/server/dist/index.js +3431 -32
- package/web/dist/assets/{MonacoEditor-BlAuC60r.js → MonacoEditor-DK7eXvER.js} +3 -3
- package/web/dist/assets/{cssMode-CGWHF7SU.js → cssMode-WYqNQp8f.js} +1 -1
- package/web/dist/assets/{freemarker2-ButExUy0.js → freemarker2-Cp3oM9e1.js} +1 -1
- package/web/dist/assets/{handlebars-C-tQtMw_.js → handlebars-Bm2HKJEh.js} +1 -1
- package/web/dist/assets/{html-DO0qZYYU.js → html-DLcrG1hX.js} +1 -1
- package/web/dist/assets/{htmlMode-HWw8frC7.js → htmlMode-3Epiie2L.js} +1 -1
- package/web/dist/assets/{index-B1_0WNjk.js → index-B7Iz0Q52.js} +1 -1
- package/web/dist/assets/{index-CFwNi7rE.js → index-BR6xmqiR.js} +129 -129
- package/web/dist/assets/index-CHC0MugP.css +32 -0
- package/web/dist/assets/{javascript-E0rNv6Hb.js → javascript-8qk8Jri8.js} +1 -1
- package/web/dist/assets/{jsonMode-BtA3wy3C.js → jsonMode-BJX6XOQt.js} +1 -1
- package/web/dist/assets/{liquid-DFyLG9q1.js → liquid-B5M4E0ZX.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-7Y9rDBgH.js → lspLanguageFeatures-CUU9XT09.js} +1 -1
- package/web/dist/assets/{mdx-DHheCJGf.js → mdx-Bvm8SmTw.js} +1 -1
- package/web/dist/assets/{python-Dp4jpU9A.js → python-DX6Bq5ZQ.js} +1 -1
- package/web/dist/assets/{razor-CpNDoj91.js → razor-DlsmhF51.js} +1 -1
- package/web/dist/assets/{tsMode-DmUtjqNQ.js → tsMode-Bcy_nymF.js} +1 -1
- package/web/dist/assets/{typescript-BJ_xD_P2.js → typescript-Dmg3kdQN.js} +1 -1
- package/web/dist/assets/{workers-i2coOX7v.js → workers-BkZgrrre.js} +1 -1
- package/web/dist/assets/{xml-ISewjn85.js → xml-5tKXHifE.js} +1 -1
- package/web/dist/assets/{yaml-B0DsFM2T.js → yaml-DvEFKlpR.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-CWyPZ8VA.css +0 -32
package/server/dist/index.js
CHANGED
|
@@ -29358,6 +29358,3397 @@ var init_smallModel = __esm({
|
|
|
29358
29358
|
}
|
|
29359
29359
|
});
|
|
29360
29360
|
|
|
29361
|
+
// node_modules/@xterm/headless/lib-headless/xterm-headless.js
|
|
29362
|
+
var require_xterm_headless = __commonJS({
|
|
29363
|
+
"node_modules/@xterm/headless/lib-headless/xterm-headless.js"(exports) {
|
|
29364
|
+
(() => {
|
|
29365
|
+
"use strict";
|
|
29366
|
+
var e = { 349: (e2, t2, i2) => {
|
|
29367
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CircularList = void 0;
|
|
29368
|
+
const s2 = i2(460), r2 = i2(844);
|
|
29369
|
+
class n3 extends r2.Disposable {
|
|
29370
|
+
constructor(e3) {
|
|
29371
|
+
super(), this._maxLength = e3, this.onDeleteEmitter = this.register(new s2.EventEmitter()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this.register(new s2.EventEmitter()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this.register(new s2.EventEmitter()), this.onTrim = this.onTrimEmitter.event, this._array = new Array(this._maxLength), this._startIndex = 0, this._length = 0;
|
|
29372
|
+
}
|
|
29373
|
+
get maxLength() {
|
|
29374
|
+
return this._maxLength;
|
|
29375
|
+
}
|
|
29376
|
+
set maxLength(e3) {
|
|
29377
|
+
if (this._maxLength === e3) return;
|
|
29378
|
+
const t3 = new Array(e3);
|
|
29379
|
+
for (let i3 = 0; i3 < Math.min(e3, this.length); i3++) t3[i3] = this._array[this._getCyclicIndex(i3)];
|
|
29380
|
+
this._array = t3, this._maxLength = e3, this._startIndex = 0;
|
|
29381
|
+
}
|
|
29382
|
+
get length() {
|
|
29383
|
+
return this._length;
|
|
29384
|
+
}
|
|
29385
|
+
set length(e3) {
|
|
29386
|
+
if (e3 > this._length) for (let t3 = this._length; t3 < e3; t3++) this._array[t3] = void 0;
|
|
29387
|
+
this._length = e3;
|
|
29388
|
+
}
|
|
29389
|
+
get(e3) {
|
|
29390
|
+
return this._array[this._getCyclicIndex(e3)];
|
|
29391
|
+
}
|
|
29392
|
+
set(e3, t3) {
|
|
29393
|
+
this._array[this._getCyclicIndex(e3)] = t3;
|
|
29394
|
+
}
|
|
29395
|
+
push(e3) {
|
|
29396
|
+
this._array[this._getCyclicIndex(this._length)] = e3, this._length === this._maxLength ? (this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1)) : this._length++;
|
|
29397
|
+
}
|
|
29398
|
+
recycle() {
|
|
29399
|
+
if (this._length !== this._maxLength) throw new Error("Can only recycle when the buffer is full");
|
|
29400
|
+
return this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1), this._array[this._getCyclicIndex(this._length - 1)];
|
|
29401
|
+
}
|
|
29402
|
+
get isFull() {
|
|
29403
|
+
return this._length === this._maxLength;
|
|
29404
|
+
}
|
|
29405
|
+
pop() {
|
|
29406
|
+
return this._array[this._getCyclicIndex(this._length-- - 1)];
|
|
29407
|
+
}
|
|
29408
|
+
splice(e3, t3, ...i3) {
|
|
29409
|
+
if (t3) {
|
|
29410
|
+
for (let i4 = e3; i4 < this._length - t3; i4++) this._array[this._getCyclicIndex(i4)] = this._array[this._getCyclicIndex(i4 + t3)];
|
|
29411
|
+
this._length -= t3, this.onDeleteEmitter.fire({ index: e3, amount: t3 });
|
|
29412
|
+
}
|
|
29413
|
+
for (let t4 = this._length - 1; t4 >= e3; t4--) this._array[this._getCyclicIndex(t4 + i3.length)] = this._array[this._getCyclicIndex(t4)];
|
|
29414
|
+
for (let t4 = 0; t4 < i3.length; t4++) this._array[this._getCyclicIndex(e3 + t4)] = i3[t4];
|
|
29415
|
+
if (i3.length && this.onInsertEmitter.fire({ index: e3, amount: i3.length }), this._length + i3.length > this._maxLength) {
|
|
29416
|
+
const e4 = this._length + i3.length - this._maxLength;
|
|
29417
|
+
this._startIndex += e4, this._length = this._maxLength, this.onTrimEmitter.fire(e4);
|
|
29418
|
+
} else this._length += i3.length;
|
|
29419
|
+
}
|
|
29420
|
+
trimStart(e3) {
|
|
29421
|
+
e3 > this._length && (e3 = this._length), this._startIndex += e3, this._length -= e3, this.onTrimEmitter.fire(e3);
|
|
29422
|
+
}
|
|
29423
|
+
shiftElements(e3, t3, i3) {
|
|
29424
|
+
if (!(t3 <= 0)) {
|
|
29425
|
+
if (e3 < 0 || e3 >= this._length) throw new Error("start argument out of range");
|
|
29426
|
+
if (e3 + i3 < 0) throw new Error("Cannot shift elements in list beyond index 0");
|
|
29427
|
+
if (i3 > 0) {
|
|
29428
|
+
for (let s4 = t3 - 1; s4 >= 0; s4--) this.set(e3 + s4 + i3, this.get(e3 + s4));
|
|
29429
|
+
const s3 = e3 + t3 + i3 - this._length;
|
|
29430
|
+
if (s3 > 0) for (this._length += s3; this._length > this._maxLength; ) this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
|
|
29431
|
+
} else for (let s3 = 0; s3 < t3; s3++) this.set(e3 + s3 + i3, this.get(e3 + s3));
|
|
29432
|
+
}
|
|
29433
|
+
}
|
|
29434
|
+
_getCyclicIndex(e3) {
|
|
29435
|
+
return (this._startIndex + e3) % this._maxLength;
|
|
29436
|
+
}
|
|
29437
|
+
}
|
|
29438
|
+
t2.CircularList = n3;
|
|
29439
|
+
}, 439: (e2, t2) => {
|
|
29440
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.clone = void 0, t2.clone = function e3(t3, i2 = 5) {
|
|
29441
|
+
if ("object" != typeof t3) return t3;
|
|
29442
|
+
const s2 = Array.isArray(t3) ? [] : {};
|
|
29443
|
+
for (const r2 in t3) s2[r2] = i2 <= 1 ? t3[r2] : t3[r2] && e3(t3[r2], i2 - 1);
|
|
29444
|
+
return s2;
|
|
29445
|
+
};
|
|
29446
|
+
}, 969: (e2, t2, i2) => {
|
|
29447
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreTerminal = void 0;
|
|
29448
|
+
const s2 = i2(844), r2 = i2(585), n3 = i2(348), a = i2(866), o = i2(744), h2 = i2(302), c = i2(83), l = i2(460), _2 = i2(753), d2 = i2(480), f2 = i2(994), u = i2(282), p2 = i2(435), g2 = i2(981), v2 = i2(660);
|
|
29449
|
+
let b2 = false;
|
|
29450
|
+
class S2 extends s2.Disposable {
|
|
29451
|
+
get onScroll() {
|
|
29452
|
+
return this._onScrollApi || (this._onScrollApi = this.register(new l.EventEmitter()), this._onScroll.event(((e3) => {
|
|
29453
|
+
this._onScrollApi?.fire(e3.position);
|
|
29454
|
+
}))), this._onScrollApi.event;
|
|
29455
|
+
}
|
|
29456
|
+
get cols() {
|
|
29457
|
+
return this._bufferService.cols;
|
|
29458
|
+
}
|
|
29459
|
+
get rows() {
|
|
29460
|
+
return this._bufferService.rows;
|
|
29461
|
+
}
|
|
29462
|
+
get buffers() {
|
|
29463
|
+
return this._bufferService.buffers;
|
|
29464
|
+
}
|
|
29465
|
+
get options() {
|
|
29466
|
+
return this.optionsService.options;
|
|
29467
|
+
}
|
|
29468
|
+
set options(e3) {
|
|
29469
|
+
for (const t3 in e3) this.optionsService.options[t3] = e3[t3];
|
|
29470
|
+
}
|
|
29471
|
+
constructor(e3) {
|
|
29472
|
+
super(), this._windowsWrappingHeuristics = this.register(new s2.MutableDisposable()), this._onBinary = this.register(new l.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new l.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new l.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new l.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new l.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new l.EventEmitter()), this._instantiationService = new n3.InstantiationService(), this.optionsService = this.register(new h2.OptionsService(e3)), this._instantiationService.setService(r2.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(o.BufferService)), this._instantiationService.setService(r2.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(a.LogService)), this._instantiationService.setService(r2.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(c.CoreService)), this._instantiationService.setService(r2.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(_2.CoreMouseService)), this._instantiationService.setService(r2.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(d2.UnicodeService)), this._instantiationService.setService(r2.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(f2.CharsetService), this._instantiationService.setService(r2.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(v2.OscLinkService), this._instantiationService.setService(r2.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new p2.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, l.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, l.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, l.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, l.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom((() => this.scrollToBottom()))), this.register(this.coreService.onUserInput((() => this._writeBuffer.handleUserInput()))), this.register(this.optionsService.onMultipleOptionChange(["windowsMode", "windowsPty"], (() => this._handleWindowsPtyOptionChange()))), this.register(this._bufferService.onScroll(((e4) => {
|
|
29473
|
+
this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
|
29474
|
+
}))), this.register(this._inputHandler.onScroll(((e4) => {
|
|
29475
|
+
this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
|
29476
|
+
}))), this._writeBuffer = this.register(new g2.WriteBuffer(((e4, t3) => this._inputHandler.parse(e4, t3)))), this.register((0, l.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed));
|
|
29477
|
+
}
|
|
29478
|
+
write(e3, t3) {
|
|
29479
|
+
this._writeBuffer.write(e3, t3);
|
|
29480
|
+
}
|
|
29481
|
+
writeSync(e3, t3) {
|
|
29482
|
+
this._logService.logLevel <= r2.LogLevelEnum.WARN && !b2 && (this._logService.warn("writeSync is unreliable and will be removed soon."), b2 = true), this._writeBuffer.writeSync(e3, t3);
|
|
29483
|
+
}
|
|
29484
|
+
input(e3, t3 = true) {
|
|
29485
|
+
this.coreService.triggerDataEvent(e3, t3);
|
|
29486
|
+
}
|
|
29487
|
+
resize(e3, t3) {
|
|
29488
|
+
isNaN(e3) || isNaN(t3) || (e3 = Math.max(e3, o.MINIMUM_COLS), t3 = Math.max(t3, o.MINIMUM_ROWS), this._bufferService.resize(e3, t3));
|
|
29489
|
+
}
|
|
29490
|
+
scroll(e3, t3 = false) {
|
|
29491
|
+
this._bufferService.scroll(e3, t3);
|
|
29492
|
+
}
|
|
29493
|
+
scrollLines(e3, t3, i3) {
|
|
29494
|
+
this._bufferService.scrollLines(e3, t3, i3);
|
|
29495
|
+
}
|
|
29496
|
+
scrollPages(e3) {
|
|
29497
|
+
this.scrollLines(e3 * (this.rows - 1));
|
|
29498
|
+
}
|
|
29499
|
+
scrollToTop() {
|
|
29500
|
+
this.scrollLines(-this._bufferService.buffer.ydisp);
|
|
29501
|
+
}
|
|
29502
|
+
scrollToBottom() {
|
|
29503
|
+
this.scrollLines(this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
|
|
29504
|
+
}
|
|
29505
|
+
scrollToLine(e3) {
|
|
29506
|
+
const t3 = e3 - this._bufferService.buffer.ydisp;
|
|
29507
|
+
0 !== t3 && this.scrollLines(t3);
|
|
29508
|
+
}
|
|
29509
|
+
registerEscHandler(e3, t3) {
|
|
29510
|
+
return this._inputHandler.registerEscHandler(e3, t3);
|
|
29511
|
+
}
|
|
29512
|
+
registerDcsHandler(e3, t3) {
|
|
29513
|
+
return this._inputHandler.registerDcsHandler(e3, t3);
|
|
29514
|
+
}
|
|
29515
|
+
registerCsiHandler(e3, t3) {
|
|
29516
|
+
return this._inputHandler.registerCsiHandler(e3, t3);
|
|
29517
|
+
}
|
|
29518
|
+
registerOscHandler(e3, t3) {
|
|
29519
|
+
return this._inputHandler.registerOscHandler(e3, t3);
|
|
29520
|
+
}
|
|
29521
|
+
_setup() {
|
|
29522
|
+
this._handleWindowsPtyOptionChange();
|
|
29523
|
+
}
|
|
29524
|
+
reset() {
|
|
29525
|
+
this._inputHandler.reset(), this._bufferService.reset(), this._charsetService.reset(), this.coreService.reset(), this.coreMouseService.reset();
|
|
29526
|
+
}
|
|
29527
|
+
_handleWindowsPtyOptionChange() {
|
|
29528
|
+
let e3 = false;
|
|
29529
|
+
const t3 = this.optionsService.rawOptions.windowsPty;
|
|
29530
|
+
t3 && void 0 !== t3.buildNumber && void 0 !== t3.buildNumber ? e3 = !!("conpty" === t3.backend && t3.buildNumber < 21376) : this.optionsService.rawOptions.windowsMode && (e3 = true), e3 ? this._enableWindowsWrappingHeuristics() : this._windowsWrappingHeuristics.clear();
|
|
29531
|
+
}
|
|
29532
|
+
_enableWindowsWrappingHeuristics() {
|
|
29533
|
+
if (!this._windowsWrappingHeuristics.value) {
|
|
29534
|
+
const e3 = [];
|
|
29535
|
+
e3.push(this.onLineFeed(u.updateWindowsModeWrappedState.bind(null, this._bufferService))), e3.push(this.registerCsiHandler({ final: "H" }, (() => ((0, u.updateWindowsModeWrappedState)(this._bufferService), false)))), this._windowsWrappingHeuristics.value = (0, s2.toDisposable)((() => {
|
|
29536
|
+
for (const t3 of e3) t3.dispose();
|
|
29537
|
+
}));
|
|
29538
|
+
}
|
|
29539
|
+
}
|
|
29540
|
+
}
|
|
29541
|
+
t2.CoreTerminal = S2;
|
|
29542
|
+
}, 460: (e2, t2) => {
|
|
29543
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
|
|
29544
|
+
constructor() {
|
|
29545
|
+
this._listeners = [], this._disposed = false;
|
|
29546
|
+
}
|
|
29547
|
+
get event() {
|
|
29548
|
+
return this._event || (this._event = (e3) => {
|
|
29549
|
+
this._listeners.push(e3);
|
|
29550
|
+
const t3 = { dispose: () => {
|
|
29551
|
+
if (!this._disposed) {
|
|
29552
|
+
for (let t4 = 0; t4 < this._listeners.length; t4++) if (this._listeners[t4] === e3) return void this._listeners.splice(t4, 1);
|
|
29553
|
+
}
|
|
29554
|
+
} };
|
|
29555
|
+
return t3;
|
|
29556
|
+
}), this._event;
|
|
29557
|
+
}
|
|
29558
|
+
fire(e3, t3) {
|
|
29559
|
+
const i2 = [];
|
|
29560
|
+
for (let e4 = 0; e4 < this._listeners.length; e4++) i2.push(this._listeners[e4]);
|
|
29561
|
+
for (let s2 = 0; s2 < i2.length; s2++) i2[s2].call(void 0, e3, t3);
|
|
29562
|
+
}
|
|
29563
|
+
dispose() {
|
|
29564
|
+
this.clearListeners(), this._disposed = true;
|
|
29565
|
+
}
|
|
29566
|
+
clearListeners() {
|
|
29567
|
+
this._listeners && (this._listeners.length = 0);
|
|
29568
|
+
}
|
|
29569
|
+
}, t2.forwardEvent = function(e3, t3) {
|
|
29570
|
+
return e3(((e4) => t3.fire(e4)));
|
|
29571
|
+
}, t2.runAndSubscribe = function(e3, t3) {
|
|
29572
|
+
return t3(void 0), e3(((e4) => t3(e4)));
|
|
29573
|
+
};
|
|
29574
|
+
}, 435: function(e2, t2, i2) {
|
|
29575
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
29576
|
+
var r3, n4 = arguments.length, a2 = n4 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
29577
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
|
|
29578
|
+
else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n4 < 3 ? r3(a2) : n4 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
|
|
29579
|
+
return n4 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
|
|
29580
|
+
}, r2 = this && this.__param || function(e3, t3) {
|
|
29581
|
+
return function(i3, s3) {
|
|
29582
|
+
t3(i3, s3, e3);
|
|
29583
|
+
};
|
|
29584
|
+
};
|
|
29585
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.InputHandler = t2.WindowsOptionsReportType = void 0;
|
|
29586
|
+
const n3 = i2(584), a = i2(116), o = i2(15), h2 = i2(844), c = i2(482), l = i2(437), _2 = i2(460), d2 = i2(643), f2 = i2(511), u = i2(734), p2 = i2(585), g2 = i2(480), v2 = i2(242), b2 = i2(351), S2 = i2(941), m2 = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, C = 131072;
|
|
29587
|
+
function y2(e3, t3) {
|
|
29588
|
+
if (e3 > 24) return t3.setWinLines || false;
|
|
29589
|
+
switch (e3) {
|
|
29590
|
+
case 1:
|
|
29591
|
+
return !!t3.restoreWin;
|
|
29592
|
+
case 2:
|
|
29593
|
+
return !!t3.minimizeWin;
|
|
29594
|
+
case 3:
|
|
29595
|
+
return !!t3.setWinPosition;
|
|
29596
|
+
case 4:
|
|
29597
|
+
return !!t3.setWinSizePixels;
|
|
29598
|
+
case 5:
|
|
29599
|
+
return !!t3.raiseWin;
|
|
29600
|
+
case 6:
|
|
29601
|
+
return !!t3.lowerWin;
|
|
29602
|
+
case 7:
|
|
29603
|
+
return !!t3.refreshWin;
|
|
29604
|
+
case 8:
|
|
29605
|
+
return !!t3.setWinSizeChars;
|
|
29606
|
+
case 9:
|
|
29607
|
+
return !!t3.maximizeWin;
|
|
29608
|
+
case 10:
|
|
29609
|
+
return !!t3.fullscreenWin;
|
|
29610
|
+
case 11:
|
|
29611
|
+
return !!t3.getWinState;
|
|
29612
|
+
case 13:
|
|
29613
|
+
return !!t3.getWinPosition;
|
|
29614
|
+
case 14:
|
|
29615
|
+
return !!t3.getWinSizePixels;
|
|
29616
|
+
case 15:
|
|
29617
|
+
return !!t3.getScreenSizePixels;
|
|
29618
|
+
case 16:
|
|
29619
|
+
return !!t3.getCellSizePixels;
|
|
29620
|
+
case 18:
|
|
29621
|
+
return !!t3.getWinSizeChars;
|
|
29622
|
+
case 19:
|
|
29623
|
+
return !!t3.getScreenSizeChars;
|
|
29624
|
+
case 20:
|
|
29625
|
+
return !!t3.getIconTitle;
|
|
29626
|
+
case 21:
|
|
29627
|
+
return !!t3.getWinTitle;
|
|
29628
|
+
case 22:
|
|
29629
|
+
return !!t3.pushTitle;
|
|
29630
|
+
case 23:
|
|
29631
|
+
return !!t3.popTitle;
|
|
29632
|
+
case 24:
|
|
29633
|
+
return !!t3.setWinLines;
|
|
29634
|
+
}
|
|
29635
|
+
return false;
|
|
29636
|
+
}
|
|
29637
|
+
var w;
|
|
29638
|
+
!(function(e3) {
|
|
29639
|
+
e3[e3.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", e3[e3.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
|
|
29640
|
+
})(w || (t2.WindowsOptionsReportType = w = {}));
|
|
29641
|
+
let B = 0;
|
|
29642
|
+
class E extends h2.Disposable {
|
|
29643
|
+
getAttrData() {
|
|
29644
|
+
return this._curAttrData;
|
|
29645
|
+
}
|
|
29646
|
+
constructor(e3, t3, i3, s3, r3, h3, d3, u2, p3 = new o.EscapeSequenceParser()) {
|
|
29647
|
+
super(), this._bufferService = e3, this._charsetService = t3, this._coreService = i3, this._logService = s3, this._optionsService = r3, this._oscLinkService = h3, this._coreMouseService = d3, this._unicodeService = u2, this._parser = p3, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new f2.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new _2.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new _2.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new _2.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new _2.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new _2.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new _2.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new _2.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new _2.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new _2.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new _2.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new _2.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new _2.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new _2.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: false, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new A(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(((e4) => this._activeBuffer = e4.activeBuffer))), this._parser.setCsiHandlerFallback(((e4, t4) => {
|
|
29648
|
+
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(e4), params: t4.toArray() });
|
|
29649
|
+
})), this._parser.setEscHandlerFallback(((e4) => {
|
|
29650
|
+
this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(e4) });
|
|
29651
|
+
})), this._parser.setExecuteHandlerFallback(((e4) => {
|
|
29652
|
+
this._logService.debug("Unknown EXECUTE code: ", { code: e4 });
|
|
29653
|
+
})), this._parser.setOscHandlerFallback(((e4, t4, i4) => {
|
|
29654
|
+
this._logService.debug("Unknown OSC code: ", { identifier: e4, action: t4, data: i4 });
|
|
29655
|
+
})), this._parser.setDcsHandlerFallback(((e4, t4, i4) => {
|
|
29656
|
+
"HOOK" === t4 && (i4 = i4.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(e4), action: t4, payload: i4 });
|
|
29657
|
+
})), this._parser.setPrintHandler(((e4, t4, i4) => this.print(e4, t4, i4))), this._parser.registerCsiHandler({ final: "@" }, ((e4) => this.insertChars(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, ((e4) => this.scrollLeft(e4))), this._parser.registerCsiHandler({ final: "A" }, ((e4) => this.cursorUp(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, ((e4) => this.scrollRight(e4))), this._parser.registerCsiHandler({ final: "B" }, ((e4) => this.cursorDown(e4))), this._parser.registerCsiHandler({ final: "C" }, ((e4) => this.cursorForward(e4))), this._parser.registerCsiHandler({ final: "D" }, ((e4) => this.cursorBackward(e4))), this._parser.registerCsiHandler({ final: "E" }, ((e4) => this.cursorNextLine(e4))), this._parser.registerCsiHandler({ final: "F" }, ((e4) => this.cursorPrecedingLine(e4))), this._parser.registerCsiHandler({ final: "G" }, ((e4) => this.cursorCharAbsolute(e4))), this._parser.registerCsiHandler({ final: "H" }, ((e4) => this.cursorPosition(e4))), this._parser.registerCsiHandler({ final: "I" }, ((e4) => this.cursorForwardTab(e4))), this._parser.registerCsiHandler({ final: "J" }, ((e4) => this.eraseInDisplay(e4, false))), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, ((e4) => this.eraseInDisplay(e4, true))), this._parser.registerCsiHandler({ final: "K" }, ((e4) => this.eraseInLine(e4, false))), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, ((e4) => this.eraseInLine(e4, true))), this._parser.registerCsiHandler({ final: "L" }, ((e4) => this.insertLines(e4))), this._parser.registerCsiHandler({ final: "M" }, ((e4) => this.deleteLines(e4))), this._parser.registerCsiHandler({ final: "P" }, ((e4) => this.deleteChars(e4))), this._parser.registerCsiHandler({ final: "S" }, ((e4) => this.scrollUp(e4))), this._parser.registerCsiHandler({ final: "T" }, ((e4) => this.scrollDown(e4))), this._parser.registerCsiHandler({ final: "X" }, ((e4) => this.eraseChars(e4))), this._parser.registerCsiHandler({ final: "Z" }, ((e4) => this.cursorBackwardTab(e4))), this._parser.registerCsiHandler({ final: "`" }, ((e4) => this.charPosAbsolute(e4))), this._parser.registerCsiHandler({ final: "a" }, ((e4) => this.hPositionRelative(e4))), this._parser.registerCsiHandler({ final: "b" }, ((e4) => this.repeatPrecedingCharacter(e4))), this._parser.registerCsiHandler({ final: "c" }, ((e4) => this.sendDeviceAttributesPrimary(e4))), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, ((e4) => this.sendDeviceAttributesSecondary(e4))), this._parser.registerCsiHandler({ final: "d" }, ((e4) => this.linePosAbsolute(e4))), this._parser.registerCsiHandler({ final: "e" }, ((e4) => this.vPositionRelative(e4))), this._parser.registerCsiHandler({ final: "f" }, ((e4) => this.hVPosition(e4))), this._parser.registerCsiHandler({ final: "g" }, ((e4) => this.tabClear(e4))), this._parser.registerCsiHandler({ final: "h" }, ((e4) => this.setMode(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, ((e4) => this.setModePrivate(e4))), this._parser.registerCsiHandler({ final: "l" }, ((e4) => this.resetMode(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, ((e4) => this.resetModePrivate(e4))), this._parser.registerCsiHandler({ final: "m" }, ((e4) => this.charAttributes(e4))), this._parser.registerCsiHandler({ final: "n" }, ((e4) => this.deviceStatus(e4))), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, ((e4) => this.deviceStatusPrivate(e4))), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, ((e4) => this.softReset(e4))), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, ((e4) => this.setCursorStyle(e4))), this._parser.registerCsiHandler({ final: "r" }, ((e4) => this.setScrollRegion(e4))), this._parser.registerCsiHandler({ final: "s" }, ((e4) => this.saveCursor(e4))), this._parser.registerCsiHandler({ final: "t" }, ((e4) => this.windowOptions(e4))), this._parser.registerCsiHandler({ final: "u" }, ((e4) => this.restoreCursor(e4))), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, ((e4) => this.insertColumns(e4))), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, ((e4) => this.deleteColumns(e4))), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, ((e4) => this.selectProtected(e4))), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, ((e4) => this.requestMode(e4, true))), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, ((e4) => this.requestMode(e4, false))), this._parser.setExecuteHandler(n3.C0.BEL, (() => this.bell())), this._parser.setExecuteHandler(n3.C0.LF, (() => this.lineFeed())), this._parser.setExecuteHandler(n3.C0.VT, (() => this.lineFeed())), this._parser.setExecuteHandler(n3.C0.FF, (() => this.lineFeed())), this._parser.setExecuteHandler(n3.C0.CR, (() => this.carriageReturn())), this._parser.setExecuteHandler(n3.C0.BS, (() => this.backspace())), this._parser.setExecuteHandler(n3.C0.HT, (() => this.tab())), this._parser.setExecuteHandler(n3.C0.SO, (() => this.shiftOut())), this._parser.setExecuteHandler(n3.C0.SI, (() => this.shiftIn())), this._parser.setExecuteHandler(n3.C1.IND, (() => this.index())), this._parser.setExecuteHandler(n3.C1.NEL, (() => this.nextLine())), this._parser.setExecuteHandler(n3.C1.HTS, (() => this.tabSet())), this._parser.registerOscHandler(0, new v2.OscHandler(((e4) => (this.setTitle(e4), this.setIconName(e4), true)))), this._parser.registerOscHandler(1, new v2.OscHandler(((e4) => this.setIconName(e4)))), this._parser.registerOscHandler(2, new v2.OscHandler(((e4) => this.setTitle(e4)))), this._parser.registerOscHandler(4, new v2.OscHandler(((e4) => this.setOrReportIndexedColor(e4)))), this._parser.registerOscHandler(8, new v2.OscHandler(((e4) => this.setHyperlink(e4)))), this._parser.registerOscHandler(10, new v2.OscHandler(((e4) => this.setOrReportFgColor(e4)))), this._parser.registerOscHandler(11, new v2.OscHandler(((e4) => this.setOrReportBgColor(e4)))), this._parser.registerOscHandler(12, new v2.OscHandler(((e4) => this.setOrReportCursorColor(e4)))), this._parser.registerOscHandler(104, new v2.OscHandler(((e4) => this.restoreIndexedColor(e4)))), this._parser.registerOscHandler(110, new v2.OscHandler(((e4) => this.restoreFgColor(e4)))), this._parser.registerOscHandler(111, new v2.OscHandler(((e4) => this.restoreBgColor(e4)))), this._parser.registerOscHandler(112, new v2.OscHandler(((e4) => this.restoreCursorColor(e4)))), this._parser.registerEscHandler({ final: "7" }, (() => this.saveCursor())), this._parser.registerEscHandler({ final: "8" }, (() => this.restoreCursor())), this._parser.registerEscHandler({ final: "D" }, (() => this.index())), this._parser.registerEscHandler({ final: "E" }, (() => this.nextLine())), this._parser.registerEscHandler({ final: "H" }, (() => this.tabSet())), this._parser.registerEscHandler({ final: "M" }, (() => this.reverseIndex())), this._parser.registerEscHandler({ final: "=" }, (() => this.keypadApplicationMode())), this._parser.registerEscHandler({ final: ">" }, (() => this.keypadNumericMode())), this._parser.registerEscHandler({ final: "c" }, (() => this.fullReset())), this._parser.registerEscHandler({ final: "n" }, (() => this.setgLevel(2))), this._parser.registerEscHandler({ final: "o" }, (() => this.setgLevel(3))), this._parser.registerEscHandler({ final: "|" }, (() => this.setgLevel(3))), this._parser.registerEscHandler({ final: "}" }, (() => this.setgLevel(2))), this._parser.registerEscHandler({ final: "~" }, (() => this.setgLevel(1))), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, (() => this.selectDefaultCharset())), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, (() => this.selectDefaultCharset()));
|
|
29658
|
+
for (const e4 in a.CHARSETS) this._parser.registerEscHandler({ intermediates: "(", final: e4 }, (() => this.selectCharset("(" + e4))), this._parser.registerEscHandler({ intermediates: ")", final: e4 }, (() => this.selectCharset(")" + e4))), this._parser.registerEscHandler({ intermediates: "*", final: e4 }, (() => this.selectCharset("*" + e4))), this._parser.registerEscHandler({ intermediates: "+", final: e4 }, (() => this.selectCharset("+" + e4))), this._parser.registerEscHandler({ intermediates: "-", final: e4 }, (() => this.selectCharset("-" + e4))), this._parser.registerEscHandler({ intermediates: ".", final: e4 }, (() => this.selectCharset("." + e4))), this._parser.registerEscHandler({ intermediates: "/", final: e4 }, (() => this.selectCharset("/" + e4)));
|
|
29659
|
+
this._parser.registerEscHandler({ intermediates: "#", final: "8" }, (() => this.screenAlignmentPattern())), this._parser.setErrorHandler(((e4) => (this._logService.error("Parsing error: ", e4), e4))), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new b2.DcsHandler(((e4, t4) => this.requestStatusString(e4, t4))));
|
|
29660
|
+
}
|
|
29661
|
+
_preserveStack(e3, t3, i3, s3) {
|
|
29662
|
+
this._parseStack.paused = true, this._parseStack.cursorStartX = e3, this._parseStack.cursorStartY = t3, this._parseStack.decodedLength = i3, this._parseStack.position = s3;
|
|
29663
|
+
}
|
|
29664
|
+
_logSlowResolvingAsync(e3) {
|
|
29665
|
+
this._logService.logLevel <= p2.LogLevelEnum.WARN && Promise.race([e3, new Promise(((e4, t3) => setTimeout((() => t3("#SLOW_TIMEOUT")), 5e3)))]).catch(((e4) => {
|
|
29666
|
+
if ("#SLOW_TIMEOUT" !== e4) throw e4;
|
|
29667
|
+
console.warn("async parser handler taking longer than 5000 ms");
|
|
29668
|
+
}));
|
|
29669
|
+
}
|
|
29670
|
+
_getCurrentLinkId() {
|
|
29671
|
+
return this._curAttrData.extended.urlId;
|
|
29672
|
+
}
|
|
29673
|
+
parse(e3, t3) {
|
|
29674
|
+
let i3, s3 = this._activeBuffer.x, r3 = this._activeBuffer.y, n4 = 0;
|
|
29675
|
+
const a2 = this._parseStack.paused;
|
|
29676
|
+
if (a2) {
|
|
29677
|
+
if (i3 = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t3)) return this._logSlowResolvingAsync(i3), i3;
|
|
29678
|
+
s3 = this._parseStack.cursorStartX, r3 = this._parseStack.cursorStartY, this._parseStack.paused = false, e3.length > C && (n4 = this._parseStack.position + C);
|
|
29679
|
+
}
|
|
29680
|
+
if (this._logService.logLevel <= p2.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e3 ? ` "${e3}"` : ` "${Array.prototype.map.call(e3, ((e4) => String.fromCharCode(e4))).join("")}"`), "string" == typeof e3 ? e3.split("").map(((e4) => e4.charCodeAt(0))) : e3), this._parseBuffer.length < e3.length && this._parseBuffer.length < C && (this._parseBuffer = new Uint32Array(Math.min(e3.length, C))), a2 || this._dirtyRowTracker.clearRange(), e3.length > C) for (let t4 = n4; t4 < e3.length; t4 += C) {
|
|
29681
|
+
const n5 = t4 + C < e3.length ? t4 + C : e3.length, a3 = "string" == typeof e3 ? this._stringDecoder.decode(e3.substring(t4, n5), this._parseBuffer) : this._utf8Decoder.decode(e3.subarray(t4, n5), this._parseBuffer);
|
|
29682
|
+
if (i3 = this._parser.parse(this._parseBuffer, a3)) return this._preserveStack(s3, r3, a3, t4), this._logSlowResolvingAsync(i3), i3;
|
|
29683
|
+
}
|
|
29684
|
+
else if (!a2) {
|
|
29685
|
+
const t4 = "string" == typeof e3 ? this._stringDecoder.decode(e3, this._parseBuffer) : this._utf8Decoder.decode(e3, this._parseBuffer);
|
|
29686
|
+
if (i3 = this._parser.parse(this._parseBuffer, t4)) return this._preserveStack(s3, r3, t4, 0), this._logSlowResolvingAsync(i3), i3;
|
|
29687
|
+
}
|
|
29688
|
+
this._activeBuffer.x === s3 && this._activeBuffer.y === r3 || this._onCursorMove.fire();
|
|
29689
|
+
const o2 = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), h3 = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
|
|
29690
|
+
h3 < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(h3, this._bufferService.rows - 1), Math.min(o2, this._bufferService.rows - 1));
|
|
29691
|
+
}
|
|
29692
|
+
print(e3, t3, i3) {
|
|
29693
|
+
let s3, r3;
|
|
29694
|
+
const n4 = this._charsetService.charset, a2 = this._optionsService.rawOptions.screenReaderMode, o2 = this._bufferService.cols, h3 = this._coreService.decPrivateModes.wraparound, _3 = this._coreService.modes.insertMode, f3 = this._curAttrData;
|
|
29695
|
+
let u2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
29696
|
+
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i3 - t3 > 0 && 2 === u2.getWidth(this._activeBuffer.x - 1) && u2.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, f3);
|
|
29697
|
+
let p3 = this._parser.precedingJoinState;
|
|
29698
|
+
for (let v3 = t3; v3 < i3; ++v3) {
|
|
29699
|
+
if (s3 = e3[v3], s3 < 127 && n4) {
|
|
29700
|
+
const e4 = n4[String.fromCharCode(s3)];
|
|
29701
|
+
e4 && (s3 = e4.charCodeAt(0));
|
|
29702
|
+
}
|
|
29703
|
+
const t4 = this._unicodeService.charProperties(s3, p3);
|
|
29704
|
+
r3 = g2.UnicodeService.extractWidth(t4);
|
|
29705
|
+
const i4 = g2.UnicodeService.extractShouldJoin(t4), b3 = i4 ? g2.UnicodeService.extractWidth(p3) : 0;
|
|
29706
|
+
if (p3 = t4, a2 && this._onA11yChar.fire((0, c.stringFromCodePoint)(s3)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + r3 - b3 > o2) {
|
|
29707
|
+
if (h3) {
|
|
29708
|
+
const e4 = u2;
|
|
29709
|
+
let t5 = this._activeBuffer.x - b3;
|
|
29710
|
+
for (this._activeBuffer.x = b3, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), true)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = true), u2 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), b3 > 0 && u2 instanceof l.BufferLine && u2.copyCellsFrom(e4, t5, 0, b3, false); t5 < o2; ) e4.setCellFromCodepoint(t5++, 0, 1, f3);
|
|
29711
|
+
} else if (this._activeBuffer.x = o2 - 1, 2 === r3) continue;
|
|
29712
|
+
}
|
|
29713
|
+
if (i4 && this._activeBuffer.x) {
|
|
29714
|
+
const e4 = u2.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
|
|
29715
|
+
u2.addCodepointToCell(this._activeBuffer.x - e4, s3, r3);
|
|
29716
|
+
for (let e5 = r3 - b3; --e5 >= 0; ) u2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, f3);
|
|
29717
|
+
} else if (_3 && (u2.insertCells(this._activeBuffer.x, r3 - b3, this._activeBuffer.getNullCell(f3)), 2 === u2.getWidth(o2 - 1) && u2.setCellFromCodepoint(o2 - 1, d2.NULL_CELL_CODE, d2.NULL_CELL_WIDTH, f3)), u2.setCellFromCodepoint(this._activeBuffer.x++, s3, r3, f3), r3 > 0) for (; --r3; ) u2.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, f3);
|
|
29718
|
+
}
|
|
29719
|
+
this._parser.precedingJoinState = p3, this._activeBuffer.x < o2 && i3 - t3 > 0 && 0 === u2.getWidth(this._activeBuffer.x) && !u2.hasContent(this._activeBuffer.x) && u2.setCellFromCodepoint(this._activeBuffer.x, 0, 1, f3), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
|
29720
|
+
}
|
|
29721
|
+
registerCsiHandler(e3, t3) {
|
|
29722
|
+
return "t" !== e3.final || e3.prefix || e3.intermediates ? this._parser.registerCsiHandler(e3, t3) : this._parser.registerCsiHandler(e3, ((e4) => !y2(e4.params[0], this._optionsService.rawOptions.windowOptions) || t3(e4)));
|
|
29723
|
+
}
|
|
29724
|
+
registerDcsHandler(e3, t3) {
|
|
29725
|
+
return this._parser.registerDcsHandler(e3, new b2.DcsHandler(t3));
|
|
29726
|
+
}
|
|
29727
|
+
registerEscHandler(e3, t3) {
|
|
29728
|
+
return this._parser.registerEscHandler(e3, t3);
|
|
29729
|
+
}
|
|
29730
|
+
registerOscHandler(e3, t3) {
|
|
29731
|
+
return this._parser.registerOscHandler(e3, new v2.OscHandler(t3));
|
|
29732
|
+
}
|
|
29733
|
+
bell() {
|
|
29734
|
+
return this._onRequestBell.fire(), true;
|
|
29735
|
+
}
|
|
29736
|
+
lineFeed() {
|
|
29737
|
+
return this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._optionsService.rawOptions.convertEol && (this._activeBuffer.x = 0), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows ? this._activeBuffer.y = this._bufferService.rows - 1 : this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.x >= this._bufferService.cols && this._activeBuffer.x--, this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._onLineFeed.fire(), true;
|
|
29738
|
+
}
|
|
29739
|
+
carriageReturn() {
|
|
29740
|
+
return this._activeBuffer.x = 0, true;
|
|
29741
|
+
}
|
|
29742
|
+
backspace() {
|
|
29743
|
+
if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, true;
|
|
29744
|
+
if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0) this._activeBuffer.x--;
|
|
29745
|
+
else if (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {
|
|
29746
|
+
this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
|
|
29747
|
+
const e3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
29748
|
+
e3.hasWidth(this._activeBuffer.x) && !e3.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
|
|
29749
|
+
}
|
|
29750
|
+
return this._restrictCursor(), true;
|
|
29751
|
+
}
|
|
29752
|
+
tab() {
|
|
29753
|
+
if (this._activeBuffer.x >= this._bufferService.cols) return true;
|
|
29754
|
+
const e3 = this._activeBuffer.x;
|
|
29755
|
+
return this._activeBuffer.x = this._activeBuffer.nextStop(), this._optionsService.rawOptions.screenReaderMode && this._onA11yTab.fire(this._activeBuffer.x - e3), true;
|
|
29756
|
+
}
|
|
29757
|
+
shiftOut() {
|
|
29758
|
+
return this._charsetService.setgLevel(1), true;
|
|
29759
|
+
}
|
|
29760
|
+
shiftIn() {
|
|
29761
|
+
return this._charsetService.setgLevel(0), true;
|
|
29762
|
+
}
|
|
29763
|
+
_restrictCursor(e3 = this._bufferService.cols - 1) {
|
|
29764
|
+
this._activeBuffer.x = Math.min(e3, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
|
29765
|
+
}
|
|
29766
|
+
_setCursor(e3, t3) {
|
|
29767
|
+
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = e3, this._activeBuffer.y = this._activeBuffer.scrollTop + t3) : (this._activeBuffer.x = e3, this._activeBuffer.y = t3), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
|
29768
|
+
}
|
|
29769
|
+
_moveCursor(e3, t3) {
|
|
29770
|
+
this._restrictCursor(), this._setCursor(this._activeBuffer.x + e3, this._activeBuffer.y + t3);
|
|
29771
|
+
}
|
|
29772
|
+
cursorUp(e3) {
|
|
29773
|
+
const t3 = this._activeBuffer.y - this._activeBuffer.scrollTop;
|
|
29774
|
+
return t3 >= 0 ? this._moveCursor(0, -Math.min(t3, e3.params[0] || 1)) : this._moveCursor(0, -(e3.params[0] || 1)), true;
|
|
29775
|
+
}
|
|
29776
|
+
cursorDown(e3) {
|
|
29777
|
+
const t3 = this._activeBuffer.scrollBottom - this._activeBuffer.y;
|
|
29778
|
+
return t3 >= 0 ? this._moveCursor(0, Math.min(t3, e3.params[0] || 1)) : this._moveCursor(0, e3.params[0] || 1), true;
|
|
29779
|
+
}
|
|
29780
|
+
cursorForward(e3) {
|
|
29781
|
+
return this._moveCursor(e3.params[0] || 1, 0), true;
|
|
29782
|
+
}
|
|
29783
|
+
cursorBackward(e3) {
|
|
29784
|
+
return this._moveCursor(-(e3.params[0] || 1), 0), true;
|
|
29785
|
+
}
|
|
29786
|
+
cursorNextLine(e3) {
|
|
29787
|
+
return this.cursorDown(e3), this._activeBuffer.x = 0, true;
|
|
29788
|
+
}
|
|
29789
|
+
cursorPrecedingLine(e3) {
|
|
29790
|
+
return this.cursorUp(e3), this._activeBuffer.x = 0, true;
|
|
29791
|
+
}
|
|
29792
|
+
cursorCharAbsolute(e3) {
|
|
29793
|
+
return this._setCursor((e3.params[0] || 1) - 1, this._activeBuffer.y), true;
|
|
29794
|
+
}
|
|
29795
|
+
cursorPosition(e3) {
|
|
29796
|
+
return this._setCursor(e3.length >= 2 ? (e3.params[1] || 1) - 1 : 0, (e3.params[0] || 1) - 1), true;
|
|
29797
|
+
}
|
|
29798
|
+
charPosAbsolute(e3) {
|
|
29799
|
+
return this._setCursor((e3.params[0] || 1) - 1, this._activeBuffer.y), true;
|
|
29800
|
+
}
|
|
29801
|
+
hPositionRelative(e3) {
|
|
29802
|
+
return this._moveCursor(e3.params[0] || 1, 0), true;
|
|
29803
|
+
}
|
|
29804
|
+
linePosAbsolute(e3) {
|
|
29805
|
+
return this._setCursor(this._activeBuffer.x, (e3.params[0] || 1) - 1), true;
|
|
29806
|
+
}
|
|
29807
|
+
vPositionRelative(e3) {
|
|
29808
|
+
return this._moveCursor(0, e3.params[0] || 1), true;
|
|
29809
|
+
}
|
|
29810
|
+
hVPosition(e3) {
|
|
29811
|
+
return this.cursorPosition(e3), true;
|
|
29812
|
+
}
|
|
29813
|
+
tabClear(e3) {
|
|
29814
|
+
const t3 = e3.params[0];
|
|
29815
|
+
return 0 === t3 ? delete this._activeBuffer.tabs[this._activeBuffer.x] : 3 === t3 && (this._activeBuffer.tabs = {}), true;
|
|
29816
|
+
}
|
|
29817
|
+
cursorForwardTab(e3) {
|
|
29818
|
+
if (this._activeBuffer.x >= this._bufferService.cols) return true;
|
|
29819
|
+
let t3 = e3.params[0] || 1;
|
|
29820
|
+
for (; t3--; ) this._activeBuffer.x = this._activeBuffer.nextStop();
|
|
29821
|
+
return true;
|
|
29822
|
+
}
|
|
29823
|
+
cursorBackwardTab(e3) {
|
|
29824
|
+
if (this._activeBuffer.x >= this._bufferService.cols) return true;
|
|
29825
|
+
let t3 = e3.params[0] || 1;
|
|
29826
|
+
for (; t3--; ) this._activeBuffer.x = this._activeBuffer.prevStop();
|
|
29827
|
+
return true;
|
|
29828
|
+
}
|
|
29829
|
+
selectProtected(e3) {
|
|
29830
|
+
const t3 = e3.params[0];
|
|
29831
|
+
return 1 === t3 && (this._curAttrData.bg |= 536870912), 2 !== t3 && 0 !== t3 || (this._curAttrData.bg &= -536870913), true;
|
|
29832
|
+
}
|
|
29833
|
+
_eraseInBufferLine(e3, t3, i3, s3 = false, r3 = false) {
|
|
29834
|
+
const n4 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
|
|
29835
|
+
n4.replaceCells(t3, i3, this._activeBuffer.getNullCell(this._eraseAttrData()), r3), s3 && (n4.isWrapped = false);
|
|
29836
|
+
}
|
|
29837
|
+
_resetBufferLine(e3, t3 = false) {
|
|
29838
|
+
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e3);
|
|
29839
|
+
i3 && (i3.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), t3), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + e3), i3.isWrapped = false);
|
|
29840
|
+
}
|
|
29841
|
+
eraseInDisplay(e3, t3 = false) {
|
|
29842
|
+
let i3;
|
|
29843
|
+
switch (this._restrictCursor(this._bufferService.cols), e3.params[0]) {
|
|
29844
|
+
case 0:
|
|
29845
|
+
for (i3 = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i3), this._eraseInBufferLine(i3++, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t3); i3 < this._bufferService.rows; i3++) this._resetBufferLine(i3, t3);
|
|
29846
|
+
this._dirtyRowTracker.markDirty(i3);
|
|
29847
|
+
break;
|
|
29848
|
+
case 1:
|
|
29849
|
+
for (i3 = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i3), this._eraseInBufferLine(i3, 0, this._activeBuffer.x + 1, true, t3), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(i3 + 1).isWrapped = false); i3--; ) this._resetBufferLine(i3, t3);
|
|
29850
|
+
this._dirtyRowTracker.markDirty(0);
|
|
29851
|
+
break;
|
|
29852
|
+
case 2:
|
|
29853
|
+
for (i3 = this._bufferService.rows, this._dirtyRowTracker.markDirty(i3 - 1); i3--; ) this._resetBufferLine(i3, t3);
|
|
29854
|
+
this._dirtyRowTracker.markDirty(0);
|
|
29855
|
+
break;
|
|
29856
|
+
case 3:
|
|
29857
|
+
const e4 = this._activeBuffer.lines.length - this._bufferService.rows;
|
|
29858
|
+
e4 > 0 && (this._activeBuffer.lines.trimStart(e4), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - e4, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - e4, 0), this._onScroll.fire(0));
|
|
29859
|
+
}
|
|
29860
|
+
return true;
|
|
29861
|
+
}
|
|
29862
|
+
eraseInLine(e3, t3 = false) {
|
|
29863
|
+
switch (this._restrictCursor(this._bufferService.cols), e3.params[0]) {
|
|
29864
|
+
case 0:
|
|
29865
|
+
this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t3);
|
|
29866
|
+
break;
|
|
29867
|
+
case 1:
|
|
29868
|
+
this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false, t3);
|
|
29869
|
+
break;
|
|
29870
|
+
case 2:
|
|
29871
|
+
this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true, t3);
|
|
29872
|
+
}
|
|
29873
|
+
return this._dirtyRowTracker.markDirty(this._activeBuffer.y), true;
|
|
29874
|
+
}
|
|
29875
|
+
insertLines(e3) {
|
|
29876
|
+
this._restrictCursor();
|
|
29877
|
+
let t3 = e3.params[0] || 1;
|
|
29878
|
+
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
|
|
29879
|
+
const i3 = this._activeBuffer.ybase + this._activeBuffer.y, s3 = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, r3 = this._bufferService.rows - 1 + this._activeBuffer.ybase - s3 + 1;
|
|
29880
|
+
for (; t3--; ) this._activeBuffer.lines.splice(r3 - 1, 1), this._activeBuffer.lines.splice(i3, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
|
|
29881
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, true;
|
|
29882
|
+
}
|
|
29883
|
+
deleteLines(e3) {
|
|
29884
|
+
this._restrictCursor();
|
|
29885
|
+
let t3 = e3.params[0] || 1;
|
|
29886
|
+
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
|
|
29887
|
+
const i3 = this._activeBuffer.ybase + this._activeBuffer.y;
|
|
29888
|
+
let s3;
|
|
29889
|
+
for (s3 = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, s3 = this._bufferService.rows - 1 + this._activeBuffer.ybase - s3; t3--; ) this._activeBuffer.lines.splice(i3, 1), this._activeBuffer.lines.splice(s3, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
|
|
29890
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, true;
|
|
29891
|
+
}
|
|
29892
|
+
insertChars(e3) {
|
|
29893
|
+
this._restrictCursor();
|
|
29894
|
+
const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
29895
|
+
return t3 && (t3.insertCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
|
|
29896
|
+
}
|
|
29897
|
+
deleteChars(e3) {
|
|
29898
|
+
this._restrictCursor();
|
|
29899
|
+
const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
29900
|
+
return t3 && (t3.deleteCells(this._activeBuffer.x, e3.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
|
|
29901
|
+
}
|
|
29902
|
+
scrollUp(e3) {
|
|
29903
|
+
let t3 = e3.params[0] || 1;
|
|
29904
|
+
for (; t3--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
|
|
29905
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
29906
|
+
}
|
|
29907
|
+
scrollDown(e3) {
|
|
29908
|
+
let t3 = e3.params[0] || 1;
|
|
29909
|
+
for (; t3--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));
|
|
29910
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
29911
|
+
}
|
|
29912
|
+
scrollLeft(e3) {
|
|
29913
|
+
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
|
|
29914
|
+
const t3 = e3.params[0] || 1;
|
|
29915
|
+
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
29916
|
+
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
29917
|
+
i3.deleteCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
29918
|
+
}
|
|
29919
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
29920
|
+
}
|
|
29921
|
+
scrollRight(e3) {
|
|
29922
|
+
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
|
|
29923
|
+
const t3 = e3.params[0] || 1;
|
|
29924
|
+
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
29925
|
+
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
29926
|
+
i3.insertCells(0, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
29927
|
+
}
|
|
29928
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
29929
|
+
}
|
|
29930
|
+
insertColumns(e3) {
|
|
29931
|
+
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
|
|
29932
|
+
const t3 = e3.params[0] || 1;
|
|
29933
|
+
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
29934
|
+
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
29935
|
+
i3.insertCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
29936
|
+
}
|
|
29937
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
29938
|
+
}
|
|
29939
|
+
deleteColumns(e3) {
|
|
29940
|
+
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return true;
|
|
29941
|
+
const t3 = e3.params[0] || 1;
|
|
29942
|
+
for (let e4 = this._activeBuffer.scrollTop; e4 <= this._activeBuffer.scrollBottom; ++e4) {
|
|
29943
|
+
const i3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + e4);
|
|
29944
|
+
i3.deleteCells(this._activeBuffer.x, t3, this._activeBuffer.getNullCell(this._eraseAttrData())), i3.isWrapped = false;
|
|
29945
|
+
}
|
|
29946
|
+
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), true;
|
|
29947
|
+
}
|
|
29948
|
+
eraseChars(e3) {
|
|
29949
|
+
this._restrictCursor();
|
|
29950
|
+
const t3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
29951
|
+
return t3 && (t3.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (e3.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), true;
|
|
29952
|
+
}
|
|
29953
|
+
repeatPrecedingCharacter(e3) {
|
|
29954
|
+
const t3 = this._parser.precedingJoinState;
|
|
29955
|
+
if (!t3) return true;
|
|
29956
|
+
const i3 = e3.params[0] || 1, s3 = g2.UnicodeService.extractWidth(t3), r3 = this._activeBuffer.x - s3, n4 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(r3), a2 = new Uint32Array(n4.length * i3);
|
|
29957
|
+
let o2 = 0;
|
|
29958
|
+
for (let e4 = 0; e4 < n4.length; ) {
|
|
29959
|
+
const t4 = n4.codePointAt(e4) || 0;
|
|
29960
|
+
a2[o2++] = t4, e4 += t4 > 65535 ? 2 : 1;
|
|
29961
|
+
}
|
|
29962
|
+
let h3 = o2;
|
|
29963
|
+
for (let e4 = 1; e4 < i3; ++e4) a2.copyWithin(h3, 0, o2), h3 += o2;
|
|
29964
|
+
return this.print(a2, 0, h3), true;
|
|
29965
|
+
}
|
|
29966
|
+
sendDeviceAttributesPrimary(e3) {
|
|
29967
|
+
return e3.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n3.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n3.C0.ESC + "[?6c")), true;
|
|
29968
|
+
}
|
|
29969
|
+
sendDeviceAttributesSecondary(e3) {
|
|
29970
|
+
return e3.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent(n3.C0.ESC + "[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent(n3.C0.ESC + "[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(e3.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent(n3.C0.ESC + "[>83;40003;0c")), true;
|
|
29971
|
+
}
|
|
29972
|
+
_is(e3) {
|
|
29973
|
+
return 0 === (this._optionsService.rawOptions.termName + "").indexOf(e3);
|
|
29974
|
+
}
|
|
29975
|
+
setMode(e3) {
|
|
29976
|
+
for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
|
|
29977
|
+
case 4:
|
|
29978
|
+
this._coreService.modes.insertMode = true;
|
|
29979
|
+
break;
|
|
29980
|
+
case 20:
|
|
29981
|
+
this._optionsService.options.convertEol = true;
|
|
29982
|
+
}
|
|
29983
|
+
return true;
|
|
29984
|
+
}
|
|
29985
|
+
setModePrivate(e3) {
|
|
29986
|
+
for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
|
|
29987
|
+
case 1:
|
|
29988
|
+
this._coreService.decPrivateModes.applicationCursorKeys = true;
|
|
29989
|
+
break;
|
|
29990
|
+
case 2:
|
|
29991
|
+
this._charsetService.setgCharset(0, a.DEFAULT_CHARSET), this._charsetService.setgCharset(1, a.DEFAULT_CHARSET), this._charsetService.setgCharset(2, a.DEFAULT_CHARSET), this._charsetService.setgCharset(3, a.DEFAULT_CHARSET);
|
|
29992
|
+
break;
|
|
29993
|
+
case 3:
|
|
29994
|
+
this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(132, this._bufferService.rows), this._onRequestReset.fire());
|
|
29995
|
+
break;
|
|
29996
|
+
case 6:
|
|
29997
|
+
this._coreService.decPrivateModes.origin = true, this._setCursor(0, 0);
|
|
29998
|
+
break;
|
|
29999
|
+
case 7:
|
|
30000
|
+
this._coreService.decPrivateModes.wraparound = true;
|
|
30001
|
+
break;
|
|
30002
|
+
case 12:
|
|
30003
|
+
this._optionsService.options.cursorBlink = true;
|
|
30004
|
+
break;
|
|
30005
|
+
case 45:
|
|
30006
|
+
this._coreService.decPrivateModes.reverseWraparound = true;
|
|
30007
|
+
break;
|
|
30008
|
+
case 66:
|
|
30009
|
+
this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = true, this._onRequestSyncScrollBar.fire();
|
|
30010
|
+
break;
|
|
30011
|
+
case 9:
|
|
30012
|
+
this._coreMouseService.activeProtocol = "X10";
|
|
30013
|
+
break;
|
|
30014
|
+
case 1e3:
|
|
30015
|
+
this._coreMouseService.activeProtocol = "VT200";
|
|
30016
|
+
break;
|
|
30017
|
+
case 1002:
|
|
30018
|
+
this._coreMouseService.activeProtocol = "DRAG";
|
|
30019
|
+
break;
|
|
30020
|
+
case 1003:
|
|
30021
|
+
this._coreMouseService.activeProtocol = "ANY";
|
|
30022
|
+
break;
|
|
30023
|
+
case 1004:
|
|
30024
|
+
this._coreService.decPrivateModes.sendFocus = true, this._onRequestSendFocus.fire();
|
|
30025
|
+
break;
|
|
30026
|
+
case 1005:
|
|
30027
|
+
this._logService.debug("DECSET 1005 not supported (see #2507)");
|
|
30028
|
+
break;
|
|
30029
|
+
case 1006:
|
|
30030
|
+
this._coreMouseService.activeEncoding = "SGR";
|
|
30031
|
+
break;
|
|
30032
|
+
case 1015:
|
|
30033
|
+
this._logService.debug("DECSET 1015 not supported (see #2507)");
|
|
30034
|
+
break;
|
|
30035
|
+
case 1016:
|
|
30036
|
+
this._coreMouseService.activeEncoding = "SGR_PIXELS";
|
|
30037
|
+
break;
|
|
30038
|
+
case 25:
|
|
30039
|
+
this._coreService.isCursorHidden = false;
|
|
30040
|
+
break;
|
|
30041
|
+
case 1048:
|
|
30042
|
+
this.saveCursor();
|
|
30043
|
+
break;
|
|
30044
|
+
case 1049:
|
|
30045
|
+
this.saveCursor();
|
|
30046
|
+
case 47:
|
|
30047
|
+
case 1047:
|
|
30048
|
+
this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()), this._coreService.isCursorInitialized = true, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
|
|
30049
|
+
break;
|
|
30050
|
+
case 2004:
|
|
30051
|
+
this._coreService.decPrivateModes.bracketedPasteMode = true;
|
|
30052
|
+
}
|
|
30053
|
+
return true;
|
|
30054
|
+
}
|
|
30055
|
+
resetMode(e3) {
|
|
30056
|
+
for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
|
|
30057
|
+
case 4:
|
|
30058
|
+
this._coreService.modes.insertMode = false;
|
|
30059
|
+
break;
|
|
30060
|
+
case 20:
|
|
30061
|
+
this._optionsService.options.convertEol = false;
|
|
30062
|
+
}
|
|
30063
|
+
return true;
|
|
30064
|
+
}
|
|
30065
|
+
resetModePrivate(e3) {
|
|
30066
|
+
for (let t3 = 0; t3 < e3.length; t3++) switch (e3.params[t3]) {
|
|
30067
|
+
case 1:
|
|
30068
|
+
this._coreService.decPrivateModes.applicationCursorKeys = false;
|
|
30069
|
+
break;
|
|
30070
|
+
case 3:
|
|
30071
|
+
this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(80, this._bufferService.rows), this._onRequestReset.fire());
|
|
30072
|
+
break;
|
|
30073
|
+
case 6:
|
|
30074
|
+
this._coreService.decPrivateModes.origin = false, this._setCursor(0, 0);
|
|
30075
|
+
break;
|
|
30076
|
+
case 7:
|
|
30077
|
+
this._coreService.decPrivateModes.wraparound = false;
|
|
30078
|
+
break;
|
|
30079
|
+
case 12:
|
|
30080
|
+
this._optionsService.options.cursorBlink = false;
|
|
30081
|
+
break;
|
|
30082
|
+
case 45:
|
|
30083
|
+
this._coreService.decPrivateModes.reverseWraparound = false;
|
|
30084
|
+
break;
|
|
30085
|
+
case 66:
|
|
30086
|
+
this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = false, this._onRequestSyncScrollBar.fire();
|
|
30087
|
+
break;
|
|
30088
|
+
case 9:
|
|
30089
|
+
case 1e3:
|
|
30090
|
+
case 1002:
|
|
30091
|
+
case 1003:
|
|
30092
|
+
this._coreMouseService.activeProtocol = "NONE";
|
|
30093
|
+
break;
|
|
30094
|
+
case 1004:
|
|
30095
|
+
this._coreService.decPrivateModes.sendFocus = false;
|
|
30096
|
+
break;
|
|
30097
|
+
case 1005:
|
|
30098
|
+
this._logService.debug("DECRST 1005 not supported (see #2507)");
|
|
30099
|
+
break;
|
|
30100
|
+
case 1006:
|
|
30101
|
+
case 1016:
|
|
30102
|
+
this._coreMouseService.activeEncoding = "DEFAULT";
|
|
30103
|
+
break;
|
|
30104
|
+
case 1015:
|
|
30105
|
+
this._logService.debug("DECRST 1015 not supported (see #2507)");
|
|
30106
|
+
break;
|
|
30107
|
+
case 25:
|
|
30108
|
+
this._coreService.isCursorHidden = true;
|
|
30109
|
+
break;
|
|
30110
|
+
case 1048:
|
|
30111
|
+
this.restoreCursor();
|
|
30112
|
+
break;
|
|
30113
|
+
case 1049:
|
|
30114
|
+
case 47:
|
|
30115
|
+
case 1047:
|
|
30116
|
+
this._bufferService.buffers.activateNormalBuffer(), 1049 === e3.params[t3] && this.restoreCursor(), this._coreService.isCursorInitialized = true, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
|
|
30117
|
+
break;
|
|
30118
|
+
case 2004:
|
|
30119
|
+
this._coreService.decPrivateModes.bracketedPasteMode = false;
|
|
30120
|
+
}
|
|
30121
|
+
return true;
|
|
30122
|
+
}
|
|
30123
|
+
requestMode(e3, t3) {
|
|
30124
|
+
const i3 = this._coreService.decPrivateModes, { activeProtocol: s3, activeEncoding: r3 } = this._coreMouseService, a2 = this._coreService, { buffers: o2, cols: h3 } = this._bufferService, { active: c2, alt: l2 } = o2, _3 = this._optionsService.rawOptions, d3 = (e4) => e4 ? 1 : 2, f3 = e3.params[0];
|
|
30125
|
+
return u2 = f3, p3 = t3 ? 2 === f3 ? 4 : 4 === f3 ? d3(a2.modes.insertMode) : 12 === f3 ? 3 : 20 === f3 ? d3(_3.convertEol) : 0 : 1 === f3 ? d3(i3.applicationCursorKeys) : 3 === f3 ? _3.windowOptions.setWinLines ? 80 === h3 ? 2 : 132 === h3 ? 1 : 0 : 0 : 6 === f3 ? d3(i3.origin) : 7 === f3 ? d3(i3.wraparound) : 8 === f3 ? 3 : 9 === f3 ? d3("X10" === s3) : 12 === f3 ? d3(_3.cursorBlink) : 25 === f3 ? d3(!a2.isCursorHidden) : 45 === f3 ? d3(i3.reverseWraparound) : 66 === f3 ? d3(i3.applicationKeypad) : 67 === f3 ? 4 : 1e3 === f3 ? d3("VT200" === s3) : 1002 === f3 ? d3("DRAG" === s3) : 1003 === f3 ? d3("ANY" === s3) : 1004 === f3 ? d3(i3.sendFocus) : 1005 === f3 ? 4 : 1006 === f3 ? d3("SGR" === r3) : 1015 === f3 ? 4 : 1016 === f3 ? d3("SGR_PIXELS" === r3) : 1048 === f3 ? 1 : 47 === f3 || 1047 === f3 || 1049 === f3 ? d3(c2 === l2) : 2004 === f3 ? d3(i3.bracketedPasteMode) : 0, a2.triggerDataEvent(`${n3.C0.ESC}[${t3 ? "" : "?"}${u2};${p3}$y`), true;
|
|
30126
|
+
var u2, p3;
|
|
30127
|
+
}
|
|
30128
|
+
_updateAttrColor(e3, t3, i3, s3, r3) {
|
|
30129
|
+
return 2 === t3 ? (e3 |= 50331648, e3 &= -16777216, e3 |= u.AttributeData.fromColorRGB([i3, s3, r3])) : 5 === t3 && (e3 &= -50331904, e3 |= 33554432 | 255 & i3), e3;
|
|
30130
|
+
}
|
|
30131
|
+
_extractColor(e3, t3, i3) {
|
|
30132
|
+
const s3 = [0, 0, -1, 0, 0, 0];
|
|
30133
|
+
let r3 = 0, n4 = 0;
|
|
30134
|
+
do {
|
|
30135
|
+
if (s3[n4 + r3] = e3.params[t3 + n4], e3.hasSubParams(t3 + n4)) {
|
|
30136
|
+
const i4 = e3.getSubParams(t3 + n4);
|
|
30137
|
+
let a2 = 0;
|
|
30138
|
+
do {
|
|
30139
|
+
5 === s3[1] && (r3 = 1), s3[n4 + a2 + 1 + r3] = i4[a2];
|
|
30140
|
+
} while (++a2 < i4.length && a2 + n4 + 1 + r3 < s3.length);
|
|
30141
|
+
break;
|
|
30142
|
+
}
|
|
30143
|
+
if (5 === s3[1] && n4 + r3 >= 2 || 2 === s3[1] && n4 + r3 >= 5) break;
|
|
30144
|
+
s3[1] && (r3 = 1);
|
|
30145
|
+
} while (++n4 + t3 < e3.length && n4 + r3 < s3.length);
|
|
30146
|
+
for (let e4 = 2; e4 < s3.length; ++e4) -1 === s3[e4] && (s3[e4] = 0);
|
|
30147
|
+
switch (s3[0]) {
|
|
30148
|
+
case 38:
|
|
30149
|
+
i3.fg = this._updateAttrColor(i3.fg, s3[1], s3[3], s3[4], s3[5]);
|
|
30150
|
+
break;
|
|
30151
|
+
case 48:
|
|
30152
|
+
i3.bg = this._updateAttrColor(i3.bg, s3[1], s3[3], s3[4], s3[5]);
|
|
30153
|
+
break;
|
|
30154
|
+
case 58:
|
|
30155
|
+
i3.extended = i3.extended.clone(), i3.extended.underlineColor = this._updateAttrColor(i3.extended.underlineColor, s3[1], s3[3], s3[4], s3[5]);
|
|
30156
|
+
}
|
|
30157
|
+
return n4;
|
|
30158
|
+
}
|
|
30159
|
+
_processUnderline(e3, t3) {
|
|
30160
|
+
t3.extended = t3.extended.clone(), (!~e3 || e3 > 5) && (e3 = 1), t3.extended.underlineStyle = e3, t3.fg |= 268435456, 0 === e3 && (t3.fg &= -268435457), t3.updateExtended();
|
|
30161
|
+
}
|
|
30162
|
+
_processSGR0(e3) {
|
|
30163
|
+
e3.fg = l.DEFAULT_ATTR_DATA.fg, e3.bg = l.DEFAULT_ATTR_DATA.bg, e3.extended = e3.extended.clone(), e3.extended.underlineStyle = 0, e3.extended.underlineColor &= -67108864, e3.updateExtended();
|
|
30164
|
+
}
|
|
30165
|
+
charAttributes(e3) {
|
|
30166
|
+
if (1 === e3.length && 0 === e3.params[0]) return this._processSGR0(this._curAttrData), true;
|
|
30167
|
+
const t3 = e3.length;
|
|
30168
|
+
let i3;
|
|
30169
|
+
const s3 = this._curAttrData;
|
|
30170
|
+
for (let r3 = 0; r3 < t3; r3++) i3 = e3.params[r3], i3 >= 30 && i3 <= 37 ? (s3.fg &= -50331904, s3.fg |= 16777216 | i3 - 30) : i3 >= 40 && i3 <= 47 ? (s3.bg &= -50331904, s3.bg |= 16777216 | i3 - 40) : i3 >= 90 && i3 <= 97 ? (s3.fg &= -50331904, s3.fg |= 16777224 | i3 - 90) : i3 >= 100 && i3 <= 107 ? (s3.bg &= -50331904, s3.bg |= 16777224 | i3 - 100) : 0 === i3 ? this._processSGR0(s3) : 1 === i3 ? s3.fg |= 134217728 : 3 === i3 ? s3.bg |= 67108864 : 4 === i3 ? (s3.fg |= 268435456, this._processUnderline(e3.hasSubParams(r3) ? e3.getSubParams(r3)[0] : 1, s3)) : 5 === i3 ? s3.fg |= 536870912 : 7 === i3 ? s3.fg |= 67108864 : 8 === i3 ? s3.fg |= 1073741824 : 9 === i3 ? s3.fg |= 2147483648 : 2 === i3 ? s3.bg |= 134217728 : 21 === i3 ? this._processUnderline(2, s3) : 22 === i3 ? (s3.fg &= -134217729, s3.bg &= -134217729) : 23 === i3 ? s3.bg &= -67108865 : 24 === i3 ? (s3.fg &= -268435457, this._processUnderline(0, s3)) : 25 === i3 ? s3.fg &= -536870913 : 27 === i3 ? s3.fg &= -67108865 : 28 === i3 ? s3.fg &= -1073741825 : 29 === i3 ? s3.fg &= 2147483647 : 39 === i3 ? (s3.fg &= -67108864, s3.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg) : 49 === i3 ? (s3.bg &= -67108864, s3.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : 38 === i3 || 48 === i3 || 58 === i3 ? r3 += this._extractColor(e3, r3, s3) : 53 === i3 ? s3.bg |= 1073741824 : 55 === i3 ? s3.bg &= -1073741825 : 59 === i3 ? (s3.extended = s3.extended.clone(), s3.extended.underlineColor = -1, s3.updateExtended()) : 100 === i3 ? (s3.fg &= -67108864, s3.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg, s3.bg &= -67108864, s3.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", i3);
|
|
30171
|
+
return true;
|
|
30172
|
+
}
|
|
30173
|
+
deviceStatus(e3) {
|
|
30174
|
+
switch (e3.params[0]) {
|
|
30175
|
+
case 5:
|
|
30176
|
+
this._coreService.triggerDataEvent(`${n3.C0.ESC}[0n`);
|
|
30177
|
+
break;
|
|
30178
|
+
case 6:
|
|
30179
|
+
const e4 = this._activeBuffer.y + 1, t3 = this._activeBuffer.x + 1;
|
|
30180
|
+
this._coreService.triggerDataEvent(`${n3.C0.ESC}[${e4};${t3}R`);
|
|
30181
|
+
}
|
|
30182
|
+
return true;
|
|
30183
|
+
}
|
|
30184
|
+
deviceStatusPrivate(e3) {
|
|
30185
|
+
if (6 === e3.params[0]) {
|
|
30186
|
+
const e4 = this._activeBuffer.y + 1, t3 = this._activeBuffer.x + 1;
|
|
30187
|
+
this._coreService.triggerDataEvent(`${n3.C0.ESC}[?${e4};${t3}R`);
|
|
30188
|
+
}
|
|
30189
|
+
return true;
|
|
30190
|
+
}
|
|
30191
|
+
softReset(e3) {
|
|
30192
|
+
return this._coreService.isCursorHidden = false, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._coreService.reset(), this._charsetService.reset(), this._activeBuffer.savedX = 0, this._activeBuffer.savedY = this._activeBuffer.ybase, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, this._coreService.decPrivateModes.origin = false, true;
|
|
30193
|
+
}
|
|
30194
|
+
setCursorStyle(e3) {
|
|
30195
|
+
const t3 = e3.params[0] || 1;
|
|
30196
|
+
switch (t3) {
|
|
30197
|
+
case 1:
|
|
30198
|
+
case 2:
|
|
30199
|
+
this._optionsService.options.cursorStyle = "block";
|
|
30200
|
+
break;
|
|
30201
|
+
case 3:
|
|
30202
|
+
case 4:
|
|
30203
|
+
this._optionsService.options.cursorStyle = "underline";
|
|
30204
|
+
break;
|
|
30205
|
+
case 5:
|
|
30206
|
+
case 6:
|
|
30207
|
+
this._optionsService.options.cursorStyle = "bar";
|
|
30208
|
+
}
|
|
30209
|
+
const i3 = t3 % 2 == 1;
|
|
30210
|
+
return this._optionsService.options.cursorBlink = i3, true;
|
|
30211
|
+
}
|
|
30212
|
+
setScrollRegion(e3) {
|
|
30213
|
+
const t3 = e3.params[0] || 1;
|
|
30214
|
+
let i3;
|
|
30215
|
+
return (e3.length < 2 || (i3 = e3.params[1]) > this._bufferService.rows || 0 === i3) && (i3 = this._bufferService.rows), i3 > t3 && (this._activeBuffer.scrollTop = t3 - 1, this._activeBuffer.scrollBottom = i3 - 1, this._setCursor(0, 0)), true;
|
|
30216
|
+
}
|
|
30217
|
+
windowOptions(e3) {
|
|
30218
|
+
if (!y2(e3.params[0], this._optionsService.rawOptions.windowOptions)) return true;
|
|
30219
|
+
const t3 = e3.length > 1 ? e3.params[1] : 0;
|
|
30220
|
+
switch (e3.params[0]) {
|
|
30221
|
+
case 14:
|
|
30222
|
+
2 !== t3 && this._onRequestWindowsOptionsReport.fire(w.GET_WIN_SIZE_PIXELS);
|
|
30223
|
+
break;
|
|
30224
|
+
case 16:
|
|
30225
|
+
this._onRequestWindowsOptionsReport.fire(w.GET_CELL_SIZE_PIXELS);
|
|
30226
|
+
break;
|
|
30227
|
+
case 18:
|
|
30228
|
+
this._bufferService && this._coreService.triggerDataEvent(`${n3.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
|
|
30229
|
+
break;
|
|
30230
|
+
case 22:
|
|
30231
|
+
0 !== t3 && 2 !== t3 || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), 0 !== t3 && 1 !== t3 || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
|
|
30232
|
+
break;
|
|
30233
|
+
case 23:
|
|
30234
|
+
0 !== t3 && 2 !== t3 || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), 0 !== t3 && 1 !== t3 || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
|
|
30235
|
+
}
|
|
30236
|
+
return true;
|
|
30237
|
+
}
|
|
30238
|
+
saveCursor(e3) {
|
|
30239
|
+
return this._activeBuffer.savedX = this._activeBuffer.x, this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, true;
|
|
30240
|
+
}
|
|
30241
|
+
restoreCursor(e3) {
|
|
30242
|
+
return this._activeBuffer.x = this._activeBuffer.savedX || 0, this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0), this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg, this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg, this._charsetService.charset = this._savedCharset, this._activeBuffer.savedCharset && (this._charsetService.charset = this._activeBuffer.savedCharset), this._restrictCursor(), true;
|
|
30243
|
+
}
|
|
30244
|
+
setTitle(e3) {
|
|
30245
|
+
return this._windowTitle = e3, this._onTitleChange.fire(e3), true;
|
|
30246
|
+
}
|
|
30247
|
+
setIconName(e3) {
|
|
30248
|
+
return this._iconName = e3, true;
|
|
30249
|
+
}
|
|
30250
|
+
setOrReportIndexedColor(e3) {
|
|
30251
|
+
const t3 = [], i3 = e3.split(";");
|
|
30252
|
+
for (; i3.length > 1; ) {
|
|
30253
|
+
const e4 = i3.shift(), s3 = i3.shift();
|
|
30254
|
+
if (/^\d+$/.exec(e4)) {
|
|
30255
|
+
const i4 = parseInt(e4);
|
|
30256
|
+
if (L(i4)) if ("?" === s3) t3.push({ type: 0, index: i4 });
|
|
30257
|
+
else {
|
|
30258
|
+
const e5 = (0, S2.parseColor)(s3);
|
|
30259
|
+
e5 && t3.push({ type: 1, index: i4, color: e5 });
|
|
30260
|
+
}
|
|
30261
|
+
}
|
|
30262
|
+
}
|
|
30263
|
+
return t3.length && this._onColor.fire(t3), true;
|
|
30264
|
+
}
|
|
30265
|
+
setHyperlink(e3) {
|
|
30266
|
+
const t3 = e3.split(";");
|
|
30267
|
+
return !(t3.length < 2) && (t3[1] ? this._createHyperlink(t3[0], t3[1]) : !t3[0] && this._finishHyperlink());
|
|
30268
|
+
}
|
|
30269
|
+
_createHyperlink(e3, t3) {
|
|
30270
|
+
this._getCurrentLinkId() && this._finishHyperlink();
|
|
30271
|
+
const i3 = e3.split(":");
|
|
30272
|
+
let s3;
|
|
30273
|
+
const r3 = i3.findIndex(((e4) => e4.startsWith("id=")));
|
|
30274
|
+
return -1 !== r3 && (s3 = i3[r3].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: s3, uri: t3 }), this._curAttrData.updateExtended(), true;
|
|
30275
|
+
}
|
|
30276
|
+
_finishHyperlink() {
|
|
30277
|
+
return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), true;
|
|
30278
|
+
}
|
|
30279
|
+
_setOrReportSpecialColor(e3, t3) {
|
|
30280
|
+
const i3 = e3.split(";");
|
|
30281
|
+
for (let e4 = 0; e4 < i3.length && !(t3 >= this._specialColors.length); ++e4, ++t3) if ("?" === i3[e4]) this._onColor.fire([{ type: 0, index: this._specialColors[t3] }]);
|
|
30282
|
+
else {
|
|
30283
|
+
const s3 = (0, S2.parseColor)(i3[e4]);
|
|
30284
|
+
s3 && this._onColor.fire([{ type: 1, index: this._specialColors[t3], color: s3 }]);
|
|
30285
|
+
}
|
|
30286
|
+
return true;
|
|
30287
|
+
}
|
|
30288
|
+
setOrReportFgColor(e3) {
|
|
30289
|
+
return this._setOrReportSpecialColor(e3, 0);
|
|
30290
|
+
}
|
|
30291
|
+
setOrReportBgColor(e3) {
|
|
30292
|
+
return this._setOrReportSpecialColor(e3, 1);
|
|
30293
|
+
}
|
|
30294
|
+
setOrReportCursorColor(e3) {
|
|
30295
|
+
return this._setOrReportSpecialColor(e3, 2);
|
|
30296
|
+
}
|
|
30297
|
+
restoreIndexedColor(e3) {
|
|
30298
|
+
if (!e3) return this._onColor.fire([{ type: 2 }]), true;
|
|
30299
|
+
const t3 = [], i3 = e3.split(";");
|
|
30300
|
+
for (let e4 = 0; e4 < i3.length; ++e4) if (/^\d+$/.exec(i3[e4])) {
|
|
30301
|
+
const s3 = parseInt(i3[e4]);
|
|
30302
|
+
L(s3) && t3.push({ type: 2, index: s3 });
|
|
30303
|
+
}
|
|
30304
|
+
return t3.length && this._onColor.fire(t3), true;
|
|
30305
|
+
}
|
|
30306
|
+
restoreFgColor(e3) {
|
|
30307
|
+
return this._onColor.fire([{ type: 2, index: 256 }]), true;
|
|
30308
|
+
}
|
|
30309
|
+
restoreBgColor(e3) {
|
|
30310
|
+
return this._onColor.fire([{ type: 2, index: 257 }]), true;
|
|
30311
|
+
}
|
|
30312
|
+
restoreCursorColor(e3) {
|
|
30313
|
+
return this._onColor.fire([{ type: 2, index: 258 }]), true;
|
|
30314
|
+
}
|
|
30315
|
+
nextLine() {
|
|
30316
|
+
return this._activeBuffer.x = 0, this.index(), true;
|
|
30317
|
+
}
|
|
30318
|
+
keypadApplicationMode() {
|
|
30319
|
+
return this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = true, this._onRequestSyncScrollBar.fire(), true;
|
|
30320
|
+
}
|
|
30321
|
+
keypadNumericMode() {
|
|
30322
|
+
return this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = false, this._onRequestSyncScrollBar.fire(), true;
|
|
30323
|
+
}
|
|
30324
|
+
selectDefaultCharset() {
|
|
30325
|
+
return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, a.DEFAULT_CHARSET), true;
|
|
30326
|
+
}
|
|
30327
|
+
selectCharset(e3) {
|
|
30328
|
+
return 2 !== e3.length ? (this.selectDefaultCharset(), true) : ("/" === e3[0] || this._charsetService.setgCharset(m2[e3[0]], a.CHARSETS[e3[1]] || a.DEFAULT_CHARSET), true);
|
|
30329
|
+
}
|
|
30330
|
+
index() {
|
|
30331
|
+
return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), true;
|
|
30332
|
+
}
|
|
30333
|
+
tabSet() {
|
|
30334
|
+
return this._activeBuffer.tabs[this._activeBuffer.x] = true, true;
|
|
30335
|
+
}
|
|
30336
|
+
reverseIndex() {
|
|
30337
|
+
if (this._restrictCursor(), this._activeBuffer.y === this._activeBuffer.scrollTop) {
|
|
30338
|
+
const e3 = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
|
|
30339
|
+
this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, e3, 1), this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData())), this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
|
|
30340
|
+
} else this._activeBuffer.y--, this._restrictCursor();
|
|
30341
|
+
return true;
|
|
30342
|
+
}
|
|
30343
|
+
fullReset() {
|
|
30344
|
+
return this._parser.reset(), this._onRequestReset.fire(), true;
|
|
30345
|
+
}
|
|
30346
|
+
reset() {
|
|
30347
|
+
this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone();
|
|
30348
|
+
}
|
|
30349
|
+
_eraseAttrData() {
|
|
30350
|
+
return this._eraseAttrDataInternal.bg &= -67108864, this._eraseAttrDataInternal.bg |= 67108863 & this._curAttrData.bg, this._eraseAttrDataInternal;
|
|
30351
|
+
}
|
|
30352
|
+
setgLevel(e3) {
|
|
30353
|
+
return this._charsetService.setgLevel(e3), true;
|
|
30354
|
+
}
|
|
30355
|
+
screenAlignmentPattern() {
|
|
30356
|
+
const e3 = new f2.CellData();
|
|
30357
|
+
e3.content = 1 << 22 | "E".charCodeAt(0), e3.fg = this._curAttrData.fg, e3.bg = this._curAttrData.bg, this._setCursor(0, 0);
|
|
30358
|
+
for (let t3 = 0; t3 < this._bufferService.rows; ++t3) {
|
|
30359
|
+
const i3 = this._activeBuffer.ybase + this._activeBuffer.y + t3, s3 = this._activeBuffer.lines.get(i3);
|
|
30360
|
+
s3 && (s3.fill(e3), s3.isWrapped = false);
|
|
30361
|
+
}
|
|
30362
|
+
return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), true;
|
|
30363
|
+
}
|
|
30364
|
+
requestStatusString(e3, t3) {
|
|
30365
|
+
const i3 = this._bufferService.buffer, s3 = this._optionsService.rawOptions;
|
|
30366
|
+
return ((e4) => (this._coreService.triggerDataEvent(`${n3.C0.ESC}${e4}${n3.C0.ESC}\\`), true))('"q' === e3 ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : '"p' === e3 ? 'P1$r61;1"p' : "r" === e3 ? `P1$r${i3.scrollTop + 1};${i3.scrollBottom + 1}r` : "m" === e3 ? "P1$r0m" : " q" === e3 ? `P1$r${{ block: 2, underline: 4, bar: 6 }[s3.cursorStyle] - (s3.cursorBlink ? 1 : 0)} q` : "P0$r");
|
|
30367
|
+
}
|
|
30368
|
+
markRangeDirty(e3, t3) {
|
|
30369
|
+
this._dirtyRowTracker.markRangeDirty(e3, t3);
|
|
30370
|
+
}
|
|
30371
|
+
}
|
|
30372
|
+
t2.InputHandler = E;
|
|
30373
|
+
let A = class {
|
|
30374
|
+
constructor(e3) {
|
|
30375
|
+
this._bufferService = e3, this.clearRange();
|
|
30376
|
+
}
|
|
30377
|
+
clearRange() {
|
|
30378
|
+
this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
|
|
30379
|
+
}
|
|
30380
|
+
markDirty(e3) {
|
|
30381
|
+
e3 < this.start ? this.start = e3 : e3 > this.end && (this.end = e3);
|
|
30382
|
+
}
|
|
30383
|
+
markRangeDirty(e3, t3) {
|
|
30384
|
+
e3 > t3 && (B = e3, e3 = t3, t3 = B), e3 < this.start && (this.start = e3), t3 > this.end && (this.end = t3);
|
|
30385
|
+
}
|
|
30386
|
+
markAllDirty() {
|
|
30387
|
+
this.markRangeDirty(0, this._bufferService.rows - 1);
|
|
30388
|
+
}
|
|
30389
|
+
};
|
|
30390
|
+
function L(e3) {
|
|
30391
|
+
return 0 <= e3 && e3 < 256;
|
|
30392
|
+
}
|
|
30393
|
+
A = s2([r2(0, p2.IBufferService)], A);
|
|
30394
|
+
}, 844: (e2, t2) => {
|
|
30395
|
+
function i2(e3) {
|
|
30396
|
+
for (const t3 of e3) t3.dispose();
|
|
30397
|
+
e3.length = 0;
|
|
30398
|
+
}
|
|
30399
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.getDisposeArrayDisposable = t2.disposeArray = t2.toDisposable = t2.MutableDisposable = t2.Disposable = void 0, t2.Disposable = class {
|
|
30400
|
+
constructor() {
|
|
30401
|
+
this._disposables = [], this._isDisposed = false;
|
|
30402
|
+
}
|
|
30403
|
+
dispose() {
|
|
30404
|
+
this._isDisposed = true;
|
|
30405
|
+
for (const e3 of this._disposables) e3.dispose();
|
|
30406
|
+
this._disposables.length = 0;
|
|
30407
|
+
}
|
|
30408
|
+
register(e3) {
|
|
30409
|
+
return this._disposables.push(e3), e3;
|
|
30410
|
+
}
|
|
30411
|
+
unregister(e3) {
|
|
30412
|
+
const t3 = this._disposables.indexOf(e3);
|
|
30413
|
+
-1 !== t3 && this._disposables.splice(t3, 1);
|
|
30414
|
+
}
|
|
30415
|
+
}, t2.MutableDisposable = class {
|
|
30416
|
+
constructor() {
|
|
30417
|
+
this._isDisposed = false;
|
|
30418
|
+
}
|
|
30419
|
+
get value() {
|
|
30420
|
+
return this._isDisposed ? void 0 : this._value;
|
|
30421
|
+
}
|
|
30422
|
+
set value(e3) {
|
|
30423
|
+
this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3);
|
|
30424
|
+
}
|
|
30425
|
+
clear() {
|
|
30426
|
+
this.value = void 0;
|
|
30427
|
+
}
|
|
30428
|
+
dispose() {
|
|
30429
|
+
this._isDisposed = true, this._value?.dispose(), this._value = void 0;
|
|
30430
|
+
}
|
|
30431
|
+
}, t2.toDisposable = function(e3) {
|
|
30432
|
+
return { dispose: e3 };
|
|
30433
|
+
}, t2.disposeArray = i2, t2.getDisposeArrayDisposable = function(e3) {
|
|
30434
|
+
return { dispose: () => i2(e3) };
|
|
30435
|
+
};
|
|
30436
|
+
}, 114: (e2, t2) => {
|
|
30437
|
+
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;
|
|
30438
|
+
const i2 = t2.isNode ? "node" : navigator.userAgent, s2 = t2.isNode ? "node" : navigator.platform;
|
|
30439
|
+
t2.isFirefox = i2.includes("Firefox"), t2.isLegacyEdge = i2.includes("Edge"), t2.isSafari = /^((?!chrome|android).)*safari/i.test(i2), t2.getSafariVersion = function() {
|
|
30440
|
+
if (!t2.isSafari) return 0;
|
|
30441
|
+
const e3 = i2.match(/Version\/(\d+)/);
|
|
30442
|
+
return null === e3 || e3.length < 2 ? 0 : parseInt(e3[1]);
|
|
30443
|
+
}, 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);
|
|
30444
|
+
}, 226: (e2, t2, i2) => {
|
|
30445
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.DebouncedIdleTask = t2.IdleTaskQueue = t2.PriorityTaskQueue = void 0;
|
|
30446
|
+
const s2 = i2(114);
|
|
30447
|
+
class r2 {
|
|
30448
|
+
constructor() {
|
|
30449
|
+
this._tasks = [], this._i = 0;
|
|
30450
|
+
}
|
|
30451
|
+
enqueue(e3) {
|
|
30452
|
+
this._tasks.push(e3), this._start();
|
|
30453
|
+
}
|
|
30454
|
+
flush() {
|
|
30455
|
+
for (; this._i < this._tasks.length; ) this._tasks[this._i]() || this._i++;
|
|
30456
|
+
this.clear();
|
|
30457
|
+
}
|
|
30458
|
+
clear() {
|
|
30459
|
+
this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
|
|
30460
|
+
}
|
|
30461
|
+
_start() {
|
|
30462
|
+
this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
|
|
30463
|
+
}
|
|
30464
|
+
_process(e3) {
|
|
30465
|
+
this._idleCallback = void 0;
|
|
30466
|
+
let t3 = 0, i3 = 0, s3 = e3.timeRemaining(), r3 = 0;
|
|
30467
|
+
for (; this._i < this._tasks.length; ) {
|
|
30468
|
+
if (t3 = Date.now(), this._tasks[this._i]() || this._i++, t3 = Math.max(1, Date.now() - t3), i3 = Math.max(t3, i3), r3 = e3.timeRemaining(), 1.5 * i3 > r3) return s3 - t3 < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s3 - t3))}ms`), void this._start();
|
|
30469
|
+
s3 = r3;
|
|
30470
|
+
}
|
|
30471
|
+
this.clear();
|
|
30472
|
+
}
|
|
30473
|
+
}
|
|
30474
|
+
class n3 extends r2 {
|
|
30475
|
+
_requestCallback(e3) {
|
|
30476
|
+
return setTimeout((() => e3(this._createDeadline(16))));
|
|
30477
|
+
}
|
|
30478
|
+
_cancelCallback(e3) {
|
|
30479
|
+
clearTimeout(e3);
|
|
30480
|
+
}
|
|
30481
|
+
_createDeadline(e3) {
|
|
30482
|
+
const t3 = Date.now() + e3;
|
|
30483
|
+
return { timeRemaining: () => Math.max(0, t3 - Date.now()) };
|
|
30484
|
+
}
|
|
30485
|
+
}
|
|
30486
|
+
t2.PriorityTaskQueue = n3, t2.IdleTaskQueue = !s2.isNode && "requestIdleCallback" in window ? class extends r2 {
|
|
30487
|
+
_requestCallback(e3) {
|
|
30488
|
+
return requestIdleCallback(e3);
|
|
30489
|
+
}
|
|
30490
|
+
_cancelCallback(e3) {
|
|
30491
|
+
cancelIdleCallback(e3);
|
|
30492
|
+
}
|
|
30493
|
+
} : n3, t2.DebouncedIdleTask = class {
|
|
30494
|
+
constructor() {
|
|
30495
|
+
this._queue = new t2.IdleTaskQueue();
|
|
30496
|
+
}
|
|
30497
|
+
set(e3) {
|
|
30498
|
+
this._queue.clear(), this._queue.enqueue(e3);
|
|
30499
|
+
}
|
|
30500
|
+
flush() {
|
|
30501
|
+
this._queue.flush();
|
|
30502
|
+
}
|
|
30503
|
+
};
|
|
30504
|
+
}, 282: (e2, t2, i2) => {
|
|
30505
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.updateWindowsModeWrappedState = void 0;
|
|
30506
|
+
const s2 = i2(643);
|
|
30507
|
+
t2.updateWindowsModeWrappedState = function(e3) {
|
|
30508
|
+
const t3 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y - 1), i3 = t3?.get(e3.cols - 1), r2 = e3.buffer.lines.get(e3.buffer.ybase + e3.buffer.y);
|
|
30509
|
+
r2 && i3 && (r2.isWrapped = i3[s2.CHAR_DATA_CODE_INDEX] !== s2.NULL_CELL_CODE && i3[s2.CHAR_DATA_CODE_INDEX] !== s2.WHITESPACE_CELL_CODE);
|
|
30510
|
+
};
|
|
30511
|
+
}, 734: (e2, t2) => {
|
|
30512
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.ExtendedAttrs = t2.AttributeData = void 0;
|
|
30513
|
+
class i2 {
|
|
30514
|
+
constructor() {
|
|
30515
|
+
this.fg = 0, this.bg = 0, this.extended = new s2();
|
|
30516
|
+
}
|
|
30517
|
+
static toColorRGB(e3) {
|
|
30518
|
+
return [e3 >>> 16 & 255, e3 >>> 8 & 255, 255 & e3];
|
|
30519
|
+
}
|
|
30520
|
+
static fromColorRGB(e3) {
|
|
30521
|
+
return (255 & e3[0]) << 16 | (255 & e3[1]) << 8 | 255 & e3[2];
|
|
30522
|
+
}
|
|
30523
|
+
clone() {
|
|
30524
|
+
const e3 = new i2();
|
|
30525
|
+
return e3.fg = this.fg, e3.bg = this.bg, e3.extended = this.extended.clone(), e3;
|
|
30526
|
+
}
|
|
30527
|
+
isInverse() {
|
|
30528
|
+
return 67108864 & this.fg;
|
|
30529
|
+
}
|
|
30530
|
+
isBold() {
|
|
30531
|
+
return 134217728 & this.fg;
|
|
30532
|
+
}
|
|
30533
|
+
isUnderline() {
|
|
30534
|
+
return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 1 : 268435456 & this.fg;
|
|
30535
|
+
}
|
|
30536
|
+
isBlink() {
|
|
30537
|
+
return 536870912 & this.fg;
|
|
30538
|
+
}
|
|
30539
|
+
isInvisible() {
|
|
30540
|
+
return 1073741824 & this.fg;
|
|
30541
|
+
}
|
|
30542
|
+
isItalic() {
|
|
30543
|
+
return 67108864 & this.bg;
|
|
30544
|
+
}
|
|
30545
|
+
isDim() {
|
|
30546
|
+
return 134217728 & this.bg;
|
|
30547
|
+
}
|
|
30548
|
+
isStrikethrough() {
|
|
30549
|
+
return 2147483648 & this.fg;
|
|
30550
|
+
}
|
|
30551
|
+
isProtected() {
|
|
30552
|
+
return 536870912 & this.bg;
|
|
30553
|
+
}
|
|
30554
|
+
isOverline() {
|
|
30555
|
+
return 1073741824 & this.bg;
|
|
30556
|
+
}
|
|
30557
|
+
getFgColorMode() {
|
|
30558
|
+
return 50331648 & this.fg;
|
|
30559
|
+
}
|
|
30560
|
+
getBgColorMode() {
|
|
30561
|
+
return 50331648 & this.bg;
|
|
30562
|
+
}
|
|
30563
|
+
isFgRGB() {
|
|
30564
|
+
return 50331648 == (50331648 & this.fg);
|
|
30565
|
+
}
|
|
30566
|
+
isBgRGB() {
|
|
30567
|
+
return 50331648 == (50331648 & this.bg);
|
|
30568
|
+
}
|
|
30569
|
+
isFgPalette() {
|
|
30570
|
+
return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
|
|
30571
|
+
}
|
|
30572
|
+
isBgPalette() {
|
|
30573
|
+
return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
|
|
30574
|
+
}
|
|
30575
|
+
isFgDefault() {
|
|
30576
|
+
return 0 == (50331648 & this.fg);
|
|
30577
|
+
}
|
|
30578
|
+
isBgDefault() {
|
|
30579
|
+
return 0 == (50331648 & this.bg);
|
|
30580
|
+
}
|
|
30581
|
+
isAttributeDefault() {
|
|
30582
|
+
return 0 === this.fg && 0 === this.bg;
|
|
30583
|
+
}
|
|
30584
|
+
getFgColor() {
|
|
30585
|
+
switch (50331648 & this.fg) {
|
|
30586
|
+
case 16777216:
|
|
30587
|
+
case 33554432:
|
|
30588
|
+
return 255 & this.fg;
|
|
30589
|
+
case 50331648:
|
|
30590
|
+
return 16777215 & this.fg;
|
|
30591
|
+
default:
|
|
30592
|
+
return -1;
|
|
30593
|
+
}
|
|
30594
|
+
}
|
|
30595
|
+
getBgColor() {
|
|
30596
|
+
switch (50331648 & this.bg) {
|
|
30597
|
+
case 16777216:
|
|
30598
|
+
case 33554432:
|
|
30599
|
+
return 255 & this.bg;
|
|
30600
|
+
case 50331648:
|
|
30601
|
+
return 16777215 & this.bg;
|
|
30602
|
+
default:
|
|
30603
|
+
return -1;
|
|
30604
|
+
}
|
|
30605
|
+
}
|
|
30606
|
+
hasExtendedAttrs() {
|
|
30607
|
+
return 268435456 & this.bg;
|
|
30608
|
+
}
|
|
30609
|
+
updateExtended() {
|
|
30610
|
+
this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
|
|
30611
|
+
}
|
|
30612
|
+
getUnderlineColor() {
|
|
30613
|
+
if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
|
|
30614
|
+
case 16777216:
|
|
30615
|
+
case 33554432:
|
|
30616
|
+
return 255 & this.extended.underlineColor;
|
|
30617
|
+
case 50331648:
|
|
30618
|
+
return 16777215 & this.extended.underlineColor;
|
|
30619
|
+
default:
|
|
30620
|
+
return this.getFgColor();
|
|
30621
|
+
}
|
|
30622
|
+
return this.getFgColor();
|
|
30623
|
+
}
|
|
30624
|
+
getUnderlineColorMode() {
|
|
30625
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
|
|
30626
|
+
}
|
|
30627
|
+
isUnderlineColorRGB() {
|
|
30628
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
|
|
30629
|
+
}
|
|
30630
|
+
isUnderlineColorPalette() {
|
|
30631
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
|
|
30632
|
+
}
|
|
30633
|
+
isUnderlineColorDefault() {
|
|
30634
|
+
return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
|
|
30635
|
+
}
|
|
30636
|
+
getUnderlineStyle() {
|
|
30637
|
+
return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
|
|
30638
|
+
}
|
|
30639
|
+
getUnderlineVariantOffset() {
|
|
30640
|
+
return this.extended.underlineVariantOffset;
|
|
30641
|
+
}
|
|
30642
|
+
}
|
|
30643
|
+
t2.AttributeData = i2;
|
|
30644
|
+
class s2 {
|
|
30645
|
+
get ext() {
|
|
30646
|
+
return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
|
|
30647
|
+
}
|
|
30648
|
+
set ext(e3) {
|
|
30649
|
+
this._ext = e3;
|
|
30650
|
+
}
|
|
30651
|
+
get underlineStyle() {
|
|
30652
|
+
return this._urlId ? 5 : (469762048 & this._ext) >> 26;
|
|
30653
|
+
}
|
|
30654
|
+
set underlineStyle(e3) {
|
|
30655
|
+
this._ext &= -469762049, this._ext |= e3 << 26 & 469762048;
|
|
30656
|
+
}
|
|
30657
|
+
get underlineColor() {
|
|
30658
|
+
return 67108863 & this._ext;
|
|
30659
|
+
}
|
|
30660
|
+
set underlineColor(e3) {
|
|
30661
|
+
this._ext &= -67108864, this._ext |= 67108863 & e3;
|
|
30662
|
+
}
|
|
30663
|
+
get urlId() {
|
|
30664
|
+
return this._urlId;
|
|
30665
|
+
}
|
|
30666
|
+
set urlId(e3) {
|
|
30667
|
+
this._urlId = e3;
|
|
30668
|
+
}
|
|
30669
|
+
get underlineVariantOffset() {
|
|
30670
|
+
const e3 = (3758096384 & this._ext) >> 29;
|
|
30671
|
+
return e3 < 0 ? 4294967288 ^ e3 : e3;
|
|
30672
|
+
}
|
|
30673
|
+
set underlineVariantOffset(e3) {
|
|
30674
|
+
this._ext &= 536870911, this._ext |= e3 << 29 & 3758096384;
|
|
30675
|
+
}
|
|
30676
|
+
constructor(e3 = 0, t3 = 0) {
|
|
30677
|
+
this._ext = 0, this._urlId = 0, this._ext = e3, this._urlId = t3;
|
|
30678
|
+
}
|
|
30679
|
+
clone() {
|
|
30680
|
+
return new s2(this._ext, this._urlId);
|
|
30681
|
+
}
|
|
30682
|
+
isEmpty() {
|
|
30683
|
+
return 0 === this.underlineStyle && 0 === this._urlId;
|
|
30684
|
+
}
|
|
30685
|
+
}
|
|
30686
|
+
t2.ExtendedAttrs = s2;
|
|
30687
|
+
}, 92: (e2, t2, i2) => {
|
|
30688
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Buffer = t2.MAX_BUFFER_SIZE = void 0;
|
|
30689
|
+
const s2 = i2(349), r2 = i2(226), n3 = i2(734), a = i2(437), o = i2(634), h2 = i2(511), c = i2(643), l = i2(863), _2 = i2(116);
|
|
30690
|
+
t2.MAX_BUFFER_SIZE = 4294967295, t2.Buffer = class {
|
|
30691
|
+
constructor(e3, t3, i3) {
|
|
30692
|
+
this._hasScrollback = e3, this._optionsService = t3, this._bufferService = i3, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = a.DEFAULT_ATTR_DATA.clone(), this.savedCharset = _2.DEFAULT_CHARSET, this.markers = [], this._nullCell = h2.CellData.fromCharData([0, c.NULL_CELL_CHAR, c.NULL_CELL_WIDTH, c.NULL_CELL_CODE]), this._whitespaceCell = h2.CellData.fromCharData([0, c.WHITESPACE_CELL_CHAR, c.WHITESPACE_CELL_WIDTH, c.WHITESPACE_CELL_CODE]), this._isClearing = false, this._memoryCleanupQueue = new r2.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new s2.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
|
|
30693
|
+
}
|
|
30694
|
+
getNullCell(e3) {
|
|
30695
|
+
return e3 ? (this._nullCell.fg = e3.fg, this._nullCell.bg = e3.bg, this._nullCell.extended = e3.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new n3.ExtendedAttrs()), this._nullCell;
|
|
30696
|
+
}
|
|
30697
|
+
getWhitespaceCell(e3) {
|
|
30698
|
+
return e3 ? (this._whitespaceCell.fg = e3.fg, this._whitespaceCell.bg = e3.bg, this._whitespaceCell.extended = e3.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new n3.ExtendedAttrs()), this._whitespaceCell;
|
|
30699
|
+
}
|
|
30700
|
+
getBlankLine(e3, t3) {
|
|
30701
|
+
return new a.BufferLine(this._bufferService.cols, this.getNullCell(e3), t3);
|
|
30702
|
+
}
|
|
30703
|
+
get hasScrollback() {
|
|
30704
|
+
return this._hasScrollback && this.lines.maxLength > this._rows;
|
|
30705
|
+
}
|
|
30706
|
+
get isCursorInViewport() {
|
|
30707
|
+
const e3 = this.ybase + this.y - this.ydisp;
|
|
30708
|
+
return e3 >= 0 && e3 < this._rows;
|
|
30709
|
+
}
|
|
30710
|
+
_getCorrectBufferLength(e3) {
|
|
30711
|
+
if (!this._hasScrollback) return e3;
|
|
30712
|
+
const i3 = e3 + this._optionsService.rawOptions.scrollback;
|
|
30713
|
+
return i3 > t2.MAX_BUFFER_SIZE ? t2.MAX_BUFFER_SIZE : i3;
|
|
30714
|
+
}
|
|
30715
|
+
fillViewportRows(e3) {
|
|
30716
|
+
if (0 === this.lines.length) {
|
|
30717
|
+
void 0 === e3 && (e3 = a.DEFAULT_ATTR_DATA);
|
|
30718
|
+
let t3 = this._rows;
|
|
30719
|
+
for (; t3--; ) this.lines.push(this.getBlankLine(e3));
|
|
30720
|
+
}
|
|
30721
|
+
}
|
|
30722
|
+
clear() {
|
|
30723
|
+
this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new s2.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
|
|
30724
|
+
}
|
|
30725
|
+
resize(e3, t3) {
|
|
30726
|
+
const i3 = this.getNullCell(a.DEFAULT_ATTR_DATA);
|
|
30727
|
+
let s3 = 0;
|
|
30728
|
+
const r3 = this._getCorrectBufferLength(t3);
|
|
30729
|
+
if (r3 > this.lines.maxLength && (this.lines.maxLength = r3), this.lines.length > 0) {
|
|
30730
|
+
if (this._cols < e3) for (let t4 = 0; t4 < this.lines.length; t4++) s3 += +this.lines.get(t4).resize(e3, i3);
|
|
30731
|
+
let n4 = 0;
|
|
30732
|
+
if (this._rows < t3) for (let s4 = this._rows; s4 < t3; s4++) this.lines.length < t3 + this.ybase && (this._optionsService.rawOptions.windowsMode || void 0 !== this._optionsService.rawOptions.windowsPty.backend || void 0 !== this._optionsService.rawOptions.windowsPty.buildNumber ? this.lines.push(new a.BufferLine(e3, i3)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + n4 + 1 ? (this.ybase--, n4++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new a.BufferLine(e3, i3)));
|
|
30733
|
+
else for (let e4 = this._rows; e4 > t3; e4--) this.lines.length > t3 + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
|
|
30734
|
+
if (r3 < this.lines.maxLength) {
|
|
30735
|
+
const e4 = this.lines.length - r3;
|
|
30736
|
+
e4 > 0 && (this.lines.trimStart(e4), this.ybase = Math.max(this.ybase - e4, 0), this.ydisp = Math.max(this.ydisp - e4, 0), this.savedY = Math.max(this.savedY - e4, 0)), this.lines.maxLength = r3;
|
|
30737
|
+
}
|
|
30738
|
+
this.x = Math.min(this.x, e3 - 1), this.y = Math.min(this.y, t3 - 1), n4 && (this.y += n4), this.savedX = Math.min(this.savedX, e3 - 1), this.scrollTop = 0;
|
|
30739
|
+
}
|
|
30740
|
+
if (this.scrollBottom = t3 - 1, this._isReflowEnabled && (this._reflow(e3, t3), this._cols > e3)) for (let t4 = 0; t4 < this.lines.length; t4++) s3 += +this.lines.get(t4).resize(e3, i3);
|
|
30741
|
+
this._cols = e3, this._rows = t3, this._memoryCleanupQueue.clear(), s3 > 0.1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue((() => this._batchedMemoryCleanup())));
|
|
30742
|
+
}
|
|
30743
|
+
_batchedMemoryCleanup() {
|
|
30744
|
+
let e3 = true;
|
|
30745
|
+
this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, e3 = false);
|
|
30746
|
+
let t3 = 0;
|
|
30747
|
+
for (; this._memoryCleanupPosition < this.lines.length; ) if (t3 += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), t3 > 100) return true;
|
|
30748
|
+
return e3;
|
|
30749
|
+
}
|
|
30750
|
+
get _isReflowEnabled() {
|
|
30751
|
+
const e3 = this._optionsService.rawOptions.windowsPty;
|
|
30752
|
+
return e3 && e3.buildNumber ? this._hasScrollback && "conpty" === e3.backend && e3.buildNumber >= 21376 : this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
|
|
30753
|
+
}
|
|
30754
|
+
_reflow(e3, t3) {
|
|
30755
|
+
this._cols !== e3 && (e3 > this._cols ? this._reflowLarger(e3, t3) : this._reflowSmaller(e3, t3));
|
|
30756
|
+
}
|
|
30757
|
+
_reflowLarger(e3, t3) {
|
|
30758
|
+
const i3 = (0, o.reflowLargerGetLinesToRemove)(this.lines, this._cols, e3, this.ybase + this.y, this.getNullCell(a.DEFAULT_ATTR_DATA));
|
|
30759
|
+
if (i3.length > 0) {
|
|
30760
|
+
const s3 = (0, o.reflowLargerCreateNewLayout)(this.lines, i3);
|
|
30761
|
+
(0, o.reflowLargerApplyNewLayout)(this.lines, s3.layout), this._reflowLargerAdjustViewport(e3, t3, s3.countRemoved);
|
|
30762
|
+
}
|
|
30763
|
+
}
|
|
30764
|
+
_reflowLargerAdjustViewport(e3, t3, i3) {
|
|
30765
|
+
const s3 = this.getNullCell(a.DEFAULT_ATTR_DATA);
|
|
30766
|
+
let r3 = i3;
|
|
30767
|
+
for (; r3-- > 0; ) 0 === this.ybase ? (this.y > 0 && this.y--, this.lines.length < t3 && this.lines.push(new a.BufferLine(e3, s3))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
|
|
30768
|
+
this.savedY = Math.max(this.savedY - i3, 0);
|
|
30769
|
+
}
|
|
30770
|
+
_reflowSmaller(e3, t3) {
|
|
30771
|
+
const i3 = this.getNullCell(a.DEFAULT_ATTR_DATA), s3 = [];
|
|
30772
|
+
let r3 = 0;
|
|
30773
|
+
for (let n4 = this.lines.length - 1; n4 >= 0; n4--) {
|
|
30774
|
+
let h3 = this.lines.get(n4);
|
|
30775
|
+
if (!h3 || !h3.isWrapped && h3.getTrimmedLength() <= e3) continue;
|
|
30776
|
+
const c2 = [h3];
|
|
30777
|
+
for (; h3.isWrapped && n4 > 0; ) h3 = this.lines.get(--n4), c2.unshift(h3);
|
|
30778
|
+
const l2 = this.ybase + this.y;
|
|
30779
|
+
if (l2 >= n4 && l2 < n4 + c2.length) continue;
|
|
30780
|
+
const _3 = c2[c2.length - 1].getTrimmedLength(), d2 = (0, o.reflowSmallerGetNewLineLengths)(c2, this._cols, e3), f2 = d2.length - c2.length;
|
|
30781
|
+
let u;
|
|
30782
|
+
u = 0 === this.ybase && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + f2) : Math.max(0, this.lines.length - this.lines.maxLength + f2);
|
|
30783
|
+
const p2 = [];
|
|
30784
|
+
for (let e4 = 0; e4 < f2; e4++) {
|
|
30785
|
+
const e5 = this.getBlankLine(a.DEFAULT_ATTR_DATA, true);
|
|
30786
|
+
p2.push(e5);
|
|
30787
|
+
}
|
|
30788
|
+
p2.length > 0 && (s3.push({ start: n4 + c2.length + r3, newLines: p2 }), r3 += p2.length), c2.push(...p2);
|
|
30789
|
+
let g2 = d2.length - 1, v2 = d2[g2];
|
|
30790
|
+
0 === v2 && (g2--, v2 = d2[g2]);
|
|
30791
|
+
let b2 = c2.length - f2 - 1, S2 = _3;
|
|
30792
|
+
for (; b2 >= 0; ) {
|
|
30793
|
+
const e4 = Math.min(S2, v2);
|
|
30794
|
+
if (void 0 === c2[g2]) break;
|
|
30795
|
+
if (c2[g2].copyCellsFrom(c2[b2], S2 - e4, v2 - e4, e4, true), v2 -= e4, 0 === v2 && (g2--, v2 = d2[g2]), S2 -= e4, 0 === S2) {
|
|
30796
|
+
b2--;
|
|
30797
|
+
const e5 = Math.max(b2, 0);
|
|
30798
|
+
S2 = (0, o.getWrappedLineTrimmedLength)(c2, e5, this._cols);
|
|
30799
|
+
}
|
|
30800
|
+
}
|
|
30801
|
+
for (let t4 = 0; t4 < c2.length; t4++) d2[t4] < e3 && c2[t4].setCell(d2[t4], i3);
|
|
30802
|
+
let m2 = f2 - u;
|
|
30803
|
+
for (; m2-- > 0; ) 0 === this.ybase ? this.y < t3 - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + r3) - t3 && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
|
|
30804
|
+
this.savedY = Math.min(this.savedY + f2, this.ybase + t3 - 1);
|
|
30805
|
+
}
|
|
30806
|
+
if (s3.length > 0) {
|
|
30807
|
+
const e4 = [], t4 = [];
|
|
30808
|
+
for (let e5 = 0; e5 < this.lines.length; e5++) t4.push(this.lines.get(e5));
|
|
30809
|
+
const i4 = this.lines.length;
|
|
30810
|
+
let n4 = i4 - 1, a2 = 0, o2 = s3[a2];
|
|
30811
|
+
this.lines.length = Math.min(this.lines.maxLength, this.lines.length + r3);
|
|
30812
|
+
let h3 = 0;
|
|
30813
|
+
for (let c3 = Math.min(this.lines.maxLength - 1, i4 + r3 - 1); c3 >= 0; c3--) if (o2 && o2.start > n4 + h3) {
|
|
30814
|
+
for (let e5 = o2.newLines.length - 1; e5 >= 0; e5--) this.lines.set(c3--, o2.newLines[e5]);
|
|
30815
|
+
c3++, e4.push({ index: n4 + 1, amount: o2.newLines.length }), h3 += o2.newLines.length, o2 = s3[++a2];
|
|
30816
|
+
} else this.lines.set(c3, t4[n4--]);
|
|
30817
|
+
let c2 = 0;
|
|
30818
|
+
for (let t5 = e4.length - 1; t5 >= 0; t5--) e4[t5].index += c2, this.lines.onInsertEmitter.fire(e4[t5]), c2 += e4[t5].amount;
|
|
30819
|
+
const l2 = Math.max(0, i4 + r3 - this.lines.maxLength);
|
|
30820
|
+
l2 > 0 && this.lines.onTrimEmitter.fire(l2);
|
|
30821
|
+
}
|
|
30822
|
+
}
|
|
30823
|
+
translateBufferLineToString(e3, t3, i3 = 0, s3) {
|
|
30824
|
+
const r3 = this.lines.get(e3);
|
|
30825
|
+
return r3 ? r3.translateToString(t3, i3, s3) : "";
|
|
30826
|
+
}
|
|
30827
|
+
getWrappedRangeForLine(e3) {
|
|
30828
|
+
let t3 = e3, i3 = e3;
|
|
30829
|
+
for (; t3 > 0 && this.lines.get(t3).isWrapped; ) t3--;
|
|
30830
|
+
for (; i3 + 1 < this.lines.length && this.lines.get(i3 + 1).isWrapped; ) i3++;
|
|
30831
|
+
return { first: t3, last: i3 };
|
|
30832
|
+
}
|
|
30833
|
+
setupTabStops(e3) {
|
|
30834
|
+
for (null != e3 ? this.tabs[e3] || (e3 = this.prevStop(e3)) : (this.tabs = {}, e3 = 0); e3 < this._cols; e3 += this._optionsService.rawOptions.tabStopWidth) this.tabs[e3] = true;
|
|
30835
|
+
}
|
|
30836
|
+
prevStop(e3) {
|
|
30837
|
+
for (null == e3 && (e3 = this.x); !this.tabs[--e3] && e3 > 0; ) ;
|
|
30838
|
+
return e3 >= this._cols ? this._cols - 1 : e3 < 0 ? 0 : e3;
|
|
30839
|
+
}
|
|
30840
|
+
nextStop(e3) {
|
|
30841
|
+
for (null == e3 && (e3 = this.x); !this.tabs[++e3] && e3 < this._cols; ) ;
|
|
30842
|
+
return e3 >= this._cols ? this._cols - 1 : e3 < 0 ? 0 : e3;
|
|
30843
|
+
}
|
|
30844
|
+
clearMarkers(e3) {
|
|
30845
|
+
this._isClearing = true;
|
|
30846
|
+
for (let t3 = 0; t3 < this.markers.length; t3++) this.markers[t3].line === e3 && (this.markers[t3].dispose(), this.markers.splice(t3--, 1));
|
|
30847
|
+
this._isClearing = false;
|
|
30848
|
+
}
|
|
30849
|
+
clearAllMarkers() {
|
|
30850
|
+
this._isClearing = true;
|
|
30851
|
+
for (let e3 = 0; e3 < this.markers.length; e3++) this.markers[e3].dispose(), this.markers.splice(e3--, 1);
|
|
30852
|
+
this._isClearing = false;
|
|
30853
|
+
}
|
|
30854
|
+
addMarker(e3) {
|
|
30855
|
+
const t3 = new l.Marker(e3);
|
|
30856
|
+
return this.markers.push(t3), t3.register(this.lines.onTrim(((e4) => {
|
|
30857
|
+
t3.line -= e4, t3.line < 0 && t3.dispose();
|
|
30858
|
+
}))), t3.register(this.lines.onInsert(((e4) => {
|
|
30859
|
+
t3.line >= e4.index && (t3.line += e4.amount);
|
|
30860
|
+
}))), t3.register(this.lines.onDelete(((e4) => {
|
|
30861
|
+
t3.line >= e4.index && t3.line < e4.index + e4.amount && t3.dispose(), t3.line > e4.index && (t3.line -= e4.amount);
|
|
30862
|
+
}))), t3.register(t3.onDispose((() => this._removeMarker(t3)))), t3;
|
|
30863
|
+
}
|
|
30864
|
+
_removeMarker(e3) {
|
|
30865
|
+
this._isClearing || this.markers.splice(this.markers.indexOf(e3), 1);
|
|
30866
|
+
}
|
|
30867
|
+
};
|
|
30868
|
+
}, 437: (e2, t2, i2) => {
|
|
30869
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferLine = t2.DEFAULT_ATTR_DATA = void 0;
|
|
30870
|
+
const s2 = i2(734), r2 = i2(511), n3 = i2(643), a = i2(482);
|
|
30871
|
+
t2.DEFAULT_ATTR_DATA = Object.freeze(new s2.AttributeData());
|
|
30872
|
+
let o = 0;
|
|
30873
|
+
class h2 {
|
|
30874
|
+
constructor(e3, t3, i3 = false) {
|
|
30875
|
+
this.isWrapped = i3, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e3);
|
|
30876
|
+
const s3 = t3 || r2.CellData.fromCharData([0, n3.NULL_CELL_CHAR, n3.NULL_CELL_WIDTH, n3.NULL_CELL_CODE]);
|
|
30877
|
+
for (let t4 = 0; t4 < e3; ++t4) this.setCell(t4, s3);
|
|
30878
|
+
this.length = e3;
|
|
30879
|
+
}
|
|
30880
|
+
get(e3) {
|
|
30881
|
+
const t3 = this._data[3 * e3 + 0], i3 = 2097151 & t3;
|
|
30882
|
+
return [this._data[3 * e3 + 1], 2097152 & t3 ? this._combined[e3] : i3 ? (0, a.stringFromCodePoint)(i3) : "", t3 >> 22, 2097152 & t3 ? this._combined[e3].charCodeAt(this._combined[e3].length - 1) : i3];
|
|
30883
|
+
}
|
|
30884
|
+
set(e3, t3) {
|
|
30885
|
+
this._data[3 * e3 + 1] = t3[n3.CHAR_DATA_ATTR_INDEX], t3[n3.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e3] = t3[1], this._data[3 * e3 + 0] = 2097152 | e3 | t3[n3.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e3 + 0] = t3[n3.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | t3[n3.CHAR_DATA_WIDTH_INDEX] << 22;
|
|
30886
|
+
}
|
|
30887
|
+
getWidth(e3) {
|
|
30888
|
+
return this._data[3 * e3 + 0] >> 22;
|
|
30889
|
+
}
|
|
30890
|
+
hasWidth(e3) {
|
|
30891
|
+
return 12582912 & this._data[3 * e3 + 0];
|
|
30892
|
+
}
|
|
30893
|
+
getFg(e3) {
|
|
30894
|
+
return this._data[3 * e3 + 1];
|
|
30895
|
+
}
|
|
30896
|
+
getBg(e3) {
|
|
30897
|
+
return this._data[3 * e3 + 2];
|
|
30898
|
+
}
|
|
30899
|
+
hasContent(e3) {
|
|
30900
|
+
return 4194303 & this._data[3 * e3 + 0];
|
|
30901
|
+
}
|
|
30902
|
+
getCodePoint(e3) {
|
|
30903
|
+
const t3 = this._data[3 * e3 + 0];
|
|
30904
|
+
return 2097152 & t3 ? this._combined[e3].charCodeAt(this._combined[e3].length - 1) : 2097151 & t3;
|
|
30905
|
+
}
|
|
30906
|
+
isCombined(e3) {
|
|
30907
|
+
return 2097152 & this._data[3 * e3 + 0];
|
|
30908
|
+
}
|
|
30909
|
+
getString(e3) {
|
|
30910
|
+
const t3 = this._data[3 * e3 + 0];
|
|
30911
|
+
return 2097152 & t3 ? this._combined[e3] : 2097151 & t3 ? (0, a.stringFromCodePoint)(2097151 & t3) : "";
|
|
30912
|
+
}
|
|
30913
|
+
isProtected(e3) {
|
|
30914
|
+
return 536870912 & this._data[3 * e3 + 2];
|
|
30915
|
+
}
|
|
30916
|
+
loadCell(e3, t3) {
|
|
30917
|
+
return o = 3 * e3, t3.content = this._data[o + 0], t3.fg = this._data[o + 1], t3.bg = this._data[o + 2], 2097152 & t3.content && (t3.combinedData = this._combined[e3]), 268435456 & t3.bg && (t3.extended = this._extendedAttrs[e3]), t3;
|
|
30918
|
+
}
|
|
30919
|
+
setCell(e3, t3) {
|
|
30920
|
+
2097152 & t3.content && (this._combined[e3] = t3.combinedData), 268435456 & t3.bg && (this._extendedAttrs[e3] = t3.extended), this._data[3 * e3 + 0] = t3.content, this._data[3 * e3 + 1] = t3.fg, this._data[3 * e3 + 2] = t3.bg;
|
|
30921
|
+
}
|
|
30922
|
+
setCellFromCodepoint(e3, t3, i3, s3) {
|
|
30923
|
+
268435456 & s3.bg && (this._extendedAttrs[e3] = s3.extended), this._data[3 * e3 + 0] = t3 | i3 << 22, this._data[3 * e3 + 1] = s3.fg, this._data[3 * e3 + 2] = s3.bg;
|
|
30924
|
+
}
|
|
30925
|
+
addCodepointToCell(e3, t3, i3) {
|
|
30926
|
+
let s3 = this._data[3 * e3 + 0];
|
|
30927
|
+
2097152 & s3 ? this._combined[e3] += (0, a.stringFromCodePoint)(t3) : 2097151 & s3 ? (this._combined[e3] = (0, a.stringFromCodePoint)(2097151 & s3) + (0, a.stringFromCodePoint)(t3), s3 &= -2097152, s3 |= 2097152) : s3 = t3 | 1 << 22, i3 && (s3 &= -12582913, s3 |= i3 << 22), this._data[3 * e3 + 0] = s3;
|
|
30928
|
+
}
|
|
30929
|
+
insertCells(e3, t3, i3) {
|
|
30930
|
+
if ((e3 %= this.length) && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length - e3) {
|
|
30931
|
+
const s3 = new r2.CellData();
|
|
30932
|
+
for (let i4 = this.length - e3 - t3 - 1; i4 >= 0; --i4) this.setCell(e3 + t3 + i4, this.loadCell(e3 + i4, s3));
|
|
30933
|
+
for (let s4 = 0; s4 < t3; ++s4) this.setCell(e3 + s4, i3);
|
|
30934
|
+
} else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
|
|
30935
|
+
2 === this.getWidth(this.length - 1) && this.setCellFromCodepoint(this.length - 1, 0, 1, i3);
|
|
30936
|
+
}
|
|
30937
|
+
deleteCells(e3, t3, i3) {
|
|
30938
|
+
if (e3 %= this.length, t3 < this.length - e3) {
|
|
30939
|
+
const s3 = new r2.CellData();
|
|
30940
|
+
for (let i4 = 0; i4 < this.length - e3 - t3; ++i4) this.setCell(e3 + i4, this.loadCell(e3 + t3 + i4, s3));
|
|
30941
|
+
for (let e4 = this.length - t3; e4 < this.length; ++e4) this.setCell(e4, i3);
|
|
30942
|
+
} else for (let t4 = e3; t4 < this.length; ++t4) this.setCell(t4, i3);
|
|
30943
|
+
e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), 0 !== this.getWidth(e3) || this.hasContent(e3) || this.setCellFromCodepoint(e3, 0, 1, i3);
|
|
30944
|
+
}
|
|
30945
|
+
replaceCells(e3, t3, i3, s3 = false) {
|
|
30946
|
+
if (s3) for (e3 && 2 === this.getWidth(e3 - 1) && !this.isProtected(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && !this.isProtected(t3) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.isProtected(e3) || this.setCell(e3, i3), e3++;
|
|
30947
|
+
else for (e3 && 2 === this.getWidth(e3 - 1) && this.setCellFromCodepoint(e3 - 1, 0, 1, i3), t3 < this.length && 2 === this.getWidth(t3 - 1) && this.setCellFromCodepoint(t3, 0, 1, i3); e3 < t3 && e3 < this.length; ) this.setCell(e3++, i3);
|
|
30948
|
+
}
|
|
30949
|
+
resize(e3, t3) {
|
|
30950
|
+
if (e3 === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
|
|
30951
|
+
const i3 = 3 * e3;
|
|
30952
|
+
if (e3 > this.length) {
|
|
30953
|
+
if (this._data.buffer.byteLength >= 4 * i3) this._data = new Uint32Array(this._data.buffer, 0, i3);
|
|
30954
|
+
else {
|
|
30955
|
+
const e4 = new Uint32Array(i3);
|
|
30956
|
+
e4.set(this._data), this._data = e4;
|
|
30957
|
+
}
|
|
30958
|
+
for (let i4 = this.length; i4 < e3; ++i4) this.setCell(i4, t3);
|
|
30959
|
+
} else {
|
|
30960
|
+
this._data = this._data.subarray(0, i3);
|
|
30961
|
+
const t4 = Object.keys(this._combined);
|
|
30962
|
+
for (let i4 = 0; i4 < t4.length; i4++) {
|
|
30963
|
+
const s4 = parseInt(t4[i4], 10);
|
|
30964
|
+
s4 >= e3 && delete this._combined[s4];
|
|
30965
|
+
}
|
|
30966
|
+
const s3 = Object.keys(this._extendedAttrs);
|
|
30967
|
+
for (let t5 = 0; t5 < s3.length; t5++) {
|
|
30968
|
+
const i4 = parseInt(s3[t5], 10);
|
|
30969
|
+
i4 >= e3 && delete this._extendedAttrs[i4];
|
|
30970
|
+
}
|
|
30971
|
+
}
|
|
30972
|
+
return this.length = e3, 4 * i3 * 2 < this._data.buffer.byteLength;
|
|
30973
|
+
}
|
|
30974
|
+
cleanupMemory() {
|
|
30975
|
+
if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
|
|
30976
|
+
const e3 = new Uint32Array(this._data.length);
|
|
30977
|
+
return e3.set(this._data), this._data = e3, 1;
|
|
30978
|
+
}
|
|
30979
|
+
return 0;
|
|
30980
|
+
}
|
|
30981
|
+
fill(e3, t3 = false) {
|
|
30982
|
+
if (t3) for (let t4 = 0; t4 < this.length; ++t4) this.isProtected(t4) || this.setCell(t4, e3);
|
|
30983
|
+
else {
|
|
30984
|
+
this._combined = {}, this._extendedAttrs = {};
|
|
30985
|
+
for (let t4 = 0; t4 < this.length; ++t4) this.setCell(t4, e3);
|
|
30986
|
+
}
|
|
30987
|
+
}
|
|
30988
|
+
copyFrom(e3) {
|
|
30989
|
+
this.length !== e3.length ? this._data = new Uint32Array(e3._data) : this._data.set(e3._data), this.length = e3.length, this._combined = {};
|
|
30990
|
+
for (const t3 in e3._combined) this._combined[t3] = e3._combined[t3];
|
|
30991
|
+
this._extendedAttrs = {};
|
|
30992
|
+
for (const t3 in e3._extendedAttrs) this._extendedAttrs[t3] = e3._extendedAttrs[t3];
|
|
30993
|
+
this.isWrapped = e3.isWrapped;
|
|
30994
|
+
}
|
|
30995
|
+
clone() {
|
|
30996
|
+
const e3 = new h2(0);
|
|
30997
|
+
e3._data = new Uint32Array(this._data), e3.length = this.length;
|
|
30998
|
+
for (const t3 in this._combined) e3._combined[t3] = this._combined[t3];
|
|
30999
|
+
for (const t3 in this._extendedAttrs) e3._extendedAttrs[t3] = this._extendedAttrs[t3];
|
|
31000
|
+
return e3.isWrapped = this.isWrapped, e3;
|
|
31001
|
+
}
|
|
31002
|
+
getTrimmedLength() {
|
|
31003
|
+
for (let e3 = this.length - 1; e3 >= 0; --e3) if (4194303 & this._data[3 * e3 + 0]) return e3 + (this._data[3 * e3 + 0] >> 22);
|
|
31004
|
+
return 0;
|
|
31005
|
+
}
|
|
31006
|
+
getNoBgTrimmedLength() {
|
|
31007
|
+
for (let e3 = this.length - 1; e3 >= 0; --e3) if (4194303 & this._data[3 * e3 + 0] || 50331648 & this._data[3 * e3 + 2]) return e3 + (this._data[3 * e3 + 0] >> 22);
|
|
31008
|
+
return 0;
|
|
31009
|
+
}
|
|
31010
|
+
copyCellsFrom(e3, t3, i3, s3, r3) {
|
|
31011
|
+
const n4 = e3._data;
|
|
31012
|
+
if (r3) for (let r4 = s3 - 1; r4 >= 0; r4--) {
|
|
31013
|
+
for (let e4 = 0; e4 < 3; e4++) this._data[3 * (i3 + r4) + e4] = n4[3 * (t3 + r4) + e4];
|
|
31014
|
+
268435456 & n4[3 * (t3 + r4) + 2] && (this._extendedAttrs[i3 + r4] = e3._extendedAttrs[t3 + r4]);
|
|
31015
|
+
}
|
|
31016
|
+
else for (let r4 = 0; r4 < s3; r4++) {
|
|
31017
|
+
for (let e4 = 0; e4 < 3; e4++) this._data[3 * (i3 + r4) + e4] = n4[3 * (t3 + r4) + e4];
|
|
31018
|
+
268435456 & n4[3 * (t3 + r4) + 2] && (this._extendedAttrs[i3 + r4] = e3._extendedAttrs[t3 + r4]);
|
|
31019
|
+
}
|
|
31020
|
+
const a2 = Object.keys(e3._combined);
|
|
31021
|
+
for (let s4 = 0; s4 < a2.length; s4++) {
|
|
31022
|
+
const r4 = parseInt(a2[s4], 10);
|
|
31023
|
+
r4 >= t3 && (this._combined[r4 - t3 + i3] = e3._combined[r4]);
|
|
31024
|
+
}
|
|
31025
|
+
}
|
|
31026
|
+
translateToString(e3, t3, i3, s3) {
|
|
31027
|
+
t3 = t3 ?? 0, i3 = i3 ?? this.length, e3 && (i3 = Math.min(i3, this.getTrimmedLength())), s3 && (s3.length = 0);
|
|
31028
|
+
let r3 = "";
|
|
31029
|
+
for (; t3 < i3; ) {
|
|
31030
|
+
const e4 = this._data[3 * t3 + 0], i4 = 2097151 & e4, o2 = 2097152 & e4 ? this._combined[t3] : i4 ? (0, a.stringFromCodePoint)(i4) : n3.WHITESPACE_CELL_CHAR;
|
|
31031
|
+
if (r3 += o2, s3) for (let e5 = 0; e5 < o2.length; ++e5) s3.push(t3);
|
|
31032
|
+
t3 += e4 >> 22 || 1;
|
|
31033
|
+
}
|
|
31034
|
+
return s3 && s3.push(t3), r3;
|
|
31035
|
+
}
|
|
31036
|
+
}
|
|
31037
|
+
t2.BufferLine = h2;
|
|
31038
|
+
}, 634: (e2, t2) => {
|
|
31039
|
+
function i2(e3, t3, i3) {
|
|
31040
|
+
if (t3 === e3.length - 1) return e3[t3].getTrimmedLength();
|
|
31041
|
+
const s2 = !e3[t3].hasContent(i3 - 1) && 1 === e3[t3].getWidth(i3 - 1), r2 = 2 === e3[t3 + 1].getWidth(0);
|
|
31042
|
+
return s2 && r2 ? i3 - 1 : i3;
|
|
31043
|
+
}
|
|
31044
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.getWrappedLineTrimmedLength = t2.reflowSmallerGetNewLineLengths = t2.reflowLargerApplyNewLayout = t2.reflowLargerCreateNewLayout = t2.reflowLargerGetLinesToRemove = void 0, t2.reflowLargerGetLinesToRemove = function(e3, t3, s2, r2, n3) {
|
|
31045
|
+
const a = [];
|
|
31046
|
+
for (let o = 0; o < e3.length - 1; o++) {
|
|
31047
|
+
let h2 = o, c = e3.get(++h2);
|
|
31048
|
+
if (!c.isWrapped) continue;
|
|
31049
|
+
const l = [e3.get(o)];
|
|
31050
|
+
for (; h2 < e3.length && c.isWrapped; ) l.push(c), c = e3.get(++h2);
|
|
31051
|
+
if (r2 >= o && r2 < h2) {
|
|
31052
|
+
o += l.length - 1;
|
|
31053
|
+
continue;
|
|
31054
|
+
}
|
|
31055
|
+
let _2 = 0, d2 = i2(l, _2, t3), f2 = 1, u = 0;
|
|
31056
|
+
for (; f2 < l.length; ) {
|
|
31057
|
+
const e4 = i2(l, f2, t3), r3 = e4 - u, a2 = s2 - d2, o2 = Math.min(r3, a2);
|
|
31058
|
+
l[_2].copyCellsFrom(l[f2], u, d2, o2, false), d2 += o2, d2 === s2 && (_2++, d2 = 0), u += o2, u === e4 && (f2++, u = 0), 0 === d2 && 0 !== _2 && 2 === l[_2 - 1].getWidth(s2 - 1) && (l[_2].copyCellsFrom(l[_2 - 1], s2 - 1, d2++, 1, false), l[_2 - 1].setCell(s2 - 1, n3));
|
|
31059
|
+
}
|
|
31060
|
+
l[_2].replaceCells(d2, s2, n3);
|
|
31061
|
+
let p2 = 0;
|
|
31062
|
+
for (let e4 = l.length - 1; e4 > 0 && (e4 > _2 || 0 === l[e4].getTrimmedLength()); e4--) p2++;
|
|
31063
|
+
p2 > 0 && (a.push(o + l.length - p2), a.push(p2)), o += l.length - 1;
|
|
31064
|
+
}
|
|
31065
|
+
return a;
|
|
31066
|
+
}, t2.reflowLargerCreateNewLayout = function(e3, t3) {
|
|
31067
|
+
const i3 = [];
|
|
31068
|
+
let s2 = 0, r2 = t3[s2], n3 = 0;
|
|
31069
|
+
for (let a = 0; a < e3.length; a++) if (r2 === a) {
|
|
31070
|
+
const i4 = t3[++s2];
|
|
31071
|
+
e3.onDeleteEmitter.fire({ index: a - n3, amount: i4 }), a += i4 - 1, n3 += i4, r2 = t3[++s2];
|
|
31072
|
+
} else i3.push(a);
|
|
31073
|
+
return { layout: i3, countRemoved: n3 };
|
|
31074
|
+
}, t2.reflowLargerApplyNewLayout = function(e3, t3) {
|
|
31075
|
+
const i3 = [];
|
|
31076
|
+
for (let s2 = 0; s2 < t3.length; s2++) i3.push(e3.get(t3[s2]));
|
|
31077
|
+
for (let t4 = 0; t4 < i3.length; t4++) e3.set(t4, i3[t4]);
|
|
31078
|
+
e3.length = t3.length;
|
|
31079
|
+
}, t2.reflowSmallerGetNewLineLengths = function(e3, t3, s2) {
|
|
31080
|
+
const r2 = [], n3 = e3.map(((s3, r3) => i2(e3, r3, t3))).reduce(((e4, t4) => e4 + t4));
|
|
31081
|
+
let a = 0, o = 0, h2 = 0;
|
|
31082
|
+
for (; h2 < n3; ) {
|
|
31083
|
+
if (n3 - h2 < s2) {
|
|
31084
|
+
r2.push(n3 - h2);
|
|
31085
|
+
break;
|
|
31086
|
+
}
|
|
31087
|
+
a += s2;
|
|
31088
|
+
const c = i2(e3, o, t3);
|
|
31089
|
+
a > c && (a -= c, o++);
|
|
31090
|
+
const l = 2 === e3[o].getWidth(a - 1);
|
|
31091
|
+
l && a--;
|
|
31092
|
+
const _2 = l ? s2 - 1 : s2;
|
|
31093
|
+
r2.push(_2), h2 += _2;
|
|
31094
|
+
}
|
|
31095
|
+
return r2;
|
|
31096
|
+
}, t2.getWrappedLineTrimmedLength = i2;
|
|
31097
|
+
}, 295: (e2, t2, i2) => {
|
|
31098
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferSet = void 0;
|
|
31099
|
+
const s2 = i2(460), r2 = i2(844), n3 = i2(92);
|
|
31100
|
+
class a extends r2.Disposable {
|
|
31101
|
+
constructor(e3, t3) {
|
|
31102
|
+
super(), this._optionsService = e3, this._bufferService = t3, this._onBufferActivate = this.register(new s2.EventEmitter()), this.onBufferActivate = this._onBufferActivate.event, this.reset(), this.register(this._optionsService.onSpecificOptionChange("scrollback", (() => this.resize(this._bufferService.cols, this._bufferService.rows)))), this.register(this._optionsService.onSpecificOptionChange("tabStopWidth", (() => this.setupTabStops())));
|
|
31103
|
+
}
|
|
31104
|
+
reset() {
|
|
31105
|
+
this._normal = new n3.Buffer(true, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new n3.Buffer(false, this._optionsService, this._bufferService), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
|
|
31106
|
+
}
|
|
31107
|
+
get alt() {
|
|
31108
|
+
return this._alt;
|
|
31109
|
+
}
|
|
31110
|
+
get active() {
|
|
31111
|
+
return this._activeBuffer;
|
|
31112
|
+
}
|
|
31113
|
+
get normal() {
|
|
31114
|
+
return this._normal;
|
|
31115
|
+
}
|
|
31116
|
+
activateNormalBuffer() {
|
|
31117
|
+
this._activeBuffer !== this._normal && (this._normal.x = this._alt.x, this._normal.y = this._alt.y, this._alt.clearAllMarkers(), this._alt.clear(), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }));
|
|
31118
|
+
}
|
|
31119
|
+
activateAltBuffer(e3) {
|
|
31120
|
+
this._activeBuffer !== this._alt && (this._alt.fillViewportRows(e3), this._alt.x = this._normal.x, this._alt.y = this._normal.y, this._activeBuffer = this._alt, this._onBufferActivate.fire({ activeBuffer: this._alt, inactiveBuffer: this._normal }));
|
|
31121
|
+
}
|
|
31122
|
+
resize(e3, t3) {
|
|
31123
|
+
this._normal.resize(e3, t3), this._alt.resize(e3, t3), this.setupTabStops(e3);
|
|
31124
|
+
}
|
|
31125
|
+
setupTabStops(e3) {
|
|
31126
|
+
this._normal.setupTabStops(e3), this._alt.setupTabStops(e3);
|
|
31127
|
+
}
|
|
31128
|
+
}
|
|
31129
|
+
t2.BufferSet = a;
|
|
31130
|
+
}, 511: (e2, t2, i2) => {
|
|
31131
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CellData = void 0;
|
|
31132
|
+
const s2 = i2(482), r2 = i2(643), n3 = i2(734);
|
|
31133
|
+
class a extends n3.AttributeData {
|
|
31134
|
+
constructor() {
|
|
31135
|
+
super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new n3.ExtendedAttrs(), this.combinedData = "";
|
|
31136
|
+
}
|
|
31137
|
+
static fromCharData(e3) {
|
|
31138
|
+
const t3 = new a();
|
|
31139
|
+
return t3.setFromCharData(e3), t3;
|
|
31140
|
+
}
|
|
31141
|
+
isCombined() {
|
|
31142
|
+
return 2097152 & this.content;
|
|
31143
|
+
}
|
|
31144
|
+
getWidth() {
|
|
31145
|
+
return this.content >> 22;
|
|
31146
|
+
}
|
|
31147
|
+
getChars() {
|
|
31148
|
+
return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s2.stringFromCodePoint)(2097151 & this.content) : "";
|
|
31149
|
+
}
|
|
31150
|
+
getCode() {
|
|
31151
|
+
return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
|
|
31152
|
+
}
|
|
31153
|
+
setFromCharData(e3) {
|
|
31154
|
+
this.fg = e3[r2.CHAR_DATA_ATTR_INDEX], this.bg = 0;
|
|
31155
|
+
let t3 = false;
|
|
31156
|
+
if (e3[r2.CHAR_DATA_CHAR_INDEX].length > 2) t3 = true;
|
|
31157
|
+
else if (2 === e3[r2.CHAR_DATA_CHAR_INDEX].length) {
|
|
31158
|
+
const i3 = e3[r2.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
|
|
31159
|
+
if (55296 <= i3 && i3 <= 56319) {
|
|
31160
|
+
const s3 = e3[r2.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
|
|
31161
|
+
56320 <= s3 && s3 <= 57343 ? this.content = 1024 * (i3 - 55296) + s3 - 56320 + 65536 | e3[r2.CHAR_DATA_WIDTH_INDEX] << 22 : t3 = true;
|
|
31162
|
+
} else t3 = true;
|
|
31163
|
+
} else this.content = e3[r2.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e3[r2.CHAR_DATA_WIDTH_INDEX] << 22;
|
|
31164
|
+
t3 && (this.combinedData = e3[r2.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e3[r2.CHAR_DATA_WIDTH_INDEX] << 22);
|
|
31165
|
+
}
|
|
31166
|
+
getAsCharData() {
|
|
31167
|
+
return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
|
|
31168
|
+
}
|
|
31169
|
+
}
|
|
31170
|
+
t2.CellData = a;
|
|
31171
|
+
}, 643: (e2, t2) => {
|
|
31172
|
+
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;
|
|
31173
|
+
}, 863: (e2, t2, i2) => {
|
|
31174
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Marker = void 0;
|
|
31175
|
+
const s2 = i2(460), r2 = i2(844);
|
|
31176
|
+
class n3 {
|
|
31177
|
+
get id() {
|
|
31178
|
+
return this._id;
|
|
31179
|
+
}
|
|
31180
|
+
constructor(e3) {
|
|
31181
|
+
this.line = e3, this.isDisposed = false, this._disposables = [], this._id = n3._nextId++, this._onDispose = this.register(new s2.EventEmitter()), this.onDispose = this._onDispose.event;
|
|
31182
|
+
}
|
|
31183
|
+
dispose() {
|
|
31184
|
+
this.isDisposed || (this.isDisposed = true, this.line = -1, this._onDispose.fire(), (0, r2.disposeArray)(this._disposables), this._disposables.length = 0);
|
|
31185
|
+
}
|
|
31186
|
+
register(e3) {
|
|
31187
|
+
return this._disposables.push(e3), e3;
|
|
31188
|
+
}
|
|
31189
|
+
}
|
|
31190
|
+
t2.Marker = n3, n3._nextId = 1;
|
|
31191
|
+
}, 116: (e2, t2) => {
|
|
31192
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.DEFAULT_CHARSET = t2.CHARSETS = void 0, t2.CHARSETS = {}, t2.DEFAULT_CHARSET = t2.CHARSETS.B, t2.CHARSETS[0] = { "`": "\u25C6", a: "\u2592", b: "\u2409", c: "\u240C", d: "\u240D", e: "\u240A", f: "\xB0", g: "\xB1", h: "\u2424", i: "\u240B", j: "\u2518", k: "\u2510", l: "\u250C", m: "\u2514", n: "\u253C", o: "\u23BA", p: "\u23BB", q: "\u2500", r: "\u23BC", s: "\u23BD", t: "\u251C", u: "\u2524", v: "\u2534", w: "\u252C", x: "\u2502", y: "\u2264", z: "\u2265", "{": "\u03C0", "|": "\u2260", "}": "\xA3", "~": "\xB7" }, t2.CHARSETS.A = { "#": "\xA3" }, t2.CHARSETS.B = void 0, t2.CHARSETS[4] = { "#": "\xA3", "@": "\xBE", "[": "ij", "\\": "\xBD", "]": "|", "{": "\xA8", "|": "f", "}": "\xBC", "~": "\xB4" }, t2.CHARSETS.C = t2.CHARSETS[5] = { "[": "\xC4", "\\": "\xD6", "]": "\xC5", "^": "\xDC", "`": "\xE9", "{": "\xE4", "|": "\xF6", "}": "\xE5", "~": "\xFC" }, t2.CHARSETS.R = { "#": "\xA3", "@": "\xE0", "[": "\xB0", "\\": "\xE7", "]": "\xA7", "{": "\xE9", "|": "\xF9", "}": "\xE8", "~": "\xA8" }, t2.CHARSETS.Q = { "@": "\xE0", "[": "\xE2", "\\": "\xE7", "]": "\xEA", "^": "\xEE", "`": "\xF4", "{": "\xE9", "|": "\xF9", "}": "\xE8", "~": "\xFB" }, t2.CHARSETS.K = { "@": "\xA7", "[": "\xC4", "\\": "\xD6", "]": "\xDC", "{": "\xE4", "|": "\xF6", "}": "\xFC", "~": "\xDF" }, t2.CHARSETS.Y = { "#": "\xA3", "@": "\xA7", "[": "\xB0", "\\": "\xE7", "]": "\xE9", "`": "\xF9", "{": "\xE0", "|": "\xF2", "}": "\xE8", "~": "\xEC" }, t2.CHARSETS.E = t2.CHARSETS[6] = { "@": "\xC4", "[": "\xC6", "\\": "\xD8", "]": "\xC5", "^": "\xDC", "`": "\xE4", "{": "\xE6", "|": "\xF8", "}": "\xE5", "~": "\xFC" }, t2.CHARSETS.Z = { "#": "\xA3", "@": "\xA7", "[": "\xA1", "\\": "\xD1", "]": "\xBF", "{": "\xB0", "|": "\xF1", "}": "\xE7" }, t2.CHARSETS.H = t2.CHARSETS[7] = { "@": "\xC9", "[": "\xC4", "\\": "\xD6", "]": "\xC5", "^": "\xDC", "`": "\xE9", "{": "\xE4", "|": "\xF6", "}": "\xE5", "~": "\xFC" }, t2.CHARSETS["="] = { "#": "\xF9", "@": "\xE0", "[": "\xE9", "\\": "\xE7", "]": "\xEA", "^": "\xEE", _: "\xE8", "`": "\xF4", "{": "\xE4", "|": "\xF6", "}": "\xFC", "~": "\xFB" };
|
|
31193
|
+
}, 584: (e2, t2) => {
|
|
31194
|
+
var i2, s2, r2;
|
|
31195
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.C1_ESCAPED = t2.C1 = t2.C0 = void 0, (function(e3) {
|
|
31196
|
+
e3.NUL = "\0", e3.SOH = "", e3.STX = "", e3.ETX = "", e3.EOT = "", e3.ENQ = "", e3.ACK = "", e3.BEL = "\x07", e3.BS = "\b", e3.HT = " ", e3.LF = "\n", e3.VT = "\v", e3.FF = "\f", e3.CR = "\r", e3.SO = "", e3.SI = "", e3.DLE = "", e3.DC1 = "", e3.DC2 = "", e3.DC3 = "", e3.DC4 = "", e3.NAK = "", e3.SYN = "", e3.ETB = "", e3.CAN = "", e3.EM = "", e3.SUB = "", e3.ESC = "\x1B", e3.FS = "", e3.GS = "", e3.RS = "", e3.US = "", e3.SP = " ", e3.DEL = "\x7F";
|
|
31197
|
+
})(i2 || (t2.C0 = i2 = {})), (function(e3) {
|
|
31198
|
+
e3.PAD = "\x80", e3.HOP = "\x81", e3.BPH = "\x82", e3.NBH = "\x83", e3.IND = "\x84", e3.NEL = "\x85", e3.SSA = "\x86", e3.ESA = "\x87", e3.HTS = "\x88", e3.HTJ = "\x89", e3.VTS = "\x8A", e3.PLD = "\x8B", e3.PLU = "\x8C", e3.RI = "\x8D", e3.SS2 = "\x8E", e3.SS3 = "\x8F", e3.DCS = "\x90", e3.PU1 = "\x91", e3.PU2 = "\x92", e3.STS = "\x93", e3.CCH = "\x94", e3.MW = "\x95", e3.SPA = "\x96", e3.EPA = "\x97", e3.SOS = "\x98", e3.SGCI = "\x99", e3.SCI = "\x9A", e3.CSI = "\x9B", e3.ST = "\x9C", e3.OSC = "\x9D", e3.PM = "\x9E", e3.APC = "\x9F";
|
|
31199
|
+
})(s2 || (t2.C1 = s2 = {})), (function(e3) {
|
|
31200
|
+
e3.ST = `${i2.ESC}\\`;
|
|
31201
|
+
})(r2 || (t2.C1_ESCAPED = r2 = {}));
|
|
31202
|
+
}, 482: (e2, t2) => {
|
|
31203
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Utf8ToUtf32 = t2.StringToUtf32 = t2.utf32ToString = t2.stringFromCodePoint = void 0, t2.stringFromCodePoint = function(e3) {
|
|
31204
|
+
return e3 > 65535 ? (e3 -= 65536, String.fromCharCode(55296 + (e3 >> 10)) + String.fromCharCode(e3 % 1024 + 56320)) : String.fromCharCode(e3);
|
|
31205
|
+
}, t2.utf32ToString = function(e3, t3 = 0, i2 = e3.length) {
|
|
31206
|
+
let s2 = "";
|
|
31207
|
+
for (let r2 = t3; r2 < i2; ++r2) {
|
|
31208
|
+
let t4 = e3[r2];
|
|
31209
|
+
t4 > 65535 ? (t4 -= 65536, s2 += String.fromCharCode(55296 + (t4 >> 10)) + String.fromCharCode(t4 % 1024 + 56320)) : s2 += String.fromCharCode(t4);
|
|
31210
|
+
}
|
|
31211
|
+
return s2;
|
|
31212
|
+
}, t2.StringToUtf32 = class {
|
|
31213
|
+
constructor() {
|
|
31214
|
+
this._interim = 0;
|
|
31215
|
+
}
|
|
31216
|
+
clear() {
|
|
31217
|
+
this._interim = 0;
|
|
31218
|
+
}
|
|
31219
|
+
decode(e3, t3) {
|
|
31220
|
+
const i2 = e3.length;
|
|
31221
|
+
if (!i2) return 0;
|
|
31222
|
+
let s2 = 0, r2 = 0;
|
|
31223
|
+
if (this._interim) {
|
|
31224
|
+
const i3 = e3.charCodeAt(r2++);
|
|
31225
|
+
56320 <= i3 && i3 <= 57343 ? t3[s2++] = 1024 * (this._interim - 55296) + i3 - 56320 + 65536 : (t3[s2++] = this._interim, t3[s2++] = i3), this._interim = 0;
|
|
31226
|
+
}
|
|
31227
|
+
for (let n3 = r2; n3 < i2; ++n3) {
|
|
31228
|
+
const r3 = e3.charCodeAt(n3);
|
|
31229
|
+
if (55296 <= r3 && r3 <= 56319) {
|
|
31230
|
+
if (++n3 >= i2) return this._interim = r3, s2;
|
|
31231
|
+
const a = e3.charCodeAt(n3);
|
|
31232
|
+
56320 <= a && a <= 57343 ? t3[s2++] = 1024 * (r3 - 55296) + a - 56320 + 65536 : (t3[s2++] = r3, t3[s2++] = a);
|
|
31233
|
+
} else 65279 !== r3 && (t3[s2++] = r3);
|
|
31234
|
+
}
|
|
31235
|
+
return s2;
|
|
31236
|
+
}
|
|
31237
|
+
}, t2.Utf8ToUtf32 = class {
|
|
31238
|
+
constructor() {
|
|
31239
|
+
this.interim = new Uint8Array(3);
|
|
31240
|
+
}
|
|
31241
|
+
clear() {
|
|
31242
|
+
this.interim.fill(0);
|
|
31243
|
+
}
|
|
31244
|
+
decode(e3, t3) {
|
|
31245
|
+
const i2 = e3.length;
|
|
31246
|
+
if (!i2) return 0;
|
|
31247
|
+
let s2, r2, n3, a, o = 0, h2 = 0, c = 0;
|
|
31248
|
+
if (this.interim[0]) {
|
|
31249
|
+
let s3 = false, r3 = this.interim[0];
|
|
31250
|
+
r3 &= 192 == (224 & r3) ? 31 : 224 == (240 & r3) ? 15 : 7;
|
|
31251
|
+
let n4, a2 = 0;
|
|
31252
|
+
for (; (n4 = 63 & this.interim[++a2]) && a2 < 4; ) r3 <<= 6, r3 |= n4;
|
|
31253
|
+
const h3 = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4, l2 = h3 - a2;
|
|
31254
|
+
for (; c < l2; ) {
|
|
31255
|
+
if (c >= i2) return 0;
|
|
31256
|
+
if (n4 = e3[c++], 128 != (192 & n4)) {
|
|
31257
|
+
c--, s3 = true;
|
|
31258
|
+
break;
|
|
31259
|
+
}
|
|
31260
|
+
this.interim[a2++] = n4, r3 <<= 6, r3 |= 63 & n4;
|
|
31261
|
+
}
|
|
31262
|
+
s3 || (2 === h3 ? r3 < 128 ? c-- : t3[o++] = r3 : 3 === h3 ? r3 < 2048 || r3 >= 55296 && r3 <= 57343 || 65279 === r3 || (t3[o++] = r3) : r3 < 65536 || r3 > 1114111 || (t3[o++] = r3)), this.interim.fill(0);
|
|
31263
|
+
}
|
|
31264
|
+
const l = i2 - 4;
|
|
31265
|
+
let _2 = c;
|
|
31266
|
+
for (; _2 < i2; ) {
|
|
31267
|
+
for (; !(!(_2 < l) || 128 & (s2 = e3[_2]) || 128 & (r2 = e3[_2 + 1]) || 128 & (n3 = e3[_2 + 2]) || 128 & (a = e3[_2 + 3])); ) t3[o++] = s2, t3[o++] = r2, t3[o++] = n3, t3[o++] = a, _2 += 4;
|
|
31268
|
+
if (s2 = e3[_2++], s2 < 128) t3[o++] = s2;
|
|
31269
|
+
else if (192 == (224 & s2)) {
|
|
31270
|
+
if (_2 >= i2) return this.interim[0] = s2, o;
|
|
31271
|
+
if (r2 = e3[_2++], 128 != (192 & r2)) {
|
|
31272
|
+
_2--;
|
|
31273
|
+
continue;
|
|
31274
|
+
}
|
|
31275
|
+
if (h2 = (31 & s2) << 6 | 63 & r2, h2 < 128) {
|
|
31276
|
+
_2--;
|
|
31277
|
+
continue;
|
|
31278
|
+
}
|
|
31279
|
+
t3[o++] = h2;
|
|
31280
|
+
} else if (224 == (240 & s2)) {
|
|
31281
|
+
if (_2 >= i2) return this.interim[0] = s2, o;
|
|
31282
|
+
if (r2 = e3[_2++], 128 != (192 & r2)) {
|
|
31283
|
+
_2--;
|
|
31284
|
+
continue;
|
|
31285
|
+
}
|
|
31286
|
+
if (_2 >= i2) return this.interim[0] = s2, this.interim[1] = r2, o;
|
|
31287
|
+
if (n3 = e3[_2++], 128 != (192 & n3)) {
|
|
31288
|
+
_2--;
|
|
31289
|
+
continue;
|
|
31290
|
+
}
|
|
31291
|
+
if (h2 = (15 & s2) << 12 | (63 & r2) << 6 | 63 & n3, h2 < 2048 || h2 >= 55296 && h2 <= 57343 || 65279 === h2) continue;
|
|
31292
|
+
t3[o++] = h2;
|
|
31293
|
+
} else if (240 == (248 & s2)) {
|
|
31294
|
+
if (_2 >= i2) return this.interim[0] = s2, o;
|
|
31295
|
+
if (r2 = e3[_2++], 128 != (192 & r2)) {
|
|
31296
|
+
_2--;
|
|
31297
|
+
continue;
|
|
31298
|
+
}
|
|
31299
|
+
if (_2 >= i2) return this.interim[0] = s2, this.interim[1] = r2, o;
|
|
31300
|
+
if (n3 = e3[_2++], 128 != (192 & n3)) {
|
|
31301
|
+
_2--;
|
|
31302
|
+
continue;
|
|
31303
|
+
}
|
|
31304
|
+
if (_2 >= i2) return this.interim[0] = s2, this.interim[1] = r2, this.interim[2] = n3, o;
|
|
31305
|
+
if (a = e3[_2++], 128 != (192 & a)) {
|
|
31306
|
+
_2--;
|
|
31307
|
+
continue;
|
|
31308
|
+
}
|
|
31309
|
+
if (h2 = (7 & s2) << 18 | (63 & r2) << 12 | (63 & n3) << 6 | 63 & a, h2 < 65536 || h2 > 1114111) continue;
|
|
31310
|
+
t3[o++] = h2;
|
|
31311
|
+
}
|
|
31312
|
+
}
|
|
31313
|
+
return o;
|
|
31314
|
+
}
|
|
31315
|
+
};
|
|
31316
|
+
}, 225: (e2, t2, i2) => {
|
|
31317
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeV6 = void 0;
|
|
31318
|
+
const s2 = i2(480), r2 = [[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]], n3 = [[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]];
|
|
31319
|
+
let a;
|
|
31320
|
+
t2.UnicodeV6 = class {
|
|
31321
|
+
constructor() {
|
|
31322
|
+
if (this.version = "6", !a) {
|
|
31323
|
+
a = new Uint8Array(65536), a.fill(1), a[0] = 0, a.fill(0, 1, 32), a.fill(0, 127, 160), a.fill(2, 4352, 4448), a[9001] = 2, a[9002] = 2, a.fill(2, 11904, 42192), a[12351] = 1, a.fill(2, 44032, 55204), a.fill(2, 63744, 64256), a.fill(2, 65040, 65050), a.fill(2, 65072, 65136), a.fill(2, 65280, 65377), a.fill(2, 65504, 65511);
|
|
31324
|
+
for (let e3 = 0; e3 < r2.length; ++e3) a.fill(0, r2[e3][0], r2[e3][1] + 1);
|
|
31325
|
+
}
|
|
31326
|
+
}
|
|
31327
|
+
wcwidth(e3) {
|
|
31328
|
+
return e3 < 32 ? 0 : e3 < 127 ? 1 : e3 < 65536 ? a[e3] : (function(e4, t3) {
|
|
31329
|
+
let i3, s3 = 0, r3 = t3.length - 1;
|
|
31330
|
+
if (e4 < t3[0][0] || e4 > t3[r3][1]) return false;
|
|
31331
|
+
for (; r3 >= s3; ) if (i3 = s3 + r3 >> 1, e4 > t3[i3][1]) s3 = i3 + 1;
|
|
31332
|
+
else {
|
|
31333
|
+
if (!(e4 < t3[i3][0])) return true;
|
|
31334
|
+
r3 = i3 - 1;
|
|
31335
|
+
}
|
|
31336
|
+
return false;
|
|
31337
|
+
})(e3, n3) ? 0 : e3 >= 131072 && e3 <= 196605 || e3 >= 196608 && e3 <= 262141 ? 2 : 1;
|
|
31338
|
+
}
|
|
31339
|
+
charProperties(e3, t3) {
|
|
31340
|
+
let i3 = this.wcwidth(e3), r3 = 0 === i3 && 0 !== t3;
|
|
31341
|
+
if (r3) {
|
|
31342
|
+
const e4 = s2.UnicodeService.extractWidth(t3);
|
|
31343
|
+
0 === e4 ? r3 = false : e4 > i3 && (i3 = e4);
|
|
31344
|
+
}
|
|
31345
|
+
return s2.UnicodeService.createPropertyValue(0, i3, r3);
|
|
31346
|
+
}
|
|
31347
|
+
};
|
|
31348
|
+
}, 981: (e2, t2, i2) => {
|
|
31349
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.WriteBuffer = void 0;
|
|
31350
|
+
const s2 = i2(460), r2 = i2(844);
|
|
31351
|
+
class n3 extends r2.Disposable {
|
|
31352
|
+
constructor(e3) {
|
|
31353
|
+
super(), this._action = e3, this._writeBuffer = [], this._callbacks = [], this._pendingData = 0, this._bufferOffset = 0, this._isSyncWriting = false, this._syncCalls = 0, this._didUserInput = false, this._onWriteParsed = this.register(new s2.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event;
|
|
31354
|
+
}
|
|
31355
|
+
handleUserInput() {
|
|
31356
|
+
this._didUserInput = true;
|
|
31357
|
+
}
|
|
31358
|
+
writeSync(e3, t3) {
|
|
31359
|
+
if (void 0 !== t3 && this._syncCalls > t3) return void (this._syncCalls = 0);
|
|
31360
|
+
if (this._pendingData += e3.length, this._writeBuffer.push(e3), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting) return;
|
|
31361
|
+
let i3;
|
|
31362
|
+
for (this._isSyncWriting = true; i3 = this._writeBuffer.shift(); ) {
|
|
31363
|
+
this._action(i3);
|
|
31364
|
+
const e4 = this._callbacks.shift();
|
|
31365
|
+
e4 && e4();
|
|
31366
|
+
}
|
|
31367
|
+
this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = false, this._syncCalls = 0;
|
|
31368
|
+
}
|
|
31369
|
+
write(e3, t3) {
|
|
31370
|
+
if (this._pendingData > 5e7) throw new Error("write data discarded, use flow control to avoid losing data");
|
|
31371
|
+
if (!this._writeBuffer.length) {
|
|
31372
|
+
if (this._bufferOffset = 0, this._didUserInput) return this._didUserInput = false, this._pendingData += e3.length, this._writeBuffer.push(e3), this._callbacks.push(t3), void this._innerWrite();
|
|
31373
|
+
setTimeout((() => this._innerWrite()));
|
|
31374
|
+
}
|
|
31375
|
+
this._pendingData += e3.length, this._writeBuffer.push(e3), this._callbacks.push(t3);
|
|
31376
|
+
}
|
|
31377
|
+
_innerWrite(e3 = 0, t3 = true) {
|
|
31378
|
+
const i3 = e3 || Date.now();
|
|
31379
|
+
for (; this._writeBuffer.length > this._bufferOffset; ) {
|
|
31380
|
+
const e4 = this._writeBuffer[this._bufferOffset], s3 = this._action(e4, t3);
|
|
31381
|
+
if (s3) {
|
|
31382
|
+
const e5 = (e6) => Date.now() - i3 >= 12 ? setTimeout((() => this._innerWrite(0, e6))) : this._innerWrite(i3, e6);
|
|
31383
|
+
return void s3.catch(((e6) => (queueMicrotask((() => {
|
|
31384
|
+
throw e6;
|
|
31385
|
+
})), Promise.resolve(false)))).then(e5);
|
|
31386
|
+
}
|
|
31387
|
+
const r3 = this._callbacks[this._bufferOffset];
|
|
31388
|
+
if (r3 && r3(), this._bufferOffset++, this._pendingData -= e4.length, Date.now() - i3 >= 12) break;
|
|
31389
|
+
}
|
|
31390
|
+
this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > 50 && (this._writeBuffer = this._writeBuffer.slice(this._bufferOffset), this._callbacks = this._callbacks.slice(this._bufferOffset), this._bufferOffset = 0), setTimeout((() => this._innerWrite()))) : (this._writeBuffer.length = 0, this._callbacks.length = 0, this._pendingData = 0, this._bufferOffset = 0), this._onWriteParsed.fire();
|
|
31391
|
+
}
|
|
31392
|
+
}
|
|
31393
|
+
t2.WriteBuffer = n3;
|
|
31394
|
+
}, 941: (e2, t2) => {
|
|
31395
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.toRgbString = t2.parseColor = void 0;
|
|
31396
|
+
const i2 = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, s2 = /^[\da-f]+$/;
|
|
31397
|
+
function r2(e3, t3) {
|
|
31398
|
+
const i3 = e3.toString(16), s3 = i3.length < 2 ? "0" + i3 : i3;
|
|
31399
|
+
switch (t3) {
|
|
31400
|
+
case 4:
|
|
31401
|
+
return i3[0];
|
|
31402
|
+
case 8:
|
|
31403
|
+
return s3;
|
|
31404
|
+
case 12:
|
|
31405
|
+
return (s3 + s3).slice(0, 3);
|
|
31406
|
+
default:
|
|
31407
|
+
return s3 + s3;
|
|
31408
|
+
}
|
|
31409
|
+
}
|
|
31410
|
+
t2.parseColor = function(e3) {
|
|
31411
|
+
if (!e3) return;
|
|
31412
|
+
let t3 = e3.toLowerCase();
|
|
31413
|
+
if (0 === t3.indexOf("rgb:")) {
|
|
31414
|
+
t3 = t3.slice(4);
|
|
31415
|
+
const e4 = i2.exec(t3);
|
|
31416
|
+
if (e4) {
|
|
31417
|
+
const t4 = e4[1] ? 15 : e4[4] ? 255 : e4[7] ? 4095 : 65535;
|
|
31418
|
+
return [Math.round(parseInt(e4[1] || e4[4] || e4[7] || e4[10], 16) / t4 * 255), Math.round(parseInt(e4[2] || e4[5] || e4[8] || e4[11], 16) / t4 * 255), Math.round(parseInt(e4[3] || e4[6] || e4[9] || e4[12], 16) / t4 * 255)];
|
|
31419
|
+
}
|
|
31420
|
+
} else if (0 === t3.indexOf("#") && (t3 = t3.slice(1), s2.exec(t3) && [3, 6, 9, 12].includes(t3.length))) {
|
|
31421
|
+
const e4 = t3.length / 3, i3 = [0, 0, 0];
|
|
31422
|
+
for (let s3 = 0; s3 < 3; ++s3) {
|
|
31423
|
+
const r3 = parseInt(t3.slice(e4 * s3, e4 * s3 + e4), 16);
|
|
31424
|
+
i3[s3] = 1 === e4 ? r3 << 4 : 2 === e4 ? r3 : 3 === e4 ? r3 >> 4 : r3 >> 8;
|
|
31425
|
+
}
|
|
31426
|
+
return i3;
|
|
31427
|
+
}
|
|
31428
|
+
}, t2.toRgbString = function(e3, t3 = 16) {
|
|
31429
|
+
const [i3, s3, n3] = e3;
|
|
31430
|
+
return `rgb:${r2(i3, t3)}/${r2(s3, t3)}/${r2(n3, t3)}`;
|
|
31431
|
+
};
|
|
31432
|
+
}, 770: (e2, t2) => {
|
|
31433
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.PAYLOAD_LIMIT = void 0, t2.PAYLOAD_LIMIT = 1e7;
|
|
31434
|
+
}, 351: (e2, t2, i2) => {
|
|
31435
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.DcsHandler = t2.DcsParser = void 0;
|
|
31436
|
+
const s2 = i2(482), r2 = i2(742), n3 = i2(770), a = [];
|
|
31437
|
+
t2.DcsParser = class {
|
|
31438
|
+
constructor() {
|
|
31439
|
+
this._handlers = /* @__PURE__ */ Object.create(null), this._active = a, this._ident = 0, this._handlerFb = () => {
|
|
31440
|
+
}, this._stack = { paused: false, loopPosition: 0, fallThrough: false };
|
|
31441
|
+
}
|
|
31442
|
+
dispose() {
|
|
31443
|
+
this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
|
31444
|
+
}, this._active = a;
|
|
31445
|
+
}
|
|
31446
|
+
registerHandler(e3, t3) {
|
|
31447
|
+
void 0 === this._handlers[e3] && (this._handlers[e3] = []);
|
|
31448
|
+
const i3 = this._handlers[e3];
|
|
31449
|
+
return i3.push(t3), { dispose: () => {
|
|
31450
|
+
const e4 = i3.indexOf(t3);
|
|
31451
|
+
-1 !== e4 && i3.splice(e4, 1);
|
|
31452
|
+
} };
|
|
31453
|
+
}
|
|
31454
|
+
clearHandler(e3) {
|
|
31455
|
+
this._handlers[e3] && delete this._handlers[e3];
|
|
31456
|
+
}
|
|
31457
|
+
setHandlerFallback(e3) {
|
|
31458
|
+
this._handlerFb = e3;
|
|
31459
|
+
}
|
|
31460
|
+
reset() {
|
|
31461
|
+
if (this._active.length) for (let e3 = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e3 >= 0; --e3) this._active[e3].unhook(false);
|
|
31462
|
+
this._stack.paused = false, this._active = a, this._ident = 0;
|
|
31463
|
+
}
|
|
31464
|
+
hook(e3, t3) {
|
|
31465
|
+
if (this.reset(), this._ident = e3, this._active = this._handlers[e3] || a, this._active.length) for (let e4 = this._active.length - 1; e4 >= 0; e4--) this._active[e4].hook(t3);
|
|
31466
|
+
else this._handlerFb(this._ident, "HOOK", t3);
|
|
31467
|
+
}
|
|
31468
|
+
put(e3, t3, i3) {
|
|
31469
|
+
if (this._active.length) for (let s3 = this._active.length - 1; s3 >= 0; s3--) this._active[s3].put(e3, t3, i3);
|
|
31470
|
+
else this._handlerFb(this._ident, "PUT", (0, s2.utf32ToString)(e3, t3, i3));
|
|
31471
|
+
}
|
|
31472
|
+
unhook(e3, t3 = true) {
|
|
31473
|
+
if (this._active.length) {
|
|
31474
|
+
let i3 = false, s3 = this._active.length - 1, r3 = false;
|
|
31475
|
+
if (this._stack.paused && (s3 = this._stack.loopPosition - 1, i3 = t3, r3 = this._stack.fallThrough, this._stack.paused = false), !r3 && false === i3) {
|
|
31476
|
+
for (; s3 >= 0 && (i3 = this._active[s3].unhook(e3), true !== i3); s3--) if (i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = false, i3;
|
|
31477
|
+
s3--;
|
|
31478
|
+
}
|
|
31479
|
+
for (; s3 >= 0; s3--) if (i3 = this._active[s3].unhook(false), i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = true, i3;
|
|
31480
|
+
} else this._handlerFb(this._ident, "UNHOOK", e3);
|
|
31481
|
+
this._active = a, this._ident = 0;
|
|
31482
|
+
}
|
|
31483
|
+
};
|
|
31484
|
+
const o = new r2.Params();
|
|
31485
|
+
o.addParam(0), t2.DcsHandler = class {
|
|
31486
|
+
constructor(e3) {
|
|
31487
|
+
this._handler = e3, this._data = "", this._params = o, this._hitLimit = false;
|
|
31488
|
+
}
|
|
31489
|
+
hook(e3) {
|
|
31490
|
+
this._params = e3.length > 1 || e3.params[0] ? e3.clone() : o, this._data = "", this._hitLimit = false;
|
|
31491
|
+
}
|
|
31492
|
+
put(e3, t3, i3) {
|
|
31493
|
+
this._hitLimit || (this._data += (0, s2.utf32ToString)(e3, t3, i3), this._data.length > n3.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = true));
|
|
31494
|
+
}
|
|
31495
|
+
unhook(e3) {
|
|
31496
|
+
let t3 = false;
|
|
31497
|
+
if (this._hitLimit) t3 = false;
|
|
31498
|
+
else if (e3 && (t3 = this._handler(this._data, this._params), t3 instanceof Promise)) return t3.then(((e4) => (this._params = o, this._data = "", this._hitLimit = false, e4)));
|
|
31499
|
+
return this._params = o, this._data = "", this._hitLimit = false, t3;
|
|
31500
|
+
}
|
|
31501
|
+
};
|
|
31502
|
+
}, 15: (e2, t2, i2) => {
|
|
31503
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.EscapeSequenceParser = t2.VT500_TRANSITION_TABLE = t2.TransitionTable = void 0;
|
|
31504
|
+
const s2 = i2(844), r2 = i2(742), n3 = i2(242), a = i2(351);
|
|
31505
|
+
class o {
|
|
31506
|
+
constructor(e3) {
|
|
31507
|
+
this.table = new Uint8Array(e3);
|
|
31508
|
+
}
|
|
31509
|
+
setDefault(e3, t3) {
|
|
31510
|
+
this.table.fill(e3 << 4 | t3);
|
|
31511
|
+
}
|
|
31512
|
+
add(e3, t3, i3, s3) {
|
|
31513
|
+
this.table[t3 << 8 | e3] = i3 << 4 | s3;
|
|
31514
|
+
}
|
|
31515
|
+
addMany(e3, t3, i3, s3) {
|
|
31516
|
+
for (let r3 = 0; r3 < e3.length; r3++) this.table[t3 << 8 | e3[r3]] = i3 << 4 | s3;
|
|
31517
|
+
}
|
|
31518
|
+
}
|
|
31519
|
+
t2.TransitionTable = o;
|
|
31520
|
+
const h2 = 160;
|
|
31521
|
+
t2.VT500_TRANSITION_TABLE = (function() {
|
|
31522
|
+
const e3 = new o(4095), t3 = Array.apply(null, Array(256)).map(((e4, t4) => t4)), i3 = (e4, i4) => t3.slice(e4, i4), s3 = i3(32, 127), r3 = i3(0, 24);
|
|
31523
|
+
r3.push(25), r3.push.apply(r3, i3(28, 32));
|
|
31524
|
+
const n4 = i3(0, 14);
|
|
31525
|
+
let a2;
|
|
31526
|
+
for (a2 in e3.setDefault(1, 0), e3.addMany(s3, 0, 2, 0), n4) e3.addMany([24, 26, 153, 154], a2, 3, 0), e3.addMany(i3(128, 144), a2, 3, 0), e3.addMany(i3(144, 152), a2, 3, 0), e3.add(156, a2, 0, 0), e3.add(27, a2, 11, 1), e3.add(157, a2, 4, 8), e3.addMany([152, 158, 159], a2, 0, 7), e3.add(155, a2, 11, 3), e3.add(144, a2, 11, 9);
|
|
31527
|
+
return e3.addMany(r3, 0, 3, 0), e3.addMany(r3, 1, 3, 1), e3.add(127, 1, 0, 1), e3.addMany(r3, 8, 0, 8), e3.addMany(r3, 3, 3, 3), e3.add(127, 3, 0, 3), e3.addMany(r3, 4, 3, 4), e3.add(127, 4, 0, 4), e3.addMany(r3, 6, 3, 6), e3.addMany(r3, 5, 3, 5), e3.add(127, 5, 0, 5), e3.addMany(r3, 2, 3, 2), e3.add(127, 2, 0, 2), e3.add(93, 1, 4, 8), e3.addMany(s3, 8, 5, 8), e3.add(127, 8, 5, 8), e3.addMany([156, 27, 24, 26, 7], 8, 6, 0), e3.addMany(i3(28, 32), 8, 0, 8), e3.addMany([88, 94, 95], 1, 0, 7), e3.addMany(s3, 7, 0, 7), e3.addMany(r3, 7, 0, 7), e3.add(156, 7, 0, 0), e3.add(127, 7, 0, 7), e3.add(91, 1, 11, 3), e3.addMany(i3(64, 127), 3, 7, 0), e3.addMany(i3(48, 60), 3, 8, 4), e3.addMany([60, 61, 62, 63], 3, 9, 4), e3.addMany(i3(48, 60), 4, 8, 4), e3.addMany(i3(64, 127), 4, 7, 0), e3.addMany([60, 61, 62, 63], 4, 0, 6), e3.addMany(i3(32, 64), 6, 0, 6), e3.add(127, 6, 0, 6), e3.addMany(i3(64, 127), 6, 0, 0), e3.addMany(i3(32, 48), 3, 9, 5), e3.addMany(i3(32, 48), 5, 9, 5), e3.addMany(i3(48, 64), 5, 0, 6), e3.addMany(i3(64, 127), 5, 7, 0), e3.addMany(i3(32, 48), 4, 9, 5), e3.addMany(i3(32, 48), 1, 9, 2), e3.addMany(i3(32, 48), 2, 9, 2), e3.addMany(i3(48, 127), 2, 10, 0), e3.addMany(i3(48, 80), 1, 10, 0), e3.addMany(i3(81, 88), 1, 10, 0), e3.addMany([89, 90, 92], 1, 10, 0), e3.addMany(i3(96, 127), 1, 10, 0), e3.add(80, 1, 11, 9), e3.addMany(r3, 9, 0, 9), e3.add(127, 9, 0, 9), e3.addMany(i3(28, 32), 9, 0, 9), e3.addMany(i3(32, 48), 9, 9, 12), e3.addMany(i3(48, 60), 9, 8, 10), e3.addMany([60, 61, 62, 63], 9, 9, 10), e3.addMany(r3, 11, 0, 11), e3.addMany(i3(32, 128), 11, 0, 11), e3.addMany(i3(28, 32), 11, 0, 11), e3.addMany(r3, 10, 0, 10), e3.add(127, 10, 0, 10), e3.addMany(i3(28, 32), 10, 0, 10), e3.addMany(i3(48, 60), 10, 8, 10), e3.addMany([60, 61, 62, 63], 10, 0, 11), e3.addMany(i3(32, 48), 10, 9, 12), e3.addMany(r3, 12, 0, 12), e3.add(127, 12, 0, 12), e3.addMany(i3(28, 32), 12, 0, 12), e3.addMany(i3(32, 48), 12, 9, 12), e3.addMany(i3(48, 64), 12, 0, 11), e3.addMany(i3(64, 127), 12, 12, 13), e3.addMany(i3(64, 127), 10, 12, 13), e3.addMany(i3(64, 127), 9, 12, 13), e3.addMany(r3, 13, 13, 13), e3.addMany(s3, 13, 13, 13), e3.add(127, 13, 0, 13), e3.addMany([27, 156, 24, 26], 13, 14, 0), e3.add(h2, 0, 2, 0), e3.add(h2, 8, 5, 8), e3.add(h2, 6, 0, 6), e3.add(h2, 11, 0, 11), e3.add(h2, 13, 13, 13), e3;
|
|
31528
|
+
})();
|
|
31529
|
+
class c extends s2.Disposable {
|
|
31530
|
+
constructor(e3 = t2.VT500_TRANSITION_TABLE) {
|
|
31531
|
+
super(), this._transitions = e3, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new r2.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (e4, t3, i3) => {
|
|
31532
|
+
}, this._executeHandlerFb = (e4) => {
|
|
31533
|
+
}, this._csiHandlerFb = (e4, t3) => {
|
|
31534
|
+
}, this._escHandlerFb = (e4) => {
|
|
31535
|
+
}, this._errorHandlerFb = (e4) => e4, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this.register((0, s2.toDisposable)((() => {
|
|
31536
|
+
this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null);
|
|
31537
|
+
}))), this._oscParser = this.register(new n3.OscParser()), this._dcsParser = this.register(new a.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, (() => true));
|
|
31538
|
+
}
|
|
31539
|
+
_identifier(e3, t3 = [64, 126]) {
|
|
31540
|
+
let i3 = 0;
|
|
31541
|
+
if (e3.prefix) {
|
|
31542
|
+
if (e3.prefix.length > 1) throw new Error("only one byte as prefix supported");
|
|
31543
|
+
if (i3 = e3.prefix.charCodeAt(0), i3 && 60 > i3 || i3 > 63) throw new Error("prefix must be in range 0x3c .. 0x3f");
|
|
31544
|
+
}
|
|
31545
|
+
if (e3.intermediates) {
|
|
31546
|
+
if (e3.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
|
|
31547
|
+
for (let t4 = 0; t4 < e3.intermediates.length; ++t4) {
|
|
31548
|
+
const s4 = e3.intermediates.charCodeAt(t4);
|
|
31549
|
+
if (32 > s4 || s4 > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
|
|
31550
|
+
i3 <<= 8, i3 |= s4;
|
|
31551
|
+
}
|
|
31552
|
+
}
|
|
31553
|
+
if (1 !== e3.final.length) throw new Error("final must be a single byte");
|
|
31554
|
+
const s3 = e3.final.charCodeAt(0);
|
|
31555
|
+
if (t3[0] > s3 || s3 > t3[1]) throw new Error(`final must be in range ${t3[0]} .. ${t3[1]}`);
|
|
31556
|
+
return i3 <<= 8, i3 |= s3, i3;
|
|
31557
|
+
}
|
|
31558
|
+
identToString(e3) {
|
|
31559
|
+
const t3 = [];
|
|
31560
|
+
for (; e3; ) t3.push(String.fromCharCode(255 & e3)), e3 >>= 8;
|
|
31561
|
+
return t3.reverse().join("");
|
|
31562
|
+
}
|
|
31563
|
+
setPrintHandler(e3) {
|
|
31564
|
+
this._printHandler = e3;
|
|
31565
|
+
}
|
|
31566
|
+
clearPrintHandler() {
|
|
31567
|
+
this._printHandler = this._printHandlerFb;
|
|
31568
|
+
}
|
|
31569
|
+
registerEscHandler(e3, t3) {
|
|
31570
|
+
const i3 = this._identifier(e3, [48, 126]);
|
|
31571
|
+
void 0 === this._escHandlers[i3] && (this._escHandlers[i3] = []);
|
|
31572
|
+
const s3 = this._escHandlers[i3];
|
|
31573
|
+
return s3.push(t3), { dispose: () => {
|
|
31574
|
+
const e4 = s3.indexOf(t3);
|
|
31575
|
+
-1 !== e4 && s3.splice(e4, 1);
|
|
31576
|
+
} };
|
|
31577
|
+
}
|
|
31578
|
+
clearEscHandler(e3) {
|
|
31579
|
+
this._escHandlers[this._identifier(e3, [48, 126])] && delete this._escHandlers[this._identifier(e3, [48, 126])];
|
|
31580
|
+
}
|
|
31581
|
+
setEscHandlerFallback(e3) {
|
|
31582
|
+
this._escHandlerFb = e3;
|
|
31583
|
+
}
|
|
31584
|
+
setExecuteHandler(e3, t3) {
|
|
31585
|
+
this._executeHandlers[e3.charCodeAt(0)] = t3;
|
|
31586
|
+
}
|
|
31587
|
+
clearExecuteHandler(e3) {
|
|
31588
|
+
this._executeHandlers[e3.charCodeAt(0)] && delete this._executeHandlers[e3.charCodeAt(0)];
|
|
31589
|
+
}
|
|
31590
|
+
setExecuteHandlerFallback(e3) {
|
|
31591
|
+
this._executeHandlerFb = e3;
|
|
31592
|
+
}
|
|
31593
|
+
registerCsiHandler(e3, t3) {
|
|
31594
|
+
const i3 = this._identifier(e3);
|
|
31595
|
+
void 0 === this._csiHandlers[i3] && (this._csiHandlers[i3] = []);
|
|
31596
|
+
const s3 = this._csiHandlers[i3];
|
|
31597
|
+
return s3.push(t3), { dispose: () => {
|
|
31598
|
+
const e4 = s3.indexOf(t3);
|
|
31599
|
+
-1 !== e4 && s3.splice(e4, 1);
|
|
31600
|
+
} };
|
|
31601
|
+
}
|
|
31602
|
+
clearCsiHandler(e3) {
|
|
31603
|
+
this._csiHandlers[this._identifier(e3)] && delete this._csiHandlers[this._identifier(e3)];
|
|
31604
|
+
}
|
|
31605
|
+
setCsiHandlerFallback(e3) {
|
|
31606
|
+
this._csiHandlerFb = e3;
|
|
31607
|
+
}
|
|
31608
|
+
registerDcsHandler(e3, t3) {
|
|
31609
|
+
return this._dcsParser.registerHandler(this._identifier(e3), t3);
|
|
31610
|
+
}
|
|
31611
|
+
clearDcsHandler(e3) {
|
|
31612
|
+
this._dcsParser.clearHandler(this._identifier(e3));
|
|
31613
|
+
}
|
|
31614
|
+
setDcsHandlerFallback(e3) {
|
|
31615
|
+
this._dcsParser.setHandlerFallback(e3);
|
|
31616
|
+
}
|
|
31617
|
+
registerOscHandler(e3, t3) {
|
|
31618
|
+
return this._oscParser.registerHandler(e3, t3);
|
|
31619
|
+
}
|
|
31620
|
+
clearOscHandler(e3) {
|
|
31621
|
+
this._oscParser.clearHandler(e3);
|
|
31622
|
+
}
|
|
31623
|
+
setOscHandlerFallback(e3) {
|
|
31624
|
+
this._oscParser.setHandlerFallback(e3);
|
|
31625
|
+
}
|
|
31626
|
+
setErrorHandler(e3) {
|
|
31627
|
+
this._errorHandler = e3;
|
|
31628
|
+
}
|
|
31629
|
+
clearErrorHandler() {
|
|
31630
|
+
this._errorHandler = this._errorHandlerFb;
|
|
31631
|
+
}
|
|
31632
|
+
reset() {
|
|
31633
|
+
this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, 0 !== this._parseStack.state && (this._parseStack.state = 2, this._parseStack.handlers = []);
|
|
31634
|
+
}
|
|
31635
|
+
_preserveStack(e3, t3, i3, s3, r3) {
|
|
31636
|
+
this._parseStack.state = e3, this._parseStack.handlers = t3, this._parseStack.handlerPos = i3, this._parseStack.transition = s3, this._parseStack.chunkPos = r3;
|
|
31637
|
+
}
|
|
31638
|
+
parse(e3, t3, i3) {
|
|
31639
|
+
let s3, r3 = 0, n4 = 0, a2 = 0;
|
|
31640
|
+
if (this._parseStack.state) if (2 === this._parseStack.state) this._parseStack.state = 0, a2 = this._parseStack.chunkPos + 1;
|
|
31641
|
+
else {
|
|
31642
|
+
if (void 0 === i3 || 1 === this._parseStack.state) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
|
|
31643
|
+
const t4 = this._parseStack.handlers;
|
|
31644
|
+
let n5 = this._parseStack.handlerPos - 1;
|
|
31645
|
+
switch (this._parseStack.state) {
|
|
31646
|
+
case 3:
|
|
31647
|
+
if (false === i3 && n5 > -1) {
|
|
31648
|
+
for (; n5 >= 0 && (s3 = t4[n5](this._params), true !== s3); n5--) if (s3 instanceof Promise) return this._parseStack.handlerPos = n5, s3;
|
|
31649
|
+
}
|
|
31650
|
+
this._parseStack.handlers = [];
|
|
31651
|
+
break;
|
|
31652
|
+
case 4:
|
|
31653
|
+
if (false === i3 && n5 > -1) {
|
|
31654
|
+
for (; n5 >= 0 && (s3 = t4[n5](), true !== s3); n5--) if (s3 instanceof Promise) return this._parseStack.handlerPos = n5, s3;
|
|
31655
|
+
}
|
|
31656
|
+
this._parseStack.handlers = [];
|
|
31657
|
+
break;
|
|
31658
|
+
case 6:
|
|
31659
|
+
if (r3 = e3[this._parseStack.chunkPos], s3 = this._dcsParser.unhook(24 !== r3 && 26 !== r3, i3), s3) return s3;
|
|
31660
|
+
27 === r3 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
31661
|
+
break;
|
|
31662
|
+
case 5:
|
|
31663
|
+
if (r3 = e3[this._parseStack.chunkPos], s3 = this._oscParser.end(24 !== r3 && 26 !== r3, i3), s3) return s3;
|
|
31664
|
+
27 === r3 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
31665
|
+
}
|
|
31666
|
+
this._parseStack.state = 0, a2 = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
|
|
31667
|
+
}
|
|
31668
|
+
for (let i4 = a2; i4 < t3; ++i4) {
|
|
31669
|
+
switch (r3 = e3[i4], n4 = this._transitions.table[this.currentState << 8 | (r3 < 160 ? r3 : h2)], n4 >> 4) {
|
|
31670
|
+
case 2:
|
|
31671
|
+
for (let s4 = i4 + 1; ; ++s4) {
|
|
31672
|
+
if (s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h2) {
|
|
31673
|
+
this._printHandler(e3, i4, s4), i4 = s4 - 1;
|
|
31674
|
+
break;
|
|
31675
|
+
}
|
|
31676
|
+
if (++s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h2) {
|
|
31677
|
+
this._printHandler(e3, i4, s4), i4 = s4 - 1;
|
|
31678
|
+
break;
|
|
31679
|
+
}
|
|
31680
|
+
if (++s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h2) {
|
|
31681
|
+
this._printHandler(e3, i4, s4), i4 = s4 - 1;
|
|
31682
|
+
break;
|
|
31683
|
+
}
|
|
31684
|
+
if (++s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 126 && r3 < h2) {
|
|
31685
|
+
this._printHandler(e3, i4, s4), i4 = s4 - 1;
|
|
31686
|
+
break;
|
|
31687
|
+
}
|
|
31688
|
+
}
|
|
31689
|
+
break;
|
|
31690
|
+
case 3:
|
|
31691
|
+
this._executeHandlers[r3] ? this._executeHandlers[r3]() : this._executeHandlerFb(r3), this.precedingJoinState = 0;
|
|
31692
|
+
break;
|
|
31693
|
+
case 0:
|
|
31694
|
+
break;
|
|
31695
|
+
case 1:
|
|
31696
|
+
if (this._errorHandler({ position: i4, code: r3, currentState: this.currentState, collect: this._collect, params: this._params, abort: false }).abort) return;
|
|
31697
|
+
break;
|
|
31698
|
+
case 7:
|
|
31699
|
+
const a3 = this._csiHandlers[this._collect << 8 | r3];
|
|
31700
|
+
let o2 = a3 ? a3.length - 1 : -1;
|
|
31701
|
+
for (; o2 >= 0 && (s3 = a3[o2](this._params), true !== s3); o2--) if (s3 instanceof Promise) return this._preserveStack(3, a3, o2, n4, i4), s3;
|
|
31702
|
+
o2 < 0 && this._csiHandlerFb(this._collect << 8 | r3, this._params), this.precedingJoinState = 0;
|
|
31703
|
+
break;
|
|
31704
|
+
case 8:
|
|
31705
|
+
do {
|
|
31706
|
+
switch (r3) {
|
|
31707
|
+
case 59:
|
|
31708
|
+
this._params.addParam(0);
|
|
31709
|
+
break;
|
|
31710
|
+
case 58:
|
|
31711
|
+
this._params.addSubParam(-1);
|
|
31712
|
+
break;
|
|
31713
|
+
default:
|
|
31714
|
+
this._params.addDigit(r3 - 48);
|
|
31715
|
+
}
|
|
31716
|
+
} while (++i4 < t3 && (r3 = e3[i4]) > 47 && r3 < 60);
|
|
31717
|
+
i4--;
|
|
31718
|
+
break;
|
|
31719
|
+
case 9:
|
|
31720
|
+
this._collect <<= 8, this._collect |= r3;
|
|
31721
|
+
break;
|
|
31722
|
+
case 10:
|
|
31723
|
+
const c2 = this._escHandlers[this._collect << 8 | r3];
|
|
31724
|
+
let l = c2 ? c2.length - 1 : -1;
|
|
31725
|
+
for (; l >= 0 && (s3 = c2[l](), true !== s3); l--) if (s3 instanceof Promise) return this._preserveStack(4, c2, l, n4, i4), s3;
|
|
31726
|
+
l < 0 && this._escHandlerFb(this._collect << 8 | r3), this.precedingJoinState = 0;
|
|
31727
|
+
break;
|
|
31728
|
+
case 11:
|
|
31729
|
+
this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
31730
|
+
break;
|
|
31731
|
+
case 12:
|
|
31732
|
+
this._dcsParser.hook(this._collect << 8 | r3, this._params);
|
|
31733
|
+
break;
|
|
31734
|
+
case 13:
|
|
31735
|
+
for (let s4 = i4 + 1; ; ++s4) if (s4 >= t3 || 24 === (r3 = e3[s4]) || 26 === r3 || 27 === r3 || r3 > 127 && r3 < h2) {
|
|
31736
|
+
this._dcsParser.put(e3, i4, s4), i4 = s4 - 1;
|
|
31737
|
+
break;
|
|
31738
|
+
}
|
|
31739
|
+
break;
|
|
31740
|
+
case 14:
|
|
31741
|
+
if (s3 = this._dcsParser.unhook(24 !== r3 && 26 !== r3), s3) return this._preserveStack(6, [], 0, n4, i4), s3;
|
|
31742
|
+
27 === r3 && (n4 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
|
31743
|
+
break;
|
|
31744
|
+
case 4:
|
|
31745
|
+
this._oscParser.start();
|
|
31746
|
+
break;
|
|
31747
|
+
case 5:
|
|
31748
|
+
for (let s4 = i4 + 1; ; s4++) if (s4 >= t3 || (r3 = e3[s4]) < 32 || r3 > 127 && r3 < h2) {
|
|
31749
|
+
this._oscParser.put(e3, i4, s4), i4 = s4 - 1;
|
|
31750
|
+
break;
|
|
31751
|
+
}
|
|
31752
|
+
break;
|
|
31753
|
+
case 6:
|
|
31754
|
+
if (s3 = this._oscParser.end(24 !== r3 && 26 !== r3), s3) return this._preserveStack(5, [], 0, n4, i4), s3;
|
|
31755
|
+
27 === r3 && (n4 |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
|
31756
|
+
}
|
|
31757
|
+
this.currentState = 15 & n4;
|
|
31758
|
+
}
|
|
31759
|
+
}
|
|
31760
|
+
}
|
|
31761
|
+
t2.EscapeSequenceParser = c;
|
|
31762
|
+
}, 242: (e2, t2, i2) => {
|
|
31763
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.OscHandler = t2.OscParser = void 0;
|
|
31764
|
+
const s2 = i2(770), r2 = i2(482), n3 = [];
|
|
31765
|
+
t2.OscParser = class {
|
|
31766
|
+
constructor() {
|
|
31767
|
+
this._state = 0, this._active = n3, this._id = -1, this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
|
31768
|
+
}, this._stack = { paused: false, loopPosition: 0, fallThrough: false };
|
|
31769
|
+
}
|
|
31770
|
+
registerHandler(e3, t3) {
|
|
31771
|
+
void 0 === this._handlers[e3] && (this._handlers[e3] = []);
|
|
31772
|
+
const i3 = this._handlers[e3];
|
|
31773
|
+
return i3.push(t3), { dispose: () => {
|
|
31774
|
+
const e4 = i3.indexOf(t3);
|
|
31775
|
+
-1 !== e4 && i3.splice(e4, 1);
|
|
31776
|
+
} };
|
|
31777
|
+
}
|
|
31778
|
+
clearHandler(e3) {
|
|
31779
|
+
this._handlers[e3] && delete this._handlers[e3];
|
|
31780
|
+
}
|
|
31781
|
+
setHandlerFallback(e3) {
|
|
31782
|
+
this._handlerFb = e3;
|
|
31783
|
+
}
|
|
31784
|
+
dispose() {
|
|
31785
|
+
this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
|
31786
|
+
}, this._active = n3;
|
|
31787
|
+
}
|
|
31788
|
+
reset() {
|
|
31789
|
+
if (2 === this._state) for (let e3 = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e3 >= 0; --e3) this._active[e3].end(false);
|
|
31790
|
+
this._stack.paused = false, this._active = n3, this._id = -1, this._state = 0;
|
|
31791
|
+
}
|
|
31792
|
+
_start() {
|
|
31793
|
+
if (this._active = this._handlers[this._id] || n3, this._active.length) for (let e3 = this._active.length - 1; e3 >= 0; e3--) this._active[e3].start();
|
|
31794
|
+
else this._handlerFb(this._id, "START");
|
|
31795
|
+
}
|
|
31796
|
+
_put(e3, t3, i3) {
|
|
31797
|
+
if (this._active.length) for (let s3 = this._active.length - 1; s3 >= 0; s3--) this._active[s3].put(e3, t3, i3);
|
|
31798
|
+
else this._handlerFb(this._id, "PUT", (0, r2.utf32ToString)(e3, t3, i3));
|
|
31799
|
+
}
|
|
31800
|
+
start() {
|
|
31801
|
+
this.reset(), this._state = 1;
|
|
31802
|
+
}
|
|
31803
|
+
put(e3, t3, i3) {
|
|
31804
|
+
if (3 !== this._state) {
|
|
31805
|
+
if (1 === this._state) for (; t3 < i3; ) {
|
|
31806
|
+
const i4 = e3[t3++];
|
|
31807
|
+
if (59 === i4) {
|
|
31808
|
+
this._state = 2, this._start();
|
|
31809
|
+
break;
|
|
31810
|
+
}
|
|
31811
|
+
if (i4 < 48 || 57 < i4) return void (this._state = 3);
|
|
31812
|
+
-1 === this._id && (this._id = 0), this._id = 10 * this._id + i4 - 48;
|
|
31813
|
+
}
|
|
31814
|
+
2 === this._state && i3 - t3 > 0 && this._put(e3, t3, i3);
|
|
31815
|
+
}
|
|
31816
|
+
}
|
|
31817
|
+
end(e3, t3 = true) {
|
|
31818
|
+
if (0 !== this._state) {
|
|
31819
|
+
if (3 !== this._state) if (1 === this._state && this._start(), this._active.length) {
|
|
31820
|
+
let i3 = false, s3 = this._active.length - 1, r3 = false;
|
|
31821
|
+
if (this._stack.paused && (s3 = this._stack.loopPosition - 1, i3 = t3, r3 = this._stack.fallThrough, this._stack.paused = false), !r3 && false === i3) {
|
|
31822
|
+
for (; s3 >= 0 && (i3 = this._active[s3].end(e3), true !== i3); s3--) if (i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = false, i3;
|
|
31823
|
+
s3--;
|
|
31824
|
+
}
|
|
31825
|
+
for (; s3 >= 0; s3--) if (i3 = this._active[s3].end(false), i3 instanceof Promise) return this._stack.paused = true, this._stack.loopPosition = s3, this._stack.fallThrough = true, i3;
|
|
31826
|
+
} else this._handlerFb(this._id, "END", e3);
|
|
31827
|
+
this._active = n3, this._id = -1, this._state = 0;
|
|
31828
|
+
}
|
|
31829
|
+
}
|
|
31830
|
+
}, t2.OscHandler = class {
|
|
31831
|
+
constructor(e3) {
|
|
31832
|
+
this._handler = e3, this._data = "", this._hitLimit = false;
|
|
31833
|
+
}
|
|
31834
|
+
start() {
|
|
31835
|
+
this._data = "", this._hitLimit = false;
|
|
31836
|
+
}
|
|
31837
|
+
put(e3, t3, i3) {
|
|
31838
|
+
this._hitLimit || (this._data += (0, r2.utf32ToString)(e3, t3, i3), this._data.length > s2.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = true));
|
|
31839
|
+
}
|
|
31840
|
+
end(e3) {
|
|
31841
|
+
let t3 = false;
|
|
31842
|
+
if (this._hitLimit) t3 = false;
|
|
31843
|
+
else if (e3 && (t3 = this._handler(this._data), t3 instanceof Promise)) return t3.then(((e4) => (this._data = "", this._hitLimit = false, e4)));
|
|
31844
|
+
return this._data = "", this._hitLimit = false, t3;
|
|
31845
|
+
}
|
|
31846
|
+
};
|
|
31847
|
+
}, 742: (e2, t2) => {
|
|
31848
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Params = void 0;
|
|
31849
|
+
const i2 = 2147483647;
|
|
31850
|
+
class s2 {
|
|
31851
|
+
static fromArray(e3) {
|
|
31852
|
+
const t3 = new s2();
|
|
31853
|
+
if (!e3.length) return t3;
|
|
31854
|
+
for (let i3 = Array.isArray(e3[0]) ? 1 : 0; i3 < e3.length; ++i3) {
|
|
31855
|
+
const s3 = e3[i3];
|
|
31856
|
+
if (Array.isArray(s3)) for (let e4 = 0; e4 < s3.length; ++e4) t3.addSubParam(s3[e4]);
|
|
31857
|
+
else t3.addParam(s3);
|
|
31858
|
+
}
|
|
31859
|
+
return t3;
|
|
31860
|
+
}
|
|
31861
|
+
constructor(e3 = 32, t3 = 32) {
|
|
31862
|
+
if (this.maxLength = e3, this.maxSubParamsLength = t3, t3 > 256) throw new Error("maxSubParamsLength must not be greater than 256");
|
|
31863
|
+
this.params = new Int32Array(e3), this.length = 0, this._subParams = new Int32Array(t3), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(e3), this._rejectDigits = false, this._rejectSubDigits = false, this._digitIsSub = false;
|
|
31864
|
+
}
|
|
31865
|
+
clone() {
|
|
31866
|
+
const e3 = new s2(this.maxLength, this.maxSubParamsLength);
|
|
31867
|
+
return e3.params.set(this.params), e3.length = this.length, e3._subParams.set(this._subParams), e3._subParamsLength = this._subParamsLength, e3._subParamsIdx.set(this._subParamsIdx), e3._rejectDigits = this._rejectDigits, e3._rejectSubDigits = this._rejectSubDigits, e3._digitIsSub = this._digitIsSub, e3;
|
|
31868
|
+
}
|
|
31869
|
+
toArray() {
|
|
31870
|
+
const e3 = [];
|
|
31871
|
+
for (let t3 = 0; t3 < this.length; ++t3) {
|
|
31872
|
+
e3.push(this.params[t3]);
|
|
31873
|
+
const i3 = this._subParamsIdx[t3] >> 8, s3 = 255 & this._subParamsIdx[t3];
|
|
31874
|
+
s3 - i3 > 0 && e3.push(Array.prototype.slice.call(this._subParams, i3, s3));
|
|
31875
|
+
}
|
|
31876
|
+
return e3;
|
|
31877
|
+
}
|
|
31878
|
+
reset() {
|
|
31879
|
+
this.length = 0, this._subParamsLength = 0, this._rejectDigits = false, this._rejectSubDigits = false, this._digitIsSub = false;
|
|
31880
|
+
}
|
|
31881
|
+
addParam(e3) {
|
|
31882
|
+
if (this._digitIsSub = false, this.length >= this.maxLength) this._rejectDigits = true;
|
|
31883
|
+
else {
|
|
31884
|
+
if (e3 < -1) throw new Error("values lesser than -1 are not allowed");
|
|
31885
|
+
this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength, this.params[this.length++] = e3 > i2 ? i2 : e3;
|
|
31886
|
+
}
|
|
31887
|
+
}
|
|
31888
|
+
addSubParam(e3) {
|
|
31889
|
+
if (this._digitIsSub = true, this.length) if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) this._rejectSubDigits = true;
|
|
31890
|
+
else {
|
|
31891
|
+
if (e3 < -1) throw new Error("values lesser than -1 are not allowed");
|
|
31892
|
+
this._subParams[this._subParamsLength++] = e3 > i2 ? i2 : e3, this._subParamsIdx[this.length - 1]++;
|
|
31893
|
+
}
|
|
31894
|
+
}
|
|
31895
|
+
hasSubParams(e3) {
|
|
31896
|
+
return (255 & this._subParamsIdx[e3]) - (this._subParamsIdx[e3] >> 8) > 0;
|
|
31897
|
+
}
|
|
31898
|
+
getSubParams(e3) {
|
|
31899
|
+
const t3 = this._subParamsIdx[e3] >> 8, i3 = 255 & this._subParamsIdx[e3];
|
|
31900
|
+
return i3 - t3 > 0 ? this._subParams.subarray(t3, i3) : null;
|
|
31901
|
+
}
|
|
31902
|
+
getSubParamsAll() {
|
|
31903
|
+
const e3 = {};
|
|
31904
|
+
for (let t3 = 0; t3 < this.length; ++t3) {
|
|
31905
|
+
const i3 = this._subParamsIdx[t3] >> 8, s3 = 255 & this._subParamsIdx[t3];
|
|
31906
|
+
s3 - i3 > 0 && (e3[t3] = this._subParams.slice(i3, s3));
|
|
31907
|
+
}
|
|
31908
|
+
return e3;
|
|
31909
|
+
}
|
|
31910
|
+
addDigit(e3) {
|
|
31911
|
+
let t3;
|
|
31912
|
+
if (this._rejectDigits || !(t3 = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits) return;
|
|
31913
|
+
const s3 = this._digitIsSub ? this._subParams : this.params, r2 = s3[t3 - 1];
|
|
31914
|
+
s3[t3 - 1] = ~r2 ? Math.min(10 * r2 + e3, i2) : e3;
|
|
31915
|
+
}
|
|
31916
|
+
}
|
|
31917
|
+
t2.Params = s2;
|
|
31918
|
+
}, 741: (e2, t2) => {
|
|
31919
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.AddonManager = void 0, t2.AddonManager = class {
|
|
31920
|
+
constructor() {
|
|
31921
|
+
this._addons = [];
|
|
31922
|
+
}
|
|
31923
|
+
dispose() {
|
|
31924
|
+
for (let e3 = this._addons.length - 1; e3 >= 0; e3--) this._addons[e3].instance.dispose();
|
|
31925
|
+
}
|
|
31926
|
+
loadAddon(e3, t3) {
|
|
31927
|
+
const i2 = { instance: t3, dispose: t3.dispose, isDisposed: false };
|
|
31928
|
+
this._addons.push(i2), t3.dispose = () => this._wrappedAddonDispose(i2), t3.activate(e3);
|
|
31929
|
+
}
|
|
31930
|
+
_wrappedAddonDispose(e3) {
|
|
31931
|
+
if (e3.isDisposed) return;
|
|
31932
|
+
let t3 = -1;
|
|
31933
|
+
for (let i2 = 0; i2 < this._addons.length; i2++) if (this._addons[i2] === e3) {
|
|
31934
|
+
t3 = i2;
|
|
31935
|
+
break;
|
|
31936
|
+
}
|
|
31937
|
+
if (-1 === t3) throw new Error("Could not dispose an addon that has not been loaded");
|
|
31938
|
+
e3.isDisposed = true, e3.dispose.apply(e3.instance), this._addons.splice(t3, 1);
|
|
31939
|
+
}
|
|
31940
|
+
};
|
|
31941
|
+
}, 771: (e2, t2, i2) => {
|
|
31942
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferApiView = void 0;
|
|
31943
|
+
const s2 = i2(785), r2 = i2(511);
|
|
31944
|
+
t2.BufferApiView = class {
|
|
31945
|
+
constructor(e3, t3) {
|
|
31946
|
+
this._buffer = e3, this.type = t3;
|
|
31947
|
+
}
|
|
31948
|
+
init(e3) {
|
|
31949
|
+
return this._buffer = e3, this;
|
|
31950
|
+
}
|
|
31951
|
+
get cursorY() {
|
|
31952
|
+
return this._buffer.y;
|
|
31953
|
+
}
|
|
31954
|
+
get cursorX() {
|
|
31955
|
+
return this._buffer.x;
|
|
31956
|
+
}
|
|
31957
|
+
get viewportY() {
|
|
31958
|
+
return this._buffer.ydisp;
|
|
31959
|
+
}
|
|
31960
|
+
get baseY() {
|
|
31961
|
+
return this._buffer.ybase;
|
|
31962
|
+
}
|
|
31963
|
+
get length() {
|
|
31964
|
+
return this._buffer.lines.length;
|
|
31965
|
+
}
|
|
31966
|
+
getLine(e3) {
|
|
31967
|
+
const t3 = this._buffer.lines.get(e3);
|
|
31968
|
+
if (t3) return new s2.BufferLineApiView(t3);
|
|
31969
|
+
}
|
|
31970
|
+
getNullCell() {
|
|
31971
|
+
return new r2.CellData();
|
|
31972
|
+
}
|
|
31973
|
+
};
|
|
31974
|
+
}, 785: (e2, t2, i2) => {
|
|
31975
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferLineApiView = void 0;
|
|
31976
|
+
const s2 = i2(511);
|
|
31977
|
+
t2.BufferLineApiView = class {
|
|
31978
|
+
constructor(e3) {
|
|
31979
|
+
this._line = e3;
|
|
31980
|
+
}
|
|
31981
|
+
get isWrapped() {
|
|
31982
|
+
return this._line.isWrapped;
|
|
31983
|
+
}
|
|
31984
|
+
get length() {
|
|
31985
|
+
return this._line.length;
|
|
31986
|
+
}
|
|
31987
|
+
getCell(e3, t3) {
|
|
31988
|
+
if (!(e3 < 0 || e3 >= this._line.length)) return t3 ? (this._line.loadCell(e3, t3), t3) : this._line.loadCell(e3, new s2.CellData());
|
|
31989
|
+
}
|
|
31990
|
+
translateToString(e3, t3, i3) {
|
|
31991
|
+
return this._line.translateToString(e3, t3, i3);
|
|
31992
|
+
}
|
|
31993
|
+
};
|
|
31994
|
+
}, 285: (e2, t2, i2) => {
|
|
31995
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferNamespaceApi = void 0;
|
|
31996
|
+
const s2 = i2(771), r2 = i2(460), n3 = i2(844);
|
|
31997
|
+
class a extends n3.Disposable {
|
|
31998
|
+
constructor(e3) {
|
|
31999
|
+
super(), this._core = e3, this._onBufferChange = this.register(new r2.EventEmitter()), this.onBufferChange = this._onBufferChange.event, this._normal = new s2.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new s2.BufferApiView(this._core.buffers.alt, "alternate"), this._core.buffers.onBufferActivate((() => this._onBufferChange.fire(this.active)));
|
|
32000
|
+
}
|
|
32001
|
+
get active() {
|
|
32002
|
+
if (this._core.buffers.active === this._core.buffers.normal) return this.normal;
|
|
32003
|
+
if (this._core.buffers.active === this._core.buffers.alt) return this.alternate;
|
|
32004
|
+
throw new Error("Active buffer is neither normal nor alternate");
|
|
32005
|
+
}
|
|
32006
|
+
get normal() {
|
|
32007
|
+
return this._normal.init(this._core.buffers.normal);
|
|
32008
|
+
}
|
|
32009
|
+
get alternate() {
|
|
32010
|
+
return this._alternate.init(this._core.buffers.alt);
|
|
32011
|
+
}
|
|
32012
|
+
}
|
|
32013
|
+
t2.BufferNamespaceApi = a;
|
|
32014
|
+
}, 975: (e2, t2) => {
|
|
32015
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.ParserApi = void 0, t2.ParserApi = class {
|
|
32016
|
+
constructor(e3) {
|
|
32017
|
+
this._core = e3;
|
|
32018
|
+
}
|
|
32019
|
+
registerCsiHandler(e3, t3) {
|
|
32020
|
+
return this._core.registerCsiHandler(e3, ((e4) => t3(e4.toArray())));
|
|
32021
|
+
}
|
|
32022
|
+
addCsiHandler(e3, t3) {
|
|
32023
|
+
return this.registerCsiHandler(e3, t3);
|
|
32024
|
+
}
|
|
32025
|
+
registerDcsHandler(e3, t3) {
|
|
32026
|
+
return this._core.registerDcsHandler(e3, ((e4, i2) => t3(e4, i2.toArray())));
|
|
32027
|
+
}
|
|
32028
|
+
addDcsHandler(e3, t3) {
|
|
32029
|
+
return this.registerDcsHandler(e3, t3);
|
|
32030
|
+
}
|
|
32031
|
+
registerEscHandler(e3, t3) {
|
|
32032
|
+
return this._core.registerEscHandler(e3, t3);
|
|
32033
|
+
}
|
|
32034
|
+
addEscHandler(e3, t3) {
|
|
32035
|
+
return this.registerEscHandler(e3, t3);
|
|
32036
|
+
}
|
|
32037
|
+
registerOscHandler(e3, t3) {
|
|
32038
|
+
return this._core.registerOscHandler(e3, t3);
|
|
32039
|
+
}
|
|
32040
|
+
addOscHandler(e3, t3) {
|
|
32041
|
+
return this.registerOscHandler(e3, t3);
|
|
32042
|
+
}
|
|
32043
|
+
};
|
|
32044
|
+
}, 90: (e2, t2) => {
|
|
32045
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeApi = void 0, t2.UnicodeApi = class {
|
|
32046
|
+
constructor(e3) {
|
|
32047
|
+
this._core = e3;
|
|
32048
|
+
}
|
|
32049
|
+
register(e3) {
|
|
32050
|
+
this._core.unicodeService.register(e3);
|
|
32051
|
+
}
|
|
32052
|
+
get versions() {
|
|
32053
|
+
return this._core.unicodeService.versions;
|
|
32054
|
+
}
|
|
32055
|
+
get activeVersion() {
|
|
32056
|
+
return this._core.unicodeService.activeVersion;
|
|
32057
|
+
}
|
|
32058
|
+
set activeVersion(e3) {
|
|
32059
|
+
this._core.unicodeService.activeVersion = e3;
|
|
32060
|
+
}
|
|
32061
|
+
};
|
|
32062
|
+
}, 744: function(e2, t2, i2) {
|
|
32063
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
32064
|
+
var r3, n4 = arguments.length, a2 = n4 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
32065
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
|
|
32066
|
+
else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n4 < 3 ? r3(a2) : n4 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
|
|
32067
|
+
return n4 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
|
|
32068
|
+
}, r2 = this && this.__param || function(e3, t3) {
|
|
32069
|
+
return function(i3, s3) {
|
|
32070
|
+
t3(i3, s3, e3);
|
|
32071
|
+
};
|
|
32072
|
+
};
|
|
32073
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.BufferService = t2.MINIMUM_ROWS = t2.MINIMUM_COLS = void 0;
|
|
32074
|
+
const n3 = i2(460), a = i2(844), o = i2(295), h2 = i2(585);
|
|
32075
|
+
t2.MINIMUM_COLS = 2, t2.MINIMUM_ROWS = 1;
|
|
32076
|
+
let c = t2.BufferService = class extends a.Disposable {
|
|
32077
|
+
get buffer() {
|
|
32078
|
+
return this.buffers.active;
|
|
32079
|
+
}
|
|
32080
|
+
constructor(e3) {
|
|
32081
|
+
super(), this.isUserScrolling = false, this._onResize = this.register(new n3.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new n3.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e3.rawOptions.cols || 0, t2.MINIMUM_COLS), this.rows = Math.max(e3.rawOptions.rows || 0, t2.MINIMUM_ROWS), this.buffers = this.register(new o.BufferSet(e3, this));
|
|
32082
|
+
}
|
|
32083
|
+
resize(e3, t3) {
|
|
32084
|
+
this.cols = e3, this.rows = t3, this.buffers.resize(e3, t3), this._onResize.fire({ cols: e3, rows: t3 });
|
|
32085
|
+
}
|
|
32086
|
+
reset() {
|
|
32087
|
+
this.buffers.reset(), this.isUserScrolling = false;
|
|
32088
|
+
}
|
|
32089
|
+
scroll(e3, t3 = false) {
|
|
32090
|
+
const i3 = this.buffer;
|
|
32091
|
+
let s3;
|
|
32092
|
+
s3 = this._cachedBlankLine, s3 && s3.length === this.cols && s3.getFg(0) === e3.fg && s3.getBg(0) === e3.bg || (s3 = i3.getBlankLine(e3, t3), this._cachedBlankLine = s3), s3.isWrapped = t3;
|
|
32093
|
+
const r3 = i3.ybase + i3.scrollTop, n4 = i3.ybase + i3.scrollBottom;
|
|
32094
|
+
if (0 === i3.scrollTop) {
|
|
32095
|
+
const e4 = i3.lines.isFull;
|
|
32096
|
+
n4 === i3.lines.length - 1 ? e4 ? i3.lines.recycle().copyFrom(s3) : i3.lines.push(s3.clone()) : i3.lines.splice(n4 + 1, 0, s3.clone()), e4 ? this.isUserScrolling && (i3.ydisp = Math.max(i3.ydisp - 1, 0)) : (i3.ybase++, this.isUserScrolling || i3.ydisp++);
|
|
32097
|
+
} else {
|
|
32098
|
+
const e4 = n4 - r3 + 1;
|
|
32099
|
+
i3.lines.shiftElements(r3 + 1, e4 - 1, -1), i3.lines.set(n4, s3.clone());
|
|
32100
|
+
}
|
|
32101
|
+
this.isUserScrolling || (i3.ydisp = i3.ybase), this._onScroll.fire(i3.ydisp);
|
|
32102
|
+
}
|
|
32103
|
+
scrollLines(e3, t3, i3) {
|
|
32104
|
+
const s3 = this.buffer;
|
|
32105
|
+
if (e3 < 0) {
|
|
32106
|
+
if (0 === s3.ydisp) return;
|
|
32107
|
+
this.isUserScrolling = true;
|
|
32108
|
+
} else e3 + s3.ydisp >= s3.ybase && (this.isUserScrolling = false);
|
|
32109
|
+
const r3 = s3.ydisp;
|
|
32110
|
+
s3.ydisp = Math.max(Math.min(s3.ydisp + e3, s3.ybase), 0), r3 !== s3.ydisp && (t3 || this._onScroll.fire(s3.ydisp));
|
|
32111
|
+
}
|
|
32112
|
+
};
|
|
32113
|
+
t2.BufferService = c = s2([r2(0, h2.IOptionsService)], c);
|
|
32114
|
+
}, 994: (e2, t2) => {
|
|
32115
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CharsetService = void 0, t2.CharsetService = class {
|
|
32116
|
+
constructor() {
|
|
32117
|
+
this.glevel = 0, this._charsets = [];
|
|
32118
|
+
}
|
|
32119
|
+
reset() {
|
|
32120
|
+
this.charset = void 0, this._charsets = [], this.glevel = 0;
|
|
32121
|
+
}
|
|
32122
|
+
setgLevel(e3) {
|
|
32123
|
+
this.glevel = e3, this.charset = this._charsets[e3];
|
|
32124
|
+
}
|
|
32125
|
+
setgCharset(e3, t3) {
|
|
32126
|
+
this._charsets[e3] = t3, this.glevel === e3 && (this.charset = t3);
|
|
32127
|
+
}
|
|
32128
|
+
};
|
|
32129
|
+
}, 753: function(e2, t2, i2) {
|
|
32130
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
32131
|
+
var r3, n4 = arguments.length, a2 = n4 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
32132
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
|
|
32133
|
+
else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n4 < 3 ? r3(a2) : n4 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
|
|
32134
|
+
return n4 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
|
|
32135
|
+
}, r2 = this && this.__param || function(e3, t3) {
|
|
32136
|
+
return function(i3, s3) {
|
|
32137
|
+
t3(i3, s3, e3);
|
|
32138
|
+
};
|
|
32139
|
+
};
|
|
32140
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreMouseService = void 0;
|
|
32141
|
+
const n3 = i2(585), a = i2(460), o = i2(844), h2 = { NONE: { events: 0, restrict: () => false }, X10: { events: 1, restrict: (e3) => 4 !== e3.button && 1 === e3.action && (e3.ctrl = false, e3.alt = false, e3.shift = false, true) }, VT200: { events: 19, restrict: (e3) => 32 !== e3.action }, DRAG: { events: 23, restrict: (e3) => 32 !== e3.action || 3 !== e3.button }, ANY: { events: 31, restrict: (e3) => true } };
|
|
32142
|
+
function c(e3, t3) {
|
|
32143
|
+
let i3 = (e3.ctrl ? 16 : 0) | (e3.shift ? 4 : 0) | (e3.alt ? 8 : 0);
|
|
32144
|
+
return 4 === e3.button ? (i3 |= 64, i3 |= e3.action) : (i3 |= 3 & e3.button, 4 & e3.button && (i3 |= 64), 8 & e3.button && (i3 |= 128), 32 === e3.action ? i3 |= 32 : 0 !== e3.action || t3 || (i3 |= 3)), i3;
|
|
32145
|
+
}
|
|
32146
|
+
const l = String.fromCharCode, _2 = { DEFAULT: (e3) => {
|
|
32147
|
+
const t3 = [c(e3, false) + 32, e3.col + 32, e3.row + 32];
|
|
32148
|
+
return t3[0] > 255 || t3[1] > 255 || t3[2] > 255 ? "" : `\x1B[M${l(t3[0])}${l(t3[1])}${l(t3[2])}`;
|
|
32149
|
+
}, SGR: (e3) => {
|
|
32150
|
+
const t3 = 0 === e3.action && 4 !== e3.button ? "m" : "M";
|
|
32151
|
+
return `\x1B[<${c(e3, true)};${e3.col};${e3.row}${t3}`;
|
|
32152
|
+
}, SGR_PIXELS: (e3) => {
|
|
32153
|
+
const t3 = 0 === e3.action && 4 !== e3.button ? "m" : "M";
|
|
32154
|
+
return `\x1B[<${c(e3, true)};${e3.x};${e3.y}${t3}`;
|
|
32155
|
+
} };
|
|
32156
|
+
let d2 = t2.CoreMouseService = class extends o.Disposable {
|
|
32157
|
+
constructor(e3, t3) {
|
|
32158
|
+
super(), this._bufferService = e3, this._coreService = t3, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new a.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
|
|
32159
|
+
for (const e4 of Object.keys(h2)) this.addProtocol(e4, h2[e4]);
|
|
32160
|
+
for (const e4 of Object.keys(_2)) this.addEncoding(e4, _2[e4]);
|
|
32161
|
+
this.reset();
|
|
32162
|
+
}
|
|
32163
|
+
addProtocol(e3, t3) {
|
|
32164
|
+
this._protocols[e3] = t3;
|
|
32165
|
+
}
|
|
32166
|
+
addEncoding(e3, t3) {
|
|
32167
|
+
this._encodings[e3] = t3;
|
|
32168
|
+
}
|
|
32169
|
+
get activeProtocol() {
|
|
32170
|
+
return this._activeProtocol;
|
|
32171
|
+
}
|
|
32172
|
+
get areMouseEventsActive() {
|
|
32173
|
+
return 0 !== this._protocols[this._activeProtocol].events;
|
|
32174
|
+
}
|
|
32175
|
+
set activeProtocol(e3) {
|
|
32176
|
+
if (!this._protocols[e3]) throw new Error(`unknown protocol "${e3}"`);
|
|
32177
|
+
this._activeProtocol = e3, this._onProtocolChange.fire(this._protocols[e3].events);
|
|
32178
|
+
}
|
|
32179
|
+
get activeEncoding() {
|
|
32180
|
+
return this._activeEncoding;
|
|
32181
|
+
}
|
|
32182
|
+
set activeEncoding(e3) {
|
|
32183
|
+
if (!this._encodings[e3]) throw new Error(`unknown encoding "${e3}"`);
|
|
32184
|
+
this._activeEncoding = e3;
|
|
32185
|
+
}
|
|
32186
|
+
reset() {
|
|
32187
|
+
this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
|
|
32188
|
+
}
|
|
32189
|
+
triggerMouseEvent(e3) {
|
|
32190
|
+
if (e3.col < 0 || e3.col >= this._bufferService.cols || e3.row < 0 || e3.row >= this._bufferService.rows) return false;
|
|
32191
|
+
if (4 === e3.button && 32 === e3.action) return false;
|
|
32192
|
+
if (3 === e3.button && 32 !== e3.action) return false;
|
|
32193
|
+
if (4 !== e3.button && (2 === e3.action || 3 === e3.action)) return false;
|
|
32194
|
+
if (e3.col++, e3.row++, 32 === e3.action && this._lastEvent && this._equalEvents(this._lastEvent, e3, "SGR_PIXELS" === this._activeEncoding)) return false;
|
|
32195
|
+
if (!this._protocols[this._activeProtocol].restrict(e3)) return false;
|
|
32196
|
+
const t3 = this._encodings[this._activeEncoding](e3);
|
|
32197
|
+
return t3 && ("DEFAULT" === this._activeEncoding ? this._coreService.triggerBinaryEvent(t3) : this._coreService.triggerDataEvent(t3, true)), this._lastEvent = e3, true;
|
|
32198
|
+
}
|
|
32199
|
+
explainEvents(e3) {
|
|
32200
|
+
return { down: !!(1 & e3), up: !!(2 & e3), drag: !!(4 & e3), move: !!(8 & e3), wheel: !!(16 & e3) };
|
|
32201
|
+
}
|
|
32202
|
+
_equalEvents(e3, t3, i3) {
|
|
32203
|
+
if (i3) {
|
|
32204
|
+
if (e3.x !== t3.x) return false;
|
|
32205
|
+
if (e3.y !== t3.y) return false;
|
|
32206
|
+
} else {
|
|
32207
|
+
if (e3.col !== t3.col) return false;
|
|
32208
|
+
if (e3.row !== t3.row) return false;
|
|
32209
|
+
}
|
|
32210
|
+
return e3.button === t3.button && e3.action === t3.action && e3.ctrl === t3.ctrl && e3.alt === t3.alt && e3.shift === t3.shift;
|
|
32211
|
+
}
|
|
32212
|
+
};
|
|
32213
|
+
t2.CoreMouseService = d2 = s2([r2(0, n3.IBufferService), r2(1, n3.ICoreService)], d2);
|
|
32214
|
+
}, 83: function(e2, t2, i2) {
|
|
32215
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
32216
|
+
var r3, n4 = arguments.length, a2 = n4 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
32217
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
|
|
32218
|
+
else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n4 < 3 ? r3(a2) : n4 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
|
|
32219
|
+
return n4 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
|
|
32220
|
+
}, r2 = this && this.__param || function(e3, t3) {
|
|
32221
|
+
return function(i3, s3) {
|
|
32222
|
+
t3(i3, s3, e3);
|
|
32223
|
+
};
|
|
32224
|
+
};
|
|
32225
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.CoreService = void 0;
|
|
32226
|
+
const n3 = i2(439), a = i2(460), o = i2(844), h2 = i2(585), c = Object.freeze({ insertMode: false }), l = Object.freeze({ applicationCursorKeys: false, applicationKeypad: false, bracketedPasteMode: false, origin: false, reverseWraparound: false, sendFocus: false, wraparound: true });
|
|
32227
|
+
let _2 = t2.CoreService = class extends o.Disposable {
|
|
32228
|
+
constructor(e3, t3, i3) {
|
|
32229
|
+
super(), this._bufferService = e3, this._logService = t3, this._optionsService = i3, this.isCursorInitialized = false, this.isCursorHidden = false, this._onData = this.register(new a.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new a.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new a.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new a.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, n3.clone)(c), this.decPrivateModes = (0, n3.clone)(l);
|
|
32230
|
+
}
|
|
32231
|
+
reset() {
|
|
32232
|
+
this.modes = (0, n3.clone)(c), this.decPrivateModes = (0, n3.clone)(l);
|
|
32233
|
+
}
|
|
32234
|
+
triggerDataEvent(e3, t3 = false) {
|
|
32235
|
+
if (this._optionsService.rawOptions.disableStdin) return;
|
|
32236
|
+
const i3 = this._bufferService.buffer;
|
|
32237
|
+
t3 && this._optionsService.rawOptions.scrollOnUserInput && i3.ybase !== i3.ydisp && this._onRequestScrollToBottom.fire(), t3 && this._onUserInput.fire(), this._logService.debug(`sending data "${e3}"`, (() => e3.split("").map(((e4) => e4.charCodeAt(0))))), this._onData.fire(e3);
|
|
32238
|
+
}
|
|
32239
|
+
triggerBinaryEvent(e3) {
|
|
32240
|
+
this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${e3}"`, (() => e3.split("").map(((e4) => e4.charCodeAt(0))))), this._onBinary.fire(e3));
|
|
32241
|
+
}
|
|
32242
|
+
};
|
|
32243
|
+
t2.CoreService = _2 = s2([r2(0, h2.IBufferService), r2(1, h2.ILogService), r2(2, h2.IOptionsService)], _2);
|
|
32244
|
+
}, 348: (e2, t2, i2) => {
|
|
32245
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.InstantiationService = t2.ServiceCollection = void 0;
|
|
32246
|
+
const s2 = i2(585), r2 = i2(343);
|
|
32247
|
+
class n3 {
|
|
32248
|
+
constructor(...e3) {
|
|
32249
|
+
this._entries = /* @__PURE__ */ new Map();
|
|
32250
|
+
for (const [t3, i3] of e3) this.set(t3, i3);
|
|
32251
|
+
}
|
|
32252
|
+
set(e3, t3) {
|
|
32253
|
+
const i3 = this._entries.get(e3);
|
|
32254
|
+
return this._entries.set(e3, t3), i3;
|
|
32255
|
+
}
|
|
32256
|
+
forEach(e3) {
|
|
32257
|
+
for (const [t3, i3] of this._entries.entries()) e3(t3, i3);
|
|
32258
|
+
}
|
|
32259
|
+
has(e3) {
|
|
32260
|
+
return this._entries.has(e3);
|
|
32261
|
+
}
|
|
32262
|
+
get(e3) {
|
|
32263
|
+
return this._entries.get(e3);
|
|
32264
|
+
}
|
|
32265
|
+
}
|
|
32266
|
+
t2.ServiceCollection = n3, t2.InstantiationService = class {
|
|
32267
|
+
constructor() {
|
|
32268
|
+
this._services = new n3(), this._services.set(s2.IInstantiationService, this);
|
|
32269
|
+
}
|
|
32270
|
+
setService(e3, t3) {
|
|
32271
|
+
this._services.set(e3, t3);
|
|
32272
|
+
}
|
|
32273
|
+
getService(e3) {
|
|
32274
|
+
return this._services.get(e3);
|
|
32275
|
+
}
|
|
32276
|
+
createInstance(e3, ...t3) {
|
|
32277
|
+
const i3 = (0, r2.getServiceDependencies)(e3).sort(((e4, t4) => e4.index - t4.index)), s3 = [];
|
|
32278
|
+
for (const t4 of i3) {
|
|
32279
|
+
const i4 = this._services.get(t4.id);
|
|
32280
|
+
if (!i4) throw new Error(`[createInstance] ${e3.name} depends on UNKNOWN service ${t4.id}.`);
|
|
32281
|
+
s3.push(i4);
|
|
32282
|
+
}
|
|
32283
|
+
const n4 = i3.length > 0 ? i3[0].index : t3.length;
|
|
32284
|
+
if (t3.length !== n4) throw new Error(`[createInstance] First service dependency of ${e3.name} at position ${n4 + 1} conflicts with ${t3.length} static arguments`);
|
|
32285
|
+
return new e3(...[...t3, ...s3]);
|
|
32286
|
+
}
|
|
32287
|
+
};
|
|
32288
|
+
}, 866: function(e2, t2, i2) {
|
|
32289
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
32290
|
+
var r3, n4 = arguments.length, a2 = n4 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
32291
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
|
|
32292
|
+
else for (var o2 = e3.length - 1; o2 >= 0; o2--) (r3 = e3[o2]) && (a2 = (n4 < 3 ? r3(a2) : n4 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
|
|
32293
|
+
return n4 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
|
|
32294
|
+
}, r2 = this && this.__param || function(e3, t3) {
|
|
32295
|
+
return function(i3, s3) {
|
|
32296
|
+
t3(i3, s3, e3);
|
|
32297
|
+
};
|
|
32298
|
+
};
|
|
32299
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.traceCall = t2.setTraceLogger = t2.LogService = void 0;
|
|
32300
|
+
const n3 = i2(844), a = i2(585), o = { trace: a.LogLevelEnum.TRACE, debug: a.LogLevelEnum.DEBUG, info: a.LogLevelEnum.INFO, warn: a.LogLevelEnum.WARN, error: a.LogLevelEnum.ERROR, off: a.LogLevelEnum.OFF };
|
|
32301
|
+
let h2, c = t2.LogService = class extends n3.Disposable {
|
|
32302
|
+
get logLevel() {
|
|
32303
|
+
return this._logLevel;
|
|
32304
|
+
}
|
|
32305
|
+
constructor(e3) {
|
|
32306
|
+
super(), this._optionsService = e3, this._logLevel = a.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", (() => this._updateLogLevel()))), h2 = this;
|
|
32307
|
+
}
|
|
32308
|
+
_updateLogLevel() {
|
|
32309
|
+
this._logLevel = o[this._optionsService.rawOptions.logLevel];
|
|
32310
|
+
}
|
|
32311
|
+
_evalLazyOptionalParams(e3) {
|
|
32312
|
+
for (let t3 = 0; t3 < e3.length; t3++) "function" == typeof e3[t3] && (e3[t3] = e3[t3]());
|
|
32313
|
+
}
|
|
32314
|
+
_log(e3, t3, i3) {
|
|
32315
|
+
this._evalLazyOptionalParams(i3), e3.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + t3, ...i3);
|
|
32316
|
+
}
|
|
32317
|
+
trace(e3, ...t3) {
|
|
32318
|
+
this._logLevel <= a.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
|
|
32319
|
+
}
|
|
32320
|
+
debug(e3, ...t3) {
|
|
32321
|
+
this._logLevel <= a.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, e3, t3);
|
|
32322
|
+
}
|
|
32323
|
+
info(e3, ...t3) {
|
|
32324
|
+
this._logLevel <= a.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, e3, t3);
|
|
32325
|
+
}
|
|
32326
|
+
warn(e3, ...t3) {
|
|
32327
|
+
this._logLevel <= a.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, e3, t3);
|
|
32328
|
+
}
|
|
32329
|
+
error(e3, ...t3) {
|
|
32330
|
+
this._logLevel <= a.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e3, t3);
|
|
32331
|
+
}
|
|
32332
|
+
};
|
|
32333
|
+
t2.LogService = c = s2([r2(0, a.IOptionsService)], c), t2.setTraceLogger = function(e3) {
|
|
32334
|
+
h2 = e3;
|
|
32335
|
+
}, t2.traceCall = function(e3, t3, i3) {
|
|
32336
|
+
if ("function" != typeof i3.value) throw new Error("not supported");
|
|
32337
|
+
const s3 = i3.value;
|
|
32338
|
+
i3.value = function(...e4) {
|
|
32339
|
+
if (h2.logLevel !== a.LogLevelEnum.TRACE) return s3.apply(this, e4);
|
|
32340
|
+
h2.trace(`GlyphRenderer#${s3.name}(${e4.map(((e5) => JSON.stringify(e5))).join(", ")})`);
|
|
32341
|
+
const t4 = s3.apply(this, e4);
|
|
32342
|
+
return h2.trace(`GlyphRenderer#${s3.name} return`, t4), t4;
|
|
32343
|
+
};
|
|
32344
|
+
};
|
|
32345
|
+
}, 302: (e2, t2, i2) => {
|
|
32346
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.OptionsService = t2.DEFAULT_OPTIONS = void 0;
|
|
32347
|
+
const s2 = i2(460), r2 = i2(844), n3 = i2(114);
|
|
32348
|
+
t2.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: false, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: true, drawBoldTextInBrightColors: true, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: false, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: true, scrollSensitivity: 1, screenReaderMode: false, smoothScrollDuration: 0, macOptionIsMeta: false, macOptionClickForcesSelection: false, minimumContrastRatio: 1, disableStdin: false, allowProposedApi: false, allowTransparency: false, tabStopWidth: 8, theme: {}, rescaleOverlappingGlyphs: false, rightClickSelectsWord: n3.isMac, windowOptions: {}, windowsMode: false, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: true, convertEol: false, termName: "xterm", cancelEvents: false, overviewRulerWidth: 0 };
|
|
32349
|
+
const a = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
|
32350
|
+
class o extends r2.Disposable {
|
|
32351
|
+
constructor(e3) {
|
|
32352
|
+
super(), this._onOptionChange = this.register(new s2.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
|
|
32353
|
+
const i3 = { ...t2.DEFAULT_OPTIONS };
|
|
32354
|
+
for (const t3 in e3) if (t3 in i3) try {
|
|
32355
|
+
const s3 = e3[t3];
|
|
32356
|
+
i3[t3] = this._sanitizeAndValidateOption(t3, s3);
|
|
32357
|
+
} catch (e4) {
|
|
32358
|
+
console.error(e4);
|
|
32359
|
+
}
|
|
32360
|
+
this.rawOptions = i3, this.options = { ...i3 }, this._setupOptions(), this.register((0, r2.toDisposable)((() => {
|
|
32361
|
+
this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
|
|
32362
|
+
})));
|
|
32363
|
+
}
|
|
32364
|
+
onSpecificOptionChange(e3, t3) {
|
|
32365
|
+
return this.onOptionChange(((i3) => {
|
|
32366
|
+
i3 === e3 && t3(this.rawOptions[e3]);
|
|
32367
|
+
}));
|
|
32368
|
+
}
|
|
32369
|
+
onMultipleOptionChange(e3, t3) {
|
|
32370
|
+
return this.onOptionChange(((i3) => {
|
|
32371
|
+
-1 !== e3.indexOf(i3) && t3();
|
|
32372
|
+
}));
|
|
32373
|
+
}
|
|
32374
|
+
_setupOptions() {
|
|
32375
|
+
const e3 = (e4) => {
|
|
32376
|
+
if (!(e4 in t2.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e4}"`);
|
|
32377
|
+
return this.rawOptions[e4];
|
|
32378
|
+
}, i3 = (e4, i4) => {
|
|
32379
|
+
if (!(e4 in t2.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e4}"`);
|
|
32380
|
+
i4 = this._sanitizeAndValidateOption(e4, i4), this.rawOptions[e4] !== i4 && (this.rawOptions[e4] = i4, this._onOptionChange.fire(e4));
|
|
32381
|
+
};
|
|
32382
|
+
for (const t3 in this.rawOptions) {
|
|
32383
|
+
const s3 = { get: e3.bind(this, t3), set: i3.bind(this, t3) };
|
|
32384
|
+
Object.defineProperty(this.options, t3, s3);
|
|
32385
|
+
}
|
|
32386
|
+
}
|
|
32387
|
+
_sanitizeAndValidateOption(e3, i3) {
|
|
32388
|
+
switch (e3) {
|
|
32389
|
+
case "cursorStyle":
|
|
32390
|
+
if (i3 || (i3 = t2.DEFAULT_OPTIONS[e3]), !/* @__PURE__ */ (function(e4) {
|
|
32391
|
+
return "block" === e4 || "underline" === e4 || "bar" === e4;
|
|
32392
|
+
})(i3)) throw new Error(`"${i3}" is not a valid value for ${e3}`);
|
|
32393
|
+
break;
|
|
32394
|
+
case "wordSeparator":
|
|
32395
|
+
i3 || (i3 = t2.DEFAULT_OPTIONS[e3]);
|
|
32396
|
+
break;
|
|
32397
|
+
case "fontWeight":
|
|
32398
|
+
case "fontWeightBold":
|
|
32399
|
+
if ("number" == typeof i3 && 1 <= i3 && i3 <= 1e3) break;
|
|
32400
|
+
i3 = a.includes(i3) ? i3 : t2.DEFAULT_OPTIONS[e3];
|
|
32401
|
+
break;
|
|
32402
|
+
case "cursorWidth":
|
|
32403
|
+
i3 = Math.floor(i3);
|
|
32404
|
+
case "lineHeight":
|
|
32405
|
+
case "tabStopWidth":
|
|
32406
|
+
if (i3 < 1) throw new Error(`${e3} cannot be less than 1, value: ${i3}`);
|
|
32407
|
+
break;
|
|
32408
|
+
case "minimumContrastRatio":
|
|
32409
|
+
i3 = Math.max(1, Math.min(21, Math.round(10 * i3) / 10));
|
|
32410
|
+
break;
|
|
32411
|
+
case "scrollback":
|
|
32412
|
+
if ((i3 = Math.min(i3, 4294967295)) < 0) throw new Error(`${e3} cannot be less than 0, value: ${i3}`);
|
|
32413
|
+
break;
|
|
32414
|
+
case "fastScrollSensitivity":
|
|
32415
|
+
case "scrollSensitivity":
|
|
32416
|
+
if (i3 <= 0) throw new Error(`${e3} cannot be less than or equal to 0, value: ${i3}`);
|
|
32417
|
+
break;
|
|
32418
|
+
case "rows":
|
|
32419
|
+
case "cols":
|
|
32420
|
+
if (!i3 && 0 !== i3) throw new Error(`${e3} must be numeric, value: ${i3}`);
|
|
32421
|
+
break;
|
|
32422
|
+
case "windowsPty":
|
|
32423
|
+
i3 = i3 ?? {};
|
|
32424
|
+
}
|
|
32425
|
+
return i3;
|
|
32426
|
+
}
|
|
32427
|
+
}
|
|
32428
|
+
t2.OptionsService = o;
|
|
32429
|
+
}, 660: function(e2, t2, i2) {
|
|
32430
|
+
var s2 = this && this.__decorate || function(e3, t3, i3, s3) {
|
|
32431
|
+
var r3, n4 = arguments.length, a2 = n4 < 3 ? t3 : null === s3 ? s3 = Object.getOwnPropertyDescriptor(t3, i3) : s3;
|
|
32432
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(e3, t3, i3, s3);
|
|
32433
|
+
else for (var o = e3.length - 1; o >= 0; o--) (r3 = e3[o]) && (a2 = (n4 < 3 ? r3(a2) : n4 > 3 ? r3(t3, i3, a2) : r3(t3, i3)) || a2);
|
|
32434
|
+
return n4 > 3 && a2 && Object.defineProperty(t3, i3, a2), a2;
|
|
32435
|
+
}, r2 = this && this.__param || function(e3, t3) {
|
|
32436
|
+
return function(i3, s3) {
|
|
32437
|
+
t3(i3, s3, e3);
|
|
32438
|
+
};
|
|
32439
|
+
};
|
|
32440
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.OscLinkService = void 0;
|
|
32441
|
+
const n3 = i2(585);
|
|
32442
|
+
let a = t2.OscLinkService = class {
|
|
32443
|
+
constructor(e3) {
|
|
32444
|
+
this._bufferService = e3, this._nextId = 1, this._entriesWithId = /* @__PURE__ */ new Map(), this._dataByLinkId = /* @__PURE__ */ new Map();
|
|
32445
|
+
}
|
|
32446
|
+
registerLink(e3) {
|
|
32447
|
+
const t3 = this._bufferService.buffer;
|
|
32448
|
+
if (void 0 === e3.id) {
|
|
32449
|
+
const i4 = t3.addMarker(t3.ybase + t3.y), s4 = { data: e3, id: this._nextId++, lines: [i4] };
|
|
32450
|
+
return i4.onDispose((() => this._removeMarkerFromLink(s4, i4))), this._dataByLinkId.set(s4.id, s4), s4.id;
|
|
32451
|
+
}
|
|
32452
|
+
const i3 = e3, s3 = this._getEntryIdKey(i3), r3 = this._entriesWithId.get(s3);
|
|
32453
|
+
if (r3) return this.addLineToLink(r3.id, t3.ybase + t3.y), r3.id;
|
|
32454
|
+
const n4 = t3.addMarker(t3.ybase + t3.y), a2 = { id: this._nextId++, key: this._getEntryIdKey(i3), data: i3, lines: [n4] };
|
|
32455
|
+
return n4.onDispose((() => this._removeMarkerFromLink(a2, n4))), this._entriesWithId.set(a2.key, a2), this._dataByLinkId.set(a2.id, a2), a2.id;
|
|
32456
|
+
}
|
|
32457
|
+
addLineToLink(e3, t3) {
|
|
32458
|
+
const i3 = this._dataByLinkId.get(e3);
|
|
32459
|
+
if (i3 && i3.lines.every(((e4) => e4.line !== t3))) {
|
|
32460
|
+
const e4 = this._bufferService.buffer.addMarker(t3);
|
|
32461
|
+
i3.lines.push(e4), e4.onDispose((() => this._removeMarkerFromLink(i3, e4)));
|
|
32462
|
+
}
|
|
32463
|
+
}
|
|
32464
|
+
getLinkData(e3) {
|
|
32465
|
+
return this._dataByLinkId.get(e3)?.data;
|
|
32466
|
+
}
|
|
32467
|
+
_getEntryIdKey(e3) {
|
|
32468
|
+
return `${e3.id};;${e3.uri}`;
|
|
32469
|
+
}
|
|
32470
|
+
_removeMarkerFromLink(e3, t3) {
|
|
32471
|
+
const i3 = e3.lines.indexOf(t3);
|
|
32472
|
+
-1 !== i3 && (e3.lines.splice(i3, 1), 0 === e3.lines.length && (void 0 !== e3.data.id && this._entriesWithId.delete(e3.key), this._dataByLinkId.delete(e3.id)));
|
|
32473
|
+
}
|
|
32474
|
+
};
|
|
32475
|
+
t2.OscLinkService = a = s2([r2(0, n3.IBufferService)], a);
|
|
32476
|
+
}, 343: (e2, t2) => {
|
|
32477
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.createDecorator = t2.getServiceDependencies = t2.serviceRegistry = void 0;
|
|
32478
|
+
const i2 = "di$target", s2 = "di$dependencies";
|
|
32479
|
+
t2.serviceRegistry = /* @__PURE__ */ new Map(), t2.getServiceDependencies = function(e3) {
|
|
32480
|
+
return e3[s2] || [];
|
|
32481
|
+
}, t2.createDecorator = function(e3) {
|
|
32482
|
+
if (t2.serviceRegistry.has(e3)) return t2.serviceRegistry.get(e3);
|
|
32483
|
+
const r2 = function(e4, t3, n3) {
|
|
32484
|
+
if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
|
|
32485
|
+
!(function(e5, t4, r3) {
|
|
32486
|
+
t4[i2] === t4 ? t4[s2].push({ id: e5, index: r3 }) : (t4[s2] = [{ id: e5, index: r3 }], t4[i2] = t4);
|
|
32487
|
+
})(r2, e4, n3);
|
|
32488
|
+
};
|
|
32489
|
+
return r2.toString = () => e3, t2.serviceRegistry.set(e3, r2), r2;
|
|
32490
|
+
};
|
|
32491
|
+
}, 585: (e2, t2, i2) => {
|
|
32492
|
+
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;
|
|
32493
|
+
const s2 = i2(343);
|
|
32494
|
+
var r2;
|
|
32495
|
+
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) {
|
|
32496
|
+
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";
|
|
32497
|
+
})(r2 || (t2.LogLevelEnum = r2 = {})), 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");
|
|
32498
|
+
}, 480: (e2, t2, i2) => {
|
|
32499
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.UnicodeService = void 0;
|
|
32500
|
+
const s2 = i2(460), r2 = i2(225);
|
|
32501
|
+
class n3 {
|
|
32502
|
+
static extractShouldJoin(e3) {
|
|
32503
|
+
return 0 != (1 & e3);
|
|
32504
|
+
}
|
|
32505
|
+
static extractWidth(e3) {
|
|
32506
|
+
return e3 >> 1 & 3;
|
|
32507
|
+
}
|
|
32508
|
+
static extractCharKind(e3) {
|
|
32509
|
+
return e3 >> 3;
|
|
32510
|
+
}
|
|
32511
|
+
static createPropertyValue(e3, t3, i3 = false) {
|
|
32512
|
+
return (16777215 & e3) << 3 | (3 & t3) << 1 | (i3 ? 1 : 0);
|
|
32513
|
+
}
|
|
32514
|
+
constructor() {
|
|
32515
|
+
this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new s2.EventEmitter(), this.onChange = this._onChange.event;
|
|
32516
|
+
const e3 = new r2.UnicodeV6();
|
|
32517
|
+
this.register(e3), this._active = e3.version, this._activeProvider = e3;
|
|
32518
|
+
}
|
|
32519
|
+
dispose() {
|
|
32520
|
+
this._onChange.dispose();
|
|
32521
|
+
}
|
|
32522
|
+
get versions() {
|
|
32523
|
+
return Object.keys(this._providers);
|
|
32524
|
+
}
|
|
32525
|
+
get activeVersion() {
|
|
32526
|
+
return this._active;
|
|
32527
|
+
}
|
|
32528
|
+
set activeVersion(e3) {
|
|
32529
|
+
if (!this._providers[e3]) throw new Error(`unknown Unicode version "${e3}"`);
|
|
32530
|
+
this._active = e3, this._activeProvider = this._providers[e3], this._onChange.fire(e3);
|
|
32531
|
+
}
|
|
32532
|
+
register(e3) {
|
|
32533
|
+
this._providers[e3.version] = e3;
|
|
32534
|
+
}
|
|
32535
|
+
wcwidth(e3) {
|
|
32536
|
+
return this._activeProvider.wcwidth(e3);
|
|
32537
|
+
}
|
|
32538
|
+
getStringCellWidth(e3) {
|
|
32539
|
+
let t3 = 0, i3 = 0;
|
|
32540
|
+
const s3 = e3.length;
|
|
32541
|
+
for (let r3 = 0; r3 < s3; ++r3) {
|
|
32542
|
+
let a = e3.charCodeAt(r3);
|
|
32543
|
+
if (55296 <= a && a <= 56319) {
|
|
32544
|
+
if (++r3 >= s3) return t3 + this.wcwidth(a);
|
|
32545
|
+
const i4 = e3.charCodeAt(r3);
|
|
32546
|
+
56320 <= i4 && i4 <= 57343 ? a = 1024 * (a - 55296) + i4 - 56320 + 65536 : t3 += this.wcwidth(i4);
|
|
32547
|
+
}
|
|
32548
|
+
const o = this.charProperties(a, i3);
|
|
32549
|
+
let h2 = n3.extractWidth(o);
|
|
32550
|
+
n3.extractShouldJoin(o) && (h2 -= n3.extractWidth(i3)), t3 += h2, i3 = o;
|
|
32551
|
+
}
|
|
32552
|
+
return t3;
|
|
32553
|
+
}
|
|
32554
|
+
charProperties(e3, t3) {
|
|
32555
|
+
return this._activeProvider.charProperties(e3, t3);
|
|
32556
|
+
}
|
|
32557
|
+
}
|
|
32558
|
+
t2.UnicodeService = n3;
|
|
32559
|
+
}, 781: (e2, t2, i2) => {
|
|
32560
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.Terminal = void 0;
|
|
32561
|
+
const s2 = i2(437), r2 = i2(969), n3 = i2(460);
|
|
32562
|
+
class a extends r2.CoreTerminal {
|
|
32563
|
+
constructor(e3 = {}) {
|
|
32564
|
+
super(e3), this._onBell = this.register(new n3.EventEmitter()), this.onBell = this._onBell.event, this._onCursorMove = this.register(new n3.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onTitleChange = this.register(new n3.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onA11yCharEmitter = this.register(new n3.EventEmitter()), this.onA11yChar = this._onA11yCharEmitter.event, this._onA11yTabEmitter = this.register(new n3.EventEmitter()), this.onA11yTab = this._onA11yTabEmitter.event, this._setup(), this.register(this._inputHandler.onRequestBell((() => this.bell()))), this.register(this._inputHandler.onRequestReset((() => this.reset()))), this.register((0, n3.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, n3.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, n3.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, n3.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter));
|
|
32565
|
+
}
|
|
32566
|
+
get buffer() {
|
|
32567
|
+
return this.buffers.active;
|
|
32568
|
+
}
|
|
32569
|
+
get markers() {
|
|
32570
|
+
return this.buffer.markers;
|
|
32571
|
+
}
|
|
32572
|
+
addMarker(e3) {
|
|
32573
|
+
if (this.buffer === this.buffers.normal) return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + e3);
|
|
32574
|
+
}
|
|
32575
|
+
bell() {
|
|
32576
|
+
this._onBell.fire();
|
|
32577
|
+
}
|
|
32578
|
+
input(e3, t3 = true) {
|
|
32579
|
+
this.coreService.triggerDataEvent(e3, t3);
|
|
32580
|
+
}
|
|
32581
|
+
resize(e3, t3) {
|
|
32582
|
+
e3 === this.cols && t3 === this.rows || super.resize(e3, t3);
|
|
32583
|
+
}
|
|
32584
|
+
clear() {
|
|
32585
|
+
if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
|
|
32586
|
+
this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)), this.buffer.lines.length = 1, this.buffer.ydisp = 0, this.buffer.ybase = 0, this.buffer.y = 0;
|
|
32587
|
+
for (let e3 = 1; e3 < this.rows; e3++) this.buffer.lines.push(this.buffer.getBlankLine(s2.DEFAULT_ATTR_DATA));
|
|
32588
|
+
this._onScroll.fire({ position: this.buffer.ydisp, source: 0 });
|
|
32589
|
+
}
|
|
32590
|
+
}
|
|
32591
|
+
reset() {
|
|
32592
|
+
this.options.rows = this.rows, this.options.cols = this.cols, this._setup(), super.reset();
|
|
32593
|
+
}
|
|
32594
|
+
}
|
|
32595
|
+
t2.Terminal = a;
|
|
32596
|
+
} }, t = {};
|
|
32597
|
+
function i(s2) {
|
|
32598
|
+
var r2 = t[s2];
|
|
32599
|
+
if (void 0 !== r2) return r2.exports;
|
|
32600
|
+
var n3 = t[s2] = { exports: {} };
|
|
32601
|
+
return e[s2].call(n3.exports, n3, n3.exports, i), n3.exports;
|
|
32602
|
+
}
|
|
32603
|
+
var s = {};
|
|
32604
|
+
(() => {
|
|
32605
|
+
var e2 = s;
|
|
32606
|
+
Object.defineProperty(e2, "__esModule", { value: true }), e2.Terminal = void 0;
|
|
32607
|
+
const t2 = i(285), r2 = i(975), n3 = i(90), a = i(781), o = i(741), h2 = i(844), c = ["cols", "rows"];
|
|
32608
|
+
class l extends h2.Disposable {
|
|
32609
|
+
constructor(e3) {
|
|
32610
|
+
super(), this._core = this.register(new a.Terminal(e3)), this._addonManager = this.register(new o.AddonManager()), this._publicOptions = { ...this._core.options };
|
|
32611
|
+
const t3 = (e4) => this._core.options[e4], i2 = (e4, t4) => {
|
|
32612
|
+
this._checkReadonlyOptions(e4), this._core.options[e4] = t4;
|
|
32613
|
+
};
|
|
32614
|
+
for (const e4 in this._core.options) {
|
|
32615
|
+
Object.defineProperty(this._publicOptions, e4, { get: () => this._core.options[e4], set: (t4) => {
|
|
32616
|
+
this._checkReadonlyOptions(e4), this._core.options[e4] = t4;
|
|
32617
|
+
} });
|
|
32618
|
+
const s2 = { get: t3.bind(this, e4), set: i2.bind(this, e4) };
|
|
32619
|
+
Object.defineProperty(this._publicOptions, e4, s2);
|
|
32620
|
+
}
|
|
32621
|
+
}
|
|
32622
|
+
_checkReadonlyOptions(e3) {
|
|
32623
|
+
if (c.includes(e3)) throw new Error(`Option "${e3}" can only be set in the constructor`);
|
|
32624
|
+
}
|
|
32625
|
+
_checkProposedApi() {
|
|
32626
|
+
if (!this._core.optionsService.options.allowProposedApi) throw new Error("You must set the allowProposedApi option to true to use proposed API");
|
|
32627
|
+
}
|
|
32628
|
+
get onBell() {
|
|
32629
|
+
return this._core.onBell;
|
|
32630
|
+
}
|
|
32631
|
+
get onBinary() {
|
|
32632
|
+
return this._core.onBinary;
|
|
32633
|
+
}
|
|
32634
|
+
get onCursorMove() {
|
|
32635
|
+
return this._core.onCursorMove;
|
|
32636
|
+
}
|
|
32637
|
+
get onData() {
|
|
32638
|
+
return this._core.onData;
|
|
32639
|
+
}
|
|
32640
|
+
get onLineFeed() {
|
|
32641
|
+
return this._core.onLineFeed;
|
|
32642
|
+
}
|
|
32643
|
+
get onResize() {
|
|
32644
|
+
return this._core.onResize;
|
|
32645
|
+
}
|
|
32646
|
+
get onScroll() {
|
|
32647
|
+
return this._core.onScroll;
|
|
32648
|
+
}
|
|
32649
|
+
get onTitleChange() {
|
|
32650
|
+
return this._core.onTitleChange;
|
|
32651
|
+
}
|
|
32652
|
+
get parser() {
|
|
32653
|
+
return this._checkProposedApi(), this._parser || (this._parser = new r2.ParserApi(this._core)), this._parser;
|
|
32654
|
+
}
|
|
32655
|
+
get unicode() {
|
|
32656
|
+
return this._checkProposedApi(), new n3.UnicodeApi(this._core);
|
|
32657
|
+
}
|
|
32658
|
+
get rows() {
|
|
32659
|
+
return this._core.rows;
|
|
32660
|
+
}
|
|
32661
|
+
get cols() {
|
|
32662
|
+
return this._core.cols;
|
|
32663
|
+
}
|
|
32664
|
+
get buffer() {
|
|
32665
|
+
return this._checkProposedApi(), this._buffer || (this._buffer = this.register(new t2.BufferNamespaceApi(this._core))), this._buffer;
|
|
32666
|
+
}
|
|
32667
|
+
get markers() {
|
|
32668
|
+
return this._checkProposedApi(), this._core.markers;
|
|
32669
|
+
}
|
|
32670
|
+
get modes() {
|
|
32671
|
+
const e3 = this._core.coreService.decPrivateModes;
|
|
32672
|
+
let t3 = "none";
|
|
32673
|
+
switch (this._core.coreMouseService.activeProtocol) {
|
|
32674
|
+
case "X10":
|
|
32675
|
+
t3 = "x10";
|
|
32676
|
+
break;
|
|
32677
|
+
case "VT200":
|
|
32678
|
+
t3 = "vt200";
|
|
32679
|
+
break;
|
|
32680
|
+
case "DRAG":
|
|
32681
|
+
t3 = "drag";
|
|
32682
|
+
break;
|
|
32683
|
+
case "ANY":
|
|
32684
|
+
t3 = "any";
|
|
32685
|
+
}
|
|
32686
|
+
return { applicationCursorKeysMode: e3.applicationCursorKeys, applicationKeypadMode: e3.applicationKeypad, bracketedPasteMode: e3.bracketedPasteMode, insertMode: this._core.coreService.modes.insertMode, mouseTrackingMode: t3, originMode: e3.origin, reverseWraparoundMode: e3.reverseWraparound, sendFocusMode: e3.sendFocus, wraparoundMode: e3.wraparound };
|
|
32687
|
+
}
|
|
32688
|
+
get options() {
|
|
32689
|
+
return this._publicOptions;
|
|
32690
|
+
}
|
|
32691
|
+
set options(e3) {
|
|
32692
|
+
for (const t3 in e3) this._publicOptions[t3] = e3[t3];
|
|
32693
|
+
}
|
|
32694
|
+
input(e3, t3 = true) {
|
|
32695
|
+
this._core.input(e3, t3);
|
|
32696
|
+
}
|
|
32697
|
+
resize(e3, t3) {
|
|
32698
|
+
this._verifyIntegers(e3, t3), this._core.resize(e3, t3);
|
|
32699
|
+
}
|
|
32700
|
+
registerMarker(e3 = 0) {
|
|
32701
|
+
return this._checkProposedApi(), this._verifyIntegers(e3), this._core.addMarker(e3);
|
|
32702
|
+
}
|
|
32703
|
+
addMarker(e3) {
|
|
32704
|
+
return this.registerMarker(e3);
|
|
32705
|
+
}
|
|
32706
|
+
dispose() {
|
|
32707
|
+
super.dispose();
|
|
32708
|
+
}
|
|
32709
|
+
scrollLines(e3) {
|
|
32710
|
+
this._verifyIntegers(e3), this._core.scrollLines(e3);
|
|
32711
|
+
}
|
|
32712
|
+
scrollPages(e3) {
|
|
32713
|
+
this._verifyIntegers(e3), this._core.scrollPages(e3);
|
|
32714
|
+
}
|
|
32715
|
+
scrollToTop() {
|
|
32716
|
+
this._core.scrollToTop();
|
|
32717
|
+
}
|
|
32718
|
+
scrollToBottom() {
|
|
32719
|
+
this._core.scrollToBottom();
|
|
32720
|
+
}
|
|
32721
|
+
scrollToLine(e3) {
|
|
32722
|
+
this._verifyIntegers(e3), this._core.scrollToLine(e3);
|
|
32723
|
+
}
|
|
32724
|
+
clear() {
|
|
32725
|
+
this._core.clear();
|
|
32726
|
+
}
|
|
32727
|
+
write(e3, t3) {
|
|
32728
|
+
this._core.write(e3, t3);
|
|
32729
|
+
}
|
|
32730
|
+
writeln(e3, t3) {
|
|
32731
|
+
this._core.write(e3), this._core.write("\r\n", t3);
|
|
32732
|
+
}
|
|
32733
|
+
reset() {
|
|
32734
|
+
this._core.reset();
|
|
32735
|
+
}
|
|
32736
|
+
loadAddon(e3) {
|
|
32737
|
+
this._addonManager.loadAddon(this, e3);
|
|
32738
|
+
}
|
|
32739
|
+
_verifyIntegers(...e3) {
|
|
32740
|
+
for (const t3 of e3) if (t3 === 1 / 0 || isNaN(t3) || t3 % 1 != 0) throw new Error("This API only accepts integers");
|
|
32741
|
+
}
|
|
32742
|
+
}
|
|
32743
|
+
e2.Terminal = l;
|
|
32744
|
+
})();
|
|
32745
|
+
var r = exports;
|
|
32746
|
+
for (var n2 in s) r[n2] = s[n2];
|
|
32747
|
+
s.__esModule && Object.defineProperty(r, "__esModule", { value: true });
|
|
32748
|
+
})();
|
|
32749
|
+
}
|
|
32750
|
+
});
|
|
32751
|
+
|
|
29361
32752
|
// server/src/terminals.ts
|
|
29362
32753
|
import * as pty from "@lydell/node-pty";
|
|
29363
32754
|
function onTerminalExit(listener) {
|
|
@@ -29392,11 +32783,13 @@ function spawnTerminal(input) {
|
|
|
29392
32783
|
backlogSize: 0,
|
|
29393
32784
|
lastOutputAt: Date.now(),
|
|
29394
32785
|
cols,
|
|
29395
|
-
rows
|
|
32786
|
+
rows,
|
|
32787
|
+
screen: new import_headless.default.Terminal({ cols, rows, scrollback: 200, allowProposedApi: true })
|
|
29396
32788
|
};
|
|
29397
32789
|
terminals.set(terminal.id, terminal);
|
|
29398
32790
|
child.onData(bindProject((data) => {
|
|
29399
32791
|
terminal.backlog.push(data);
|
|
32792
|
+
terminal.screen.write(data);
|
|
29400
32793
|
terminal.backlogSize += data.length;
|
|
29401
32794
|
terminal.lastOutputAt = Date.now();
|
|
29402
32795
|
while (terminal.backlogSize > BACKLOG_LIMIT && terminal.backlog.length > 1) {
|
|
@@ -29407,6 +32800,7 @@ function spawnTerminal(input) {
|
|
|
29407
32800
|
}));
|
|
29408
32801
|
child.onExit(bindProject(({ exitCode }) => {
|
|
29409
32802
|
terminals.delete(terminal.id);
|
|
32803
|
+
terminal.screen.dispose();
|
|
29410
32804
|
const frame = JSON.stringify({ type: "exit", code: exitCode });
|
|
29411
32805
|
for (const client of terminal.clients) {
|
|
29412
32806
|
if (client.readyState === client.OPEN) client.send(frame);
|
|
@@ -29461,9 +32855,20 @@ function resizeTerminal(terminal, cols, rows) {
|
|
|
29461
32855
|
terminal.rows = rows;
|
|
29462
32856
|
try {
|
|
29463
32857
|
terminal.pty.resize(cols, rows);
|
|
32858
|
+
terminal.screen.resize(cols, rows);
|
|
29464
32859
|
} catch {
|
|
29465
32860
|
}
|
|
29466
32861
|
}
|
|
32862
|
+
function screenLines(terminal) {
|
|
32863
|
+
return new Promise(
|
|
32864
|
+
(resolve) => terminal.screen.write("", () => {
|
|
32865
|
+
const buffer = terminal.screen.buffer.active;
|
|
32866
|
+
const lines2 = [];
|
|
32867
|
+
for (let row = 0; row < terminal.screen.rows; row += 1) lines2.push(buffer.getLine(buffer.baseY + row)?.translateToString(true) ?? "");
|
|
32868
|
+
resolve(lines2);
|
|
32869
|
+
})
|
|
32870
|
+
);
|
|
32871
|
+
}
|
|
29467
32872
|
async function pressKeys(terminal, ...keys) {
|
|
29468
32873
|
for (const key of keys) {
|
|
29469
32874
|
terminal.pty.write(key);
|
|
@@ -29500,10 +32905,11 @@ function killProjectTerminals(projectId) {
|
|
|
29500
32905
|
for (const terminal of killed) killTerminal(terminal);
|
|
29501
32906
|
return killed;
|
|
29502
32907
|
}
|
|
29503
|
-
var BACKLOG_LIMIT, terminals, exitListeners, INHERITED_MARKERS, sleep;
|
|
32908
|
+
var import_headless, BACKLOG_LIMIT, terminals, exitListeners, INHERITED_MARKERS, sleep;
|
|
29504
32909
|
var init_terminals = __esm({
|
|
29505
32910
|
"server/src/terminals.ts"() {
|
|
29506
32911
|
"use strict";
|
|
32912
|
+
import_headless = __toESM(require_xterm_headless(), 1);
|
|
29507
32913
|
init_nanoid();
|
|
29508
32914
|
init_context();
|
|
29509
32915
|
init_events();
|
|
@@ -30938,33 +34344,29 @@ __export(watchdog_exports, {
|
|
|
30938
34344
|
answerTrust: () => answerTrust,
|
|
30939
34345
|
startWatchdog: () => startWatchdog
|
|
30940
34346
|
});
|
|
30941
|
-
function screenTail(terminal) {
|
|
30942
|
-
let text = "";
|
|
30943
|
-
for (let index = terminal.backlog.length - 1; index >= 0 && text.length < SCREEN_TAIL * 2; index -= 1) text = terminal.backlog[index] + text;
|
|
30944
|
-
return text.slice(-SCREEN_TAIL * 2).replace(ANSI, "").slice(-SCREEN_TAIL);
|
|
30945
|
-
}
|
|
30946
34347
|
async function answerTrust(terminal, trust) {
|
|
30947
34348
|
if (!trust) return pressKeys(terminal, "\x1B");
|
|
30948
|
-
for (let
|
|
30949
|
-
const
|
|
30950
|
-
const
|
|
30951
|
-
const
|
|
30952
|
-
if (
|
|
30953
|
-
|
|
30954
|
-
|
|
34349
|
+
for (let attempt = 0; attempt < 4; attempt += 1) {
|
|
34350
|
+
const lines2 = (await screenLines(terminal)).map(squeeze);
|
|
34351
|
+
const yes = lines2.findIndex((line) => line.includes("yes,itrust"));
|
|
34352
|
+
const selected = lines2.findIndex((line) => line.includes("\u276F"));
|
|
34353
|
+
if (yes === -1 || selected === -1) throw new Error("Could not find the trust dialog on the screen; answer it in the terminal.");
|
|
34354
|
+
if (yes === selected) return pressKeys(terminal, "\r");
|
|
34355
|
+
const arrow = yes > selected ? "\x1B[B" : "\x1B[A";
|
|
34356
|
+
await pressKeys(terminal, ...Array(Math.abs(yes - selected)).fill(arrow));
|
|
30955
34357
|
await sleep2(300);
|
|
30956
34358
|
}
|
|
30957
|
-
throw new Error(
|
|
34359
|
+
throw new Error('Could not move the selection onto "Yes, I trust this folder"; answer it in the terminal.');
|
|
30958
34360
|
}
|
|
30959
34361
|
function lastLines(screen) {
|
|
30960
34362
|
const lines2 = screen.split(/\r?\n/).map((line) => line.replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
30961
34363
|
return lines2.slice(-14).join("\n").slice(-1200);
|
|
30962
34364
|
}
|
|
30963
|
-
function check2() {
|
|
34365
|
+
async function check2() {
|
|
30964
34366
|
for (const terminal of listTerminals()) {
|
|
30965
34367
|
if (terminal.finished || terminal.restarting) continue;
|
|
30966
34368
|
const open = listInteractions({ sessionId: terminal.sessionId, status: "open" });
|
|
30967
|
-
const screen =
|
|
34369
|
+
const screen = await screenLines(terminal);
|
|
30968
34370
|
const trustOpen = open.find((item) => item.data?.trust);
|
|
30969
34371
|
if (showsTrustDialog(screen)) {
|
|
30970
34372
|
if (!trustOpen) {
|
|
@@ -30999,23 +34401,22 @@ function check2() {
|
|
|
30999
34401
|
title: "This run looks stuck",
|
|
31000
34402
|
body: `Nothing has changed on its screen for ${Math.round(quietFor / 6e4)} minutes. It may be waiting on a dialog, or it stopped without reporting done. Reply to type into it, or stop it.
|
|
31001
34403
|
|
|
31002
|
-
${lastLines(screen)}`,
|
|
34404
|
+
${lastLines(screen.join("\n"))}`,
|
|
31003
34405
|
data: { stalled: true }
|
|
31004
34406
|
});
|
|
31005
34407
|
}
|
|
31006
34408
|
for (const id of reported.keys()) if (!allTerminals().some((terminal) => terminal.id === id)) reported.delete(id);
|
|
31007
34409
|
}
|
|
31008
34410
|
function startWatchdog(intervalMs = 3e3) {
|
|
34411
|
+
let busy = false;
|
|
31009
34412
|
const timer = setInterval(bindProject(() => {
|
|
31010
|
-
|
|
31011
|
-
|
|
31012
|
-
|
|
31013
|
-
console.error("[watchdog]", error.message);
|
|
31014
|
-
}
|
|
34413
|
+
if (busy) return;
|
|
34414
|
+
busy = true;
|
|
34415
|
+
check2().catch((error) => console.error("[watchdog]", error.message)).finally(() => busy = false);
|
|
31015
34416
|
}), intervalMs);
|
|
31016
34417
|
return () => clearInterval(timer);
|
|
31017
34418
|
}
|
|
31018
|
-
var TRUST_MARKERS, STALL_MS,
|
|
34419
|
+
var TRUST_MARKERS, STALL_MS, squeeze, showsTrustDialog, sleep2, reported;
|
|
31019
34420
|
var init_watchdog = __esm({
|
|
31020
34421
|
"server/src/watchdog.ts"() {
|
|
31021
34422
|
"use strict";
|
|
@@ -31025,14 +34426,10 @@ var init_watchdog = __esm({
|
|
|
31025
34426
|
init_terminals();
|
|
31026
34427
|
TRUST_MARKERS = ["doyoutrustthefilesinthisfolder", "isthisaprojectyoucreatedoroneyoutrust", "yes,itrustthisfolder"];
|
|
31027
34428
|
STALL_MS = Number(process.env.CLAUDER_HUB_STALL_MS) || 8 * 6e4;
|
|
31028
|
-
SCREEN_TAIL = 8e3;
|
|
31029
|
-
ANSI = /\x1b\[[0-9;?]*[ -/]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b[()][A-Za-z0-9]|\x1b[=>78]/g;
|
|
31030
34429
|
squeeze = (text) => text.toLowerCase().replace(/\s+/g, "");
|
|
31031
|
-
showsTrustDialog = (
|
|
31032
|
-
const flat2 = squeeze(
|
|
31033
|
-
|
|
31034
|
-
const end = Math.max(flat2.lastIndexOf("entertoconfirm"), flat2.lastIndexOf("itrustthisfolder"), flat2.lastIndexOf("no,exit"));
|
|
31035
|
-
return end >= 0 && flat2.length - end < 120;
|
|
34430
|
+
showsTrustDialog = (lines2) => {
|
|
34431
|
+
const flat2 = squeeze(lines2.join("\n"));
|
|
34432
|
+
return TRUST_MARKERS.some((marker) => flat2.includes(marker)) && (flat2.includes("itrustthisfolder") || flat2.includes("no,exit"));
|
|
31036
34433
|
};
|
|
31037
34434
|
sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
31038
34435
|
reported = /* @__PURE__ */ new Map();
|
|
@@ -34445,7 +37842,9 @@ hubApi.get(
|
|
|
34445
37842
|
nextCron: next ?? null,
|
|
34446
37843
|
activeToday: activeToday.length,
|
|
34447
37844
|
tokensToday: tokens,
|
|
34448
|
-
muted: muted.has(info.id)
|
|
37845
|
+
muted: muted.has(info.id),
|
|
37846
|
+
// Do not disturb for the whole project: none of its channels, nor the global ones, hear of it.
|
|
37847
|
+
paused: notificationsPaused()
|
|
34449
37848
|
};
|
|
34450
37849
|
});
|
|
34451
37850
|
})
|