@qwen-code/web-shell 0.28.4 → 0.28.7
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/NOTICES.txt +1 -1
- package/README.md +11 -1
- package/dist/{PierreFilePreview-Cn-K0sjp.js → PierreFilePreview-mjl-NyoO.js} +1 -1
- package/dist/{SpreadsheetPreview-9HeqwVPY.js → SpreadsheetPreview-CLwpWAHt.js} +2 -2
- package/dist/{WorkspaceFileBrowser-DKicahqO.js → WorkspaceFileBrowser-BUHjDcz5.js} +2 -2
- package/dist/{WorkspacePdfRangePreview-2_xkjgkQ.js → WorkspacePdfRangePreview-T1wFDszO.js} +2 -2
- package/dist/{agents-route-CgXJn9nH.js → agents-route-Cko0LJBS.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{i18n-ru-_WgXRbpi.js → i18n-ru-zX2HBIQv.js} +18 -10
- package/dist/{i18n-zh-cn-nzJpapgU.js → i18n-zh-cn-CqjpUMZJ.js} +18 -10
- package/dist/{i18n-zh-tw-DRUCD7h2.js → i18n-zh-tw-DyTerQIj.js} +29 -10
- package/dist/{index-Mt-5HQ-Q.js → index-BO8CdGLJ.js} +67694 -65705
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/{terminal-runtime-BQaN1NCS.js → terminal-runtime-ubK12HhZ.js} +997 -997
- package/dist/transcript.js +10619 -10534
- package/dist/types/App.d.ts +8 -2
- package/dist/types/ManagedAgentWebShell.d.ts +2 -0
- package/dist/types/WebShellContexts.d.ts +8 -0
- package/dist/types/adapters/transcriptToMessages.d.ts +0 -20
- package/dist/types/chat-core/ChatSurface.d.ts +5 -1
- package/dist/types/chat-core/contract.d.ts +7 -0
- package/dist/types/components/BranchPickerPopover.d.ts +15 -1
- package/dist/types/components/ComposerTaskChips.d.ts +7 -4
- package/dist/types/components/GitBranchIndicator.d.ts +4 -2
- package/dist/types/components/GitModePopover.d.ts +10 -1
- package/dist/types/components/MessageItem.d.ts +1 -0
- package/dist/types/components/MessageList.d.ts +1 -0
- package/dist/types/components/SessionOverviewPanel.d.ts +3 -2
- package/dist/types/components/TranscriptViewport.d.ts +6 -0
- package/dist/types/components/WorkspaceSelector.d.ts +5 -1
- package/dist/types/components/artifacts/artifactUtils.d.ts +3 -1
- package/dist/types/components/channels/ChannelsManagerPage.d.ts +3 -1
- package/dist/types/components/dialogs/WorkspaceHooksDialog.d.ts +9 -0
- package/dist/types/components/extensions/ExtensionsManagerPage.d.ts +3 -1
- package/dist/types/components/managed/chat-capabilities.d.ts +3 -1
- package/dist/types/components/managed/chat-controller.d.ts +65 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +1 -1
- package/dist/types/components/managed/managed-agent-provider.d.ts +13 -1
- package/dist/types/components/managed/managed-question-response.d.ts +7 -0
- package/dist/types/components/managed/use-managed-actions.d.ts +1 -1
- package/dist/types/components/managed/use-managed-chat-controller.d.ts +9 -0
- package/dist/types/components/managed/use-managed-turn-cancel.d.ts +5 -2
- package/dist/types/components/messages/AskUserQuestion.d.ts +15 -2
- package/dist/types/components/messages/MemoryMessage.d.ts +2 -1
- package/dist/types/components/messages/SettingsMessage.d.ts +13 -5
- package/dist/types/components/messages/UserMessage.d.ts +1 -0
- package/dist/types/components/plugins/PluginManagerPage.d.ts +3 -1
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +2 -4
- package/dist/types/components/sidebar/WorkspaceDetailsTooltip.d.ts +12 -1
- package/dist/types/components/sidebar/WorkspaceMenu.d.ts +9 -2
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +5 -1
- package/dist/types/components/sidebar/sidebar-hover-suppression.d.ts +1 -0
- package/dist/types/components/sidebar/workspaceOverviewModel.d.ts +4 -2
- package/dist/types/components/workspaces/WorkspaceDirectoriesSection.d.ts +3 -1
- package/dist/types/components/workspaces/use-workspace-trust-grant.d.ts +18 -0
- package/dist/types/daemon/chat-controller.d.ts +5 -0
- package/dist/types/daemon/remotePromptSidechannel.d.ts +13 -0
- package/dist/types/daemon/session/DaemonSessionProvider.d.ts +1 -0
- package/dist/types/daemon/session/actions.d.ts +5 -2
- package/dist/types/daemon/session/index.d.ts +1 -1
- package/dist/types/daemon/session/types.d.ts +20 -1
- package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +5 -1
- package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +1 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +5 -1
- package/dist/types/daemon/workspace/types.d.ts +23 -0
- package/dist/types/generated-ui/effects.d.ts +27 -0
- package/dist/types/hooks/composer-draft-session.d.ts +7 -3
- package/dist/types/hooks/useComposerCore.d.ts +14 -1
- package/dist/types/hooks/useInputHistory.d.ts +11 -1
- package/dist/types/hooks/useScopedSessions.d.ts +1 -0
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
- package/dist/types/settings.d.ts +3 -1
- package/dist/types/utils/promptAdmission.d.ts +2 -1
- package/dist/types/utils/rectangles.d.ts +8 -0
- package/dist/types/utils/sessionPreparation.d.ts +2 -1
- package/dist/{useDaemonMidTurnInjected-C7uv5N2a.js → useDaemonMidTurnInjected-K7Sl7y1O.js} +8282 -8004
- package/package.json +1 -1
- package/dist/types/components/managed/ManagedQuestionForm.d.ts +0 -13
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
var Zs = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, Kr = (e, t) => {
|
|
14
14
|
for (var i in t) Zs(e, i, { get: t[i], enumerable: !0 });
|
|
15
15
|
}, q = (e, t, i, s) => {
|
|
16
|
-
for (var r = s > 1 ? void 0 : s ? $r(t, i) : t,
|
|
16
|
+
for (var r = s > 1 ? void 0 : s ? $r(t, i) : t, n = e.length - 1, o; n >= 0; n--) (o = e[n]) && (r = (s ? o(t, i, r) : o(r)) || r);
|
|
17
17
|
return s && r && Zs(t, i, r), r;
|
|
18
|
-
}, S = (e, t) => (i, s) => t(i, s, e), rs = "Terminal input", di = { get: () => rs, set: (e) => rs = e },
|
|
18
|
+
}, S = (e, t) => (i, s) => t(i, s, e), rs = "Terminal input", di = { get: () => rs, set: (e) => rs = e }, ns = "Too much output to announce, navigate to rows manually to read", ui = { get: () => ns, set: (e) => ns = e };
|
|
19
19
|
function Ur(e) {
|
|
20
20
|
return e.replace(/\r?\n/g, "\r");
|
|
21
21
|
}
|
|
@@ -35,10 +35,10 @@ function Qs(e, t, i, s) {
|
|
|
35
35
|
e = Ur(e), e = qr(e, i.decPrivateModes.bracketedPasteMode && s.rawOptions.ignoreBracketedPasteMode !== !0), i.triggerDataEvent(e, !0), t.value = "";
|
|
36
36
|
}
|
|
37
37
|
function er(e, t, i) {
|
|
38
|
-
let s = i.getBoundingClientRect(), r = e.clientX - s.left - 10,
|
|
39
|
-
t.style.width = "20px", t.style.height = "20px", t.style.left = `${r}px`, t.style.top = `${
|
|
38
|
+
let s = i.getBoundingClientRect(), r = e.clientX - s.left - 10, n = e.clientY - s.top - 10;
|
|
39
|
+
t.style.width = "20px", t.style.height = "20px", t.style.left = `${r}px`, t.style.top = `${n}px`, t.style.zIndex = "1000", t.focus();
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function os(e, t, i, s, r) {
|
|
42
42
|
er(e, t, i), r && s.rightClickSelect(e), t.value = s.selectionText, t.select();
|
|
43
43
|
}
|
|
44
44
|
function $e(e) {
|
|
@@ -47,8 +47,8 @@ function $e(e) {
|
|
|
47
47
|
function Vt(e, t = 0, i = e.length) {
|
|
48
48
|
let s = "";
|
|
49
49
|
for (let r = t; r < i; ++r) {
|
|
50
|
-
let
|
|
51
|
-
|
|
50
|
+
let n = e[r];
|
|
51
|
+
n > 65535 ? (n -= 65536, s += String.fromCharCode((n >> 10) + 55296) + String.fromCharCode(n % 1024 + 56320)) : s += String.fromCharCode(n);
|
|
52
52
|
}
|
|
53
53
|
return s;
|
|
54
54
|
}
|
|
@@ -64,18 +64,18 @@ var Xr = class {
|
|
|
64
64
|
if (!i) return 0;
|
|
65
65
|
let s = 0, r = 0;
|
|
66
66
|
if (this._interim) {
|
|
67
|
-
let
|
|
68
|
-
56320 <=
|
|
69
|
-
}
|
|
70
|
-
for (let
|
|
71
|
-
let
|
|
72
|
-
if (55296 <=
|
|
73
|
-
if (++
|
|
74
|
-
let
|
|
75
|
-
56320 <=
|
|
67
|
+
let n = e.charCodeAt(r++);
|
|
68
|
+
56320 <= n && n <= 57343 ? t[s++] = (this._interim - 55296) * 1024 + n - 56320 + 65536 : (t[s++] = this._interim, t[s++] = n), this._interim = 0;
|
|
69
|
+
}
|
|
70
|
+
for (let n = r; n < i; ++n) {
|
|
71
|
+
let o = e.charCodeAt(n);
|
|
72
|
+
if (55296 <= o && o <= 56319) {
|
|
73
|
+
if (++n >= i) return this._interim = o, s;
|
|
74
|
+
let h = e.charCodeAt(n);
|
|
75
|
+
56320 <= h && h <= 57343 ? t[s++] = (o - 55296) * 1024 + h - 56320 + 65536 : (t[s++] = o, t[s++] = h);
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
o !== 65279 && (t[s++] = o);
|
|
79
79
|
}
|
|
80
80
|
return s;
|
|
81
81
|
}
|
|
@@ -89,7 +89,7 @@ var Xr = class {
|
|
|
89
89
|
decode(e, t) {
|
|
90
90
|
let i = e.length;
|
|
91
91
|
if (!i) return 0;
|
|
92
|
-
let s = 0, r, o,
|
|
92
|
+
let s = 0, r, n, o, h, l = 0, a = 0;
|
|
93
93
|
if (this.interim[0]) {
|
|
94
94
|
let _ = !1, f = this.interim[0];
|
|
95
95
|
f &= (f & 224) === 192 ? 31 : (f & 240) === 224 ? 15 : 7;
|
|
@@ -107,50 +107,50 @@ var Xr = class {
|
|
|
107
107
|
}
|
|
108
108
|
let d = i - 4, c = a;
|
|
109
109
|
for (; c < i; ) {
|
|
110
|
-
for (; c < d && !((r = e[c]) & 128) && !((
|
|
110
|
+
for (; c < d && !((r = e[c]) & 128) && !((n = e[c + 1]) & 128) && !((o = e[c + 2]) & 128) && !((h = e[c + 3]) & 128); ) t[s++] = r, t[s++] = n, t[s++] = o, t[s++] = h, c += 4;
|
|
111
111
|
if (r = e[c++], r < 128) t[s++] = r;
|
|
112
112
|
else if ((r & 224) === 192) {
|
|
113
113
|
if (c >= i) return this.interim[0] = r, s;
|
|
114
|
-
if (
|
|
114
|
+
if (n = e[c++], (n & 192) !== 128) {
|
|
115
115
|
c--;
|
|
116
116
|
continue;
|
|
117
117
|
}
|
|
118
|
-
if (
|
|
118
|
+
if (l = (r & 31) << 6 | n & 63, l < 128) {
|
|
119
119
|
c--;
|
|
120
120
|
continue;
|
|
121
121
|
}
|
|
122
|
-
t[s++] =
|
|
122
|
+
t[s++] = l;
|
|
123
123
|
} else if ((r & 240) === 224) {
|
|
124
124
|
if (c >= i) return this.interim[0] = r, s;
|
|
125
|
-
if (
|
|
125
|
+
if (n = e[c++], (n & 192) !== 128) {
|
|
126
126
|
c--;
|
|
127
127
|
continue;
|
|
128
128
|
}
|
|
129
|
-
if (c >= i) return this.interim[0] = r, this.interim[1] =
|
|
130
|
-
if (
|
|
129
|
+
if (c >= i) return this.interim[0] = r, this.interim[1] = n, s;
|
|
130
|
+
if (o = e[c++], (o & 192) !== 128) {
|
|
131
131
|
c--;
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
|
-
if (
|
|
135
|
-
t[s++] =
|
|
134
|
+
if (l = (r & 15) << 12 | (n & 63) << 6 | o & 63, l < 2048 || l >= 55296 && l <= 57343 || l === 65279) continue;
|
|
135
|
+
t[s++] = l;
|
|
136
136
|
} else if ((r & 248) === 240) {
|
|
137
137
|
if (c >= i) return this.interim[0] = r, s;
|
|
138
|
-
if (
|
|
138
|
+
if (n = e[c++], (n & 192) !== 128) {
|
|
139
139
|
c--;
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
|
-
if (c >= i) return this.interim[0] = r, this.interim[1] =
|
|
143
|
-
if (
|
|
142
|
+
if (c >= i) return this.interim[0] = r, this.interim[1] = n, s;
|
|
143
|
+
if (o = e[c++], (o & 192) !== 128) {
|
|
144
144
|
c--;
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
147
|
-
if (c >= i) return this.interim[0] = r, this.interim[1] =
|
|
148
|
-
if (
|
|
147
|
+
if (c >= i) return this.interim[0] = r, this.interim[1] = n, this.interim[2] = o, s;
|
|
148
|
+
if (h = e[c++], (h & 192) !== 128) {
|
|
149
149
|
c--;
|
|
150
150
|
continue;
|
|
151
151
|
}
|
|
152
|
-
if (
|
|
153
|
-
t[s++] =
|
|
152
|
+
if (l = (r & 7) << 18 | (n & 63) << 12 | (o & 63) << 6 | h & 63, l < 65536 || l > 1114111) continue;
|
|
153
|
+
t[s++] = l;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
return s;
|
|
@@ -376,7 +376,7 @@ function ie(e) {
|
|
|
376
376
|
function Jr(e, t, i) {
|
|
377
377
|
t[as] === t ? t[_i].push({ id: e, index: i }) : (t[_i] = [{ id: e, index: i }], t[as] = t);
|
|
378
378
|
}
|
|
379
|
-
var
|
|
379
|
+
var he = ie("BufferService"), nr = ie("CoreMouseService"), Qe = ie("CoreService"), Zr = ie("CharsetService"), Xi = ie("InstantiationService"), or = ie("LogService"), le = ie("OptionsService"), ar = ie("OscLinkService"), Qr = ie("UnicodeService"), Ct = ie("DecorationService"), fi = class {
|
|
380
380
|
constructor(e, t, i) {
|
|
381
381
|
this._bufferService = e, this._optionsService = t, this._oscLinkService = i;
|
|
382
382
|
}
|
|
@@ -386,33 +386,33 @@ var le = ie("BufferService"), or = ie("CoreMouseService"), Qe = ie("CoreService"
|
|
|
386
386
|
t(void 0);
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
|
-
let s = [], r = this._optionsService.rawOptions.linkHandler,
|
|
390
|
-
for (let d = 0; d <
|
|
391
|
-
if (i.loadCell(d,
|
|
392
|
-
|
|
389
|
+
let s = [], r = this._optionsService.rawOptions.linkHandler, n = new Se(), o = i.getTrimmedLength(), h = -1, l = -1, a = !1;
|
|
390
|
+
for (let d = 0; d < o; d++) if (!(l === -1 && !i.hasContent(d))) {
|
|
391
|
+
if (i.loadCell(d, n), n.hasExtendedAttrs() && n.extended.urlId) if (l === -1) {
|
|
392
|
+
l = d, h = n.extended.urlId;
|
|
393
393
|
continue;
|
|
394
|
-
} else a =
|
|
395
|
-
else
|
|
396
|
-
if (a ||
|
|
397
|
-
let c = this._oscLinkService.getLinkData(
|
|
394
|
+
} else a = n.extended.urlId !== h;
|
|
395
|
+
else l !== -1 && (a = !0);
|
|
396
|
+
if (a || l !== -1 && d === o - 1) {
|
|
397
|
+
let c = this._oscLinkService.getLinkData(h)?.uri;
|
|
398
398
|
if (c) {
|
|
399
|
-
let _ = { start: { x:
|
|
399
|
+
let _ = { start: { x: l + 1, y: e }, end: { x: d + (!a && d === o - 1 ? 1 : 0), y: e } }, f = !1;
|
|
400
400
|
if (!r?.allowNonHttpProtocols) try {
|
|
401
401
|
let u = new URL(c);
|
|
402
402
|
["http:", "https:"].includes(u.protocol) || (f = !0);
|
|
403
403
|
} catch {
|
|
404
404
|
f = !0;
|
|
405
405
|
}
|
|
406
|
-
f || s.push({ text: c, range: _, activate: (u, g) => r ? r.activate(u, g, _) :
|
|
406
|
+
f || s.push({ text: c, range: _, activate: (u, g) => r ? r.activate(u, g, _) : en(u, g), hover: (u, g) => r?.hover?.(u, g, _), leave: (u, g) => r?.leave?.(u, g, _) });
|
|
407
407
|
}
|
|
408
|
-
a = !1,
|
|
408
|
+
a = !1, n.hasExtendedAttrs() && n.extended.urlId ? (l = d, h = n.extended.urlId) : (l = -1, h = -1);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
t(s);
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
fi = q([S(0,
|
|
415
|
-
function
|
|
414
|
+
fi = q([S(0, he), S(1, le), S(2, ar)], fi);
|
|
415
|
+
function en(e, t) {
|
|
416
416
|
if (confirm(`Do you want to navigate to ${t}?
|
|
417
417
|
|
|
418
418
|
WARNING: This link could potentially be dangerous`)) {
|
|
@@ -426,11 +426,11 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
426
426
|
} else console.warn("Opening link blocked as opener could not be cleared");
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
var Yt = ie("CharSizeService"), Ae = ie("CoreBrowserService"), ji = ie("MouseService"), Oe = ie("RenderService"),
|
|
429
|
+
var Yt = ie("CharSizeService"), Ae = ie("CoreBrowserService"), ji = ie("MouseService"), Oe = ie("RenderService"), tn = ie("SelectionService"), hr = ie("CharacterJoinerService"), rt = ie("ThemeService"), lr = ie("LinkProviderService"), sn = class {
|
|
430
430
|
constructor() {
|
|
431
431
|
this.listeners = [], this.unexpectedErrorHandler = function(e) {
|
|
432
432
|
setTimeout(() => {
|
|
433
|
-
throw e.stack ?
|
|
433
|
+
throw e.stack ? hs.isErrorNoTelemetry(e) ? new hs(e.message + `
|
|
434
434
|
|
|
435
435
|
` + e.stack) : new Error(e.message + `
|
|
436
436
|
|
|
@@ -463,23 +463,23 @@ var Yt = ie("CharSizeService"), Ae = ie("CoreBrowserService"), ji = ie("MouseSer
|
|
|
463
463
|
onUnexpectedExternalError(e) {
|
|
464
464
|
this.unexpectedErrorHandler(e);
|
|
465
465
|
}
|
|
466
|
-
},
|
|
466
|
+
}, rn = new sn();
|
|
467
467
|
function At(e) {
|
|
468
|
-
|
|
468
|
+
nn(e) || rn.onUnexpectedError(e);
|
|
469
469
|
}
|
|
470
470
|
var pi = "Canceled";
|
|
471
|
-
function
|
|
472
|
-
return e instanceof
|
|
471
|
+
function nn(e) {
|
|
472
|
+
return e instanceof on ? !0 : e instanceof Error && e.name === pi && e.message === pi;
|
|
473
473
|
}
|
|
474
|
-
var
|
|
474
|
+
var on = class extends Error {
|
|
475
475
|
constructor() {
|
|
476
476
|
super(pi), this.name = this.message;
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
function
|
|
479
|
+
function an(e) {
|
|
480
480
|
return new Error(`Illegal argument: ${e}`);
|
|
481
481
|
}
|
|
482
|
-
var
|
|
482
|
+
var hs = class gi extends Error {
|
|
483
483
|
constructor(t) {
|
|
484
484
|
super(t), this.name = "CodeExpectedError";
|
|
485
485
|
}
|
|
@@ -499,26 +499,26 @@ var ls = class gi extends Error {
|
|
|
499
499
|
function ue(e, t = 0) {
|
|
500
500
|
return e[e.length - (1 + t)];
|
|
501
501
|
}
|
|
502
|
-
var
|
|
502
|
+
var hn;
|
|
503
503
|
((e) => {
|
|
504
|
-
function t(
|
|
505
|
-
return
|
|
504
|
+
function t(n) {
|
|
505
|
+
return n < 0;
|
|
506
506
|
}
|
|
507
507
|
e.isLessThan = t;
|
|
508
|
-
function i(
|
|
509
|
-
return
|
|
508
|
+
function i(n) {
|
|
509
|
+
return n <= 0;
|
|
510
510
|
}
|
|
511
511
|
e.isLessThanOrEqual = i;
|
|
512
|
-
function s(
|
|
513
|
-
return
|
|
512
|
+
function s(n) {
|
|
513
|
+
return n > 0;
|
|
514
514
|
}
|
|
515
515
|
e.isGreaterThan = s;
|
|
516
|
-
function r(
|
|
517
|
-
return
|
|
516
|
+
function r(n) {
|
|
517
|
+
return n === 0;
|
|
518
518
|
}
|
|
519
519
|
e.isNeitherLessOrGreaterThan = r, e.greaterThan = 1, e.lessThan = -1, e.neitherLessOrGreaterThan = 0;
|
|
520
|
-
})(
|
|
521
|
-
function
|
|
520
|
+
})(hn ||= {});
|
|
521
|
+
function ln(e, t) {
|
|
522
522
|
let i = this, s = !1, r;
|
|
523
523
|
return function() {
|
|
524
524
|
return s || (s = !0, t || (r = e.apply(i, arguments))), r;
|
|
@@ -539,22 +539,22 @@ var dr;
|
|
|
539
539
|
yield B;
|
|
540
540
|
}
|
|
541
541
|
e.single = r;
|
|
542
|
-
function
|
|
542
|
+
function n(B) {
|
|
543
543
|
return t(B) ? B : r(B);
|
|
544
544
|
}
|
|
545
|
-
e.wrap =
|
|
546
|
-
function
|
|
545
|
+
e.wrap = n;
|
|
546
|
+
function o(B) {
|
|
547
547
|
return B || i;
|
|
548
548
|
}
|
|
549
|
-
e.from =
|
|
550
|
-
function*
|
|
549
|
+
e.from = o;
|
|
550
|
+
function* h(B) {
|
|
551
551
|
for (let T = B.length - 1; T >= 0; T--) yield B[T];
|
|
552
552
|
}
|
|
553
|
-
e.reverse =
|
|
554
|
-
function
|
|
553
|
+
e.reverse = h;
|
|
554
|
+
function l(B) {
|
|
555
555
|
return !B || B[Symbol.iterator]().next().done === !0;
|
|
556
556
|
}
|
|
557
|
-
e.isEmpty =
|
|
557
|
+
e.isEmpty = l;
|
|
558
558
|
function a(B) {
|
|
559
559
|
return B[Symbol.iterator]().next().value;
|
|
560
560
|
}
|
|
@@ -631,11 +631,11 @@ function Je(e) {
|
|
|
631
631
|
return Array.isArray(e) ? [] : e;
|
|
632
632
|
} else if (e) return e.dispose(), e;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function cn(...e) {
|
|
635
635
|
return z(() => Je(e));
|
|
636
636
|
}
|
|
637
637
|
function z(e) {
|
|
638
|
-
return { dispose:
|
|
638
|
+
return { dispose: ln(() => {
|
|
639
639
|
e();
|
|
640
640
|
}) };
|
|
641
641
|
}
|
|
@@ -712,7 +712,7 @@ var st = class {
|
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
714
|
mi.Undefined = new mi(void 0);
|
|
715
|
-
var $ = mi,
|
|
715
|
+
var $ = mi, ls = class {
|
|
716
716
|
constructor() {
|
|
717
717
|
this._first = $.Undefined, this._last = $.Undefined, this._size = 0;
|
|
718
718
|
}
|
|
@@ -775,12 +775,12 @@ var $ = mi, hs = class {
|
|
|
775
775
|
let e = this._first;
|
|
776
776
|
for (; e !== $.Undefined; ) yield e.element, e = e.next;
|
|
777
777
|
}
|
|
778
|
-
},
|
|
778
|
+
}, dn = globalThis.performance && typeof globalThis.performance.now == "function", un = class fr {
|
|
779
779
|
static create(t) {
|
|
780
780
|
return new fr(t);
|
|
781
781
|
}
|
|
782
782
|
constructor(t) {
|
|
783
|
-
this._now =
|
|
783
|
+
this._now = dn && t === !1 ? Date.now : globalThis.performance.now.bind(globalThis.performance), this._startTime = this._now(), this._stopTime = -1;
|
|
784
784
|
}
|
|
785
785
|
stop() {
|
|
786
786
|
this._stopTime = this._now();
|
|
@@ -791,7 +791,7 @@ var $ = mi, hs = class {
|
|
|
791
791
|
elapsed() {
|
|
792
792
|
return this._stopTime !== -1 ? this._stopTime - this._startTime : this._now() - this._startTime;
|
|
793
793
|
}
|
|
794
|
-
},
|
|
794
|
+
}, ne;
|
|
795
795
|
((e) => {
|
|
796
796
|
e.None = () => L.None;
|
|
797
797
|
function t(x, v) {
|
|
@@ -818,26 +818,26 @@ var $ = mi, hs = class {
|
|
|
818
818
|
}, null, R), C);
|
|
819
819
|
}
|
|
820
820
|
e.forEach = r;
|
|
821
|
-
function
|
|
821
|
+
function n(x, v, C) {
|
|
822
822
|
return a((w, k = null, R) => x((b) => v(b) && w.call(k, b), null, R), C);
|
|
823
823
|
}
|
|
824
|
-
e.filter =
|
|
825
|
-
function
|
|
824
|
+
e.filter = n;
|
|
825
|
+
function o(x) {
|
|
826
826
|
return x;
|
|
827
827
|
}
|
|
828
|
-
e.signal =
|
|
829
|
-
function
|
|
828
|
+
e.signal = o;
|
|
829
|
+
function h(...x) {
|
|
830
830
|
return (v, C = null, w) => {
|
|
831
|
-
let k =
|
|
831
|
+
let k = cn(...x.map((R) => R((b) => v.call(C, b))));
|
|
832
832
|
return d(k, w);
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
|
-
e.any =
|
|
836
|
-
function
|
|
835
|
+
e.any = h;
|
|
836
|
+
function l(x, v, C, w) {
|
|
837
837
|
let k = C;
|
|
838
838
|
return s(x, (R) => (k = v(k, R), k), w);
|
|
839
839
|
}
|
|
840
|
-
e.reduce =
|
|
840
|
+
e.reduce = l;
|
|
841
841
|
function a(x, v) {
|
|
842
842
|
let C, w = { onWillAddFirstListener() {
|
|
843
843
|
C = x(k.fire, k);
|
|
@@ -871,7 +871,7 @@ var $ = mi, hs = class {
|
|
|
871
871
|
e.accumulate = _;
|
|
872
872
|
function f(x, v = (w, k) => w === k, C) {
|
|
873
873
|
let w = !0, k;
|
|
874
|
-
return
|
|
874
|
+
return n(x, (R) => {
|
|
875
875
|
let b = w || !v(R, k);
|
|
876
876
|
return w = !1, k = R, b;
|
|
877
877
|
}, C);
|
|
@@ -1015,13 +1015,13 @@ var $ = mi, hs = class {
|
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
1017
|
e.fromObservableLight = F;
|
|
1018
|
-
})(
|
|
1018
|
+
})(ne ||= {});
|
|
1019
1019
|
var wi = class bi {
|
|
1020
1020
|
constructor(t) {
|
|
1021
1021
|
this.listenerCount = 0, this.invocationCount = 0, this.elapsedOverall = 0, this.durations = [], this.name = `${t}_${bi._idPool++}`, bi.all.add(this);
|
|
1022
1022
|
}
|
|
1023
1023
|
start(t) {
|
|
1024
|
-
this._stopWatch = new
|
|
1024
|
+
this._stopWatch = new un(), this.listenerCount = t;
|
|
1025
1025
|
}
|
|
1026
1026
|
stop() {
|
|
1027
1027
|
if (this._stopWatch) {
|
|
@@ -1031,7 +1031,7 @@ var wi = class bi {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
1033
|
wi.all = /* @__PURE__ */ new Set(), wi._idPool = 0;
|
|
1034
|
-
var
|
|
1034
|
+
var _n = wi, fn = -1, pr = class gr {
|
|
1035
1035
|
constructor(t, i, s = (gr._idPool++).toString(16).padStart(3, "0")) {
|
|
1036
1036
|
this._errorHandler = t, this.threshold = i, this.name = s, this._warnCountdown = 0;
|
|
1037
1037
|
}
|
|
@@ -1045,14 +1045,14 @@ var _o = wi, fo = -1, pr = class gr {
|
|
|
1045
1045
|
let r = this._stacks.get(t.value) || 0;
|
|
1046
1046
|
if (this._stacks.set(t.value, r + 1), this._warnCountdown -= 1, this._warnCountdown <= 0) {
|
|
1047
1047
|
this._warnCountdown = s * 0.5;
|
|
1048
|
-
let [
|
|
1049
|
-
console.warn(
|
|
1050
|
-
let
|
|
1051
|
-
this._errorHandler(
|
|
1048
|
+
let [n, o] = this.getMostFrequentStack(), h = `[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`;
|
|
1049
|
+
console.warn(h), console.warn(n);
|
|
1050
|
+
let l = new vn(h, n);
|
|
1051
|
+
this._errorHandler(l);
|
|
1052
1052
|
}
|
|
1053
1053
|
return () => {
|
|
1054
|
-
let
|
|
1055
|
-
this._stacks.set(t.value,
|
|
1054
|
+
let n = this._stacks.get(t.value) || 0;
|
|
1055
|
+
this._stacks.set(t.value, n - 1);
|
|
1056
1056
|
};
|
|
1057
1057
|
}
|
|
1058
1058
|
getMostFrequentStack() {
|
|
@@ -1063,7 +1063,7 @@ var _o = wi, fo = -1, pr = class gr {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
};
|
|
1065
1065
|
pr._idPool = 1;
|
|
1066
|
-
var
|
|
1066
|
+
var pn = pr, gn = class vr {
|
|
1067
1067
|
constructor(t) {
|
|
1068
1068
|
this.value = t;
|
|
1069
1069
|
}
|
|
@@ -1076,21 +1076,21 @@ var po = pr, go = class vr {
|
|
|
1076
1076
|
`).slice(2).join(`
|
|
1077
1077
|
`));
|
|
1078
1078
|
}
|
|
1079
|
-
},
|
|
1079
|
+
}, vn = class extends Error {
|
|
1080
1080
|
constructor(e, t) {
|
|
1081
1081
|
super(e), this.name = "ListenerLeakError", this.stack = t;
|
|
1082
1082
|
}
|
|
1083
|
-
},
|
|
1083
|
+
}, mn = class extends Error {
|
|
1084
1084
|
constructor(e, t) {
|
|
1085
1085
|
super(e), this.name = "ListenerRefusalError", this.stack = t;
|
|
1086
1086
|
}
|
|
1087
|
-
},
|
|
1087
|
+
}, Sn = 0, Qt = class {
|
|
1088
1088
|
constructor(e) {
|
|
1089
|
-
this.value = e, this.id =
|
|
1089
|
+
this.value = e, this.id = Sn++;
|
|
1090
1090
|
}
|
|
1091
|
-
},
|
|
1091
|
+
}, wn = 2, bn, m = class {
|
|
1092
1092
|
constructor(e) {
|
|
1093
|
-
this._size = 0, this._options = e, this._leakageMon = this._options?.leakWarningThreshold ? new
|
|
1093
|
+
this._size = 0, this._options = e, this._leakageMon = this._options?.leakWarningThreshold ? new pn(e?.onListenerError ?? At, this._options?.leakWarningThreshold ?? fn) : void 0, this._perfMon = this._options?._profName ? new _n(this._options._profName) : void 0, this._deliveryQueue = this._options?.deliveryQueue;
|
|
1094
1094
|
}
|
|
1095
1095
|
dispose() {
|
|
1096
1096
|
this._disposed || (this._disposed = !0, this._deliveryQueue?.current === this && this._deliveryQueue.reset(), this._listeners && (this._listeners = void 0, this._size = 0), this._options?.onDidRemoveLastListener?.(), this._leakageMon?.dispose());
|
|
@@ -1098,19 +1098,19 @@ var po = pr, go = class vr {
|
|
|
1098
1098
|
get event() {
|
|
1099
1099
|
return this._event ??= (e, t, i) => {
|
|
1100
1100
|
if (this._leakageMon && this._size > this._leakageMon.threshold ** 2) {
|
|
1101
|
-
let
|
|
1102
|
-
console.warn(
|
|
1103
|
-
let
|
|
1104
|
-
return (this._options?.onListenerError || At)(
|
|
1101
|
+
let o = `[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;
|
|
1102
|
+
console.warn(o);
|
|
1103
|
+
let h = this._leakageMon.getMostFrequentStack() ?? ["UNKNOWN stack", -1], l = new mn(`${o}. HINT: Stack shows most frequent listener (${h[1]}-times)`, h[0]);
|
|
1104
|
+
return (this._options?.onListenerError || At)(l), L.None;
|
|
1105
1105
|
}
|
|
1106
1106
|
if (this._disposed) return L.None;
|
|
1107
1107
|
t && (e = e.bind(t));
|
|
1108
1108
|
let s = new Qt(e), r;
|
|
1109
|
-
this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && (s.stack =
|
|
1110
|
-
let
|
|
1109
|
+
this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && (s.stack = gn.create(), r = this._leakageMon.check(s.stack, this._size + 1)), this._listeners ? this._listeners instanceof Qt ? (this._deliveryQueue ??= new yn(), this._listeners = [this._listeners, s]) : this._listeners.push(s) : (this._options?.onWillAddFirstListener?.(this), this._listeners = s, this._options?.onDidAddFirstListener?.(this)), this._size++;
|
|
1110
|
+
let n = z(() => {
|
|
1111
1111
|
r?.(), this._removeListener(s);
|
|
1112
1112
|
});
|
|
1113
|
-
return i instanceof Ue ? i.add(
|
|
1113
|
+
return i instanceof Ue ? i.add(n) : Array.isArray(i) && i.push(n), n;
|
|
1114
1114
|
}, this._event;
|
|
1115
1115
|
}
|
|
1116
1116
|
_removeListener(e) {
|
|
@@ -1123,9 +1123,9 @@ var po = pr, go = class vr {
|
|
|
1123
1123
|
if (i === -1) throw console.log("disposed?", this._disposed), console.log("size?", this._size), console.log("arr?", JSON.stringify(this._listeners)), new Error("Attempted to dispose unknown listener");
|
|
1124
1124
|
this._size--, t[i] = void 0;
|
|
1125
1125
|
let s = this._deliveryQueue.current === this;
|
|
1126
|
-
if (this._size *
|
|
1126
|
+
if (this._size * wn <= t.length) {
|
|
1127
1127
|
let r = 0;
|
|
1128
|
-
for (let
|
|
1128
|
+
for (let n = 0; n < t.length; n++) t[n] ? t[r++] = t[n] : s && (this._deliveryQueue.end--, r < this._deliveryQueue.i && this._deliveryQueue.i--);
|
|
1129
1129
|
t.length = r;
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
@@ -1158,7 +1158,7 @@ var po = pr, go = class vr {
|
|
|
1158
1158
|
hasListeners() {
|
|
1159
1159
|
return this._size > 0;
|
|
1160
1160
|
}
|
|
1161
|
-
},
|
|
1161
|
+
}, yn = class {
|
|
1162
1162
|
constructor() {
|
|
1163
1163
|
this.i = -1, this.end = 0;
|
|
1164
1164
|
}
|
|
@@ -1200,38 +1200,38 @@ var po = pr, go = class vr {
|
|
|
1200
1200
|
};
|
|
1201
1201
|
yi.INSTANCE = new yi();
|
|
1202
1202
|
var Gi = yi;
|
|
1203
|
-
function
|
|
1203
|
+
function Cn(e, t, i) {
|
|
1204
1204
|
typeof t == "string" && (t = e.matchMedia(t)), t.addEventListener("change", i);
|
|
1205
1205
|
}
|
|
1206
1206
|
Gi.INSTANCE.onDidChangeZoomLevel;
|
|
1207
|
-
function
|
|
1207
|
+
function xn(e) {
|
|
1208
1208
|
return Gi.INSTANCE.getZoomFactor(e);
|
|
1209
1209
|
}
|
|
1210
1210
|
Gi.INSTANCE.onDidChangeFullscreen;
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1213
|
-
|
|
1211
|
+
var nt = typeof navigator == "object" ? navigator.userAgent : "", Ci = nt.indexOf("Firefox") >= 0, kn = nt.indexOf("AppleWebKit") >= 0, Ji = nt.indexOf("Chrome") >= 0, En = !Ji && nt.indexOf("Safari") >= 0;
|
|
1212
|
+
nt.indexOf("Electron/") >= 0;
|
|
1213
|
+
nt.indexOf("Android") >= 0;
|
|
1214
1214
|
var ei = !1;
|
|
1215
1215
|
if (typeof Te.matchMedia == "function") {
|
|
1216
1216
|
let e = Te.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"), t = Te.matchMedia("(display-mode: fullscreen)");
|
|
1217
|
-
ei = e.matches,
|
|
1217
|
+
ei = e.matches, Cn(Te, e, ({ matches: i }) => {
|
|
1218
1218
|
ei && t.matches || (ei = i);
|
|
1219
1219
|
});
|
|
1220
1220
|
}
|
|
1221
|
-
var it = "en", xi = !1, ki = !1, Ot = !1, mr = !1, Dt, It = it, cs = it,
|
|
1221
|
+
var it = "en", xi = !1, ki = !1, Ot = !1, mr = !1, Dt, It = it, cs = it, Bn, Pe, Ge = globalThis, fe;
|
|
1222
1222
|
typeof Ge.vscode < "u" && typeof Ge.vscode.process < "u" ? fe = Ge.vscode.process : typeof process < "u" && typeof process?.versions?.node == "string" && (fe = process);
|
|
1223
|
-
var
|
|
1223
|
+
var Dn = typeof fe?.versions?.electron == "string", Rn = Dn && fe?.type === "renderer";
|
|
1224
1224
|
if (typeof fe == "object") {
|
|
1225
1225
|
xi = fe.platform === "win32", ki = fe.platform === "darwin", Ot = fe.platform === "linux", Ot && fe.env.SNAP && fe.env.SNAP_REVISION, fe.env.CI || fe.env.BUILD_ARTIFACTSTAGINGDIRECTORY, Dt = it, It = it;
|
|
1226
1226
|
let e = fe.env.VSCODE_NLS_CONFIG;
|
|
1227
1227
|
if (e) try {
|
|
1228
1228
|
let t = JSON.parse(e);
|
|
1229
|
-
Dt = t.userLocale, cs = t.osLocale, It = t.resolvedLanguage || it,
|
|
1229
|
+
Dt = t.userLocale, cs = t.osLocale, It = t.resolvedLanguage || it, Bn = t.languagePack?.translationsConfigFile;
|
|
1230
1230
|
} catch {
|
|
1231
1231
|
}
|
|
1232
1232
|
mr = !0;
|
|
1233
|
-
} else typeof navigator == "object" && !
|
|
1234
|
-
var Sr = xi, Re = ki,
|
|
1233
|
+
} else typeof navigator == "object" && !Rn ? (Pe = navigator.userAgent, xi = Pe.indexOf("Windows") >= 0, ki = Pe.indexOf("Macintosh") >= 0, (Pe.indexOf("Macintosh") >= 0 || Pe.indexOf("iPad") >= 0 || Pe.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints > 0, Ot = Pe.indexOf("Linux") >= 0, Pe?.indexOf("Mobi") >= 0, It = globalThis._VSCODE_NLS_LANGUAGE || it, Dt = navigator.language.toLowerCase(), cs = Dt) : console.error("Unable to resolve platform.");
|
|
1234
|
+
var Sr = xi, Re = ki, Mn = Ot, ds = mr, Me = Pe, We = It, Ln;
|
|
1235
1235
|
((e) => {
|
|
1236
1236
|
function t() {
|
|
1237
1237
|
return We;
|
|
@@ -1245,16 +1245,16 @@ var Sr = xi, Re = ki, Mo = Ot, ds = mr, Me = Pe, We = It, Lo;
|
|
|
1245
1245
|
return We === "en";
|
|
1246
1246
|
}
|
|
1247
1247
|
e.isDefault = s;
|
|
1248
|
-
})(
|
|
1249
|
-
var
|
|
1248
|
+
})(Ln ||= {});
|
|
1249
|
+
var Pn = typeof Ge.postMessage == "function" && !Ge.importScripts;
|
|
1250
1250
|
(() => {
|
|
1251
|
-
if (
|
|
1251
|
+
if (Pn) {
|
|
1252
1252
|
let e = [];
|
|
1253
1253
|
Ge.addEventListener("message", (i) => {
|
|
1254
1254
|
if (i.data && i.data.vscodeScheduleAsyncWork) for (let s = 0, r = e.length; s < r; s++) {
|
|
1255
|
-
let
|
|
1256
|
-
if (
|
|
1257
|
-
e.splice(s, 1),
|
|
1255
|
+
let n = e[s];
|
|
1256
|
+
if (n.id === i.data.vscodeScheduleAsyncWork) {
|
|
1257
|
+
e.splice(s, 1), n.callback();
|
|
1258
1258
|
return;
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
@@ -1267,9 +1267,9 @@ var Po = typeof Ge.postMessage == "function" && !Ge.importScripts;
|
|
|
1267
1267
|
}
|
|
1268
1268
|
return (e) => setTimeout(e);
|
|
1269
1269
|
})();
|
|
1270
|
-
var
|
|
1270
|
+
var Tn = !!(Me && Me.indexOf("Chrome") >= 0);
|
|
1271
1271
|
Me && Me.indexOf("Firefox") >= 0;
|
|
1272
|
-
!
|
|
1272
|
+
!Tn && Me && Me.indexOf("Safari") >= 0;
|
|
1273
1273
|
Me && Me.indexOf("Edg/") >= 0;
|
|
1274
1274
|
Me && Me.indexOf("Android") >= 0;
|
|
1275
1275
|
var et = typeof navigator == "object" ? navigator : {};
|
|
@@ -1287,31 +1287,31 @@ var Zi = class {
|
|
|
1287
1287
|
strToKeyCode(e) {
|
|
1288
1288
|
return this._strToKeyCode[e.toLowerCase()] || 0;
|
|
1289
1289
|
}
|
|
1290
|
-
}, ti = new Zi(), us = new Zi(), _s = new Zi(),
|
|
1290
|
+
}, ti = new Zi(), us = new Zi(), _s = new Zi(), An = new Array(230), wr;
|
|
1291
1291
|
((e) => {
|
|
1292
|
-
function t(
|
|
1293
|
-
return ti.keyCodeToStr(
|
|
1292
|
+
function t(h) {
|
|
1293
|
+
return ti.keyCodeToStr(h);
|
|
1294
1294
|
}
|
|
1295
1295
|
e.toString = t;
|
|
1296
|
-
function i(
|
|
1297
|
-
return ti.strToKeyCode(
|
|
1296
|
+
function i(h) {
|
|
1297
|
+
return ti.strToKeyCode(h);
|
|
1298
1298
|
}
|
|
1299
1299
|
e.fromString = i;
|
|
1300
|
-
function s(
|
|
1301
|
-
return us.keyCodeToStr(
|
|
1300
|
+
function s(h) {
|
|
1301
|
+
return us.keyCodeToStr(h);
|
|
1302
1302
|
}
|
|
1303
1303
|
e.toUserSettingsUS = s;
|
|
1304
|
-
function r(
|
|
1305
|
-
return _s.keyCodeToStr(
|
|
1304
|
+
function r(h) {
|
|
1305
|
+
return _s.keyCodeToStr(h);
|
|
1306
1306
|
}
|
|
1307
1307
|
e.toUserSettingsGeneral = r;
|
|
1308
|
-
function
|
|
1309
|
-
return us.strToKeyCode(
|
|
1308
|
+
function n(h) {
|
|
1309
|
+
return us.strToKeyCode(h) || _s.strToKeyCode(h);
|
|
1310
1310
|
}
|
|
1311
|
-
e.fromUserSettings =
|
|
1312
|
-
function
|
|
1313
|
-
if (
|
|
1314
|
-
switch (
|
|
1311
|
+
e.fromUserSettings = n;
|
|
1312
|
+
function o(h) {
|
|
1313
|
+
if (h >= 98 && h <= 113) return null;
|
|
1314
|
+
switch (h) {
|
|
1315
1315
|
case 16:
|
|
1316
1316
|
return "Up";
|
|
1317
1317
|
case 18:
|
|
@@ -1321,13 +1321,13 @@ var Zi = class {
|
|
|
1321
1321
|
case 17:
|
|
1322
1322
|
return "Right";
|
|
1323
1323
|
}
|
|
1324
|
-
return ti.keyCodeToStr(
|
|
1324
|
+
return ti.keyCodeToStr(h);
|
|
1325
1325
|
}
|
|
1326
|
-
e.toElectronAccelerator =
|
|
1326
|
+
e.toElectronAccelerator = o;
|
|
1327
1327
|
})(wr ||= {});
|
|
1328
|
-
var
|
|
1329
|
-
constructor(t, i, s, r,
|
|
1330
|
-
this.ctrlKey = t, this.shiftKey = i, this.altKey = s, this.metaKey = r, this.keyCode =
|
|
1328
|
+
var On = class br {
|
|
1329
|
+
constructor(t, i, s, r, n) {
|
|
1330
|
+
this.ctrlKey = t, this.shiftKey = i, this.altKey = s, this.metaKey = r, this.keyCode = n;
|
|
1331
1331
|
}
|
|
1332
1332
|
equals(t) {
|
|
1333
1333
|
return t instanceof br && this.ctrlKey === t.ctrlKey && this.shiftKey === t.shiftKey && this.altKey === t.altKey && this.metaKey === t.metaKey && this.keyCode === t.keyCode;
|
|
@@ -1340,14 +1340,14 @@ var Oo = class br {
|
|
|
1340
1340
|
return this.keyCode === 0 || this.keyCode === 5 || this.keyCode === 57 || this.keyCode === 6 || this.keyCode === 4;
|
|
1341
1341
|
}
|
|
1342
1342
|
toKeybinding() {
|
|
1343
|
-
return new
|
|
1343
|
+
return new In([this]);
|
|
1344
1344
|
}
|
|
1345
1345
|
isDuplicateModifierCase() {
|
|
1346
1346
|
return this.ctrlKey && this.keyCode === 5 || this.shiftKey && this.keyCode === 4 || this.altKey && this.keyCode === 6 || this.metaKey && this.keyCode === 57;
|
|
1347
1347
|
}
|
|
1348
|
-
},
|
|
1348
|
+
}, In = class {
|
|
1349
1349
|
constructor(e) {
|
|
1350
|
-
if (e.length === 0) throw
|
|
1350
|
+
if (e.length === 0) throw an("chords");
|
|
1351
1351
|
this.chords = e;
|
|
1352
1352
|
}
|
|
1353
1353
|
getHashCode() {
|
|
@@ -1361,7 +1361,7 @@ var Oo = class br {
|
|
|
1361
1361
|
return !0;
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
|
-
function
|
|
1364
|
+
function Nn(e) {
|
|
1365
1365
|
if (e.charCode) {
|
|
1366
1366
|
let i = String.fromCharCode(e.charCode).toUpperCase();
|
|
1367
1367
|
return wr.fromString(i);
|
|
@@ -1372,7 +1372,7 @@ function No(e) {
|
|
|
1372
1372
|
case 59:
|
|
1373
1373
|
return 85;
|
|
1374
1374
|
case 60:
|
|
1375
|
-
if (
|
|
1375
|
+
if (Mn) return 97;
|
|
1376
1376
|
break;
|
|
1377
1377
|
case 61:
|
|
1378
1378
|
return 86;
|
|
@@ -1386,15 +1386,15 @@ function No(e) {
|
|
|
1386
1386
|
if (Re) return 57;
|
|
1387
1387
|
break;
|
|
1388
1388
|
}
|
|
1389
|
-
else if (
|
|
1389
|
+
else if (kn && (Re && t === 93 || !Re && t === 92))
|
|
1390
1390
|
return 57;
|
|
1391
|
-
return
|
|
1391
|
+
return An[t] || 0;
|
|
1392
1392
|
}
|
|
1393
|
-
var
|
|
1393
|
+
var Hn = Re ? 256 : 2048, Wn = 512, zn = 1024, Fn = Re ? 2048 : 256, fs = class {
|
|
1394
1394
|
constructor(e) {
|
|
1395
1395
|
this._standardKeyboardEventBrand = !0;
|
|
1396
1396
|
let t = e;
|
|
1397
|
-
this.browserEvent = t, this.target = t.target, this.ctrlKey = t.ctrlKey, this.shiftKey = t.shiftKey, this.altKey = t.altKey, this.metaKey = t.metaKey, this.altGraphKey = t.getModifierState?.("AltGraph"), this.keyCode =
|
|
1397
|
+
this.browserEvent = t, this.target = t.target, this.ctrlKey = t.ctrlKey, this.shiftKey = t.shiftKey, this.altKey = t.altKey, this.metaKey = t.metaKey, this.altGraphKey = t.getModifierState?.("AltGraph"), this.keyCode = Nn(t), this.code = t.code, this.ctrlKey = this.ctrlKey || this.keyCode === 5, this.altKey = this.altKey || this.keyCode === 6, this.shiftKey = this.shiftKey || this.keyCode === 4, this.metaKey = this.metaKey || this.keyCode === 57, this._asKeybinding = this._computeKeybinding(), this._asKeyCodeChord = this._computeKeyCodeChord();
|
|
1398
1398
|
}
|
|
1399
1399
|
preventDefault() {
|
|
1400
1400
|
this.browserEvent && this.browserEvent.preventDefault && this.browserEvent.preventDefault();
|
|
@@ -1412,14 +1412,14 @@ var Ho = Re ? 256 : 2048, Wo = 512, zo = 1024, Fo = Re ? 2048 : 256, fs = class
|
|
|
1412
1412
|
let e = 0;
|
|
1413
1413
|
this.keyCode !== 5 && this.keyCode !== 4 && this.keyCode !== 6 && this.keyCode !== 57 && (e = this.keyCode);
|
|
1414
1414
|
let t = 0;
|
|
1415
|
-
return this.ctrlKey && (t |=
|
|
1415
|
+
return this.ctrlKey && (t |= Hn), this.altKey && (t |= Wn), this.shiftKey && (t |= zn), this.metaKey && (t |= Fn), t |= e, t;
|
|
1416
1416
|
}
|
|
1417
1417
|
_computeKeyCodeChord() {
|
|
1418
1418
|
let e = 0;
|
|
1419
|
-
return this.keyCode !== 5 && this.keyCode !== 4 && this.keyCode !== 6 && this.keyCode !== 57 && (e = this.keyCode), new
|
|
1419
|
+
return this.keyCode !== 5 && this.keyCode !== 4 && this.keyCode !== 6 && this.keyCode !== 57 && (e = this.keyCode), new On(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, e);
|
|
1420
1420
|
}
|
|
1421
1421
|
}, ps = /* @__PURE__ */ new WeakMap();
|
|
1422
|
-
function $
|
|
1422
|
+
function $n(e) {
|
|
1423
1423
|
if (!e.parent || e.parent === e) return null;
|
|
1424
1424
|
try {
|
|
1425
1425
|
let t = e.location, i = e.parent.location;
|
|
@@ -1429,14 +1429,14 @@ function $o(e) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
return e.parent;
|
|
1431
1431
|
}
|
|
1432
|
-
var
|
|
1432
|
+
var Kn = class {
|
|
1433
1433
|
static getSameOriginWindowChain(e) {
|
|
1434
1434
|
let t = ps.get(e);
|
|
1435
1435
|
if (!t) {
|
|
1436
1436
|
t = [], ps.set(e, t);
|
|
1437
1437
|
let i = e, s;
|
|
1438
1438
|
do
|
|
1439
|
-
s = $
|
|
1439
|
+
s = $n(i), s ? t.push({ window: new WeakRef(i), iframeElement: i.frameElement || null }) : t.push({ window: new WeakRef(i), iframeElement: null }), i = s;
|
|
1440
1440
|
while (i);
|
|
1441
1441
|
}
|
|
1442
1442
|
return t.slice(0);
|
|
@@ -1444,18 +1444,18 @@ var Ko = class {
|
|
|
1444
1444
|
static getPositionOfChildWindowRelativeToAncestorWindow(e, t) {
|
|
1445
1445
|
if (!t || e === t) return { top: 0, left: 0 };
|
|
1446
1446
|
let i = 0, s = 0, r = this.getSameOriginWindowChain(e);
|
|
1447
|
-
for (let
|
|
1448
|
-
let
|
|
1449
|
-
if (i +=
|
|
1450
|
-
let
|
|
1451
|
-
i +=
|
|
1447
|
+
for (let n of r) {
|
|
1448
|
+
let o = n.window.deref();
|
|
1449
|
+
if (i += o?.scrollY ?? 0, s += o?.scrollX ?? 0, o === t || !n.iframeElement) break;
|
|
1450
|
+
let h = n.iframeElement.getBoundingClientRect();
|
|
1451
|
+
i += h.top, s += h.left;
|
|
1452
1452
|
}
|
|
1453
1453
|
return { top: i, left: s };
|
|
1454
1454
|
}
|
|
1455
1455
|
}, Rt = class {
|
|
1456
1456
|
constructor(e, t) {
|
|
1457
1457
|
this.timestamp = Date.now(), this.browserEvent = t, this.leftButton = t.button === 0, this.middleButton = t.button === 1, this.rightButton = t.button === 2, this.buttons = t.buttons, this.target = t.target, this.detail = t.detail || 1, t.type === "dblclick" && (this.detail = 2), this.ctrlKey = t.ctrlKey, this.shiftKey = t.shiftKey, this.altKey = t.altKey, this.metaKey = t.metaKey, typeof t.pageX == "number" ? (this.posx = t.pageX, this.posy = t.pageY) : (this.posx = t.clientX + this.target.ownerDocument.body.scrollLeft + this.target.ownerDocument.documentElement.scrollLeft, this.posy = t.clientY + this.target.ownerDocument.body.scrollTop + this.target.ownerDocument.documentElement.scrollTop);
|
|
1458
|
-
let i =
|
|
1458
|
+
let i = Kn.getPositionOfChildWindowRelativeToAncestorWindow(e, t.view);
|
|
1459
1459
|
this.posx -= i.left, this.posy -= i.top;
|
|
1460
1460
|
}
|
|
1461
1461
|
preventDefault() {
|
|
@@ -1473,20 +1473,20 @@ var Ko = class {
|
|
|
1473
1473
|
s = (r ? parseInt(r[1]) : 123) <= 122;
|
|
1474
1474
|
}
|
|
1475
1475
|
if (e) {
|
|
1476
|
-
let r = e,
|
|
1477
|
-
if (typeof r.wheelDeltaY < "u") s ? this.deltaY = r.wheelDeltaY / (120 *
|
|
1478
|
-
else if (typeof
|
|
1476
|
+
let r = e, n = e, o = e.view?.devicePixelRatio || 1;
|
|
1477
|
+
if (typeof r.wheelDeltaY < "u") s ? this.deltaY = r.wheelDeltaY / (120 * o) : this.deltaY = r.wheelDeltaY / 120;
|
|
1478
|
+
else if (typeof n.VERTICAL_AXIS < "u" && n.axis === n.VERTICAL_AXIS) this.deltaY = -n.detail / 3;
|
|
1479
1479
|
else if (e.type === "wheel") {
|
|
1480
|
-
let
|
|
1481
|
-
|
|
1480
|
+
let h = e;
|
|
1481
|
+
h.deltaMode === h.DOM_DELTA_LINE ? Ci && !Re ? this.deltaY = -e.deltaY / 3 : this.deltaY = -e.deltaY : this.deltaY = -e.deltaY / 40;
|
|
1482
1482
|
}
|
|
1483
|
-
if (typeof r.wheelDeltaX < "u")
|
|
1484
|
-
else if (typeof
|
|
1483
|
+
if (typeof r.wheelDeltaX < "u") En && Sr ? this.deltaX = -(r.wheelDeltaX / 120) : s ? this.deltaX = r.wheelDeltaX / (120 * o) : this.deltaX = r.wheelDeltaX / 120;
|
|
1484
|
+
else if (typeof n.HORIZONTAL_AXIS < "u" && n.axis === n.HORIZONTAL_AXIS) this.deltaX = -e.detail / 3;
|
|
1485
1485
|
else if (e.type === "wheel") {
|
|
1486
|
-
let
|
|
1487
|
-
|
|
1486
|
+
let h = e;
|
|
1487
|
+
h.deltaMode === h.DOM_DELTA_LINE ? Ci && !Re ? this.deltaX = -e.deltaX / 3 : this.deltaX = -e.deltaX : this.deltaX = -e.deltaX / 40;
|
|
1488
1488
|
}
|
|
1489
|
-
this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta && (s ? this.deltaY = e.wheelDelta / (120 *
|
|
1489
|
+
this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta && (s ? this.deltaY = e.wheelDelta / (120 * o) : this.deltaY = e.wheelDelta / 120);
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
preventDefault() {
|
|
@@ -1500,14 +1500,14 @@ var Ko = class {
|
|
|
1500
1500
|
return { dispose() {
|
|
1501
1501
|
clearTimeout(i);
|
|
1502
1502
|
} };
|
|
1503
|
-
}),
|
|
1503
|
+
}), Un;
|
|
1504
1504
|
((e) => {
|
|
1505
1505
|
function t(i) {
|
|
1506
|
-
return i === e.None || i === e.Cancelled || i instanceof
|
|
1506
|
+
return i === e.None || i === e.Cancelled || i instanceof qn ? !0 : !i || typeof i != "object" ? !1 : typeof i.isCancellationRequested == "boolean" && typeof i.onCancellationRequested == "function";
|
|
1507
1507
|
}
|
|
1508
|
-
e.isCancellationToken = t, e.None = Object.freeze({ isCancellationRequested: !1, onCancellationRequested:
|
|
1509
|
-
})(
|
|
1510
|
-
var
|
|
1508
|
+
e.isCancellationToken = t, e.None = Object.freeze({ isCancellationRequested: !1, onCancellationRequested: ne.None }), e.Cancelled = Object.freeze({ isCancellationRequested: !0, onCancellationRequested: yr });
|
|
1509
|
+
})(Un ||= {});
|
|
1510
|
+
var qn = class {
|
|
1511
1511
|
constructor() {
|
|
1512
1512
|
this._isCancelled = !1, this._emitter = null;
|
|
1513
1513
|
}
|
|
@@ -1545,7 +1545,7 @@ var qo = class {
|
|
|
1545
1545
|
this._token = -1, e();
|
|
1546
1546
|
}, t));
|
|
1547
1547
|
}
|
|
1548
|
-
},
|
|
1548
|
+
}, Vn = class {
|
|
1549
1549
|
constructor() {
|
|
1550
1550
|
this.disposable = void 0, this.isDisposed = !1;
|
|
1551
1551
|
}
|
|
@@ -1565,27 +1565,27 @@ var qo = class {
|
|
|
1565
1565
|
dispose() {
|
|
1566
1566
|
this.cancel(), this.isDisposed = !0;
|
|
1567
1567
|
}
|
|
1568
|
-
},
|
|
1568
|
+
}, Yn;
|
|
1569
1569
|
((e) => {
|
|
1570
1570
|
async function t(s) {
|
|
1571
|
-
let r,
|
|
1572
|
-
r || (r =
|
|
1571
|
+
let r, n = await Promise.all(s.map((o) => o.then((h) => h, (h) => {
|
|
1572
|
+
r || (r = h);
|
|
1573
1573
|
})));
|
|
1574
1574
|
if (typeof r < "u") throw r;
|
|
1575
|
-
return
|
|
1575
|
+
return n;
|
|
1576
1576
|
}
|
|
1577
1577
|
e.settled = t;
|
|
1578
1578
|
function i(s) {
|
|
1579
|
-
return new Promise(async (r,
|
|
1579
|
+
return new Promise(async (r, n) => {
|
|
1580
1580
|
try {
|
|
1581
|
-
await s(r,
|
|
1582
|
-
} catch (
|
|
1583
|
-
o
|
|
1581
|
+
await s(r, n);
|
|
1582
|
+
} catch (o) {
|
|
1583
|
+
n(o);
|
|
1584
1584
|
}
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
e.withAsyncBody = i;
|
|
1588
|
-
})(
|
|
1588
|
+
})(Yn ||= {});
|
|
1589
1589
|
var vs = class ve {
|
|
1590
1590
|
static fromArray(t) {
|
|
1591
1591
|
return new ve((i) => {
|
|
@@ -1628,7 +1628,7 @@ var vs = class ve {
|
|
|
1628
1628
|
if (this._state === 2) throw this._error;
|
|
1629
1629
|
if (t < this._results.length) return { done: !1, value: this._results[t++] };
|
|
1630
1630
|
if (this._state === 1) return { done: !0, value: void 0 };
|
|
1631
|
-
await
|
|
1631
|
+
await ne.toPromise(this._onStateChanged.event);
|
|
1632
1632
|
} while (!0);
|
|
1633
1633
|
}, return: async () => (this._onReturn?.(), { done: !0, value: void 0 }) };
|
|
1634
1634
|
}
|
|
@@ -1676,38 +1676,38 @@ var vs = class ve {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
};
|
|
1678
1678
|
vs.EMPTY = vs.fromArray([]);
|
|
1679
|
-
var { getWindow: De, getWindowId:
|
|
1679
|
+
var { getWindow: De, getWindowId: Xn, onDidRegisterWindow: jn } = function() {
|
|
1680
1680
|
let e = /* @__PURE__ */ new Map(), t = { window: Te, disposables: new Ue() };
|
|
1681
1681
|
e.set(Te.vscodeWindowId, t);
|
|
1682
1682
|
let i = new m(), s = new m(), r = new m();
|
|
1683
|
-
function o
|
|
1684
|
-
return (typeof
|
|
1685
|
-
}
|
|
1686
|
-
return { onDidRegisterWindow: i.event, onWillUnregisterWindow: r.event, onDidUnregisterWindow: s.event, registerWindow(
|
|
1687
|
-
if (e.has(
|
|
1688
|
-
let
|
|
1689
|
-
return e.set(
|
|
1690
|
-
e.delete(
|
|
1691
|
-
})),
|
|
1692
|
-
r.fire(
|
|
1693
|
-
})), i.fire(
|
|
1683
|
+
function n(o, h) {
|
|
1684
|
+
return (typeof o == "number" ? e.get(o) : void 0) ?? (h ? t : void 0);
|
|
1685
|
+
}
|
|
1686
|
+
return { onDidRegisterWindow: i.event, onWillUnregisterWindow: r.event, onDidUnregisterWindow: s.event, registerWindow(o) {
|
|
1687
|
+
if (e.has(o.vscodeWindowId)) return L.None;
|
|
1688
|
+
let h = new Ue(), l = { window: o, disposables: h.add(new Ue()) };
|
|
1689
|
+
return e.set(o.vscodeWindowId, l), h.add(z(() => {
|
|
1690
|
+
e.delete(o.vscodeWindowId), s.fire(o);
|
|
1691
|
+
})), h.add(D(o, Z.BEFORE_UNLOAD, () => {
|
|
1692
|
+
r.fire(o);
|
|
1693
|
+
})), i.fire(l), h;
|
|
1694
1694
|
}, getWindows() {
|
|
1695
1695
|
return e.values();
|
|
1696
1696
|
}, getWindowsCount() {
|
|
1697
1697
|
return e.size;
|
|
1698
|
-
}, getWindowId(
|
|
1699
|
-
return
|
|
1700
|
-
}, hasWindow(
|
|
1701
|
-
return e.has(
|
|
1702
|
-
}, getWindowById:
|
|
1703
|
-
let
|
|
1704
|
-
if (
|
|
1705
|
-
let
|
|
1706
|
-
return
|
|
1707
|
-
}, getDocument(
|
|
1708
|
-
return De(
|
|
1698
|
+
}, getWindowId(o) {
|
|
1699
|
+
return o.vscodeWindowId;
|
|
1700
|
+
}, hasWindow(o) {
|
|
1701
|
+
return e.has(o);
|
|
1702
|
+
}, getWindowById: n, getWindow(o) {
|
|
1703
|
+
let h = o;
|
|
1704
|
+
if (h?.ownerDocument?.defaultView) return h.ownerDocument.defaultView.window;
|
|
1705
|
+
let l = o;
|
|
1706
|
+
return l?.view ? l.view.window : Te;
|
|
1707
|
+
}, getDocument(o) {
|
|
1708
|
+
return De(o).document;
|
|
1709
1709
|
} };
|
|
1710
|
-
}(),
|
|
1710
|
+
}(), Gn = class {
|
|
1711
1711
|
constructor(e, t, i, s) {
|
|
1712
1712
|
this._node = e, this._type = t, this._handler = i, this._options = s || !1, this._node.addEventListener(this._type, this._handler, this._options);
|
|
1713
1713
|
}
|
|
@@ -1716,11 +1716,11 @@ var { getWindow: De, getWindowId: Xo, onDidRegisterWindow: jo } = function() {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
};
|
|
1718
1718
|
function D(e, t, i, s) {
|
|
1719
|
-
return new
|
|
1719
|
+
return new Gn(e, t, i, s);
|
|
1720
1720
|
}
|
|
1721
1721
|
var ms = function(e, t, i, s) {
|
|
1722
1722
|
return D(e, t, i, s);
|
|
1723
|
-
}, es,
|
|
1723
|
+
}, es, Jn = class extends Vn {
|
|
1724
1724
|
constructor(e) {
|
|
1725
1725
|
super(), this.defaultTarget = e && De(e);
|
|
1726
1726
|
}
|
|
@@ -1746,22 +1746,22 @@ var ms = function(e, t, i, s) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
};
|
|
1748
1748
|
(function() {
|
|
1749
|
-
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), r = (
|
|
1750
|
-
i.set(
|
|
1751
|
-
let
|
|
1752
|
-
for (t.set(
|
|
1753
|
-
s.set(
|
|
1749
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), r = (n) => {
|
|
1750
|
+
i.set(n, !1);
|
|
1751
|
+
let o = e.get(n) ?? [];
|
|
1752
|
+
for (t.set(n, o), e.set(n, []), s.set(n, !0); o.length > 0; ) o.sort(Ss.sort), o.shift().execute();
|
|
1753
|
+
s.set(n, !1);
|
|
1754
1754
|
};
|
|
1755
|
-
es = (
|
|
1756
|
-
let
|
|
1757
|
-
return d || (d = [], e.set(
|
|
1755
|
+
es = (n, o, h = 0) => {
|
|
1756
|
+
let l = Xn(n), a = new Ss(o, h), d = e.get(l);
|
|
1757
|
+
return d || (d = [], e.set(l, d)), d.push(a), i.get(l) || (i.set(l, !0), n.requestAnimationFrame(() => r(l))), a;
|
|
1758
1758
|
};
|
|
1759
1759
|
})();
|
|
1760
|
-
function
|
|
1760
|
+
function Zn(e) {
|
|
1761
1761
|
let t = e.getBoundingClientRect(), i = De(e);
|
|
1762
1762
|
return { left: t.left + i.scrollX, top: t.top + i.scrollY, width: t.width, height: t.height };
|
|
1763
1763
|
}
|
|
1764
|
-
var Z = { CLICK: "click", MOUSE_DOWN: "mousedown", MOUSE_OVER: "mouseover", MOUSE_LEAVE: "mouseleave", MOUSE_WHEEL: "wheel", POINTER_UP: "pointerup", POINTER_DOWN: "pointerdown", POINTER_MOVE: "pointermove", KEY_DOWN: "keydown", KEY_UP: "keyup", BEFORE_UNLOAD: "beforeunload", CHANGE: "change", FOCUS: "focus", BLUR: "blur", INPUT: "input" },
|
|
1764
|
+
var Z = { CLICK: "click", MOUSE_DOWN: "mousedown", MOUSE_OVER: "mouseover", MOUSE_LEAVE: "mouseleave", MOUSE_WHEEL: "wheel", POINTER_UP: "pointerup", POINTER_DOWN: "pointerdown", POINTER_MOVE: "pointermove", KEY_DOWN: "keydown", KEY_UP: "keyup", BEFORE_UNLOAD: "beforeunload", CHANGE: "change", FOCUS: "focus", BLUR: "blur", INPUT: "input" }, Qn = class {
|
|
1765
1765
|
constructor(e) {
|
|
1766
1766
|
this.domNode = e, this._maxWidth = "", this._width = "", this._height = "", this._top = "", this._left = "", this._bottom = "", this._right = "", this._paddingTop = "", this._paddingLeft = "", this._paddingBottom = "", this._paddingRight = "", this._fontFamily = "", this._fontWeight = "", this._fontSize = "", this._fontStyle = "", this._fontFeatureSettings = "", this._fontVariationSettings = "", this._textDecoration = "", this._lineHeight = "", this._letterSpacing = "", this._className = "", this._display = "", this._position = "", this._visibility = "", this._color = "", this._backgroundColor = "", this._layerHint = !1, this._contain = "none", this._boxShadow = "";
|
|
1767
1767
|
}
|
|
@@ -1886,7 +1886,7 @@ function de(e) {
|
|
|
1886
1886
|
return typeof e == "number" ? `${e}px` : e;
|
|
1887
1887
|
}
|
|
1888
1888
|
function mt(e) {
|
|
1889
|
-
return new
|
|
1889
|
+
return new Qn(e);
|
|
1890
1890
|
}
|
|
1891
1891
|
var Cr = class {
|
|
1892
1892
|
constructor() {
|
|
@@ -1906,7 +1906,7 @@ var Cr = class {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
startMonitoring(e, t, i, s, r) {
|
|
1908
1908
|
this.isMonitoring() && this.stopMonitoring(!1), this._pointerMoveCallback = s, this._onStopCallback = r;
|
|
1909
|
-
let
|
|
1909
|
+
let n = e;
|
|
1910
1910
|
try {
|
|
1911
1911
|
e.setPointerCapture(t), this._hooks.add(z(() => {
|
|
1912
1912
|
try {
|
|
@@ -1915,43 +1915,43 @@ var Cr = class {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
}));
|
|
1917
1917
|
} catch {
|
|
1918
|
-
|
|
1918
|
+
n = De(e);
|
|
1919
1919
|
}
|
|
1920
|
-
this._hooks.add(D(
|
|
1921
|
-
if (
|
|
1920
|
+
this._hooks.add(D(n, Z.POINTER_MOVE, (o) => {
|
|
1921
|
+
if (o.buttons !== i) {
|
|
1922
1922
|
this.stopMonitoring(!0);
|
|
1923
1923
|
return;
|
|
1924
1924
|
}
|
|
1925
|
-
|
|
1926
|
-
})), this._hooks.add(D(
|
|
1925
|
+
o.preventDefault(), this._pointerMoveCallback(o);
|
|
1926
|
+
})), this._hooks.add(D(n, Z.POINTER_UP, (o) => this.stopMonitoring(!0)));
|
|
1927
1927
|
}
|
|
1928
1928
|
};
|
|
1929
|
-
function
|
|
1929
|
+
function eo(e, t, i) {
|
|
1930
1930
|
let s = null, r = null;
|
|
1931
1931
|
if (typeof i.value == "function" ? (s = "value", r = i.value, r.length !== 0 && console.warn("Memoize should only be used in functions with zero parameters")) : typeof i.get == "function" && (s = "get", r = i.get), !r) throw new Error("not supported");
|
|
1932
|
-
let
|
|
1933
|
-
i[s] = function(...
|
|
1934
|
-
return this.hasOwnProperty(
|
|
1932
|
+
let n = `$memoize$${t}`;
|
|
1933
|
+
i[s] = function(...o) {
|
|
1934
|
+
return this.hasOwnProperty(n) || Object.defineProperty(this, n, { configurable: !1, enumerable: !1, writable: !1, value: r.apply(this, o) }), this[n];
|
|
1935
1935
|
};
|
|
1936
1936
|
}
|
|
1937
1937
|
var Be;
|
|
1938
1938
|
((e) => (e.Tap = "-xterm-gesturetap", e.Change = "-xterm-gesturechange", e.Start = "-xterm-gesturestart", e.End = "-xterm-gesturesend", e.Contextmenu = "-xterm-gesturecontextmenu"))(Be ||= {});
|
|
1939
|
-
var _t = class
|
|
1939
|
+
var _t = class oe extends L {
|
|
1940
1940
|
constructor() {
|
|
1941
|
-
super(), this.dispatched = !1, this.targets = new
|
|
1941
|
+
super(), this.dispatched = !1, this.targets = new ls(), this.ignoreTargets = new ls(), this.activeTouches = {}, this.handle = null, this._lastSetTapCountTime = 0, this._register(ne.runAndSubscribe(jn, ({ window: t, disposables: i }) => {
|
|
1942
1942
|
i.add(D(t.document, "touchstart", (s) => this.onTouchStart(s), { passive: !1 })), i.add(D(t.document, "touchend", (s) => this.onTouchEnd(t, s))), i.add(D(t.document, "touchmove", (s) => this.onTouchMove(s), { passive: !1 }));
|
|
1943
1943
|
}, { window: Te, disposables: this._store }));
|
|
1944
1944
|
}
|
|
1945
1945
|
static addTarget(t) {
|
|
1946
|
-
if (!
|
|
1947
|
-
|
|
1948
|
-
let i =
|
|
1946
|
+
if (!oe.isTouchDevice()) return L.None;
|
|
1947
|
+
oe.INSTANCE || (oe.INSTANCE = new oe());
|
|
1948
|
+
let i = oe.INSTANCE.targets.push(t);
|
|
1949
1949
|
return z(i);
|
|
1950
1950
|
}
|
|
1951
1951
|
static ignoreTarget(t) {
|
|
1952
|
-
if (!
|
|
1953
|
-
|
|
1954
|
-
let i =
|
|
1952
|
+
if (!oe.isTouchDevice()) return L.None;
|
|
1953
|
+
oe.INSTANCE || (oe.INSTANCE = new oe());
|
|
1954
|
+
let i = oe.INSTANCE.ignoreTargets.push(t);
|
|
1955
1955
|
return z(i);
|
|
1956
1956
|
}
|
|
1957
1957
|
static isTouchDevice() {
|
|
@@ -1964,33 +1964,33 @@ var _t = class ne extends L {
|
|
|
1964
1964
|
let i = Date.now();
|
|
1965
1965
|
this.handle && (this.handle.dispose(), this.handle = null);
|
|
1966
1966
|
for (let s = 0, r = t.targetTouches.length; s < r; s++) {
|
|
1967
|
-
let
|
|
1968
|
-
this.activeTouches[
|
|
1969
|
-
let
|
|
1970
|
-
|
|
1967
|
+
let n = t.targetTouches.item(s);
|
|
1968
|
+
this.activeTouches[n.identifier] = { id: n.identifier, initialTarget: n.target, initialTimeStamp: i, initialPageX: n.pageX, initialPageY: n.pageY, rollingTimestamps: [i], rollingPageX: [n.pageX], rollingPageY: [n.pageY] };
|
|
1969
|
+
let o = this.newGestureEvent(Be.Start, n.target);
|
|
1970
|
+
o.pageX = n.pageX, o.pageY = n.pageY, this.dispatchEvent(o);
|
|
1971
1971
|
}
|
|
1972
1972
|
this.dispatched && (t.preventDefault(), t.stopPropagation(), this.dispatched = !1);
|
|
1973
1973
|
}
|
|
1974
1974
|
onTouchEnd(t, i) {
|
|
1975
1975
|
let s = Date.now(), r = Object.keys(this.activeTouches).length;
|
|
1976
|
-
for (let
|
|
1977
|
-
let
|
|
1978
|
-
if (!this.activeTouches.hasOwnProperty(String(
|
|
1979
|
-
console.warn("move of an UNKNOWN touch",
|
|
1976
|
+
for (let n = 0, o = i.changedTouches.length; n < o; n++) {
|
|
1977
|
+
let h = i.changedTouches.item(n);
|
|
1978
|
+
if (!this.activeTouches.hasOwnProperty(String(h.identifier))) {
|
|
1979
|
+
console.warn("move of an UNKNOWN touch", h);
|
|
1980
1980
|
continue;
|
|
1981
1981
|
}
|
|
1982
|
-
let
|
|
1983
|
-
if (a <
|
|
1984
|
-
let d = this.newGestureEvent(Be.Tap,
|
|
1985
|
-
d.pageX = ue(
|
|
1986
|
-
} else if (a >=
|
|
1987
|
-
let d = this.newGestureEvent(Be.Contextmenu,
|
|
1988
|
-
d.pageX = ue(
|
|
1982
|
+
let l = this.activeTouches[h.identifier], a = Date.now() - l.initialTimeStamp;
|
|
1983
|
+
if (a < oe.HOLD_DELAY && Math.abs(l.initialPageX - ue(l.rollingPageX)) < 30 && Math.abs(l.initialPageY - ue(l.rollingPageY)) < 30) {
|
|
1984
|
+
let d = this.newGestureEvent(Be.Tap, l.initialTarget);
|
|
1985
|
+
d.pageX = ue(l.rollingPageX), d.pageY = ue(l.rollingPageY), this.dispatchEvent(d);
|
|
1986
|
+
} else if (a >= oe.HOLD_DELAY && Math.abs(l.initialPageX - ue(l.rollingPageX)) < 30 && Math.abs(l.initialPageY - ue(l.rollingPageY)) < 30) {
|
|
1987
|
+
let d = this.newGestureEvent(Be.Contextmenu, l.initialTarget);
|
|
1988
|
+
d.pageX = ue(l.rollingPageX), d.pageY = ue(l.rollingPageY), this.dispatchEvent(d);
|
|
1989
1989
|
} else if (r === 1) {
|
|
1990
|
-
let d = ue(
|
|
1990
|
+
let d = ue(l.rollingPageX), c = ue(l.rollingPageY), _ = ue(l.rollingTimestamps) - l.rollingTimestamps[0], f = d - l.rollingPageX[0], u = c - l.rollingPageY[0], g = [...this.targets].filter((y) => l.initialTarget instanceof Node && y.contains(l.initialTarget));
|
|
1991
1991
|
this.inertia(t, g, s, Math.abs(f) / _, f > 0 ? 1 : -1, d, Math.abs(u) / _, u > 0 ? 1 : -1, c);
|
|
1992
1992
|
}
|
|
1993
|
-
this.dispatchEvent(this.newGestureEvent(Be.End,
|
|
1993
|
+
this.dispatchEvent(this.newGestureEvent(Be.End, l.initialTarget)), delete this.activeTouches[h.identifier];
|
|
1994
1994
|
}
|
|
1995
1995
|
this.dispatched && (i.preventDefault(), i.stopPropagation(), this.dispatched = !1);
|
|
1996
1996
|
}
|
|
@@ -2001,44 +2001,44 @@ var _t = class ne extends L {
|
|
|
2001
2001
|
dispatchEvent(t) {
|
|
2002
2002
|
if (t.type === Be.Tap) {
|
|
2003
2003
|
let i = (/* @__PURE__ */ new Date()).getTime(), s = 0;
|
|
2004
|
-
i - this._lastSetTapCountTime >
|
|
2004
|
+
i - this._lastSetTapCountTime > oe.CLEAR_TAP_COUNT_TIME ? s = 1 : s = 2, this._lastSetTapCountTime = i, t.tapCount = s;
|
|
2005
2005
|
} else (t.type === Be.Change || t.type === Be.Contextmenu) && (this._lastSetTapCountTime = 0);
|
|
2006
2006
|
if (t.initialTarget instanceof Node) {
|
|
2007
2007
|
for (let s of this.ignoreTargets) if (s.contains(t.initialTarget)) return;
|
|
2008
2008
|
let i = [];
|
|
2009
2009
|
for (let s of this.targets) if (s.contains(t.initialTarget)) {
|
|
2010
|
-
let r = 0,
|
|
2011
|
-
for (;
|
|
2010
|
+
let r = 0, n = t.initialTarget;
|
|
2011
|
+
for (; n && n !== s; ) r++, n = n.parentElement;
|
|
2012
2012
|
i.push([r, s]);
|
|
2013
2013
|
}
|
|
2014
2014
|
i.sort((s, r) => s[0] - r[0]);
|
|
2015
2015
|
for (let [s, r] of i) r.dispatchEvent(t), this.dispatched = !0;
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
inertia(t, i, s, r, o,
|
|
2018
|
+
inertia(t, i, s, r, n, o, h, l, a) {
|
|
2019
2019
|
this.handle = es(t, () => {
|
|
2020
2020
|
let d = Date.now(), c = d - s, _ = 0, f = 0, u = !0;
|
|
2021
|
-
r +=
|
|
2021
|
+
r += oe.SCROLL_FRICTION * c, h += oe.SCROLL_FRICTION * c, r > 0 && (u = !1, _ = n * r * c), h > 0 && (u = !1, f = l * h * c);
|
|
2022
2022
|
let g = this.newGestureEvent(Be.Change);
|
|
2023
|
-
g.translationX = _, g.translationY = f, i.forEach((y) => y.dispatchEvent(g)), u || this.inertia(t, i, d, r,
|
|
2023
|
+
g.translationX = _, g.translationY = f, i.forEach((y) => y.dispatchEvent(g)), u || this.inertia(t, i, d, r, n, o + _, h, l, a + f);
|
|
2024
2024
|
});
|
|
2025
2025
|
}
|
|
2026
2026
|
onTouchMove(t) {
|
|
2027
2027
|
let i = Date.now();
|
|
2028
2028
|
for (let s = 0, r = t.changedTouches.length; s < r; s++) {
|
|
2029
|
-
let
|
|
2030
|
-
if (!this.activeTouches.hasOwnProperty(String(
|
|
2031
|
-
console.warn("end of an UNKNOWN touch",
|
|
2029
|
+
let n = t.changedTouches.item(s);
|
|
2030
|
+
if (!this.activeTouches.hasOwnProperty(String(n.identifier))) {
|
|
2031
|
+
console.warn("end of an UNKNOWN touch", n);
|
|
2032
2032
|
continue;
|
|
2033
2033
|
}
|
|
2034
|
-
let
|
|
2035
|
-
|
|
2034
|
+
let o = this.activeTouches[n.identifier], h = this.newGestureEvent(Be.Change, o.initialTarget);
|
|
2035
|
+
h.translationX = n.pageX - ue(o.rollingPageX), h.translationY = n.pageY - ue(o.rollingPageY), h.pageX = n.pageX, h.pageY = n.pageY, this.dispatchEvent(h), o.rollingPageX.length > 3 && (o.rollingPageX.shift(), o.rollingPageY.shift(), o.rollingTimestamps.shift()), o.rollingPageX.push(n.pageX), o.rollingPageY.push(n.pageY), o.rollingTimestamps.push(i);
|
|
2036
2036
|
}
|
|
2037
2037
|
this.dispatched && (t.preventDefault(), t.stopPropagation(), this.dispatched = !1);
|
|
2038
2038
|
}
|
|
2039
2039
|
};
|
|
2040
|
-
_t.SCROLL_FRICTION = -5e-3, _t.HOLD_DELAY = 700, _t.CLEAR_TAP_COUNT_TIME = 400, q([
|
|
2041
|
-
var
|
|
2040
|
+
_t.SCROLL_FRICTION = -5e-3, _t.HOLD_DELAY = 700, _t.CLEAR_TAP_COUNT_TIME = 400, q([eo], _t, "isTouchDevice", 1);
|
|
2041
|
+
var to = _t, ts = class extends L {
|
|
2042
2042
|
onclick(e, t) {
|
|
2043
2043
|
this._register(D(e, Z.CLICK, (i) => t(new Rt(De(e), i))));
|
|
2044
2044
|
}
|
|
@@ -2070,11 +2070,11 @@ var tn = _t, ts = class extends L {
|
|
|
2070
2070
|
this._register(D(e, Z.CHANGE, t));
|
|
2071
2071
|
}
|
|
2072
2072
|
ignoreGesture(e) {
|
|
2073
|
-
return
|
|
2073
|
+
return to.ignoreTarget(e);
|
|
2074
2074
|
}
|
|
2075
|
-
}, ws = 11,
|
|
2075
|
+
}, ws = 11, io = class extends ts {
|
|
2076
2076
|
constructor(e) {
|
|
2077
|
-
super(), this._onActivate = e.onActivate, this.bgDomNode = document.createElement("div"), this.bgDomNode.className = "arrow-background", this.bgDomNode.style.position = "absolute", this.bgDomNode.style.width = e.bgWidth + "px", this.bgDomNode.style.height = e.bgHeight + "px", typeof e.top < "u" && (this.bgDomNode.style.top = "0px"), typeof e.left < "u" && (this.bgDomNode.style.left = "0px"), typeof e.bottom < "u" && (this.bgDomNode.style.bottom = "0px"), typeof e.right < "u" && (this.bgDomNode.style.right = "0px"), this.domNode = document.createElement("div"), this.domNode.className = e.className, this.domNode.style.position = "absolute", this.domNode.style.width = ws + "px", this.domNode.style.height = ws + "px", typeof e.top < "u" && (this.domNode.style.top = e.top + "px"), typeof e.left < "u" && (this.domNode.style.left = e.left + "px"), typeof e.bottom < "u" && (this.domNode.style.bottom = e.bottom + "px"), typeof e.right < "u" && (this.domNode.style.right = e.right + "px"), this._pointerMoveMonitor = this._register(new Cr()), this._register(ms(this.bgDomNode, Z.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._register(ms(this.domNode, Z.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._pointerdownRepeatTimer = this._register(new
|
|
2077
|
+
super(), this._onActivate = e.onActivate, this.bgDomNode = document.createElement("div"), this.bgDomNode.className = "arrow-background", this.bgDomNode.style.position = "absolute", this.bgDomNode.style.width = e.bgWidth + "px", this.bgDomNode.style.height = e.bgHeight + "px", typeof e.top < "u" && (this.bgDomNode.style.top = "0px"), typeof e.left < "u" && (this.bgDomNode.style.left = "0px"), typeof e.bottom < "u" && (this.bgDomNode.style.bottom = "0px"), typeof e.right < "u" && (this.bgDomNode.style.right = "0px"), this.domNode = document.createElement("div"), this.domNode.className = e.className, this.domNode.style.position = "absolute", this.domNode.style.width = ws + "px", this.domNode.style.height = ws + "px", typeof e.top < "u" && (this.domNode.style.top = e.top + "px"), typeof e.left < "u" && (this.domNode.style.left = e.left + "px"), typeof e.bottom < "u" && (this.domNode.style.bottom = e.bottom + "px"), typeof e.right < "u" && (this.domNode.style.right = e.right + "px"), this._pointerMoveMonitor = this._register(new Cr()), this._register(ms(this.bgDomNode, Z.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._register(ms(this.domNode, Z.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._pointerdownRepeatTimer = this._register(new Jn()), this._pointerdownScheduleRepeatTimer = this._register(new Qi());
|
|
2078
2078
|
}
|
|
2079
2079
|
_arrowPointerDown(e) {
|
|
2080
2080
|
if (!e.target || !(e.target instanceof Element)) return;
|
|
@@ -2086,9 +2086,9 @@ var tn = _t, ts = class extends L {
|
|
|
2086
2086
|
this._pointerdownRepeatTimer.cancel(), this._pointerdownScheduleRepeatTimer.cancel();
|
|
2087
2087
|
}), e.preventDefault();
|
|
2088
2088
|
}
|
|
2089
|
-
},
|
|
2090
|
-
constructor(t, i, s, r,
|
|
2091
|
-
this._forceIntegerValues = t, this._scrollStateBrand = void 0, this._forceIntegerValues && (i = i | 0, s = s | 0, r = r | 0,
|
|
2089
|
+
}, so = class Ei {
|
|
2090
|
+
constructor(t, i, s, r, n, o, h) {
|
|
2091
|
+
this._forceIntegerValues = t, this._scrollStateBrand = void 0, this._forceIntegerValues && (i = i | 0, s = s | 0, r = r | 0, n = n | 0, o = o | 0, h = h | 0), this.rawScrollLeft = r, this.rawScrollTop = h, i < 0 && (i = 0), r + i > s && (r = s - i), r < 0 && (r = 0), n < 0 && (n = 0), h + n > o && (h = o - n), h < 0 && (h = 0), this.width = i, this.scrollWidth = s, this.scrollLeft = r, this.height = n, this.scrollHeight = o, this.scrollTop = h;
|
|
2092
2092
|
}
|
|
2093
2093
|
equals(t) {
|
|
2094
2094
|
return this.rawScrollLeft === t.rawScrollLeft && this.rawScrollTop === t.rawScrollTop && this.width === t.width && this.scrollWidth === t.scrollWidth && this.scrollLeft === t.scrollLeft && this.height === t.height && this.scrollHeight === t.scrollHeight && this.scrollTop === t.scrollTop;
|
|
@@ -2100,12 +2100,12 @@ var tn = _t, ts = class extends L {
|
|
|
2100
2100
|
return new Ei(this._forceIntegerValues, this.width, this.scrollWidth, typeof t.scrollLeft < "u" ? t.scrollLeft : this.rawScrollLeft, this.height, this.scrollHeight, typeof t.scrollTop < "u" ? t.scrollTop : this.rawScrollTop);
|
|
2101
2101
|
}
|
|
2102
2102
|
createScrollEvent(t, i) {
|
|
2103
|
-
let s = this.width !== t.width, r = this.scrollWidth !== t.scrollWidth,
|
|
2104
|
-
return { inSmoothScrolling: i, oldWidth: t.width, oldScrollWidth: t.scrollWidth, oldScrollLeft: t.scrollLeft, width: this.width, scrollWidth: this.scrollWidth, scrollLeft: this.scrollLeft, oldHeight: t.height, oldScrollHeight: t.scrollHeight, oldScrollTop: t.scrollTop, height: this.height, scrollHeight: this.scrollHeight, scrollTop: this.scrollTop, widthChanged: s, scrollWidthChanged: r, scrollLeftChanged:
|
|
2103
|
+
let s = this.width !== t.width, r = this.scrollWidth !== t.scrollWidth, n = this.scrollLeft !== t.scrollLeft, o = this.height !== t.height, h = this.scrollHeight !== t.scrollHeight, l = this.scrollTop !== t.scrollTop;
|
|
2104
|
+
return { inSmoothScrolling: i, oldWidth: t.width, oldScrollWidth: t.scrollWidth, oldScrollLeft: t.scrollLeft, width: this.width, scrollWidth: this.scrollWidth, scrollLeft: this.scrollLeft, oldHeight: t.height, oldScrollHeight: t.scrollHeight, oldScrollTop: t.scrollTop, height: this.height, scrollHeight: this.scrollHeight, scrollTop: this.scrollTop, widthChanged: s, scrollWidthChanged: r, scrollLeftChanged: n, heightChanged: o, scrollHeightChanged: h, scrollTopChanged: l };
|
|
2105
2105
|
}
|
|
2106
|
-
},
|
|
2106
|
+
}, ro = class extends L {
|
|
2107
2107
|
constructor(e) {
|
|
2108
|
-
super(), this._scrollableBrand = void 0, this._onScroll = this._register(new m()), this.onScroll = this._onScroll.event, this._smoothScrollDuration = e.smoothScrollDuration, this._scheduleAtNextAnimationFrame = e.scheduleAtNextAnimationFrame, this._state = new
|
|
2108
|
+
super(), this._scrollableBrand = void 0, this._onScroll = this._register(new m()), this.onScroll = this._onScroll.event, this._smoothScrollDuration = e.smoothScrollDuration, this._scheduleAtNextAnimationFrame = e.scheduleAtNextAnimationFrame, this._state = new so(e.forceIntegerValues, 0, 0, 0, 0, 0, 0), this._smoothScrolling = null;
|
|
2109
2109
|
}
|
|
2110
2110
|
dispose() {
|
|
2111
2111
|
this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), super.dispose();
|
|
@@ -2177,10 +2177,10 @@ var tn = _t, ts = class extends L {
|
|
|
2177
2177
|
function ii(e, t) {
|
|
2178
2178
|
let i = t - e;
|
|
2179
2179
|
return function(s) {
|
|
2180
|
-
return e + i *
|
|
2180
|
+
return e + i * ao(s);
|
|
2181
2181
|
};
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function no(e, t, i) {
|
|
2184
2184
|
return function(s) {
|
|
2185
2185
|
return s < i ? e(s / i) : t((s - i) / (1 - i));
|
|
2186
2186
|
};
|
|
@@ -2194,8 +2194,8 @@ var ys = class Bi {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
_initAnimation(t, i, s) {
|
|
2196
2196
|
if (Math.abs(t - i) > 2.5 * s) {
|
|
2197
|
-
let r,
|
|
2198
|
-
return t < i ? (r = t + 0.75 * s,
|
|
2197
|
+
let r, n;
|
|
2198
|
+
return t < i ? (r = t + 0.75 * s, n = i - 0.75 * s) : (r = t - 0.75 * s, n = i + 0.75 * s), no(ii(t, r), ii(n, i), 0.33);
|
|
2199
2199
|
}
|
|
2200
2200
|
return ii(t, i);
|
|
2201
2201
|
}
|
|
@@ -2225,13 +2225,13 @@ var ys = class Bi {
|
|
|
2225
2225
|
return new Bi(t, i, r, s);
|
|
2226
2226
|
}
|
|
2227
2227
|
};
|
|
2228
|
-
function
|
|
2228
|
+
function oo(e) {
|
|
2229
2229
|
return Math.pow(e, 3);
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2232
|
-
return 1 -
|
|
2231
|
+
function ao(e) {
|
|
2232
|
+
return 1 - oo(1 - e);
|
|
2233
2233
|
}
|
|
2234
|
-
var
|
|
2234
|
+
var ho = class extends L {
|
|
2235
2235
|
constructor(e, t, i) {
|
|
2236
2236
|
super(), this._visibility = e, this._visibleClassName = t, this._invisibleClassName = i, this._domNode = null, this._isVisible = !1, this._isNeeded = !1, this._rawShouldBeVisible = !1, this._shouldBeVisible = !1, this._revealTimer = this._register(new Qi());
|
|
2237
2237
|
}
|
|
@@ -2269,12 +2269,12 @@ var hn = class extends L {
|
|
|
2269
2269
|
_hide(e) {
|
|
2270
2270
|
this._revealTimer.cancel(), this._isVisible && (this._isVisible = !1, this._domNode?.setClassName(this._invisibleClassName + (e ? " fade" : "")));
|
|
2271
2271
|
}
|
|
2272
|
-
},
|
|
2272
|
+
}, lo = 140, xr = class extends ts {
|
|
2273
2273
|
constructor(e) {
|
|
2274
|
-
super(), this._lazyRender = e.lazyRender, this._host = e.host, this._scrollable = e.scrollable, this._scrollByPage = e.scrollByPage, this._scrollbarState = e.scrollbarState, this._visibilityController = this._register(new
|
|
2274
|
+
super(), this._lazyRender = e.lazyRender, this._host = e.host, this._scrollable = e.scrollable, this._scrollByPage = e.scrollByPage, this._scrollbarState = e.scrollbarState, this._visibilityController = this._register(new ho(e.visibility, "visible scrollbar " + e.extraScrollbarClassName, "invisible scrollbar " + e.extraScrollbarClassName)), this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._pointerMoveMonitor = this._register(new Cr()), this._shouldRender = !0, this.domNode = mt(document.createElement("div")), this.domNode.setAttribute("role", "presentation"), this.domNode.setAttribute("aria-hidden", "true"), this._visibilityController.setDomNode(this.domNode), this.domNode.setPosition("absolute"), this._register(D(this.domNode.domNode, Z.POINTER_DOWN, (t) => this._domNodePointerDown(t)));
|
|
2275
2275
|
}
|
|
2276
2276
|
_createArrow(e) {
|
|
2277
|
-
let t = this._register(new
|
|
2277
|
+
let t = this._register(new io(e));
|
|
2278
2278
|
this.domNode.domNode.appendChild(t.bgDomNode), this.domNode.domNode.appendChild(t.domNode);
|
|
2279
2279
|
}
|
|
2280
2280
|
_createSlider(e, t, i, s) {
|
|
@@ -2313,7 +2313,7 @@ var hn = class extends L {
|
|
|
2313
2313
|
let t, i;
|
|
2314
2314
|
if (e.target === this.domNode.domNode && typeof e.offsetX == "number" && typeof e.offsetY == "number") t = e.offsetX, i = e.offsetY;
|
|
2315
2315
|
else {
|
|
2316
|
-
let r =
|
|
2316
|
+
let r = Zn(this.domNode.domNode);
|
|
2317
2317
|
t = e.pageX - r.left, i = e.pageY - r.top;
|
|
2318
2318
|
}
|
|
2319
2319
|
let s = this._pointerDownRelativePosition(t, i);
|
|
@@ -2323,13 +2323,13 @@ var hn = class extends L {
|
|
|
2323
2323
|
if (!e.target || !(e.target instanceof Element)) return;
|
|
2324
2324
|
let t = this._sliderPointerPosition(e), i = this._sliderOrthogonalPointerPosition(e), s = this._scrollbarState.clone();
|
|
2325
2325
|
this.slider.toggleClassName("active", !0), this._pointerMoveMonitor.startMonitoring(e.target, e.pointerId, e.buttons, (r) => {
|
|
2326
|
-
let
|
|
2327
|
-
if (Sr &&
|
|
2326
|
+
let n = this._sliderOrthogonalPointerPosition(r), o = Math.abs(n - i);
|
|
2327
|
+
if (Sr && o > lo) {
|
|
2328
2328
|
this._setDesiredScrollPositionNow(s.getScrollPosition());
|
|
2329
2329
|
return;
|
|
2330
2330
|
}
|
|
2331
|
-
let
|
|
2332
|
-
this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(
|
|
2331
|
+
let h = this._sliderPointerPosition(r) - t;
|
|
2332
|
+
this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(h));
|
|
2333
2333
|
}, () => {
|
|
2334
2334
|
this.slider.toggleClassName("active", !1), this._host.onDragEnd();
|
|
2335
2335
|
}), this._host.onDragStart();
|
|
@@ -2345,8 +2345,8 @@ var hn = class extends L {
|
|
|
2345
2345
|
return this._scrollbarState.isNeeded();
|
|
2346
2346
|
}
|
|
2347
2347
|
}, kr = class Di {
|
|
2348
|
-
constructor(t, i, s, r,
|
|
2349
|
-
this._scrollbarSize = Math.round(i), this._oppositeScrollbarSize = Math.round(s), this._arrowSize = Math.round(t), this._visibleSize = r, this._scrollSize =
|
|
2348
|
+
constructor(t, i, s, r, n, o) {
|
|
2349
|
+
this._scrollbarSize = Math.round(i), this._oppositeScrollbarSize = Math.round(s), this._arrowSize = Math.round(t), this._visibleSize = r, this._scrollSize = n, this._scrollPosition = o, this._computedAvailableSize = 0, this._computedIsNeeded = !1, this._computedSliderSize = 0, this._computedSliderRatio = 0, this._computedSliderPosition = 0, this._refreshComputedValues();
|
|
2350
2350
|
}
|
|
2351
2351
|
clone() {
|
|
2352
2352
|
return new Di(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition);
|
|
@@ -2369,11 +2369,11 @@ var hn = class extends L {
|
|
|
2369
2369
|
setOppositeScrollbarSize(t) {
|
|
2370
2370
|
this._oppositeScrollbarSize = Math.round(t);
|
|
2371
2371
|
}
|
|
2372
|
-
static _computeValues(t, i, s, r,
|
|
2373
|
-
let
|
|
2374
|
-
if (!
|
|
2375
|
-
let a = Math.round(Math.max(20, Math.floor(s *
|
|
2376
|
-
return { computedAvailableSize: Math.round(
|
|
2372
|
+
static _computeValues(t, i, s, r, n) {
|
|
2373
|
+
let o = Math.max(0, s - t), h = Math.max(0, o - 2 * i), l = r > 0 && r > s;
|
|
2374
|
+
if (!l) return { computedAvailableSize: Math.round(o), computedIsNeeded: l, computedSliderSize: Math.round(h), computedSliderRatio: 0, computedSliderPosition: 0 };
|
|
2375
|
+
let a = Math.round(Math.max(20, Math.floor(s * h / r))), d = (h - a) / (r - s), c = n * d;
|
|
2376
|
+
return { computedAvailableSize: Math.round(o), computedIsNeeded: l, computedSliderSize: Math.round(a), computedSliderRatio: d, computedSliderPosition: Math.round(c) };
|
|
2377
2377
|
}
|
|
2378
2378
|
_refreshComputedValues() {
|
|
2379
2379
|
let t = Di._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);
|
|
@@ -2415,7 +2415,7 @@ var hn = class extends L {
|
|
|
2415
2415
|
let i = this._computedSliderPosition + t;
|
|
2416
2416
|
return Math.round(i / this._computedSliderRatio);
|
|
2417
2417
|
}
|
|
2418
|
-
},
|
|
2418
|
+
}, co = class extends xr {
|
|
2419
2419
|
constructor(e, t, i) {
|
|
2420
2420
|
let s = e.getScrollDimensions(), r = e.getCurrentScrollPosition();
|
|
2421
2421
|
if (super({ lazyRender: t.lazyRender, host: i, scrollbarState: new kr(t.horizontalHasArrows ? t.arrowSize : 0, t.horizontal === 2 ? 0 : t.horizontalScrollbarSize, t.vertical === 2 ? 0 : t.verticalScrollbarSize, s.width, s.scrollWidth, r.scrollLeft), visibility: t.horizontal, extraScrollbarClassName: "horizontal", scrollable: e, scrollByPage: t.scrollByPage }), t.horizontalHasArrows) throw new Error("horizontalHasArrows is not supported in xterm.js");
|
|
@@ -2448,7 +2448,7 @@ var hn = class extends L {
|
|
|
2448
2448
|
updateOptions(e) {
|
|
2449
2449
|
this.updateScrollbarSize(e.horizontal === 2 ? 0 : e.horizontalScrollbarSize), this._scrollbarState.setOppositeScrollbarSize(e.vertical === 2 ? 0 : e.verticalScrollbarSize), this._visibilityController.setVisibility(e.horizontal), this._scrollByPage = e.scrollByPage;
|
|
2450
2450
|
}
|
|
2451
|
-
},
|
|
2451
|
+
}, uo = class extends xr {
|
|
2452
2452
|
constructor(e, t, i) {
|
|
2453
2453
|
let s = e.getScrollDimensions(), r = e.getCurrentScrollPosition();
|
|
2454
2454
|
if (super({ lazyRender: t.lazyRender, host: i, scrollbarState: new kr(t.verticalHasArrows ? t.arrowSize : 0, t.vertical === 2 ? 0 : t.verticalScrollbarSize, 0, s.height, s.scrollHeight, r.scrollTop), visibility: t.vertical, extraScrollbarClassName: "vertical", scrollable: e, scrollByPage: t.scrollByPage }), t.verticalHasArrows) throw new Error("horizontalHasArrows is not supported in xterm.js");
|
|
@@ -2481,7 +2481,7 @@ var hn = class extends L {
|
|
|
2481
2481
|
updateOptions(e) {
|
|
2482
2482
|
this.updateScrollbarSize(e.vertical === 2 ? 0 : e.verticalScrollbarSize), this._scrollbarState.setOppositeScrollbarSize(0), this._visibilityController.setVisibility(e.vertical), this._scrollByPage = e.scrollByPage;
|
|
2483
2483
|
}
|
|
2484
|
-
},
|
|
2484
|
+
}, _o = 500, Cs = 50, fo = class {
|
|
2485
2485
|
constructor(e, t, i) {
|
|
2486
2486
|
this.timestamp = e, this.deltaX = t, this.deltaY = i, this.score = 0;
|
|
2487
2487
|
}
|
|
@@ -2493,28 +2493,28 @@ var hn = class extends L {
|
|
|
2493
2493
|
if (this._front === -1 && this._rear === -1) return !1;
|
|
2494
2494
|
let t = 1, i = 0, s = 1, r = this._rear;
|
|
2495
2495
|
do {
|
|
2496
|
-
let
|
|
2497
|
-
if (t -=
|
|
2496
|
+
let n = r === this._front ? t : Math.pow(2, -s);
|
|
2497
|
+
if (t -= n, i += this._memory[r].score * n, r === this._front) break;
|
|
2498
2498
|
r = (this._capacity + r - 1) % this._capacity, s++;
|
|
2499
2499
|
} while (!0);
|
|
2500
2500
|
return i <= 0.5;
|
|
2501
2501
|
}
|
|
2502
2502
|
acceptStandardWheelEvent(t) {
|
|
2503
2503
|
if (Ji) {
|
|
2504
|
-
let i = De(t.browserEvent), s =
|
|
2504
|
+
let i = De(t.browserEvent), s = xn(i);
|
|
2505
2505
|
this.accept(Date.now(), t.deltaX * s, t.deltaY * s);
|
|
2506
2506
|
} else this.accept(Date.now(), t.deltaX, t.deltaY);
|
|
2507
2507
|
}
|
|
2508
2508
|
accept(t, i, s) {
|
|
2509
|
-
let r = null,
|
|
2510
|
-
this._front === -1 && this._rear === -1 ? (this._memory[0] =
|
|
2509
|
+
let r = null, n = new fo(t, i, s);
|
|
2510
|
+
this._front === -1 && this._rear === -1 ? (this._memory[0] = n, this._front = 0, this._rear = 0) : (r = this._memory[this._rear], this._rear = (this._rear + 1) % this._capacity, this._rear === this._front && (this._front = (this._front + 1) % this._capacity), this._memory[this._rear] = n), n.score = this._computeScore(n, r);
|
|
2511
2511
|
}
|
|
2512
2512
|
_computeScore(t, i) {
|
|
2513
2513
|
if (Math.abs(t.deltaX) > 0 && Math.abs(t.deltaY) > 0) return 1;
|
|
2514
2514
|
let s = 0.5;
|
|
2515
2515
|
if ((!this._isAlmostInt(t.deltaX) || !this._isAlmostInt(t.deltaY)) && (s += 0.25), i) {
|
|
2516
|
-
let r = Math.abs(t.deltaX),
|
|
2517
|
-
d %
|
|
2516
|
+
let r = Math.abs(t.deltaX), n = Math.abs(t.deltaY), o = Math.abs(i.deltaX), h = Math.abs(i.deltaY), l = Math.max(Math.min(r, o), 1), a = Math.max(Math.min(n, h), 1), d = Math.max(r, o), c = Math.max(n, h);
|
|
2517
|
+
d % l === 0 && c % a === 0 && (s -= 0.5);
|
|
2518
2518
|
}
|
|
2519
2519
|
return Math.min(Math.max(s, 0), 1);
|
|
2520
2520
|
}
|
|
@@ -2523,13 +2523,13 @@ var hn = class extends L {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
};
|
|
2525
2525
|
Ri.INSTANCE = new Ri();
|
|
2526
|
-
var
|
|
2526
|
+
var po = Ri, go = class extends ts {
|
|
2527
2527
|
constructor(e, t, i) {
|
|
2528
|
-
super(), this._onScroll = this._register(new m()), this.onScroll = this._onScroll.event, this._onWillScroll = this._register(new m()), this.onWillScroll = this._onWillScroll.event, this._options =
|
|
2528
|
+
super(), this._onScroll = this._register(new m()), this.onScroll = this._onScroll.event, this._onWillScroll = this._register(new m()), this.onWillScroll = this._onWillScroll.event, this._options = mo(t), this._scrollable = i, this._register(this._scrollable.onScroll((r) => {
|
|
2529
2529
|
this._onWillScroll.fire(r), this._onDidScroll(r), this._onScroll.fire(r);
|
|
2530
2530
|
}));
|
|
2531
2531
|
let s = { onMouseWheel: (r) => this._onMouseWheel(r), onDragStart: () => this._onDragStart(), onDragEnd: () => this._onDragEnd() };
|
|
2532
|
-
this._verticalScrollbar = this._register(new
|
|
2532
|
+
this._verticalScrollbar = this._register(new uo(this._scrollable, this._options, s)), this._horizontalScrollbar = this._register(new co(this._scrollable, this._options, s)), this._domNode = document.createElement("div"), this._domNode.className = "xterm-scrollable-element " + this._options.className, this._domNode.setAttribute("role", "presentation"), this._domNode.style.position = "relative", this._domNode.appendChild(e), this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode), this._domNode.appendChild(this._verticalScrollbar.domNode.domNode), this._options.useShadows ? (this._leftShadowDomNode = mt(document.createElement("div")), this._leftShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._leftShadowDomNode.domNode), this._topShadowDomNode = mt(document.createElement("div")), this._topShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._topShadowDomNode.domNode), this._topLeftShadowDomNode = mt(document.createElement("div")), this._topLeftShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._topLeftShadowDomNode.domNode)) : (this._leftShadowDomNode = null, this._topShadowDomNode = null, this._topLeftShadowDomNode = null), this._listenOnDomNode = this._options.listenOnDomNode || this._domNode, this._mouseWheelToDispose = [], this._setListeningToMouseWheel(this._options.handleMouseWheel), this.onmouseover(this._listenOnDomNode, (r) => this._onMouseOver(r)), this.onmouseleave(this._listenOnDomNode, (r) => this._onMouseLeave(r)), this._hideTimeout = this._register(new Qi()), this._isDragging = !1, this._mouseIsOver = !1, this._shouldRender = !0, this._revealOnScroll = !0;
|
|
2533
2533
|
}
|
|
2534
2534
|
get options() {
|
|
2535
2535
|
return this._options;
|
|
@@ -2574,24 +2574,24 @@ var pn = Ri, gn = class extends ts {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
_onMouseWheel(e) {
|
|
2576
2576
|
if (e.browserEvent?.defaultPrevented) return;
|
|
2577
|
-
let t =
|
|
2577
|
+
let t = po.INSTANCE;
|
|
2578
2578
|
t.acceptStandardWheelEvent(e);
|
|
2579
2579
|
let i = !1;
|
|
2580
2580
|
if (e.deltaY || e.deltaX) {
|
|
2581
|
-
let r = e.deltaY * this._options.mouseWheelScrollSensitivity,
|
|
2582
|
-
this._options.scrollPredominantAxis && (this._options.scrollYToX &&
|
|
2583
|
-
let
|
|
2584
|
-
(this._options.scrollYToX ||
|
|
2585
|
-
let
|
|
2581
|
+
let r = e.deltaY * this._options.mouseWheelScrollSensitivity, n = e.deltaX * this._options.mouseWheelScrollSensitivity;
|
|
2582
|
+
this._options.scrollPredominantAxis && (this._options.scrollYToX && n + r === 0 ? n = r = 0 : Math.abs(r) >= Math.abs(n) ? n = 0 : r = 0), this._options.flipAxes && ([r, n] = [n, r]);
|
|
2583
|
+
let o = !Re && e.browserEvent && e.browserEvent.shiftKey;
|
|
2584
|
+
(this._options.scrollYToX || o) && !n && (n = r, r = 0), e.browserEvent && e.browserEvent.altKey && (n = n * this._options.fastScrollSensitivity, r = r * this._options.fastScrollSensitivity);
|
|
2585
|
+
let h = this._scrollable.getFutureScrollPosition(), l = {};
|
|
2586
2586
|
if (r) {
|
|
2587
|
-
let a = Cs * r, d =
|
|
2588
|
-
this._verticalScrollbar.writeScrollPosition(
|
|
2587
|
+
let a = Cs * r, d = h.scrollTop - (a < 0 ? Math.floor(a) : Math.ceil(a));
|
|
2588
|
+
this._verticalScrollbar.writeScrollPosition(l, d);
|
|
2589
2589
|
}
|
|
2590
|
-
if (
|
|
2591
|
-
let a = Cs *
|
|
2592
|
-
this._horizontalScrollbar.writeScrollPosition(
|
|
2590
|
+
if (n) {
|
|
2591
|
+
let a = Cs * n, d = h.scrollLeft - (a < 0 ? Math.floor(a) : Math.ceil(a));
|
|
2592
|
+
this._horizontalScrollbar.writeScrollPosition(l, d);
|
|
2593
2593
|
}
|
|
2594
|
-
|
|
2594
|
+
l = this._scrollable.validateScrollPosition(l), (h.scrollLeft !== l.scrollLeft || h.scrollTop !== l.scrollTop) && (this._options.mouseWheelSmoothScroll && t.isPhysicalMouseWheel() ? this._scrollable.setScrollPositionSmooth(l) : this._scrollable.setScrollPositionNow(l), i = !0);
|
|
2595
2595
|
}
|
|
2596
2596
|
let s = i;
|
|
2597
2597
|
!s && this._options.alwaysConsumeMouseWheel && (s = !0), !s && this._options.consumeMouseWheelIfScrollbarIsNeeded && (this._verticalScrollbar.isNeeded() || this._horizontalScrollbar.isNeeded()) && (s = !0), s && (e.preventDefault(), e.stopPropagation());
|
|
@@ -2605,8 +2605,8 @@ var pn = Ri, gn = class extends ts {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
_render() {
|
|
2607
2607
|
if (this._shouldRender && (this._shouldRender = !1, this._horizontalScrollbar.render(), this._verticalScrollbar.render(), this._options.useShadows)) {
|
|
2608
|
-
let e = this._scrollable.getCurrentScrollPosition(), t = e.scrollTop > 0, i = e.scrollLeft > 0, s = i ? " left" : "", r = t ? " top" : "",
|
|
2609
|
-
this._leftShadowDomNode.setClassName(`shadow${s}`), this._topShadowDomNode.setClassName(`shadow${r}`), this._topLeftShadowDomNode.setClassName(`shadow${
|
|
2608
|
+
let e = this._scrollable.getCurrentScrollPosition(), t = e.scrollTop > 0, i = e.scrollLeft > 0, s = i ? " left" : "", r = t ? " top" : "", n = i || t ? " top-left-corner" : "";
|
|
2609
|
+
this._leftShadowDomNode.setClassName(`shadow${s}`), this._topShadowDomNode.setClassName(`shadow${r}`), this._topLeftShadowDomNode.setClassName(`shadow${n}${r}${s}`);
|
|
2610
2610
|
}
|
|
2611
2611
|
}
|
|
2612
2612
|
_onDragStart() {
|
|
@@ -2628,9 +2628,9 @@ var pn = Ri, gn = class extends ts {
|
|
|
2628
2628
|
!this._mouseIsOver && !this._isDragging && (this._verticalScrollbar.beginHide(), this._horizontalScrollbar.beginHide());
|
|
2629
2629
|
}
|
|
2630
2630
|
_scheduleHide() {
|
|
2631
|
-
!this._mouseIsOver && !this._isDragging && this._hideTimeout.cancelAndSet(() => this._hide(),
|
|
2631
|
+
!this._mouseIsOver && !this._isDragging && this._hideTimeout.cancelAndSet(() => this._hide(), _o);
|
|
2632
2632
|
}
|
|
2633
|
-
},
|
|
2633
|
+
}, vo = class extends go {
|
|
2634
2634
|
constructor(e, t, i) {
|
|
2635
2635
|
super(e, t, i);
|
|
2636
2636
|
}
|
|
@@ -2641,22 +2641,22 @@ var pn = Ri, gn = class extends ts {
|
|
|
2641
2641
|
return this._scrollable.getCurrentScrollPosition();
|
|
2642
2642
|
}
|
|
2643
2643
|
};
|
|
2644
|
-
function
|
|
2644
|
+
function mo(e) {
|
|
2645
2645
|
let t = { lazyRender: typeof e.lazyRender < "u" ? e.lazyRender : !1, className: typeof e.className < "u" ? e.className : "", useShadows: typeof e.useShadows < "u" ? e.useShadows : !0, handleMouseWheel: typeof e.handleMouseWheel < "u" ? e.handleMouseWheel : !0, flipAxes: typeof e.flipAxes < "u" ? e.flipAxes : !1, consumeMouseWheelIfScrollbarIsNeeded: typeof e.consumeMouseWheelIfScrollbarIsNeeded < "u" ? e.consumeMouseWheelIfScrollbarIsNeeded : !1, alwaysConsumeMouseWheel: typeof e.alwaysConsumeMouseWheel < "u" ? e.alwaysConsumeMouseWheel : !1, scrollYToX: typeof e.scrollYToX < "u" ? e.scrollYToX : !1, mouseWheelScrollSensitivity: typeof e.mouseWheelScrollSensitivity < "u" ? e.mouseWheelScrollSensitivity : 1, fastScrollSensitivity: typeof e.fastScrollSensitivity < "u" ? e.fastScrollSensitivity : 5, scrollPredominantAxis: typeof e.scrollPredominantAxis < "u" ? e.scrollPredominantAxis : !0, mouseWheelSmoothScroll: typeof e.mouseWheelSmoothScroll < "u" ? e.mouseWheelSmoothScroll : !0, arrowSize: typeof e.arrowSize < "u" ? e.arrowSize : 11, listenOnDomNode: typeof e.listenOnDomNode < "u" ? e.listenOnDomNode : null, horizontal: typeof e.horizontal < "u" ? e.horizontal : 1, horizontalScrollbarSize: typeof e.horizontalScrollbarSize < "u" ? e.horizontalScrollbarSize : 10, horizontalSliderSize: typeof e.horizontalSliderSize < "u" ? e.horizontalSliderSize : 0, horizontalHasArrows: typeof e.horizontalHasArrows < "u" ? e.horizontalHasArrows : !1, vertical: typeof e.vertical < "u" ? e.vertical : 1, verticalScrollbarSize: typeof e.verticalScrollbarSize < "u" ? e.verticalScrollbarSize : 10, verticalHasArrows: typeof e.verticalHasArrows < "u" ? e.verticalHasArrows : !1, verticalSliderSize: typeof e.verticalSliderSize < "u" ? e.verticalSliderSize : 0, scrollByPage: typeof e.scrollByPage < "u" ? e.scrollByPage : !1 };
|
|
2646
2646
|
return t.horizontalSliderSize = typeof e.horizontalSliderSize < "u" ? e.horizontalSliderSize : t.horizontalScrollbarSize, t.verticalSliderSize = typeof e.verticalSliderSize < "u" ? e.verticalSliderSize : t.verticalScrollbarSize, Re && (t.className += " mac"), t;
|
|
2647
2647
|
}
|
|
2648
2648
|
var Mi = class extends L {
|
|
2649
|
-
constructor(e, t, i, s, r,
|
|
2650
|
-
super(), this._bufferService = i, this._optionsService =
|
|
2651
|
-
let
|
|
2649
|
+
constructor(e, t, i, s, r, n, o, h) {
|
|
2650
|
+
super(), this._bufferService = i, this._optionsService = o, this._renderService = h, this._onRequestScrollLines = this._register(new m()), this.onRequestScrollLines = this._onRequestScrollLines.event, this._isSyncing = !1, this._isHandlingScroll = !1, this._suppressOnScrollHandler = !1;
|
|
2651
|
+
let l = this._register(new ro({ forceIntegerValues: !1, smoothScrollDuration: this._optionsService.rawOptions.smoothScrollDuration, scheduleAtNextAnimationFrame: (a) => es(s.window, a) }));
|
|
2652
2652
|
this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration", () => {
|
|
2653
|
-
|
|
2654
|
-
})), this._scrollableElement = this._register(new
|
|
2653
|
+
l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration);
|
|
2654
|
+
})), this._scrollableElement = this._register(new vo(t, { vertical: 1, horizontal: 2, useShadows: !1, mouseWheelSmoothScroll: !0, ...this._getChangeOptions() }, l)), this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity", "fastScrollSensitivity", "overviewRuler"], () => this._scrollableElement.updateOptions(this._getChangeOptions()))), this._register(r.onProtocolChange((a) => {
|
|
2655
2655
|
this._scrollableElement.updateOptions({ handleMouseWheel: !(a & 16) });
|
|
2656
|
-
})), this._scrollableElement.setScrollDimensions({ height: 0, scrollHeight: 0 }), this._register(
|
|
2657
|
-
this._scrollableElement.getDomNode().style.backgroundColor =
|
|
2658
|
-
})), e.appendChild(this._scrollableElement.getDomNode()), this._register(z(() => this._scrollableElement.getDomNode().remove())), this._styleElement = s.mainDocument.createElement("style"), t.appendChild(this._styleElement), this._register(z(() => this._styleElement.remove())), this._register(
|
|
2659
|
-
this._styleElement.textContent = [".xterm .xterm-scrollable-element > .scrollbar > .slider {", ` background: ${
|
|
2656
|
+
})), this._scrollableElement.setScrollDimensions({ height: 0, scrollHeight: 0 }), this._register(ne.runAndSubscribe(n.onChangeColors, () => {
|
|
2657
|
+
this._scrollableElement.getDomNode().style.backgroundColor = n.colors.background.css;
|
|
2658
|
+
})), e.appendChild(this._scrollableElement.getDomNode()), this._register(z(() => this._scrollableElement.getDomNode().remove())), this._styleElement = s.mainDocument.createElement("style"), t.appendChild(this._styleElement), this._register(z(() => this._styleElement.remove())), this._register(ne.runAndSubscribe(n.onChangeColors, () => {
|
|
2659
|
+
this._styleElement.textContent = [".xterm .xterm-scrollable-element > .scrollbar > .slider {", ` background: ${n.colors.scrollbarSliderBackground.css};`, "}", ".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {", ` background: ${n.colors.scrollbarSliderHoverBackground.css};`, "}", ".xterm .xterm-scrollable-element > .scrollbar > .slider.active {", ` background: ${n.colors.scrollbarSliderActiveBackground.css};`, "}"].join(`
|
|
2660
2660
|
`);
|
|
2661
2661
|
})), this._register(this._bufferService.onResize(() => this.queueSync())), this._register(this._bufferService.buffers.onBufferActivate(() => {
|
|
2662
2662
|
this._latestYDisp = void 0, this.queueSync();
|
|
@@ -2687,14 +2687,14 @@ var Mi = class extends L {
|
|
|
2687
2687
|
i !== 0 && (this._latestYDisp = t, this._onRequestScrollLines.fire(i)), this._isHandlingScroll = !1;
|
|
2688
2688
|
}
|
|
2689
2689
|
};
|
|
2690
|
-
Mi = q([S(2,
|
|
2690
|
+
Mi = q([S(2, he), S(3, Ae), S(4, nr), S(5, rt), S(6, le), S(7, Oe)], Mi);
|
|
2691
2691
|
var Li = class extends L {
|
|
2692
2692
|
constructor(e, t, i, s, r) {
|
|
2693
2693
|
super(), this._screenElement = e, this._bufferService = t, this._coreBrowserService = i, this._decorationService = s, this._renderService = r, this._decorationElements = /* @__PURE__ */ new Map(), this._altBufferIsActive = !1, this._dimensionsChanged = !1, this._container = document.createElement("div"), this._container.classList.add("xterm-decoration-container"), this._screenElement.appendChild(this._container), this._register(this._renderService.onRenderedViewportChange(() => this._doRefreshDecorations())), this._register(this._renderService.onDimensionsChange(() => {
|
|
2694
2694
|
this._dimensionsChanged = !0, this._queueRefresh();
|
|
2695
2695
|
})), this._register(this._coreBrowserService.onDprChange(() => this._queueRefresh())), this._register(this._bufferService.buffers.onBufferActivate(() => {
|
|
2696
2696
|
this._altBufferIsActive = this._bufferService.buffer === this._bufferService.buffers.alt;
|
|
2697
|
-
})), this._register(this._decorationService.onDecorationRegistered(() => this._queueRefresh())), this._register(this._decorationService.onDecorationRemoved((
|
|
2697
|
+
})), this._register(this._decorationService.onDecorationRegistered(() => this._queueRefresh())), this._register(this._decorationService.onDecorationRemoved((n) => this._removeDecoration(n))), this._register(z(() => {
|
|
2698
2698
|
this._container.remove(), this._decorationElements.clear();
|
|
2699
2699
|
}));
|
|
2700
2700
|
}
|
|
@@ -2735,8 +2735,8 @@ var Li = class extends L {
|
|
|
2735
2735
|
this._decorationElements.get(e)?.remove(), this._decorationElements.delete(e), e.dispose();
|
|
2736
2736
|
}
|
|
2737
2737
|
};
|
|
2738
|
-
Li = q([S(1,
|
|
2739
|
-
var
|
|
2738
|
+
Li = q([S(1, he), S(2, Ae), S(3, Ct), S(4, Oe)], Li);
|
|
2739
|
+
var So = class {
|
|
2740
2740
|
constructor() {
|
|
2741
2741
|
this._zones = [], this._zonePool = [], this._zonePoolIndex = 0, this._linePadding = { full: 0, left: 0, center: 0, right: 0 };
|
|
2742
2742
|
}
|
|
@@ -2775,10 +2775,10 @@ var Sn = class {
|
|
|
2775
2775
|
e.startBufferLine = Math.min(e.startBufferLine, t), e.endBufferLine = Math.max(e.endBufferLine, t);
|
|
2776
2776
|
}
|
|
2777
2777
|
}, ke = { full: 0, left: 0, center: 0, right: 0 }, ze = { full: 0, left: 0, center: 0, right: 0 }, at = { full: 0, left: 0, center: 0, right: 0 }, Ft = class extends L {
|
|
2778
|
-
constructor(e, t, i, s, r,
|
|
2779
|
-
super(), this._viewportElement = e, this._screenElement = t, this._bufferService = i, this._decorationService = s, this._renderService = r, this._optionsService =
|
|
2780
|
-
let
|
|
2781
|
-
if (
|
|
2778
|
+
constructor(e, t, i, s, r, n, o, h) {
|
|
2779
|
+
super(), this._viewportElement = e, this._screenElement = t, this._bufferService = i, this._decorationService = s, this._renderService = r, this._optionsService = n, this._themeService = o, this._coreBrowserService = h, this._colorZoneStore = new So(), this._shouldUpdateDimensions = !0, this._shouldUpdateAnchor = !0, this._lastKnownBufferLength = 0, this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), this._viewportElement.parentElement?.insertBefore(this._canvas, this._viewportElement), this._register(z(() => this._canvas?.remove()));
|
|
2780
|
+
let l = this._canvas.getContext("2d");
|
|
2781
|
+
if (l) this._ctx = l;
|
|
2782
2782
|
else throw new Error("Ctx cannot be null");
|
|
2783
2783
|
this._register(this._decorationService.onDecorationRegistered(() => this._queueRefresh(void 0, !0))), this._register(this._decorationService.onDecorationRemoved(() => this._queueRefresh(void 0, !0))), this._register(this._renderService.onRenderedViewportChange(() => this._queueRefresh())), this._register(this._bufferService.buffers.onBufferActivate(() => {
|
|
2784
2784
|
this._canvas.style.display = this._bufferService.buffer === this._bufferService.buffers.alt ? "none" : "block";
|
|
@@ -2827,7 +2827,7 @@ var Sn = class {
|
|
|
2827
2827
|
}));
|
|
2828
2828
|
}
|
|
2829
2829
|
};
|
|
2830
|
-
Ft = q([S(2,
|
|
2830
|
+
Ft = q([S(2, he), S(3, Ct), S(4, Oe), S(5, le), S(6, rt), S(7, Ae)], Ft);
|
|
2831
2831
|
var p;
|
|
2832
2832
|
((e) => (e.NUL = "\0", e.SOH = "", e.STX = "", e.ETX = "", e.EOT = "", e.ENQ = "", e.ACK = "", e.BEL = "\x07", e.BS = "\b", e.HT = " ", e.LF = `
|
|
2833
2833
|
`, e.VT = "\v", e.FF = "\f", e.CR = "\r", e.SO = "", e.SI = "", e.DLE = "", e.DC1 = "", e.DC2 = "", e.DC3 = "", e.DC4 = "", e.NAK = "", e.SYN = "", e.ETB = "", e.CAN = "", e.EM = "", e.SUB = "", e.ESC = "\x1B", e.FS = "", e.GS = "", e.RS = "", e.US = "", e.SP = " ", e.DEL = ""))(p ||= {});
|
|
@@ -2836,8 +2836,8 @@ var Nt;
|
|
|
2836
2836
|
var Er;
|
|
2837
2837
|
((e) => e.ST = `${p.ESC}\\`)(Er ||= {});
|
|
2838
2838
|
var Pi = class {
|
|
2839
|
-
constructor(e, t, i, s, r,
|
|
2840
|
-
this._textarea = e, this._compositionView = t, this._bufferService = i, this._optionsService = s, this._coreService = r, this._renderService =
|
|
2839
|
+
constructor(e, t, i, s, r, n) {
|
|
2840
|
+
this._textarea = e, this._compositionView = t, this._bufferService = i, this._optionsService = s, this._coreService = r, this._renderService = n, this._isComposing = !1, this._isSendingComposition = !1, this._compositionPosition = { start: 0, end: 0 }, this._dataAlreadySent = "";
|
|
2841
2841
|
}
|
|
2842
2842
|
get isComposing() {
|
|
2843
2843
|
return this._isComposing;
|
|
@@ -2890,65 +2890,65 @@ var Pi = class {
|
|
|
2890
2890
|
if (this._bufferService.buffer.isCursorInViewport) {
|
|
2891
2891
|
let t = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1), i = this._renderService.dimensions.css.cell.height, s = this._bufferService.buffer.y * this._renderService.dimensions.css.cell.height, r = t * this._renderService.dimensions.css.cell.width;
|
|
2892
2892
|
this._compositionView.style.left = r + "px", this._compositionView.style.top = s + "px", this._compositionView.style.height = i + "px", this._compositionView.style.lineHeight = i + "px", this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + "px";
|
|
2893
|
-
let
|
|
2894
|
-
this._textarea.style.left = r + "px", this._textarea.style.top = s + "px", this._textarea.style.width = Math.max(
|
|
2893
|
+
let n = this._compositionView.getBoundingClientRect();
|
|
2894
|
+
this._textarea.style.left = r + "px", this._textarea.style.top = s + "px", this._textarea.style.width = Math.max(n.width, 1) + "px", this._textarea.style.height = Math.max(n.height, 1) + "px", this._textarea.style.lineHeight = n.height + "px";
|
|
2895
2895
|
}
|
|
2896
2896
|
e || setTimeout(() => this.updateCompositionElements(!0), 0);
|
|
2897
2897
|
}
|
|
2898
2898
|
}
|
|
2899
2899
|
};
|
|
2900
|
-
Pi = q([S(2,
|
|
2900
|
+
Pi = q([S(2, he), S(3, le), S(4, Qe), S(5, Oe)], Pi);
|
|
2901
2901
|
var Q = 0, ee = 0, te = 0, U = 0, xs = { css: "#00000000", rgba: 0 }, X;
|
|
2902
2902
|
((e) => {
|
|
2903
|
-
function t(r,
|
|
2904
|
-
return
|
|
2903
|
+
function t(r, n, o, h) {
|
|
2904
|
+
return h !== void 0 ? `#${Ve(r)}${Ve(n)}${Ve(o)}${Ve(h)}` : `#${Ve(r)}${Ve(n)}${Ve(o)}`;
|
|
2905
2905
|
}
|
|
2906
2906
|
e.toCss = t;
|
|
2907
|
-
function i(r,
|
|
2908
|
-
return (r << 24 |
|
|
2907
|
+
function i(r, n, o, h = 255) {
|
|
2908
|
+
return (r << 24 | n << 16 | o << 8 | h) >>> 0;
|
|
2909
2909
|
}
|
|
2910
2910
|
e.toRgba = i;
|
|
2911
|
-
function s(r,
|
|
2912
|
-
return { css: e.toCss(r,
|
|
2911
|
+
function s(r, n, o, h) {
|
|
2912
|
+
return { css: e.toCss(r, n, o, h), rgba: e.toRgba(r, n, o, h) };
|
|
2913
2913
|
}
|
|
2914
2914
|
e.toColor = s;
|
|
2915
2915
|
})(X ||= {});
|
|
2916
2916
|
var W;
|
|
2917
2917
|
((e) => {
|
|
2918
|
-
function t(
|
|
2918
|
+
function t(l, a) {
|
|
2919
2919
|
if (U = (a.rgba & 255) / 255, U === 1) return { css: a.css, rgba: a.rgba };
|
|
2920
|
-
let d = a.rgba >> 24 & 255, c = a.rgba >> 16 & 255, _ = a.rgba >> 8 & 255, f =
|
|
2920
|
+
let d = a.rgba >> 24 & 255, c = a.rgba >> 16 & 255, _ = a.rgba >> 8 & 255, f = l.rgba >> 24 & 255, u = l.rgba >> 16 & 255, g = l.rgba >> 8 & 255;
|
|
2921
2921
|
Q = f + Math.round((d - f) * U), ee = u + Math.round((c - u) * U), te = g + Math.round((_ - g) * U);
|
|
2922
2922
|
let y = X.toCss(Q, ee, te), E = X.toRgba(Q, ee, te);
|
|
2923
2923
|
return { css: y, rgba: E };
|
|
2924
2924
|
}
|
|
2925
2925
|
e.blend = t;
|
|
2926
|
-
function i(
|
|
2927
|
-
return (
|
|
2926
|
+
function i(l) {
|
|
2927
|
+
return (l.rgba & 255) === 255;
|
|
2928
2928
|
}
|
|
2929
2929
|
e.isOpaque = i;
|
|
2930
|
-
function s(
|
|
2931
|
-
let c = Ht.ensureContrastRatio(
|
|
2930
|
+
function s(l, a, d) {
|
|
2931
|
+
let c = Ht.ensureContrastRatio(l.rgba, a.rgba, d);
|
|
2932
2932
|
if (c) return X.toColor(c >> 24 & 255, c >> 16 & 255, c >> 8 & 255);
|
|
2933
2933
|
}
|
|
2934
2934
|
e.ensureContrastRatio = s;
|
|
2935
|
-
function r(
|
|
2936
|
-
let a = (
|
|
2935
|
+
function r(l) {
|
|
2936
|
+
let a = (l.rgba | 255) >>> 0;
|
|
2937
2937
|
return [Q, ee, te] = Ht.toChannels(a), { css: X.toCss(Q, ee, te), rgba: a };
|
|
2938
2938
|
}
|
|
2939
2939
|
e.opaque = r;
|
|
2940
|
-
function
|
|
2941
|
-
return U = Math.round(a * 255), [Q, ee, te] = Ht.toChannels(
|
|
2940
|
+
function n(l, a) {
|
|
2941
|
+
return U = Math.round(a * 255), [Q, ee, te] = Ht.toChannels(l.rgba), { css: X.toCss(Q, ee, te, U), rgba: X.toRgba(Q, ee, te, U) };
|
|
2942
2942
|
}
|
|
2943
|
-
e.opacity =
|
|
2944
|
-
function
|
|
2945
|
-
return U =
|
|
2943
|
+
e.opacity = n;
|
|
2944
|
+
function o(l, a) {
|
|
2945
|
+
return U = l.rgba & 255, n(l, U * a / 255);
|
|
2946
2946
|
}
|
|
2947
|
-
e.multiplyOpacity =
|
|
2948
|
-
function l
|
|
2949
|
-
return [
|
|
2947
|
+
e.multiplyOpacity = o;
|
|
2948
|
+
function h(l) {
|
|
2949
|
+
return [l.rgba >> 24 & 255, l.rgba >> 16 & 255, l.rgba >> 8 & 255];
|
|
2950
2950
|
}
|
|
2951
|
-
e.toColorRGB =
|
|
2951
|
+
e.toColorRGB = h;
|
|
2952
2952
|
})(W ||= {});
|
|
2953
2953
|
var K;
|
|
2954
2954
|
((e) => {
|
|
@@ -2956,8 +2956,8 @@ var K;
|
|
|
2956
2956
|
try {
|
|
2957
2957
|
let r = document.createElement("canvas");
|
|
2958
2958
|
r.width = 1, r.height = 1;
|
|
2959
|
-
let
|
|
2960
|
-
|
|
2959
|
+
let n = r.getContext("2d", { willReadFrequently: !0 });
|
|
2960
|
+
n && (t = n, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
|
|
2961
2961
|
} catch {
|
|
2962
2962
|
}
|
|
2963
2963
|
function s(r) {
|
|
@@ -2971,8 +2971,8 @@ var K;
|
|
|
2971
2971
|
case 9:
|
|
2972
2972
|
return { css: r, rgba: parseInt(r.slice(1), 16) >>> 0 };
|
|
2973
2973
|
}
|
|
2974
|
-
let
|
|
2975
|
-
if (
|
|
2974
|
+
let n = r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
|
|
2975
|
+
if (n) return Q = parseInt(n[1]), ee = parseInt(n[2]), te = parseInt(n[3]), U = Math.round((n[5] === void 0 ? 1 : parseFloat(n[5])) * 255), X.toColor(Q, ee, te, U);
|
|
2976
2976
|
if (!t || !i) throw new Error("css.toColor: Unsupported css format");
|
|
2977
2977
|
if (t.fillStyle = i, t.fillStyle = r, typeof t.fillStyle != "string") throw new Error("css.toColor: Unsupported css format");
|
|
2978
2978
|
if (t.fillRect(0, 0, 1, 1), [Q, ee, te, U] = t.getImageData(0, 0, 1, 1).data, U !== 255) throw new Error("css.toColor: Unsupported css format");
|
|
@@ -2986,56 +2986,56 @@ var ae;
|
|
|
2986
2986
|
return i(s >> 16 & 255, s >> 8 & 255, s & 255);
|
|
2987
2987
|
}
|
|
2988
2988
|
e.relativeLuminance = t;
|
|
2989
|
-
function i(s, r,
|
|
2990
|
-
let
|
|
2989
|
+
function i(s, r, n) {
|
|
2990
|
+
let o = s / 255, h = r / 255, l = n / 255, a = o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4), d = h <= 0.03928 ? h / 12.92 : Math.pow((h + 0.055) / 1.055, 2.4), c = l <= 0.03928 ? l / 12.92 : Math.pow((l + 0.055) / 1.055, 2.4);
|
|
2991
2991
|
return a * 0.2126 + d * 0.7152 + c * 0.0722;
|
|
2992
2992
|
}
|
|
2993
2993
|
e.relativeLuminance2 = i;
|
|
2994
2994
|
})(ae ||= {});
|
|
2995
2995
|
var Ht;
|
|
2996
2996
|
((e) => {
|
|
2997
|
-
function t(
|
|
2998
|
-
if (U = (
|
|
2999
|
-
let
|
|
3000
|
-
return Q = c + Math.round((
|
|
2997
|
+
function t(o, h) {
|
|
2998
|
+
if (U = (h & 255) / 255, U === 1) return h;
|
|
2999
|
+
let l = h >> 24 & 255, a = h >> 16 & 255, d = h >> 8 & 255, c = o >> 24 & 255, _ = o >> 16 & 255, f = o >> 8 & 255;
|
|
3000
|
+
return Q = c + Math.round((l - c) * U), ee = _ + Math.round((a - _) * U), te = f + Math.round((d - f) * U), X.toRgba(Q, ee, te);
|
|
3001
3001
|
}
|
|
3002
3002
|
e.blend = t;
|
|
3003
|
-
function i(
|
|
3004
|
-
let a = ae.relativeLuminance(
|
|
3005
|
-
if (Le(a, d) <
|
|
3003
|
+
function i(o, h, l) {
|
|
3004
|
+
let a = ae.relativeLuminance(o >> 8), d = ae.relativeLuminance(h >> 8);
|
|
3005
|
+
if (Le(a, d) < l) {
|
|
3006
3006
|
if (d < a) {
|
|
3007
|
-
let f = s(
|
|
3008
|
-
if (u <
|
|
3009
|
-
let g = r(
|
|
3007
|
+
let f = s(o, h, l), u = Le(a, ae.relativeLuminance(f >> 8));
|
|
3008
|
+
if (u < l) {
|
|
3009
|
+
let g = r(o, h, l), y = Le(a, ae.relativeLuminance(g >> 8));
|
|
3010
3010
|
return u > y ? f : g;
|
|
3011
3011
|
}
|
|
3012
3012
|
return f;
|
|
3013
3013
|
}
|
|
3014
|
-
let c = r(
|
|
3015
|
-
if (_ <
|
|
3016
|
-
let f = s(
|
|
3014
|
+
let c = r(o, h, l), _ = Le(a, ae.relativeLuminance(c >> 8));
|
|
3015
|
+
if (_ < l) {
|
|
3016
|
+
let f = s(o, h, l), u = Le(a, ae.relativeLuminance(f >> 8));
|
|
3017
3017
|
return _ > u ? c : f;
|
|
3018
3018
|
}
|
|
3019
3019
|
return c;
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
e.ensureContrastRatio = i;
|
|
3023
|
-
function s(
|
|
3024
|
-
let a =
|
|
3025
|
-
for (; g <
|
|
3023
|
+
function s(o, h, l) {
|
|
3024
|
+
let a = o >> 24 & 255, d = o >> 16 & 255, c = o >> 8 & 255, _ = h >> 24 & 255, f = h >> 16 & 255, u = h >> 8 & 255, g = Le(ae.relativeLuminance2(_, f, u), ae.relativeLuminance2(a, d, c));
|
|
3025
|
+
for (; g < l && (_ > 0 || f > 0 || u > 0); ) _ -= Math.max(0, Math.ceil(_ * 0.1)), f -= Math.max(0, Math.ceil(f * 0.1)), u -= Math.max(0, Math.ceil(u * 0.1)), g = Le(ae.relativeLuminance2(_, f, u), ae.relativeLuminance2(a, d, c));
|
|
3026
3026
|
return (_ << 24 | f << 16 | u << 8 | 255) >>> 0;
|
|
3027
3027
|
}
|
|
3028
3028
|
e.reduceLuminance = s;
|
|
3029
|
-
function r(
|
|
3030
|
-
let a =
|
|
3031
|
-
for (; g <
|
|
3029
|
+
function r(o, h, l) {
|
|
3030
|
+
let a = o >> 24 & 255, d = o >> 16 & 255, c = o >> 8 & 255, _ = h >> 24 & 255, f = h >> 16 & 255, u = h >> 8 & 255, g = Le(ae.relativeLuminance2(_, f, u), ae.relativeLuminance2(a, d, c));
|
|
3031
|
+
for (; g < l && (_ < 255 || f < 255 || u < 255); ) _ = Math.min(255, _ + Math.ceil((255 - _) * 0.1)), f = Math.min(255, f + Math.ceil((255 - f) * 0.1)), u = Math.min(255, u + Math.ceil((255 - u) * 0.1)), g = Le(ae.relativeLuminance2(_, f, u), ae.relativeLuminance2(a, d, c));
|
|
3032
3032
|
return (_ << 24 | f << 16 | u << 8 | 255) >>> 0;
|
|
3033
3033
|
}
|
|
3034
3034
|
e.increaseLuminance = r;
|
|
3035
|
-
function o
|
|
3036
|
-
return [
|
|
3035
|
+
function n(o) {
|
|
3036
|
+
return [o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, o & 255];
|
|
3037
3037
|
}
|
|
3038
|
-
e.toChannels =
|
|
3038
|
+
e.toChannels = n;
|
|
3039
3039
|
})(Ht ||= {});
|
|
3040
3040
|
function Ve(e) {
|
|
3041
3041
|
let t = e.toString(16);
|
|
@@ -3044,7 +3044,7 @@ function Ve(e) {
|
|
|
3044
3044
|
function Le(e, t) {
|
|
3045
3045
|
return e < t ? (t + 0.05) / (e + 0.05) : (e + 0.05) / (t + 0.05);
|
|
3046
3046
|
}
|
|
3047
|
-
var
|
|
3047
|
+
var wo = class extends yt {
|
|
3048
3048
|
constructor(e, t, i) {
|
|
3049
3049
|
super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
|
|
3050
3050
|
}
|
|
@@ -3082,52 +3082,52 @@ var wn = class extends yt {
|
|
|
3082
3082
|
if (this._characterJoiners.length === 0) return [];
|
|
3083
3083
|
let t = this._bufferService.buffer.lines.get(e);
|
|
3084
3084
|
if (!t || t.length === 0) return [];
|
|
3085
|
-
let i = [], s = t.translateToString(!0), r = 0,
|
|
3085
|
+
let i = [], s = t.translateToString(!0), r = 0, n = 0, o = 0, h = t.getFg(0), l = t.getBg(0);
|
|
3086
3086
|
for (let a = 0; a < t.getTrimmedLength(); a++) if (t.loadCell(a, this._workCell), this._workCell.getWidth() !== 0) {
|
|
3087
|
-
if (this._workCell.fg !==
|
|
3087
|
+
if (this._workCell.fg !== h || this._workCell.bg !== l) {
|
|
3088
3088
|
if (a - r > 1) {
|
|
3089
|
-
let d = this._getJoinedRanges(s,
|
|
3089
|
+
let d = this._getJoinedRanges(s, o, n, t, r);
|
|
3090
3090
|
for (let c = 0; c < d.length; c++) i.push(d[c]);
|
|
3091
3091
|
}
|
|
3092
|
-
r = a,
|
|
3092
|
+
r = a, o = n, h = this._workCell.fg, l = this._workCell.bg;
|
|
3093
3093
|
}
|
|
3094
|
-
|
|
3094
|
+
n += this._workCell.getChars().length || Ke.length;
|
|
3095
3095
|
}
|
|
3096
3096
|
if (this._bufferService.cols - r > 1) {
|
|
3097
|
-
let a = this._getJoinedRanges(s,
|
|
3097
|
+
let a = this._getJoinedRanges(s, o, n, t, r);
|
|
3098
3098
|
for (let d = 0; d < a.length; d++) i.push(a[d]);
|
|
3099
3099
|
}
|
|
3100
3100
|
return i;
|
|
3101
3101
|
}
|
|
3102
3102
|
_getJoinedRanges(e, t, i, s, r) {
|
|
3103
|
-
let
|
|
3103
|
+
let n = e.substring(t, i), o = [];
|
|
3104
3104
|
try {
|
|
3105
|
-
|
|
3106
|
-
} catch (l) {
|
|
3107
|
-
console.error(l);
|
|
3108
|
-
}
|
|
3109
|
-
for (let l = 1; l < this._characterJoiners.length; l++) try {
|
|
3110
|
-
let h = this._characterJoiners[l].handler(o);
|
|
3111
|
-
for (let a = 0; a < h.length; a++) $t._mergeRanges(n, h[a]);
|
|
3105
|
+
o = this._characterJoiners[0].handler(n);
|
|
3112
3106
|
} catch (h) {
|
|
3113
3107
|
console.error(h);
|
|
3114
3108
|
}
|
|
3115
|
-
|
|
3109
|
+
for (let h = 1; h < this._characterJoiners.length; h++) try {
|
|
3110
|
+
let l = this._characterJoiners[h].handler(n);
|
|
3111
|
+
for (let a = 0; a < l.length; a++) $t._mergeRanges(o, l[a]);
|
|
3112
|
+
} catch (l) {
|
|
3113
|
+
console.error(l);
|
|
3114
|
+
}
|
|
3115
|
+
return this._stringRangesToCellRanges(o, s, r), o;
|
|
3116
3116
|
}
|
|
3117
3117
|
_stringRangesToCellRanges(e, t, i) {
|
|
3118
|
-
let s = 0, r = !1,
|
|
3119
|
-
if (
|
|
3120
|
-
for (let
|
|
3121
|
-
let
|
|
3122
|
-
if (
|
|
3123
|
-
if (!r &&
|
|
3124
|
-
if (
|
|
3125
|
-
|
|
3118
|
+
let s = 0, r = !1, n = 0, o = e[s];
|
|
3119
|
+
if (o) {
|
|
3120
|
+
for (let h = i; h < this._bufferService.cols; h++) {
|
|
3121
|
+
let l = t.getWidth(h), a = t.getString(h).length || Ke.length;
|
|
3122
|
+
if (l !== 0) {
|
|
3123
|
+
if (!r && o[0] <= n && (o[0] = h, r = !0), o[1] <= n) {
|
|
3124
|
+
if (o[1] = h, o = e[++s], !o) break;
|
|
3125
|
+
o[0] <= n ? (o[0] = h, r = !0) : r = !1;
|
|
3126
3126
|
}
|
|
3127
|
-
|
|
3127
|
+
n += a;
|
|
3128
3128
|
}
|
|
3129
3129
|
}
|
|
3130
|
-
|
|
3130
|
+
o && (o[1] = this._bufferService.cols);
|
|
3131
3131
|
}
|
|
3132
3132
|
}
|
|
3133
3133
|
static _mergeRanges(e, t) {
|
|
@@ -3148,32 +3148,32 @@ var wn = class extends yt {
|
|
|
3148
3148
|
return i ? e[e.length - 1][1] = t[1] : e.push(t), e;
|
|
3149
3149
|
}
|
|
3150
3150
|
};
|
|
3151
|
-
$t = q([S(0,
|
|
3152
|
-
function
|
|
3151
|
+
$t = q([S(0, he)], $t);
|
|
3152
|
+
function bo(e) {
|
|
3153
3153
|
return 57508 <= e && e <= 57558;
|
|
3154
3154
|
}
|
|
3155
|
-
function
|
|
3155
|
+
function yo(e) {
|
|
3156
3156
|
return 9472 <= e && e <= 9631;
|
|
3157
3157
|
}
|
|
3158
|
-
function
|
|
3159
|
-
return
|
|
3158
|
+
function Co(e) {
|
|
3159
|
+
return bo(e) || yo(e);
|
|
3160
3160
|
}
|
|
3161
|
-
function
|
|
3161
|
+
function xo() {
|
|
3162
3162
|
return { css: { canvas: Mt(), cell: Mt() }, device: { canvas: Mt(), cell: Mt(), char: { width: 0, height: 0, left: 0, top: 0 } } };
|
|
3163
3163
|
}
|
|
3164
3164
|
function Mt() {
|
|
3165
3165
|
return { width: 0, height: 0 };
|
|
3166
3166
|
}
|
|
3167
3167
|
var Ti = class {
|
|
3168
|
-
constructor(e, t, i, s, r,
|
|
3169
|
-
this._document = e, this._characterJoinerService = t, this._optionsService = i, this._coreBrowserService = s, this._coreService = r, this._decorationService =
|
|
3168
|
+
constructor(e, t, i, s, r, n, o) {
|
|
3169
|
+
this._document = e, this._characterJoinerService = t, this._optionsService = i, this._coreBrowserService = s, this._coreService = r, this._decorationService = n, this._themeService = o, this._workCell = new Se(), this._columnSelectMode = !1, this.defaultSpacing = 0;
|
|
3170
3170
|
}
|
|
3171
3171
|
handleSelectionChanged(e, t, i) {
|
|
3172
3172
|
this._selectionStart = e, this._selectionEnd = t, this._columnSelectMode = i;
|
|
3173
3173
|
}
|
|
3174
|
-
createRow(e, t, i, s, r, o,
|
|
3174
|
+
createRow(e, t, i, s, r, n, o, h, l, a, d) {
|
|
3175
3175
|
let c = [], _ = this._characterJoinerService.getJoinedCharacters(t), f = this._themeService.colors, u = e.getNoBgTrimmedLength();
|
|
3176
|
-
i && u <
|
|
3176
|
+
i && u < n + 1 && (u = n + 1);
|
|
3177
3177
|
let g, y = 0, E = "", N = 0, P = 0, B = 0, T = 0, A = !1, se = 0, we = !1, be = 0, Et = 0, F = [], x = a !== -1 && d !== -1;
|
|
3178
3178
|
for (let v = 0; v < u; v++) {
|
|
3179
3179
|
e.loadCell(v, this._workCell);
|
|
@@ -3183,20 +3183,20 @@ var Ti = class {
|
|
|
3183
3183
|
if (_.length > 0 && v === _[0][0] && k) {
|
|
3184
3184
|
let O = _.shift(), Jt = this._isCellInSelection(O[0], t);
|
|
3185
3185
|
for (N = O[0] + 1; N < O[1]; N++) k &&= Jt === this._isCellInSelection(N, t);
|
|
3186
|
-
k &&= !i ||
|
|
3186
|
+
k &&= !i || n < O[0] || n >= O[1], k ? (w = !0, b = new wo(this._workCell, e.translateToString(!0, O[0], O[1]), O[1] - O[0]), R = O[1] - 1, C = b.getWidth()) : Et = O[1];
|
|
3187
3187
|
}
|
|
3188
|
-
let H = this._isCellInSelection(v, t), re = i && v ===
|
|
3188
|
+
let H = this._isCellInSelection(v, t), re = i && v === n, ye = x && v >= a && v <= d, Ie = !1;
|
|
3189
3189
|
this._decorationService.forEachDecorationAtCell(v, t, void 0, (O) => {
|
|
3190
3190
|
Ie = !0;
|
|
3191
3191
|
});
|
|
3192
3192
|
let Ce = b.getChars() || Ke;
|
|
3193
|
-
if (Ce === " " && (b.isUnderline() || b.isOverline()) && (Ce = " "), be = C *
|
|
3193
|
+
if (Ce === " " && (b.isUnderline() || b.isOverline()) && (Ce = " "), be = C * h - l.get(Ce, b.isBold(), b.isItalic()), !g) g = this._document.createElement("span");
|
|
3194
3194
|
else if (y && (H && we || !H && !we && b.bg === P) && (H && we && f.selectionForeground || b.fg === B) && b.extended.ext === T && ye === A && be === se && !re && !w && !Ie && k) {
|
|
3195
3195
|
b.isInvisible() ? E += Ke : E += Ce, y++;
|
|
3196
3196
|
continue;
|
|
3197
3197
|
} else y && (g.textContent = E), g = this._document.createElement("span"), y = 0, E = "";
|
|
3198
|
-
if (P = b.bg, B = b.fg, T = b.extended.ext, A = ye, se = be, we = H, w &&
|
|
3199
|
-
if (F.push("xterm-cursor"), this._coreBrowserService.isFocused)
|
|
3198
|
+
if (P = b.bg, B = b.fg, T = b.extended.ext, A = ye, se = be, we = H, w && n >= v && n <= R && (n = v), !this._coreService.isCursorHidden && re && this._coreService.isCursorInitialized) {
|
|
3199
|
+
if (F.push("xterm-cursor"), this._coreBrowserService.isFocused) o && F.push("xterm-cursor-blink"), F.push(s === "bar" ? "xterm-cursor-bar" : s === "underline" ? "xterm-cursor-underline" : "xterm-cursor-block");
|
|
3200
3200
|
else if (r) switch (r) {
|
|
3201
3201
|
case "outline":
|
|
3202
3202
|
F.push("xterm-cursor-outline");
|
|
@@ -3225,10 +3225,10 @@ var Ti = class {
|
|
|
3225
3225
|
let Jt = xe;
|
|
3226
3226
|
xe = qe, qe = Jt;
|
|
3227
3227
|
}
|
|
3228
|
-
let Ne, Bt,
|
|
3228
|
+
let Ne, Bt, ot = !1;
|
|
3229
3229
|
this._decorationService.forEachDecorationAtCell(v, t, void 0, (O) => {
|
|
3230
|
-
O.options.layer !== "top" &&
|
|
3231
|
-
}), !
|
|
3230
|
+
O.options.layer !== "top" && ot || (O.backgroundColorRGB && (qe = 50331648, pe = O.backgroundColorRGB.rgba >> 8 & 16777215, Ne = O.backgroundColorRGB), O.foregroundColorRGB && (xe = 50331648, ce = O.foregroundColorRGB.rgba >> 8 & 16777215, Bt = O.foregroundColorRGB), ot = O.options.layer === "top");
|
|
3231
|
+
}), !ot && H && (Ne = this._coreBrowserService.isFocused ? f.selectionBackgroundOpaque : f.selectionInactiveBackgroundOpaque, pe = Ne.rgba >> 8 & 16777215, qe = 50331648, ot = !0, f.selectionForeground && (xe = 50331648, ce = f.selectionForeground.rgba >> 8 & 16777215, Bt = f.selectionForeground)), ot && F.push("xterm-decoration-top");
|
|
3232
3232
|
let He;
|
|
3233
3233
|
switch (qe) {
|
|
3234
3234
|
case 16777216:
|
|
@@ -3259,14 +3259,14 @@ var Ti = class {
|
|
|
3259
3259
|
}
|
|
3260
3260
|
return g && y && (g.textContent = E), c;
|
|
3261
3261
|
}
|
|
3262
|
-
_applyMinimumContrast(e, t, i, s, r,
|
|
3263
|
-
if (this._optionsService.rawOptions.minimumContrastRatio === 1 ||
|
|
3264
|
-
let
|
|
3265
|
-
if (!r && !
|
|
3266
|
-
let
|
|
3267
|
-
|
|
3262
|
+
_applyMinimumContrast(e, t, i, s, r, n) {
|
|
3263
|
+
if (this._optionsService.rawOptions.minimumContrastRatio === 1 || Co(s.getCode())) return !1;
|
|
3264
|
+
let o = this._getContrastCache(s), h;
|
|
3265
|
+
if (!r && !n && (h = o.getColor(t.rgba, i.rgba)), h === void 0) {
|
|
3266
|
+
let l = this._optionsService.rawOptions.minimumContrastRatio / (s.isDim() ? 2 : 1);
|
|
3267
|
+
h = W.ensureContrastRatio(r || t, n || i, l), o.setColor((r || t).rgba, (n || i).rgba, h ?? null);
|
|
3268
3268
|
}
|
|
3269
|
-
return
|
|
3269
|
+
return h ? (this._addStyle(e, `color:${h.css}`), !0) : !1;
|
|
3270
3270
|
}
|
|
3271
3271
|
_getContrastCache(e) {
|
|
3272
3272
|
return e.isDim() ? this._themeService.colors.halfContrastCache : this._themeService.colors.contrastCache;
|
|
@@ -3279,12 +3279,12 @@ var Ti = class {
|
|
|
3279
3279
|
return !i || !s ? !1 : this._columnSelectMode ? i[0] <= s[0] ? e >= i[0] && t >= i[1] && e < s[0] && t <= s[1] : e < i[0] && t >= i[1] && e >= s[0] && t <= s[1] : t > i[1] && t < s[1] || i[1] === s[1] && t === i[1] && e >= i[0] && e < s[0] || i[1] < s[1] && t === s[1] && e < s[0] || i[1] < s[1] && t === i[1] && e >= i[0];
|
|
3280
3280
|
}
|
|
3281
3281
|
};
|
|
3282
|
-
Ti = q([S(1,
|
|
3282
|
+
Ti = q([S(1, hr), S(2, le), S(3, Ae), S(4, Qe), S(5, Ct), S(6, rt)], Ti);
|
|
3283
3283
|
function ks(e, t, i) {
|
|
3284
3284
|
for (; e.length < i; ) e = t + e;
|
|
3285
3285
|
return e;
|
|
3286
3286
|
}
|
|
3287
|
-
var
|
|
3287
|
+
var ko = class {
|
|
3288
3288
|
constructor(e, t) {
|
|
3289
3289
|
this._flat = new Float32Array(256), this._font = "", this._fontSize = 0, this._weight = "normal", this._weightBold = "bold", this._measureElements = [], this._container = e.createElement("div"), this._container.classList.add("xterm-width-cache-measure-container"), this._container.setAttribute("aria-hidden", "true"), this._container.style.whiteSpace = "pre", this._container.style.fontKerning = "none";
|
|
3290
3290
|
let i = e.createElement("span");
|
|
@@ -3293,8 +3293,8 @@ var kn = class {
|
|
|
3293
3293
|
s.classList.add("xterm-char-measure-element"), s.style.fontWeight = "bold";
|
|
3294
3294
|
let r = e.createElement("span");
|
|
3295
3295
|
r.classList.add("xterm-char-measure-element"), r.style.fontStyle = "italic";
|
|
3296
|
-
let
|
|
3297
|
-
|
|
3296
|
+
let n = e.createElement("span");
|
|
3297
|
+
n.classList.add("xterm-char-measure-element"), n.style.fontWeight = "bold", n.style.fontStyle = "italic", this._measureElements = [i, s, r, n], this._container.appendChild(i), this._container.appendChild(s), this._container.appendChild(r), this._container.appendChild(n), t.appendChild(this._container), this.clear();
|
|
3298
3298
|
}
|
|
3299
3299
|
dispose() {
|
|
3300
3300
|
this._container.remove(), this._measureElements.length = 0, this._holey = void 0;
|
|
@@ -3309,23 +3309,23 @@ var kn = class {
|
|
|
3309
3309
|
let s = 0;
|
|
3310
3310
|
if (!t && !i && e.length === 1 && (s = e.charCodeAt(0)) < 256) {
|
|
3311
3311
|
if (this._flat[s] !== -9999) return this._flat[s];
|
|
3312
|
-
let
|
|
3313
|
-
return
|
|
3312
|
+
let o = this._measure(e, 0);
|
|
3313
|
+
return o > 0 && (this._flat[s] = o), o;
|
|
3314
3314
|
}
|
|
3315
3315
|
let r = e;
|
|
3316
3316
|
t && (r += "B"), i && (r += "I");
|
|
3317
|
-
let
|
|
3318
|
-
if (
|
|
3319
|
-
let
|
|
3320
|
-
t && (
|
|
3317
|
+
let n = this._holey.get(r);
|
|
3318
|
+
if (n === void 0) {
|
|
3319
|
+
let o = 0;
|
|
3320
|
+
t && (o |= 1), i && (o |= 2), n = this._measure(e, o), n > 0 && this._holey.set(r, n);
|
|
3321
3321
|
}
|
|
3322
|
-
return
|
|
3322
|
+
return n;
|
|
3323
3323
|
}
|
|
3324
3324
|
_measure(e, t) {
|
|
3325
3325
|
let i = this._measureElements[t];
|
|
3326
3326
|
return i.textContent = e.repeat(32), i.offsetWidth / 32;
|
|
3327
3327
|
}
|
|
3328
|
-
},
|
|
3328
|
+
}, Eo = class {
|
|
3329
3329
|
constructor() {
|
|
3330
3330
|
this.clear();
|
|
3331
3331
|
}
|
|
@@ -3337,25 +3337,25 @@ var kn = class {
|
|
|
3337
3337
|
this.clear();
|
|
3338
3338
|
return;
|
|
3339
3339
|
}
|
|
3340
|
-
let r = e.buffers.active.ydisp,
|
|
3341
|
-
if (
|
|
3340
|
+
let r = e.buffers.active.ydisp, n = t[1] - r, o = i[1] - r, h = Math.max(n, 0), l = Math.min(o, e.rows - 1);
|
|
3341
|
+
if (h >= e.rows || l < 0) {
|
|
3342
3342
|
this.clear();
|
|
3343
3343
|
return;
|
|
3344
3344
|
}
|
|
3345
|
-
this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow =
|
|
3345
|
+
this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow = n, this.viewportEndRow = o, this.viewportCappedStartRow = h, this.viewportCappedEndRow = l, this.startCol = t[0], this.endCol = i[0];
|
|
3346
3346
|
}
|
|
3347
3347
|
isCellSelected(e, t, i) {
|
|
3348
3348
|
return this.hasSelection ? (i -= e.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t >= this.startCol && i >= this.viewportCappedStartRow && t < this.endCol && i <= this.viewportCappedEndRow : t < this.startCol && i >= this.viewportCappedStartRow && t >= this.endCol && i <= this.viewportCappedEndRow : i > this.viewportStartRow && i < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportEndRow && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol) : !1;
|
|
3349
3349
|
}
|
|
3350
3350
|
};
|
|
3351
|
-
function
|
|
3352
|
-
return new
|
|
3351
|
+
function Bo() {
|
|
3352
|
+
return new Eo();
|
|
3353
3353
|
}
|
|
3354
|
-
var si = "xterm-dom-renderer-owner-", ge = "xterm-rows", Lt = "xterm-fg-", Es = "xterm-bg-",
|
|
3355
|
-
constructor(e, t, i, s, r, o,
|
|
3356
|
-
super(), this._terminal = e, this._document = t, this._element = i, this._screenElement = s, this._viewportElement = r, this._helperContainer =
|
|
3354
|
+
var si = "xterm-dom-renderer-owner-", ge = "xterm-rows", Lt = "xterm-fg-", Es = "xterm-bg-", ht = "xterm-focus", Pt = "xterm-selection", Do = 1, Ai = class extends L {
|
|
3355
|
+
constructor(e, t, i, s, r, n, o, h, l, a, d, c, _, f) {
|
|
3356
|
+
super(), this._terminal = e, this._document = t, this._element = i, this._screenElement = s, this._viewportElement = r, this._helperContainer = n, this._linkifier2 = o, this._charSizeService = l, this._optionsService = a, this._bufferService = d, this._coreService = c, this._coreBrowserService = _, this._themeService = f, this._terminalClass = Do++, this._rowElements = [], this._selectionRenderModel = Bo(), this.onRequestRedraw = this._register(new m()).event, this._rowContainer = this._document.createElement("div"), this._rowContainer.classList.add(ge), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = this._document.createElement("div"), this._selectionContainer.classList.add(Pt), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = xo(), this._updateDimensions(), this._register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this._register(this._themeService.onChangeColors((u) => this._injectCss(u))), this._injectCss(this._themeService.colors), this._rowFactory = h.createInstance(Ti, document), this._element.classList.add(si + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this._register(this._linkifier2.onShowLinkUnderline((u) => this._handleLinkHover(u))), this._register(this._linkifier2.onHideLinkUnderline((u) => this._handleLinkLeave(u))), this._register(z(() => {
|
|
3357
3357
|
this._element.classList.remove(si + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
|
|
3358
|
-
})), this._widthCache = new
|
|
3358
|
+
})), this._widthCache = new ko(this._document, this._helperContainer), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
|
|
3359
3359
|
}
|
|
3360
3360
|
_updateDimensions() {
|
|
3361
3361
|
let e = this._coreBrowserService.dpr;
|
|
@@ -3370,8 +3370,8 @@ var si = "xterm-dom-renderer-owner-", ge = "xterm-rows", Lt = "xterm-fg-", Es =
|
|
|
3370
3370
|
let t = `${this._terminalSelector} .${ge} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;
|
|
3371
3371
|
t += `${this._terminalSelector} .${ge} .xterm-dim { color: ${W.multiplyOpacity(e.foreground, 0.5).css};}`, t += `${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;
|
|
3372
3372
|
let i = `blink_underline_${this._terminalClass}`, s = `blink_bar_${this._terminalClass}`, r = `blink_block_${this._terminalClass}`;
|
|
3373
|
-
t += `@keyframes ${i} { 50% { border-bottom-style: hidden; }}`, t += `@keyframes ${s} { 50% { box-shadow: none; }}`, t += `@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`, t += `${this._terminalSelector} .${ge}.${
|
|
3374
|
-
for (let [
|
|
3373
|
+
t += `@keyframes ${i} { 50% { border-bottom-style: hidden; }}`, t += `@keyframes ${s} { 50% { box-shadow: none; }}`, t += `@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`, t += `${this._terminalSelector} .${ge}.${ht} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${ge}.${ht} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${ge}.${ht} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${ge} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${ge} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${ge} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${ge} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${ge} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`, t += `${this._terminalSelector} .${Pt} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Pt} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Pt} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;
|
|
3374
|
+
for (let [n, o] of e.ansi.entries()) t += `${this._terminalSelector} .${Lt}${n} { color: ${o.css}; }${this._terminalSelector} .${Lt}${n}.xterm-dim { color: ${W.multiplyOpacity(o, 0.5).css}; }${this._terminalSelector} .${Es}${n} { background-color: ${o.css}; }`;
|
|
3375
3375
|
t += `${this._terminalSelector} .${Lt}257 { color: ${W.opaque(e.background).css}; }${this._terminalSelector} .${Lt}257.xterm-dim { color: ${W.multiplyOpacity(W.opaque(e.background), 0.5).css}; }${this._terminalSelector} .${Es}257 { background-color: ${e.foreground.css}; }`, this._themeStyleElement.textContent = t;
|
|
3376
3376
|
}
|
|
3377
3377
|
_setDefaultSpacing() {
|
|
@@ -3395,31 +3395,31 @@ var si = "xterm-dom-renderer-owner-", ge = "xterm-rows", Lt = "xterm-fg-", Es =
|
|
|
3395
3395
|
this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
|
|
3396
3396
|
}
|
|
3397
3397
|
handleBlur() {
|
|
3398
|
-
this._rowContainer.classList.remove(
|
|
3398
|
+
this._rowContainer.classList.remove(ht), this.renderRows(0, this._bufferService.rows - 1);
|
|
3399
3399
|
}
|
|
3400
3400
|
handleFocus() {
|
|
3401
|
-
this._rowContainer.classList.add(
|
|
3401
|
+
this._rowContainer.classList.add(ht), this.renderRows(this._bufferService.buffer.y, this._bufferService.buffer.y);
|
|
3402
3402
|
}
|
|
3403
3403
|
handleSelectionChanged(e, t, i) {
|
|
3404
3404
|
if (this._selectionContainer.replaceChildren(), this._rowFactory.handleSelectionChanged(e, t, i), this.renderRows(0, this._bufferService.rows - 1), !e || !t || (this._selectionRenderModel.update(this._terminal, e, t, i), !this._selectionRenderModel.hasSelection)) return;
|
|
3405
|
-
let s = this._selectionRenderModel.viewportStartRow, r = this._selectionRenderModel.viewportEndRow,
|
|
3405
|
+
let s = this._selectionRenderModel.viewportStartRow, r = this._selectionRenderModel.viewportEndRow, n = this._selectionRenderModel.viewportCappedStartRow, o = this._selectionRenderModel.viewportCappedEndRow, h = this._document.createDocumentFragment();
|
|
3406
3406
|
if (i) {
|
|
3407
|
-
let
|
|
3408
|
-
|
|
3407
|
+
let l = e[0] > t[0];
|
|
3408
|
+
h.appendChild(this._createSelectionElement(n, l ? t[0] : e[0], l ? e[0] : t[0], o - n + 1));
|
|
3409
3409
|
} else {
|
|
3410
|
-
let
|
|
3411
|
-
|
|
3412
|
-
let d =
|
|
3413
|
-
if (
|
|
3414
|
-
let c = r ===
|
|
3415
|
-
|
|
3410
|
+
let l = s === n ? e[0] : 0, a = n === r ? t[0] : this._bufferService.cols;
|
|
3411
|
+
h.appendChild(this._createSelectionElement(n, l, a));
|
|
3412
|
+
let d = o - n - 1;
|
|
3413
|
+
if (h.appendChild(this._createSelectionElement(n + 1, 0, this._bufferService.cols, d)), n !== o) {
|
|
3414
|
+
let c = r === o ? t[0] : this._bufferService.cols;
|
|
3415
|
+
h.appendChild(this._createSelectionElement(o, 0, c));
|
|
3416
3416
|
}
|
|
3417
3417
|
}
|
|
3418
|
-
this._selectionContainer.appendChild(
|
|
3418
|
+
this._selectionContainer.appendChild(h);
|
|
3419
3419
|
}
|
|
3420
3420
|
_createSelectionElement(e, t, i, s = 1) {
|
|
3421
|
-
let r = this._document.createElement("div"),
|
|
3422
|
-
return
|
|
3421
|
+
let r = this._document.createElement("div"), n = t * this.dimensions.css.cell.width, o = this.dimensions.css.cell.width * (i - t);
|
|
3422
|
+
return n + o > this.dimensions.css.canvas.width && (o = this.dimensions.css.canvas.width - n), r.style.height = `${s * this.dimensions.css.cell.height}px`, r.style.top = `${e * this.dimensions.css.cell.height}px`, r.style.left = `${n}px`, r.style.width = `${o}px`, r;
|
|
3423
3423
|
}
|
|
3424
3424
|
handleCursorMove() {
|
|
3425
3425
|
}
|
|
@@ -3430,11 +3430,11 @@ var si = "xterm-dom-renderer-owner-", ge = "xterm-rows", Lt = "xterm-fg-", Es =
|
|
|
3430
3430
|
for (let e of this._rowElements) e.replaceChildren();
|
|
3431
3431
|
}
|
|
3432
3432
|
renderRows(e, t) {
|
|
3433
|
-
let i = this._bufferService.buffer, s = i.ybase + i.y, r = Math.min(i.x, this._bufferService.cols - 1),
|
|
3434
|
-
for (let
|
|
3435
|
-
let a =
|
|
3433
|
+
let i = this._bufferService.buffer, s = i.ybase + i.y, r = Math.min(i.x, this._bufferService.cols - 1), n = this._coreService.decPrivateModes.cursorBlink ?? this._optionsService.rawOptions.cursorBlink, o = this._coreService.decPrivateModes.cursorStyle ?? this._optionsService.rawOptions.cursorStyle, h = this._optionsService.rawOptions.cursorInactiveStyle;
|
|
3434
|
+
for (let l = e; l <= t; l++) {
|
|
3435
|
+
let a = l + i.ydisp, d = this._rowElements[l], c = i.lines.get(a);
|
|
3436
3436
|
if (!d || !c) break;
|
|
3437
|
-
d.replaceChildren(...this._rowFactory.createRow(c, a, a === s,
|
|
3437
|
+
d.replaceChildren(...this._rowFactory.createRow(c, a, a === s, o, h, r, n, this.dimensions.css.cell.width, this._widthCache, -1, -1));
|
|
3438
3438
|
}
|
|
3439
3439
|
}
|
|
3440
3440
|
get _terminalSelector() {
|
|
@@ -3446,26 +3446,26 @@ var si = "xterm-dom-renderer-owner-", ge = "xterm-rows", Lt = "xterm-fg-", Es =
|
|
|
3446
3446
|
_handleLinkLeave(e) {
|
|
3447
3447
|
this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, !1);
|
|
3448
3448
|
}
|
|
3449
|
-
_setCellUnderline(e, t, i, s, r,
|
|
3449
|
+
_setCellUnderline(e, t, i, s, r, n) {
|
|
3450
3450
|
i < 0 && (e = 0), s < 0 && (t = 0);
|
|
3451
|
-
let
|
|
3452
|
-
i = Math.max(Math.min(i,
|
|
3453
|
-
let
|
|
3451
|
+
let o = this._bufferService.rows - 1;
|
|
3452
|
+
i = Math.max(Math.min(i, o), 0), s = Math.max(Math.min(s, o), 0), r = Math.min(r, this._bufferService.cols);
|
|
3453
|
+
let h = this._bufferService.buffer, l = h.ybase + h.y, a = Math.min(h.x, r - 1), d = this._optionsService.rawOptions.cursorBlink, c = this._optionsService.rawOptions.cursorStyle, _ = this._optionsService.rawOptions.cursorInactiveStyle;
|
|
3454
3454
|
for (let f = i; f <= s; ++f) {
|
|
3455
|
-
let u = f +
|
|
3455
|
+
let u = f + h.ydisp, g = this._rowElements[f], y = h.lines.get(u);
|
|
3456
3456
|
if (!g || !y) break;
|
|
3457
|
-
g.replaceChildren(...this._rowFactory.createRow(y, u, u ===
|
|
3457
|
+
g.replaceChildren(...this._rowFactory.createRow(y, u, u === l, c, _, a, d, this.dimensions.css.cell.width, this._widthCache, n ? f === i ? e : 0 : -1, n ? (f === s ? t : r) - 1 : -1));
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
3460
|
};
|
|
3461
|
-
Ai = q([S(7, Xi), S(8, Yt), S(9,
|
|
3461
|
+
Ai = q([S(7, Xi), S(8, Yt), S(9, le), S(10, he), S(11, Qe), S(12, Ae), S(13, rt)], Ai);
|
|
3462
3462
|
var Oi = class extends L {
|
|
3463
3463
|
constructor(e, t, i) {
|
|
3464
3464
|
super(), this._optionsService = i, this.width = 0, this.height = 0, this._onCharSizeChange = this._register(new m()), this.onCharSizeChange = this._onCharSizeChange.event;
|
|
3465
3465
|
try {
|
|
3466
|
-
this._measureStrategy = this._register(new
|
|
3466
|
+
this._measureStrategy = this._register(new Mo(this._optionsService));
|
|
3467
3467
|
} catch {
|
|
3468
|
-
this._measureStrategy = this._register(new
|
|
3468
|
+
this._measureStrategy = this._register(new Ro(e, t, this._optionsService));
|
|
3469
3469
|
}
|
|
3470
3470
|
this._register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], () => this.measure()));
|
|
3471
3471
|
}
|
|
@@ -3477,7 +3477,7 @@ var Oi = class extends L {
|
|
|
3477
3477
|
(e.width !== this.width || e.height !== this.height) && (this.width = e.width, this.height = e.height, this._onCharSizeChange.fire());
|
|
3478
3478
|
}
|
|
3479
3479
|
};
|
|
3480
|
-
Oi = q([S(2,
|
|
3480
|
+
Oi = q([S(2, le)], Oi);
|
|
3481
3481
|
var Br = class extends L {
|
|
3482
3482
|
constructor() {
|
|
3483
3483
|
super(...arguments), this._result = { width: 0, height: 0 };
|
|
@@ -3485,14 +3485,14 @@ var Br = class extends L {
|
|
|
3485
3485
|
_validateAndSet(e, t) {
|
|
3486
3486
|
e !== void 0 && e > 0 && t !== void 0 && t > 0 && (this._result.width = e, this._result.height = t);
|
|
3487
3487
|
}
|
|
3488
|
-
},
|
|
3488
|
+
}, Ro = class extends Br {
|
|
3489
3489
|
constructor(e, t, i) {
|
|
3490
3490
|
super(), this._document = e, this._parentElement = t, this._optionsService = i, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W".repeat(32), this._measureElement.setAttribute("aria-hidden", "true"), this._measureElement.style.whiteSpace = "pre", this._measureElement.style.fontKerning = "none", this._parentElement.appendChild(this._measureElement);
|
|
3491
3491
|
}
|
|
3492
3492
|
measure() {
|
|
3493
3493
|
return this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`, this._validateAndSet(Number(this._measureElement.offsetWidth) / 32, Number(this._measureElement.offsetHeight)), this._result;
|
|
3494
3494
|
}
|
|
3495
|
-
},
|
|
3495
|
+
}, Mo = class extends Br {
|
|
3496
3496
|
constructor(e) {
|
|
3497
3497
|
super(), this._optionsService = e, this._canvas = new OffscreenCanvas(100, 100), this._ctx = this._canvas.getContext("2d");
|
|
3498
3498
|
let t = this._ctx.measureText("W");
|
|
@@ -3503,9 +3503,9 @@ var Br = class extends L {
|
|
|
3503
3503
|
let e = this._ctx.measureText("W");
|
|
3504
3504
|
return this._validateAndSet(e.width, e.fontBoundingBoxAscent + e.fontBoundingBoxDescent), this._result;
|
|
3505
3505
|
}
|
|
3506
|
-
},
|
|
3506
|
+
}, Lo = class extends L {
|
|
3507
3507
|
constructor(e, t, i) {
|
|
3508
|
-
super(), this._textarea = e, this._window = t, this.mainDocument = i, this._isFocused = !1, this._cachedIsFocused = void 0, this._screenDprMonitor = this._register(new
|
|
3508
|
+
super(), this._textarea = e, this._window = t, this.mainDocument = i, this._isFocused = !1, this._cachedIsFocused = void 0, this._screenDprMonitor = this._register(new Po(this._window)), this._onDprChange = this._register(new m()), this.onDprChange = this._onDprChange.event, this._onWindowChange = this._register(new m()), this.onWindowChange = this._onWindowChange.event, this._register(this.onWindowChange((s) => this._screenDprMonitor.setWindow(s))), this._register(ne.forward(this._screenDprMonitor.onDprChange, this._onDprChange)), this._register(D(this._textarea, "focus", () => this._isFocused = !0)), this._register(D(this._textarea, "blur", () => this._isFocused = !1));
|
|
3509
3509
|
}
|
|
3510
3510
|
get window() {
|
|
3511
3511
|
return this._window;
|
|
@@ -3519,7 +3519,7 @@ var Br = class extends L {
|
|
|
3519
3519
|
get isFocused() {
|
|
3520
3520
|
return this._cachedIsFocused === void 0 && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask(() => this._cachedIsFocused = void 0)), this._cachedIsFocused;
|
|
3521
3521
|
}
|
|
3522
|
-
},
|
|
3522
|
+
}, Po = class extends L {
|
|
3523
3523
|
constructor(e) {
|
|
3524
3524
|
super(), this._parentWindow = e, this._windowResizeListener = this._register(new st()), this._onDprChange = this._register(new m()), this.onDprChange = this._onDprChange.event, this._outerListener = () => this._setDprAndFireIfDiffers(), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._updateDpr(), this._setWindowResizeListener(), this._register(z(() => this.clearListener()));
|
|
3525
3525
|
}
|
|
@@ -3538,7 +3538,7 @@ var Br = class extends L {
|
|
|
3538
3538
|
clearListener() {
|
|
3539
3539
|
!this._resolutionMediaMatchList || !this._outerListener || (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._outerListener = void 0);
|
|
3540
3540
|
}
|
|
3541
|
-
},
|
|
3541
|
+
}, To = class extends L {
|
|
3542
3542
|
constructor() {
|
|
3543
3543
|
super(), this.linkProviders = [], this._register(z(() => this.linkProviders.length = 0));
|
|
3544
3544
|
}
|
|
@@ -3550,20 +3550,20 @@ var Br = class extends L {
|
|
|
3550
3550
|
}
|
|
3551
3551
|
};
|
|
3552
3552
|
function is(e, t, i) {
|
|
3553
|
-
let s = i.getBoundingClientRect(), r = e.getComputedStyle(i),
|
|
3554
|
-
return [t.clientX - s.left -
|
|
3553
|
+
let s = i.getBoundingClientRect(), r = e.getComputedStyle(i), n = parseInt(r.getPropertyValue("padding-left")), o = parseInt(r.getPropertyValue("padding-top"));
|
|
3554
|
+
return [t.clientX - s.left - n, t.clientY - s.top - o];
|
|
3555
3555
|
}
|
|
3556
|
-
function
|
|
3557
|
-
if (!
|
|
3556
|
+
function Ao(e, t, i, s, r, n, o, h, l) {
|
|
3557
|
+
if (!n) return;
|
|
3558
3558
|
let a = is(e, t, i);
|
|
3559
|
-
if (a) return a[0] = Math.ceil((a[0] + (
|
|
3559
|
+
if (a) return a[0] = Math.ceil((a[0] + (l ? o / 2 : 0)) / o), a[1] = Math.ceil(a[1] / h), a[0] = Math.min(Math.max(a[0], 1), s + (l ? 1 : 0)), a[1] = Math.min(Math.max(a[1], 1), r), a;
|
|
3560
3560
|
}
|
|
3561
3561
|
var Ii = class {
|
|
3562
3562
|
constructor(e, t) {
|
|
3563
3563
|
this._renderService = e, this._charSizeService = t;
|
|
3564
3564
|
}
|
|
3565
3565
|
getCoords(e, t, i, s, r) {
|
|
3566
|
-
return
|
|
3566
|
+
return Ao(window, e, t, i, s, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, r);
|
|
3567
3567
|
}
|
|
3568
3568
|
getMouseReportCoords(e, t) {
|
|
3569
3569
|
let i = is(window, e, t);
|
|
@@ -3571,7 +3571,7 @@ var Ii = class {
|
|
|
3571
3571
|
}
|
|
3572
3572
|
};
|
|
3573
3573
|
Ii = q([S(0, Oe), S(1, Yt)], Ii);
|
|
3574
|
-
var
|
|
3574
|
+
var Oo = class {
|
|
3575
3575
|
constructor(e, t) {
|
|
3576
3576
|
this._renderCallback = e, this._coreBrowserService = t, this._refreshCallbacks = [];
|
|
3577
3577
|
}
|
|
@@ -3597,14 +3597,14 @@ var On = class {
|
|
|
3597
3597
|
this._refreshCallbacks = [];
|
|
3598
3598
|
}
|
|
3599
3599
|
}, Dr = {};
|
|
3600
|
-
Kr(Dr, { getSafariVersion: () =>
|
|
3601
|
-
var Xt = typeof process < "u" && "title" in process, xt = Xt ? "node" : navigator.userAgent, kt = Xt ? "node" : navigator.platform, Rr = xt.includes("Firefox"),
|
|
3602
|
-
function
|
|
3600
|
+
Kr(Dr, { getSafariVersion: () => No, isChromeOS: () => Pr, isFirefox: () => Rr, isIpad: () => Ho, isIphone: () => Wo, isLegacyEdge: () => Io, isLinux: () => ss, isMac: () => Kt, isNode: () => Xt, isSafari: () => Mr, isWindows: () => Lr });
|
|
3601
|
+
var Xt = typeof process < "u" && "title" in process, xt = Xt ? "node" : navigator.userAgent, kt = Xt ? "node" : navigator.platform, Rr = xt.includes("Firefox"), Io = xt.includes("Edge"), Mr = /^((?!chrome|android).)*safari/i.test(xt);
|
|
3602
|
+
function No() {
|
|
3603
3603
|
if (!Mr) return 0;
|
|
3604
3604
|
let e = xt.match(/Version\/(\d+)/);
|
|
3605
3605
|
return e === null || e.length < 2 ? 0 : parseInt(e[1]);
|
|
3606
3606
|
}
|
|
3607
|
-
var Kt = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(kt),
|
|
3607
|
+
var Kt = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(kt), Ho = kt === "iPad", Wo = kt === "iPhone", Lr = ["Windows", "Win16", "Win32", "WinCE"].includes(kt), ss = kt.indexOf("Linux") >= 0, Pr = /\bCrOS\b/.test(xt), Tr = class {
|
|
3608
3608
|
constructor() {
|
|
3609
3609
|
this._tasks = [], this._i = 0;
|
|
3610
3610
|
}
|
|
@@ -3633,7 +3633,7 @@ var Kt = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(kt), Hn = kt ===
|
|
|
3633
3633
|
}
|
|
3634
3634
|
this.clear();
|
|
3635
3635
|
}
|
|
3636
|
-
},
|
|
3636
|
+
}, zo = class extends Tr {
|
|
3637
3637
|
_requestCallback(e) {
|
|
3638
3638
|
return setTimeout(() => e(this._createDeadline(16)));
|
|
3639
3639
|
}
|
|
@@ -3644,14 +3644,14 @@ var Kt = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(kt), Hn = kt ===
|
|
|
3644
3644
|
let t = performance.now() + e;
|
|
3645
3645
|
return { timeRemaining: () => Math.max(0, t - performance.now()) };
|
|
3646
3646
|
}
|
|
3647
|
-
},
|
|
3647
|
+
}, Fo = class extends Tr {
|
|
3648
3648
|
_requestCallback(e) {
|
|
3649
3649
|
return requestIdleCallback(e);
|
|
3650
3650
|
}
|
|
3651
3651
|
_cancelCallback(e) {
|
|
3652
3652
|
cancelIdleCallback(e);
|
|
3653
3653
|
}
|
|
3654
|
-
}, Ut = !Xt && "requestIdleCallback" in window ?
|
|
3654
|
+
}, Ut = !Xt && "requestIdleCallback" in window ? Fo : zo, $o = class {
|
|
3655
3655
|
constructor() {
|
|
3656
3656
|
this._queue = new Ut();
|
|
3657
3657
|
}
|
|
@@ -3662,10 +3662,10 @@ var Kt = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(kt), Hn = kt ===
|
|
|
3662
3662
|
this._queue.flush();
|
|
3663
3663
|
}
|
|
3664
3664
|
}, Ni = class extends L {
|
|
3665
|
-
constructor(e, t, i, s, r, o,
|
|
3666
|
-
super(), this._rowCount = e, this._optionsService = i, this._charSizeService = s, this._coreService = r, this._coreBrowserService =
|
|
3667
|
-
this.clear(), this.handleResize(
|
|
3668
|
-
})), this._register(this._optionsService.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(
|
|
3665
|
+
constructor(e, t, i, s, r, n, o, h, l) {
|
|
3666
|
+
super(), this._rowCount = e, this._optionsService = i, this._charSizeService = s, this._coreService = r, this._coreBrowserService = h, this._renderer = this._register(new st()), this._pausedResizeTask = new $o(), this._observerDisposable = this._register(new st()), this._isPaused = !1, this._needsFullRefresh = !1, this._isNextRenderRedrawOnly = !0, this._needsSelectionRefresh = !1, this._canvasWidth = 0, this._canvasHeight = 0, this._selectionState = { start: void 0, end: void 0, columnSelectMode: !1 }, this._onDimensionsChange = this._register(new m()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this._register(new m()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this._register(new m()), this.onRender = this._onRender.event, this._onRefreshRequest = this._register(new m()), this.onRefreshRequest = this._onRefreshRequest.event, this._renderDebouncer = new Oo((a, d) => this._renderRows(a, d), this._coreBrowserService), this._register(this._renderDebouncer), this._syncOutputHandler = new Ko(this._coreBrowserService, this._coreService, () => this._fullRefresh()), this._register(z(() => this._syncOutputHandler.dispose())), this._register(this._coreBrowserService.onDprChange(() => this.handleDevicePixelRatioChange())), this._register(o.onResize(() => this._fullRefresh())), this._register(o.buffers.onBufferActivate(() => this._renderer.value?.clear())), this._register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this._register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this._register(n.onDecorationRegistered(() => this._fullRefresh())), this._register(n.onDecorationRemoved(() => this._fullRefresh())), this._register(this._optionsService.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio", "rescaleOverlappingGlyphs"], () => {
|
|
3667
|
+
this.clear(), this.handleResize(o.cols, o.rows), this._fullRefresh();
|
|
3668
|
+
})), this._register(this._optionsService.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(o.buffer.y, o.buffer.y, !0))), this._register(l.onChangeColors(() => this._fullRefresh())), this._registerIntersectionObserver(this._coreBrowserService.window, t), this._register(this._coreBrowserService.onWindowChange((a) => this._registerIntersectionObserver(a, t)));
|
|
3669
3669
|
}
|
|
3670
3670
|
get dimensions() {
|
|
3671
3671
|
return this._renderer.value.dimensions;
|
|
@@ -3749,8 +3749,8 @@ var Kt = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(kt), Hn = kt ===
|
|
|
3749
3749
|
this._renderer.value?.clear();
|
|
3750
3750
|
}
|
|
3751
3751
|
};
|
|
3752
|
-
Ni = q([S(2,
|
|
3753
|
-
var
|
|
3752
|
+
Ni = q([S(2, le), S(3, Yt), S(4, Qe), S(5, Ct), S(6, he), S(7, Ae), S(8, rt)], Ni);
|
|
3753
|
+
var Ko = class {
|
|
3754
3754
|
constructor(e, t, i) {
|
|
3755
3755
|
this._coreBrowserService = e, this._coreService = t, this._onTimeout = i, this._start = 0, this._end = 0, this._isBuffering = !1;
|
|
3756
3756
|
}
|
|
@@ -3768,39 +3768,39 @@ var Kn = class {
|
|
|
3768
3768
|
this._timeout !== void 0 && (this._coreBrowserService.window.clearTimeout(this._timeout), this._timeout = void 0);
|
|
3769
3769
|
}
|
|
3770
3770
|
};
|
|
3771
|
-
function
|
|
3772
|
-
let r = i.buffer.x,
|
|
3773
|
-
if (!i.buffer.hasScrollback) return
|
|
3774
|
-
let
|
|
3775
|
-
if (
|
|
3776
|
-
|
|
3777
|
-
let
|
|
3778
|
-
return wt(
|
|
3771
|
+
function Uo(e, t, i, s) {
|
|
3772
|
+
let r = i.buffer.x, n = i.buffer.y;
|
|
3773
|
+
if (!i.buffer.hasScrollback) return Yo(r, n, e, t, i, s) + jt(n, t, i, s) + Xo(r, n, e, t, i, s);
|
|
3774
|
+
let o;
|
|
3775
|
+
if (n === t) return o = r > e ? "D" : "C", wt(Math.abs(r - e), St(o, s));
|
|
3776
|
+
o = n > t ? "D" : "C";
|
|
3777
|
+
let h = Math.abs(n - t), l = Vo(n > t ? e : r, i) + (h - 1) * i.cols + 1 + qo(n > t ? r : e);
|
|
3778
|
+
return wt(l, St(o, s));
|
|
3779
3779
|
}
|
|
3780
|
-
function
|
|
3780
|
+
function qo(e, t) {
|
|
3781
3781
|
return e - 1;
|
|
3782
3782
|
}
|
|
3783
|
-
function
|
|
3783
|
+
function Vo(e, t) {
|
|
3784
3784
|
return t.cols - e;
|
|
3785
3785
|
}
|
|
3786
|
-
function
|
|
3787
|
-
return jt(t, s, r,
|
|
3786
|
+
function Yo(e, t, i, s, r, n) {
|
|
3787
|
+
return jt(t, s, r, n).length === 0 ? "" : wt(Or(e, t, e, t - Ze(t, r), !1, r).length, St("D", n));
|
|
3788
3788
|
}
|
|
3789
3789
|
function jt(e, t, i, s) {
|
|
3790
|
-
let r = e - Ze(e, i),
|
|
3791
|
-
return wt(
|
|
3790
|
+
let r = e - Ze(e, i), n = t - Ze(t, i), o = Math.abs(r - n) - jo(e, t, i);
|
|
3791
|
+
return wt(o, St(Ar(e, t), s));
|
|
3792
3792
|
}
|
|
3793
|
-
function
|
|
3794
|
-
let
|
|
3795
|
-
jt(t, s, r,
|
|
3796
|
-
let
|
|
3797
|
-
return wt(Or(e,
|
|
3793
|
+
function Xo(e, t, i, s, r, n) {
|
|
3794
|
+
let o;
|
|
3795
|
+
jt(t, s, r, n).length > 0 ? o = s - Ze(s, r) : o = t;
|
|
3796
|
+
let h = s, l = Go(e, t, i, s, r, n);
|
|
3797
|
+
return wt(Or(e, o, i, h, l === "C", r).length, St(l, n));
|
|
3798
3798
|
}
|
|
3799
|
-
function
|
|
3800
|
-
let s = 0, r = e - Ze(e, i),
|
|
3801
|
-
for (let
|
|
3802
|
-
let
|
|
3803
|
-
i.buffer.lines.get(r +
|
|
3799
|
+
function jo(e, t, i) {
|
|
3800
|
+
let s = 0, r = e - Ze(e, i), n = t - Ze(t, i);
|
|
3801
|
+
for (let o = 0; o < Math.abs(r - n); o++) {
|
|
3802
|
+
let h = Ar(e, t) === "A" ? -1 : 1;
|
|
3803
|
+
i.buffer.lines.get(r + h * o)?.isWrapped && s++;
|
|
3804
3804
|
}
|
|
3805
3805
|
return s;
|
|
3806
3806
|
}
|
|
@@ -3809,17 +3809,17 @@ function Ze(e, t) {
|
|
|
3809
3809
|
for (; r && e >= 0 && e < t.rows; ) i++, s = t.buffer.lines.get(--e), r = s?.isWrapped;
|
|
3810
3810
|
return i;
|
|
3811
3811
|
}
|
|
3812
|
-
function
|
|
3813
|
-
let
|
|
3814
|
-
return jt(i, s, r,
|
|
3812
|
+
function Go(e, t, i, s, r, n) {
|
|
3813
|
+
let o;
|
|
3814
|
+
return jt(i, s, r, n).length > 0 ? o = s - Ze(s, r) : o = t, e < i && o <= s || e >= i && o < s ? "C" : "D";
|
|
3815
3815
|
}
|
|
3816
3816
|
function Ar(e, t) {
|
|
3817
3817
|
return e > t ? "A" : "B";
|
|
3818
3818
|
}
|
|
3819
|
-
function Or(e, t, i, s, r,
|
|
3820
|
-
let
|
|
3821
|
-
for (; (
|
|
3822
|
-
return
|
|
3819
|
+
function Or(e, t, i, s, r, n) {
|
|
3820
|
+
let o = e, h = t, l = "";
|
|
3821
|
+
for (; (o !== i || h !== s) && h >= 0 && h < n.buffer.lines.length; ) o += r ? 1 : -1, r && o > n.cols - 1 ? (l += n.buffer.translateBufferLineToString(h, !1, e, o), o = 0, e = 0, h++) : !r && o < 0 && (l += n.buffer.translateBufferLineToString(h, !1, 0, e + 1), o = n.cols - 1, e = o, h--);
|
|
3822
|
+
return l + n.buffer.translateBufferLineToString(h, !1, e, o);
|
|
3823
3823
|
}
|
|
3824
3824
|
function St(e, t) {
|
|
3825
3825
|
let i = t ? "O" : "[";
|
|
@@ -3831,7 +3831,7 @@ function wt(e, t) {
|
|
|
3831
3831
|
for (let s = 0; s < e; s++) i += t;
|
|
3832
3832
|
return i;
|
|
3833
3833
|
}
|
|
3834
|
-
var
|
|
3834
|
+
var Jo = class {
|
|
3835
3835
|
constructor(e) {
|
|
3836
3836
|
this._bufferService = e, this.isSelectAllActive = !1, this.selectionStartLength = 0;
|
|
3837
3837
|
}
|
|
@@ -3867,11 +3867,11 @@ function Bs(e, t) {
|
|
|
3867
3867
|
if (e.start.y > e.end.y) throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);
|
|
3868
3868
|
return t * (e.end.y - e.start.y) + (e.end.x - e.start.x + 1);
|
|
3869
3869
|
}
|
|
3870
|
-
var ri = 50,
|
|
3871
|
-
constructor(e, t, i, s, r, o,
|
|
3872
|
-
super(), this._element = e, this._screenElement = t, this._linkifier = i, this._bufferService = s, this._coreService = r, this._mouseService =
|
|
3870
|
+
var ri = 50, Zo = 15, Qo = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi = class extends L {
|
|
3871
|
+
constructor(e, t, i, s, r, n, o, h, l) {
|
|
3872
|
+
super(), this._element = e, this._screenElement = t, this._linkifier = i, this._bufferService = s, this._coreService = r, this._mouseService = n, this._optionsService = o, this._renderService = h, this._coreBrowserService = l, this._dragScrollAmount = 0, this._enabled = !0, this._workCell = new Se(), this._mouseDownTimeStamp = 0, this._oldHasSelection = !1, this._oldSelectionStart = void 0, this._oldSelectionEnd = void 0, this._onLinuxMouseSelection = this._register(new m()), this.onLinuxMouseSelection = this._onLinuxMouseSelection.event, this._onRedrawRequest = this._register(new m()), this.onRequestRedraw = this._onRedrawRequest.event, this._onSelectionChange = this._register(new m()), this.onSelectionChange = this._onSelectionChange.event, this._onRequestScrollLines = this._register(new m()), this.onRequestScrollLines = this._onRequestScrollLines.event, this._mouseMoveListener = (a) => this._handleMouseMove(a), this._mouseUpListener = (a) => this._handleMouseUp(a), this._coreService.onUserInput(() => {
|
|
3873
3873
|
this.hasSelection && this.clearSelection();
|
|
3874
|
-
}), this._trimListener = this._bufferService.buffer.lines.onTrim((a) => this._handleTrim(a)), this._register(this._bufferService.buffers.onBufferActivate((a) => this._handleBufferActivate(a))), this.enable(), this._model = new
|
|
3874
|
+
}), this._trimListener = this._bufferService.buffer.lines.onTrim((a) => this._handleTrim(a)), this._register(this._bufferService.buffers.onBufferActivate((a) => this._handleBufferActivate(a))), this.enable(), this._model = new Jo(this._bufferService), this._activeSelectionMode = 0, this._register(z(() => {
|
|
3875
3875
|
this._removeMouseDownListeners();
|
|
3876
3876
|
})), this._register(this._bufferService.onResize((a) => {
|
|
3877
3877
|
a.rowsChanged && this.clearSelection();
|
|
@@ -3902,21 +3902,21 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
3902
3902
|
let i = this._bufferService.buffer, s = [];
|
|
3903
3903
|
if (this._activeSelectionMode === 3) {
|
|
3904
3904
|
if (e[0] === t[0]) return "";
|
|
3905
|
-
let r = e[0] < t[0] ? e[0] : t[0],
|
|
3906
|
-
for (let
|
|
3907
|
-
let
|
|
3908
|
-
s.push(
|
|
3905
|
+
let r = e[0] < t[0] ? e[0] : t[0], n = e[0] < t[0] ? t[0] : e[0];
|
|
3906
|
+
for (let o = e[1]; o <= t[1]; o++) {
|
|
3907
|
+
let h = i.translateBufferLineToString(o, !0, r, n);
|
|
3908
|
+
s.push(h);
|
|
3909
3909
|
}
|
|
3910
3910
|
} else {
|
|
3911
3911
|
let r = e[1] === t[1] ? t[0] : void 0;
|
|
3912
3912
|
s.push(i.translateBufferLineToString(e[1], !0, e[0], r));
|
|
3913
|
-
for (let
|
|
3914
|
-
let
|
|
3915
|
-
|
|
3913
|
+
for (let n = e[1] + 1; n <= t[1] - 1; n++) {
|
|
3914
|
+
let o = i.lines.get(n), h = i.translateBufferLineToString(n, !0);
|
|
3915
|
+
o?.isWrapped ? s[s.length - 1] += h : s.push(h);
|
|
3916
3916
|
}
|
|
3917
3917
|
if (e[1] !== t[1]) {
|
|
3918
|
-
let
|
|
3919
|
-
|
|
3918
|
+
let n = i.lines.get(t[1]), o = i.translateBufferLineToString(t[1], !0, 0, t[0]);
|
|
3919
|
+
n && n.isWrapped ? s[s.length - 1] += o : s.push(o);
|
|
3920
3920
|
}
|
|
3921
3921
|
}
|
|
3922
3922
|
return s.map((r) => r.replace(ia, " ")).join(Lr ? `\r
|
|
@@ -3964,7 +3964,7 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
3964
3964
|
}
|
|
3965
3965
|
_getMouseEventScrollAmount(e) {
|
|
3966
3966
|
let t = is(this._coreBrowserService.window, e, this._screenElement)[1], i = this._renderService.dimensions.css.canvas.height;
|
|
3967
|
-
return t >= 0 && t <= i ? 0 : (t > i && (t -= i), t = Math.min(Math.max(t, -ri), ri), t /= ri, t / Math.abs(t) + Math.round(t * (
|
|
3967
|
+
return t >= 0 && t <= i ? 0 : (t > i && (t -= i), t = Math.min(Math.max(t, -ri), ri), t /= ri, t / Math.abs(t) + Math.round(t * (Zo - 1)));
|
|
3968
3968
|
}
|
|
3969
3969
|
shouldForceSelection(e) {
|
|
3970
3970
|
return Kt ? e.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection : e.shiftKey;
|
|
@@ -3979,7 +3979,7 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
3979
3979
|
}
|
|
3980
3980
|
}
|
|
3981
3981
|
_addMouseDownListeners() {
|
|
3982
|
-
this._screenElement.ownerDocument && (this._screenElement.ownerDocument.addEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.addEventListener("mouseup", this._mouseUpListener)), this._dragScrollIntervalTimer = this._coreBrowserService.window.setInterval(() => this._dragScroll(),
|
|
3982
|
+
this._screenElement.ownerDocument && (this._screenElement.ownerDocument.addEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.addEventListener("mouseup", this._mouseUpListener)), this._dragScrollIntervalTimer = this._coreBrowserService.window.setInterval(() => this._dragScroll(), Qo);
|
|
3983
3983
|
}
|
|
3984
3984
|
_removeMouseDownListeners() {
|
|
3985
3985
|
this._screenElement.ownerDocument && (this._screenElement.ownerDocument.removeEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.removeEventListener("mouseup", this._mouseUpListener)), this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer), this._dragScrollIntervalTimer = void 0;
|
|
@@ -4031,7 +4031,7 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
4031
4031
|
if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
|
|
4032
4032
|
let i = this._mouseService.getCoords(e, this._element, this._bufferService.cols, this._bufferService.rows, !1);
|
|
4033
4033
|
if (i && i[0] !== void 0 && i[1] !== void 0) {
|
|
4034
|
-
let s =
|
|
4034
|
+
let s = Uo(i[0] - 1, i[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
|
|
4035
4035
|
this._coreService.triggerDataEvent(s, !0);
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
@@ -4067,33 +4067,33 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
4067
4067
|
}
|
|
4068
4068
|
_getWordAt(e, t, i = !0, s = !0) {
|
|
4069
4069
|
if (e[0] >= this._bufferService.cols) return;
|
|
4070
|
-
let r = this._bufferService.buffer,
|
|
4071
|
-
if (!
|
|
4072
|
-
let
|
|
4073
|
-
if (
|
|
4074
|
-
for (;
|
|
4075
|
-
for (;
|
|
4070
|
+
let r = this._bufferService.buffer, n = r.lines.get(e[1]);
|
|
4071
|
+
if (!n) return;
|
|
4072
|
+
let o = r.translateBufferLineToString(e[1], !1), h = this._convertViewportColToCharacterIndex(n, e[0]), l = h, a = e[0] - h, d = 0, c = 0, _ = 0, f = 0;
|
|
4073
|
+
if (o.charAt(h) === " ") {
|
|
4074
|
+
for (; h > 0 && o.charAt(h - 1) === " "; ) h--;
|
|
4075
|
+
for (; l < o.length && o.charAt(l + 1) === " "; ) l++;
|
|
4076
4076
|
} else {
|
|
4077
4077
|
let y = e[0], E = e[0];
|
|
4078
|
-
|
|
4079
|
-
let N =
|
|
4080
|
-
for (N > 1 && (f += N - 1,
|
|
4081
|
-
|
|
4078
|
+
n.getWidth(y) === 0 && (d++, y--), n.getWidth(E) === 2 && (c++, E++);
|
|
4079
|
+
let N = n.getString(E).length;
|
|
4080
|
+
for (N > 1 && (f += N - 1, l += N - 1); y > 0 && h > 0 && !this._isCharWordSeparator(n.loadCell(y - 1, this._workCell)); ) {
|
|
4081
|
+
n.loadCell(y - 1, this._workCell);
|
|
4082
4082
|
let P = this._workCell.getChars().length;
|
|
4083
|
-
this._workCell.getWidth() === 0 ? (d++, y--) : P > 1 && (_ += P - 1,
|
|
4083
|
+
this._workCell.getWidth() === 0 ? (d++, y--) : P > 1 && (_ += P - 1, h -= P - 1), h--, y--;
|
|
4084
4084
|
}
|
|
4085
|
-
for (; E <
|
|
4086
|
-
|
|
4085
|
+
for (; E < n.length && l + 1 < o.length && !this._isCharWordSeparator(n.loadCell(E + 1, this._workCell)); ) {
|
|
4086
|
+
n.loadCell(E + 1, this._workCell);
|
|
4087
4087
|
let P = this._workCell.getChars().length;
|
|
4088
|
-
this._workCell.getWidth() === 2 ? (c++, E++) : P > 1 && (f += P - 1,
|
|
4088
|
+
this._workCell.getWidth() === 2 ? (c++, E++) : P > 1 && (f += P - 1, l += P - 1), l++, E++;
|
|
4089
4089
|
}
|
|
4090
4090
|
}
|
|
4091
|
-
|
|
4092
|
-
let u =
|
|
4093
|
-
if (!(!t &&
|
|
4094
|
-
if (i && u === 0 &&
|
|
4091
|
+
l++;
|
|
4092
|
+
let u = h + a - d + _, g = Math.min(this._bufferService.cols, l - h + d + c - _ - f);
|
|
4093
|
+
if (!(!t && o.slice(h, l).trim() === "")) {
|
|
4094
|
+
if (i && u === 0 && n.getCodePoint(0) !== 32) {
|
|
4095
4095
|
let y = r.lines.get(e[1] - 1);
|
|
4096
|
-
if (y &&
|
|
4096
|
+
if (y && n.isWrapped && y.getCodePoint(this._bufferService.cols - 1) !== 32) {
|
|
4097
4097
|
let E = this._getWordAt([this._bufferService.cols - 1, e[1] - 1], !1, !0, !1);
|
|
4098
4098
|
if (E) {
|
|
4099
4099
|
let N = this._bufferService.cols - E.start;
|
|
@@ -4101,7 +4101,7 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
4103
|
}
|
|
4104
|
-
if (s && u + g === this._bufferService.cols &&
|
|
4104
|
+
if (s && u + g === this._bufferService.cols && n.getCodePoint(this._bufferService.cols - 1) !== 32) {
|
|
4105
4105
|
let y = r.lines.get(e[1] + 1);
|
|
4106
4106
|
if (y?.isWrapped && y.getCodePoint(0) !== 32) {
|
|
4107
4107
|
let E = this._getWordAt([0, e[1] + 1], !1, !1, !0);
|
|
@@ -4135,7 +4135,7 @@ var ri = 50, Zn = 15, Qn = 50, ea = 500, ta = " ", ia = new RegExp(ta, "g"), Hi
|
|
|
4135
4135
|
this._model.selectionStart = [0, t.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = Bs(i, this._bufferService.cols);
|
|
4136
4136
|
}
|
|
4137
4137
|
};
|
|
4138
|
-
Hi = q([S(3,
|
|
4138
|
+
Hi = q([S(3, he), S(4, Qe), S(5, ji), S(6, le), S(7, Oe), S(8, Ae)], Hi);
|
|
4139
4139
|
var Ds = class {
|
|
4140
4140
|
constructor() {
|
|
4141
4141
|
this._data = {};
|
|
@@ -4171,24 +4171,24 @@ var Ds = class {
|
|
|
4171
4171
|
}, j = Object.freeze((() => {
|
|
4172
4172
|
let e = [K.toColor("#2e3436"), K.toColor("#cc0000"), K.toColor("#4e9a06"), K.toColor("#c4a000"), K.toColor("#3465a4"), K.toColor("#75507b"), K.toColor("#06989a"), K.toColor("#d3d7cf"), K.toColor("#555753"), K.toColor("#ef2929"), K.toColor("#8ae234"), K.toColor("#fce94f"), K.toColor("#729fcf"), K.toColor("#ad7fa8"), K.toColor("#34e2e2"), K.toColor("#eeeeec")], t = [0, 95, 135, 175, 215, 255];
|
|
4173
4173
|
for (let i = 0; i < 216; i++) {
|
|
4174
|
-
let s = t[i / 36 % 6 | 0], r = t[i / 6 % 6 | 0],
|
|
4175
|
-
e.push({ css: X.toCss(s, r,
|
|
4174
|
+
let s = t[i / 36 % 6 | 0], r = t[i / 6 % 6 | 0], n = t[i % 6];
|
|
4175
|
+
e.push({ css: X.toCss(s, r, n), rgba: X.toRgba(s, r, n) });
|
|
4176
4176
|
}
|
|
4177
4177
|
for (let i = 0; i < 24; i++) {
|
|
4178
4178
|
let s = 8 + i * 10;
|
|
4179
4179
|
e.push({ css: X.toCss(s, s, s), rgba: X.toRgba(s, s, s) });
|
|
4180
4180
|
}
|
|
4181
4181
|
return e;
|
|
4182
|
-
})()), Ye = K.toColor("#ffffff"), ft = K.toColor("#000000"), Ms = K.toColor("#ffffff"), Ls = ft,
|
|
4182
|
+
})()), Ye = K.toColor("#ffffff"), ft = K.toColor("#000000"), Ms = K.toColor("#ffffff"), Ls = ft, lt = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 }, sa = Ye, Wi = class extends L {
|
|
4183
4183
|
constructor(e) {
|
|
4184
|
-
super(), this._optionsService = e, this._contrastCache = new Rs(), this._halfContrastCache = new Rs(), this._onChangeColors = this._register(new m()), this.onChangeColors = this._onChangeColors.event, this._colors = { foreground: Ye, background: ft, cursor: Ms, cursorAccent: Ls, selectionForeground: void 0, selectionBackgroundTransparent:
|
|
4184
|
+
super(), this._optionsService = e, this._contrastCache = new Rs(), this._halfContrastCache = new Rs(), this._onChangeColors = this._register(new m()), this.onChangeColors = this._onChangeColors.event, this._colors = { foreground: Ye, background: ft, cursor: Ms, cursorAccent: Ls, selectionForeground: void 0, selectionBackgroundTransparent: lt, selectionBackgroundOpaque: W.blend(ft, lt), selectionInactiveBackgroundTransparent: lt, selectionInactiveBackgroundOpaque: W.blend(ft, lt), scrollbarSliderBackground: W.opacity(Ye, 0.2), scrollbarSliderHoverBackground: W.opacity(Ye, 0.4), scrollbarSliderActiveBackground: W.opacity(Ye, 0.5), overviewRulerBorder: Ye, ansi: j.slice(), contrastCache: this._contrastCache, halfContrastCache: this._halfContrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this._register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
|
|
4185
4185
|
}
|
|
4186
4186
|
get colors() {
|
|
4187
4187
|
return this._colors;
|
|
4188
4188
|
}
|
|
4189
4189
|
_setTheme(e = {}) {
|
|
4190
4190
|
let t = this._colors;
|
|
4191
|
-
if (t.foreground = I(e.foreground, Ye), t.background = I(e.background, ft), t.cursor = W.blend(t.background, I(e.cursor, Ms)), t.cursorAccent = W.blend(t.background, I(e.cursorAccent, Ls)), t.selectionBackgroundTransparent = I(e.selectionBackground,
|
|
4191
|
+
if (t.foreground = I(e.foreground, Ye), t.background = I(e.background, ft), t.cursor = W.blend(t.background, I(e.cursor, Ms)), t.cursorAccent = W.blend(t.background, I(e.cursorAccent, Ls)), t.selectionBackgroundTransparent = I(e.selectionBackground, lt), t.selectionBackgroundOpaque = W.blend(t.background, t.selectionBackgroundTransparent), t.selectionInactiveBackgroundTransparent = I(e.selectionInactiveBackground, t.selectionBackgroundTransparent), t.selectionInactiveBackgroundOpaque = W.blend(t.background, t.selectionInactiveBackgroundTransparent), t.selectionForeground = e.selectionForeground ? I(e.selectionForeground, xs) : void 0, t.selectionForeground === xs && (t.selectionForeground = void 0), W.isOpaque(t.selectionBackgroundTransparent) && (t.selectionBackgroundTransparent = W.opacity(t.selectionBackgroundTransparent, 0.3)), W.isOpaque(t.selectionInactiveBackgroundTransparent) && (t.selectionInactiveBackgroundTransparent = W.opacity(t.selectionInactiveBackgroundTransparent, 0.3)), t.scrollbarSliderBackground = I(e.scrollbarSliderBackground, W.opacity(t.foreground, 0.2)), t.scrollbarSliderHoverBackground = I(e.scrollbarSliderHoverBackground, W.opacity(t.foreground, 0.4)), t.scrollbarSliderActiveBackground = I(e.scrollbarSliderActiveBackground, W.opacity(t.foreground, 0.5)), t.overviewRulerBorder = I(e.overviewRulerBorder, sa), t.ansi = j.slice(), t.ansi[0] = I(e.black, j[0]), t.ansi[1] = I(e.red, j[1]), t.ansi[2] = I(e.green, j[2]), t.ansi[3] = I(e.yellow, j[3]), t.ansi[4] = I(e.blue, j[4]), t.ansi[5] = I(e.magenta, j[5]), t.ansi[6] = I(e.cyan, j[6]), t.ansi[7] = I(e.white, j[7]), t.ansi[8] = I(e.brightBlack, j[8]), t.ansi[9] = I(e.brightRed, j[9]), t.ansi[10] = I(e.brightGreen, j[10]), t.ansi[11] = I(e.brightYellow, j[11]), t.ansi[12] = I(e.brightBlue, j[12]), t.ansi[13] = I(e.brightMagenta, j[13]), t.ansi[14] = I(e.brightCyan, j[14]), t.ansi[15] = I(e.brightWhite, j[15]), e.extendedAnsi) {
|
|
4192
4192
|
let i = Math.min(t.ansi.length - 16, e.extendedAnsi.length);
|
|
4193
4193
|
for (let s = 0; s < i; s++) t.ansi[s + 16] = I(e.extendedAnsi[s], j[s + 16]);
|
|
4194
4194
|
}
|
|
@@ -4223,7 +4223,7 @@ var Ds = class {
|
|
|
4223
4223
|
this._restoreColors = { foreground: this._colors.foreground, background: this._colors.background, cursor: this._colors.cursor, ansi: this._colors.ansi.slice() };
|
|
4224
4224
|
}
|
|
4225
4225
|
};
|
|
4226
|
-
Wi = q([S(0,
|
|
4226
|
+
Wi = q([S(0, le)], Wi);
|
|
4227
4227
|
function I(e, t) {
|
|
4228
4228
|
if (e !== void 0) try {
|
|
4229
4229
|
return K.toColor(e);
|
|
@@ -4249,7 +4249,7 @@ var ra = class {
|
|
|
4249
4249
|
get(e) {
|
|
4250
4250
|
return this._entries.get(e);
|
|
4251
4251
|
}
|
|
4252
|
-
},
|
|
4252
|
+
}, na = class {
|
|
4253
4253
|
constructor() {
|
|
4254
4254
|
this._services = new ra(), this._services.set(Xi, this);
|
|
4255
4255
|
}
|
|
@@ -4260,17 +4260,17 @@ var ra = class {
|
|
|
4260
4260
|
return this._services.get(e);
|
|
4261
4261
|
}
|
|
4262
4262
|
createInstance(e, ...t) {
|
|
4263
|
-
let i = Gr(e).sort((
|
|
4264
|
-
for (let
|
|
4265
|
-
let
|
|
4266
|
-
if (!
|
|
4267
|
-
s.push(
|
|
4263
|
+
let i = Gr(e).sort((n, o) => n.index - o.index), s = [];
|
|
4264
|
+
for (let n of i) {
|
|
4265
|
+
let o = this._services.get(n.id);
|
|
4266
|
+
if (!o) throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${n.id._id}.`);
|
|
4267
|
+
s.push(o);
|
|
4268
4268
|
}
|
|
4269
4269
|
let r = i.length > 0 ? i[0].index : t.length;
|
|
4270
4270
|
if (t.length !== r) throw new Error(`[createInstance] First service dependency of ${e.name} at position ${r + 1} conflicts with ${t.length} static arguments`);
|
|
4271
4271
|
return new e(...t, ...s);
|
|
4272
4272
|
}
|
|
4273
|
-
},
|
|
4273
|
+
}, oa = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, off: 5 }, aa = "xterm.js: ", zi = class extends L {
|
|
4274
4274
|
constructor(e) {
|
|
4275
4275
|
super(), this._optionsService = e, this._logLevel = 5, this._updateLogLevel(), this._register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel()));
|
|
4276
4276
|
}
|
|
@@ -4278,7 +4278,7 @@ var ra = class {
|
|
|
4278
4278
|
return this._logLevel;
|
|
4279
4279
|
}
|
|
4280
4280
|
_updateLogLevel() {
|
|
4281
|
-
this._logLevel =
|
|
4281
|
+
this._logLevel = oa[this._optionsService.rawOptions.logLevel];
|
|
4282
4282
|
}
|
|
4283
4283
|
_evalLazyOptionalParams(e) {
|
|
4284
4284
|
for (let t = 0; t < e.length; t++) typeof e[t] == "function" && (e[t] = e[t]());
|
|
@@ -4302,7 +4302,7 @@ var ra = class {
|
|
|
4302
4302
|
this._logLevel <= 4 && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e, t);
|
|
4303
4303
|
}
|
|
4304
4304
|
};
|
|
4305
|
-
zi = q([S(0,
|
|
4305
|
+
zi = q([S(0, le)], zi);
|
|
4306
4306
|
var Ps = class extends L {
|
|
4307
4307
|
constructor(e) {
|
|
4308
4308
|
super(), this._maxLength = e, this.onDeleteEmitter = this._register(new m()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this._register(new m()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this._register(new m()), this.onTrim = this.onTrimEmitter.event, this._array = new Array(this._maxLength), this._startIndex = 0, this._length = 0;
|
|
@@ -4371,11 +4371,11 @@ var Ps = class extends L {
|
|
|
4371
4371
|
_getCyclicIndex(e) {
|
|
4372
4372
|
return (this._startIndex + e) % this._maxLength;
|
|
4373
4373
|
}
|
|
4374
|
-
}, M = 3, Y = Object.freeze(new yt()), Tt = 0,
|
|
4374
|
+
}, M = 3, Y = Object.freeze(new yt()), Tt = 0, ni = 2, pt = class Ir {
|
|
4375
4375
|
constructor(t, i, s = !1) {
|
|
4376
4376
|
this.isWrapped = s, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(t * M);
|
|
4377
4377
|
let r = i || Se.fromCharData([0, tr, 1, 0]);
|
|
4378
|
-
for (let
|
|
4378
|
+
for (let n = 0; n < t; ++n) this.setCell(n, r);
|
|
4379
4379
|
this.length = t;
|
|
4380
4380
|
}
|
|
4381
4381
|
get(t) {
|
|
@@ -4430,16 +4430,16 @@ var Ps = class extends L {
|
|
|
4430
4430
|
insertCells(t, i, s) {
|
|
4431
4431
|
if (t %= this.length, t && this.getWidth(t - 1) === 2 && this.setCellFromCodepoint(t - 1, 0, 1, s), i < this.length - t) {
|
|
4432
4432
|
let r = new Se();
|
|
4433
|
-
for (let
|
|
4434
|
-
for (let
|
|
4433
|
+
for (let n = this.length - t - i - 1; n >= 0; --n) this.setCell(t + i + n, this.loadCell(t + n, r));
|
|
4434
|
+
for (let n = 0; n < i; ++n) this.setCell(t + n, s);
|
|
4435
4435
|
} else for (let r = t; r < this.length; ++r) this.setCell(r, s);
|
|
4436
4436
|
this.getWidth(this.length - 1) === 2 && this.setCellFromCodepoint(this.length - 1, 0, 1, s);
|
|
4437
4437
|
}
|
|
4438
4438
|
deleteCells(t, i, s) {
|
|
4439
4439
|
if (t %= this.length, i < this.length - t) {
|
|
4440
4440
|
let r = new Se();
|
|
4441
|
-
for (let
|
|
4442
|
-
for (let
|
|
4441
|
+
for (let n = 0; n < this.length - t - i; ++n) this.setCell(t + n, this.loadCell(t + i + n, r));
|
|
4442
|
+
for (let n = this.length - i; n < this.length; ++n) this.setCell(n, s);
|
|
4443
4443
|
} else for (let r = t; r < this.length; ++r) this.setCell(r, s);
|
|
4444
4444
|
t && this.getWidth(t - 1) === 2 && this.setCellFromCodepoint(t - 1, 0, 1, s), this.getWidth(t) === 0 && !this.hasContent(t) && this.setCellFromCodepoint(t, 0, 1, s);
|
|
4445
4445
|
}
|
|
@@ -4451,7 +4451,7 @@ var Ps = class extends L {
|
|
|
4451
4451
|
for (t && this.getWidth(t - 1) === 2 && this.setCellFromCodepoint(t - 1, 0, 1, s), i < this.length && this.getWidth(i - 1) === 2 && this.setCellFromCodepoint(i, 0, 1, s); t < i && t < this.length; ) this.setCell(t++, s);
|
|
4452
4452
|
}
|
|
4453
4453
|
resize(t, i) {
|
|
4454
|
-
if (t === this.length) return this._data.length * 4 *
|
|
4454
|
+
if (t === this.length) return this._data.length * 4 * ni < this._data.buffer.byteLength;
|
|
4455
4455
|
let s = t * M;
|
|
4456
4456
|
if (t > this.length) {
|
|
4457
4457
|
if (this._data.buffer.byteLength >= s * 4) this._data = new Uint32Array(this._data.buffer, 0, s);
|
|
@@ -4463,20 +4463,20 @@ var Ps = class extends L {
|
|
|
4463
4463
|
} else {
|
|
4464
4464
|
this._data = this._data.subarray(0, s);
|
|
4465
4465
|
let r = Object.keys(this._combined);
|
|
4466
|
-
for (let
|
|
4467
|
-
let
|
|
4468
|
-
|
|
4466
|
+
for (let o = 0; o < r.length; o++) {
|
|
4467
|
+
let h = parseInt(r[o], 10);
|
|
4468
|
+
h >= t && delete this._combined[h];
|
|
4469
4469
|
}
|
|
4470
|
-
let
|
|
4471
|
-
for (let
|
|
4472
|
-
let
|
|
4473
|
-
|
|
4470
|
+
let n = Object.keys(this._extendedAttrs);
|
|
4471
|
+
for (let o = 0; o < n.length; o++) {
|
|
4472
|
+
let h = parseInt(n[o], 10);
|
|
4473
|
+
h >= t && delete this._extendedAttrs[h];
|
|
4474
4474
|
}
|
|
4475
4475
|
}
|
|
4476
|
-
return this.length = t, s * 4 *
|
|
4476
|
+
return this.length = t, s * 4 * ni < this._data.buffer.byteLength;
|
|
4477
4477
|
}
|
|
4478
4478
|
cleanupMemory() {
|
|
4479
|
-
if (this._data.length * 4 *
|
|
4479
|
+
if (this._data.length * 4 * ni < this._data.buffer.byteLength) {
|
|
4480
4480
|
let t = new Uint32Array(this._data.length);
|
|
4481
4481
|
return t.set(this._data), this._data = t, 1;
|
|
4482
4482
|
}
|
|
@@ -4512,42 +4512,42 @@ var Ps = class extends L {
|
|
|
4512
4512
|
for (let t = this.length - 1; t >= 0; --t) if (this._data[t * M + 0] & 4194303 || this._data[t * M + 2] & 50331648) return t + (this._data[t * M + 0] >> 22);
|
|
4513
4513
|
return 0;
|
|
4514
4514
|
}
|
|
4515
|
-
copyCellsFrom(t, i, s, r,
|
|
4516
|
-
let
|
|
4517
|
-
if (
|
|
4518
|
-
for (let a = 0; a < M; a++) this._data[(s +
|
|
4519
|
-
|
|
4515
|
+
copyCellsFrom(t, i, s, r, n) {
|
|
4516
|
+
let o = t._data;
|
|
4517
|
+
if (n) for (let l = r - 1; l >= 0; l--) {
|
|
4518
|
+
for (let a = 0; a < M; a++) this._data[(s + l) * M + a] = o[(i + l) * M + a];
|
|
4519
|
+
o[(i + l) * M + 2] & 268435456 && (this._extendedAttrs[s + l] = t._extendedAttrs[i + l]);
|
|
4520
4520
|
}
|
|
4521
|
-
else for (let
|
|
4522
|
-
for (let a = 0; a < M; a++) this._data[(s +
|
|
4523
|
-
|
|
4521
|
+
else for (let l = 0; l < r; l++) {
|
|
4522
|
+
for (let a = 0; a < M; a++) this._data[(s + l) * M + a] = o[(i + l) * M + a];
|
|
4523
|
+
o[(i + l) * M + 2] & 268435456 && (this._extendedAttrs[s + l] = t._extendedAttrs[i + l]);
|
|
4524
4524
|
}
|
|
4525
|
-
let
|
|
4526
|
-
for (let
|
|
4527
|
-
let a = parseInt(l
|
|
4525
|
+
let h = Object.keys(t._combined);
|
|
4526
|
+
for (let l = 0; l < h.length; l++) {
|
|
4527
|
+
let a = parseInt(h[l], 10);
|
|
4528
4528
|
a >= i && (this._combined[a - i + s] = t._combined[a]);
|
|
4529
4529
|
}
|
|
4530
4530
|
}
|
|
4531
4531
|
translateToString(t, i, s, r) {
|
|
4532
4532
|
i = i ?? 0, s = s ?? this.length, t && (s = Math.min(s, this.getTrimmedLength())), r && (r.length = 0);
|
|
4533
|
-
let
|
|
4533
|
+
let n = "";
|
|
4534
4534
|
for (; i < s; ) {
|
|
4535
|
-
let
|
|
4536
|
-
if (
|
|
4537
|
-
i +=
|
|
4535
|
+
let o = this._data[i * M + 0], h = o & 2097151, l = o & 2097152 ? this._combined[i] : h ? $e(h) : Ke;
|
|
4536
|
+
if (n += l, r) for (let a = 0; a < l.length; ++a) r.push(i);
|
|
4537
|
+
i += o >> 22 || 1;
|
|
4538
4538
|
}
|
|
4539
|
-
return r && r.push(i),
|
|
4539
|
+
return r && r.push(i), n;
|
|
4540
4540
|
}
|
|
4541
4541
|
};
|
|
4542
|
-
function
|
|
4543
|
-
let
|
|
4544
|
-
for (let
|
|
4545
|
-
let
|
|
4542
|
+
function ha(e, t, i, s, r, n) {
|
|
4543
|
+
let o = [];
|
|
4544
|
+
for (let h = 0; h < e.length - 1; h++) {
|
|
4545
|
+
let l = h, a = e.get(++l);
|
|
4546
4546
|
if (!a.isWrapped) continue;
|
|
4547
|
-
let d = [e.get(
|
|
4548
|
-
for (;
|
|
4549
|
-
if (!
|
|
4550
|
-
|
|
4547
|
+
let d = [e.get(h)];
|
|
4548
|
+
for (; l < e.length && a.isWrapped; ) d.push(a), a = e.get(++l);
|
|
4549
|
+
if (!n && s >= h && s < l) {
|
|
4550
|
+
h += d.length - 1;
|
|
4551
4551
|
continue;
|
|
4552
4552
|
}
|
|
4553
4553
|
let c = 0, _ = bt(d, c, t), f = 1, u = 0;
|
|
@@ -4558,17 +4558,17 @@ function la(e, t, i, s, r, o) {
|
|
|
4558
4558
|
d[c].replaceCells(_, i, r);
|
|
4559
4559
|
let g = 0;
|
|
4560
4560
|
for (let y = d.length - 1; y > 0 && (y > c || d[y].getTrimmedLength() === 0); y--) g++;
|
|
4561
|
-
g > 0 && (
|
|
4561
|
+
g > 0 && (o.push(h + d.length - g), o.push(g)), h += d.length - 1;
|
|
4562
4562
|
}
|
|
4563
|
-
return
|
|
4563
|
+
return o;
|
|
4564
4564
|
}
|
|
4565
|
-
function
|
|
4566
|
-
let i = [], s = 0, r = t[s],
|
|
4567
|
-
for (let
|
|
4568
|
-
let
|
|
4569
|
-
e.onDeleteEmitter.fire({ index:
|
|
4570
|
-
} else i.push(
|
|
4571
|
-
return { layout: i, countRemoved:
|
|
4565
|
+
function la(e, t) {
|
|
4566
|
+
let i = [], s = 0, r = t[s], n = 0;
|
|
4567
|
+
for (let o = 0; o < e.length; o++) if (r === o) {
|
|
4568
|
+
let h = t[++s];
|
|
4569
|
+
e.onDeleteEmitter.fire({ index: o - n, amount: h }), o += h - 1, n += h, r = t[++s];
|
|
4570
|
+
} else i.push(o);
|
|
4571
|
+
return { layout: i, countRemoved: n };
|
|
4572
4572
|
}
|
|
4573
4573
|
function ca(e, t) {
|
|
4574
4574
|
let i = [];
|
|
@@ -4577,19 +4577,19 @@ function ca(e, t) {
|
|
|
4577
4577
|
e.length = t.length;
|
|
4578
4578
|
}
|
|
4579
4579
|
function da(e, t, i) {
|
|
4580
|
-
let s = [], r = e.map((
|
|
4581
|
-
for (;
|
|
4582
|
-
if (r -
|
|
4583
|
-
s.push(r -
|
|
4580
|
+
let s = [], r = e.map((l, a) => bt(e, a, t)).reduce((l, a) => l + a), n = 0, o = 0, h = 0;
|
|
4581
|
+
for (; h < r; ) {
|
|
4582
|
+
if (r - h < i) {
|
|
4583
|
+
s.push(r - h);
|
|
4584
4584
|
break;
|
|
4585
4585
|
}
|
|
4586
|
-
|
|
4587
|
-
let
|
|
4588
|
-
|
|
4589
|
-
let a = e[
|
|
4590
|
-
a &&
|
|
4586
|
+
n += i;
|
|
4587
|
+
let l = bt(e, o, t);
|
|
4588
|
+
n > l && (n -= l, o++);
|
|
4589
|
+
let a = e[o].getWidth(n - 1) === 2;
|
|
4590
|
+
a && n--;
|
|
4591
4591
|
let d = a ? i - 1 : i;
|
|
4592
|
-
s.push(d),
|
|
4592
|
+
s.push(d), h += d;
|
|
4593
4593
|
}
|
|
4594
4594
|
return s;
|
|
4595
4595
|
}
|
|
@@ -4665,17 +4665,17 @@ var Ts = 4294967295, As = class {
|
|
|
4665
4665
|
resize(e, t) {
|
|
4666
4666
|
let i = this.getNullCell(Y), s = 0, r = this._getCorrectBufferLength(t);
|
|
4667
4667
|
if (r > this.lines.maxLength && (this.lines.maxLength = r), this.lines.length > 0) {
|
|
4668
|
-
if (this._cols < e) for (let
|
|
4669
|
-
let
|
|
4670
|
-
if (this._rows < t) for (let
|
|
4671
|
-
else for (let
|
|
4668
|
+
if (this._cols < e) for (let o = 0; o < this.lines.length; o++) s += +this.lines.get(o).resize(e, i);
|
|
4669
|
+
let n = 0;
|
|
4670
|
+
if (this._rows < t) for (let o = this._rows; o < t; o++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsMode || this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new pt(e, i)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + n + 1 ? (this.ybase--, n++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new pt(e, i)));
|
|
4671
|
+
else for (let o = this._rows; o > t; o--) this.lines.length > t + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
|
|
4672
4672
|
if (r < this.lines.maxLength) {
|
|
4673
|
-
let
|
|
4674
|
-
|
|
4673
|
+
let o = this.lines.length - r;
|
|
4674
|
+
o > 0 && (this.lines.trimStart(o), this.ybase = Math.max(this.ybase - o, 0), this.ydisp = Math.max(this.ydisp - o, 0), this.savedY = Math.max(this.savedY - o, 0)), this.lines.maxLength = r;
|
|
4675
4675
|
}
|
|
4676
|
-
this.x = Math.min(this.x, e - 1), this.y = Math.min(this.y, t - 1),
|
|
4676
|
+
this.x = Math.min(this.x, e - 1), this.y = Math.min(this.y, t - 1), n && (this.y += n), this.savedX = Math.min(this.savedX, e - 1), this.scrollTop = 0;
|
|
4677
4677
|
}
|
|
4678
|
-
if (this.scrollBottom = t - 1, this._isReflowEnabled && (this._reflow(e, t), this._cols > e)) for (let
|
|
4678
|
+
if (this.scrollBottom = t - 1, this._isReflowEnabled && (this._reflow(e, t), this._cols > e)) for (let n = 0; n < this.lines.length; n++) s += +this.lines.get(n).resize(e, i);
|
|
4679
4679
|
this._cols = e, this._rows = t, this._memoryCleanupQueue.clear(), s > 0.1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
|
|
4680
4680
|
}
|
|
4681
4681
|
_batchedMemoryCleanup() {
|
|
@@ -4693,9 +4693,9 @@ var Ts = 4294967295, As = class {
|
|
|
4693
4693
|
this._cols !== e && (e > this._cols ? this._reflowLarger(e, t) : this._reflowSmaller(e, t));
|
|
4694
4694
|
}
|
|
4695
4695
|
_reflowLarger(e, t) {
|
|
4696
|
-
let i = this._optionsService.rawOptions.reflowCursorLine, s =
|
|
4696
|
+
let i = this._optionsService.rawOptions.reflowCursorLine, s = ha(this.lines, this._cols, e, this.ybase + this.y, this.getNullCell(Y), i);
|
|
4697
4697
|
if (s.length > 0) {
|
|
4698
|
-
let r =
|
|
4698
|
+
let r = la(this.lines, s);
|
|
4699
4699
|
ca(this.lines, r.layout), this._reflowLargerAdjustViewport(e, t, r.countRemoved);
|
|
4700
4700
|
}
|
|
4701
4701
|
}
|
|
@@ -4705,54 +4705,54 @@ var Ts = 4294967295, As = class {
|
|
|
4705
4705
|
this.savedY = Math.max(this.savedY - i, 0);
|
|
4706
4706
|
}
|
|
4707
4707
|
_reflowSmaller(e, t) {
|
|
4708
|
-
let i = this._optionsService.rawOptions.reflowCursorLine, s = this.getNullCell(Y), r = [],
|
|
4709
|
-
for (let
|
|
4710
|
-
let
|
|
4711
|
-
if (!
|
|
4712
|
-
let
|
|
4713
|
-
for (;
|
|
4708
|
+
let i = this._optionsService.rawOptions.reflowCursorLine, s = this.getNullCell(Y), r = [], n = 0;
|
|
4709
|
+
for (let o = this.lines.length - 1; o >= 0; o--) {
|
|
4710
|
+
let h = this.lines.get(o);
|
|
4711
|
+
if (!h || !h.isWrapped && h.getTrimmedLength() <= e) continue;
|
|
4712
|
+
let l = [h];
|
|
4713
|
+
for (; h.isWrapped && o > 0; ) h = this.lines.get(--o), l.unshift(h);
|
|
4714
4714
|
if (!i) {
|
|
4715
4715
|
let P = this.ybase + this.y;
|
|
4716
|
-
if (P >=
|
|
4716
|
+
if (P >= o && P < o + l.length) continue;
|
|
4717
4717
|
}
|
|
4718
|
-
let a =
|
|
4718
|
+
let a = l[l.length - 1].getTrimmedLength(), d = da(l, this._cols, e), c = d.length - l.length, _;
|
|
4719
4719
|
this.ybase === 0 && this.y !== this.lines.length - 1 ? _ = Math.max(0, this.y - this.lines.maxLength + c) : _ = Math.max(0, this.lines.length - this.lines.maxLength + c);
|
|
4720
4720
|
let f = [];
|
|
4721
4721
|
for (let P = 0; P < c; P++) {
|
|
4722
4722
|
let B = this.getBlankLine(Y, !0);
|
|
4723
4723
|
f.push(B);
|
|
4724
4724
|
}
|
|
4725
|
-
f.length > 0 && (r.push({ start:
|
|
4725
|
+
f.length > 0 && (r.push({ start: o + l.length + n, newLines: f }), n += f.length), l.push(...f);
|
|
4726
4726
|
let u = d.length - 1, g = d[u];
|
|
4727
4727
|
g === 0 && (u--, g = d[u]);
|
|
4728
|
-
let y =
|
|
4728
|
+
let y = l.length - c - 1, E = a;
|
|
4729
4729
|
for (; y >= 0; ) {
|
|
4730
4730
|
let P = Math.min(E, g);
|
|
4731
|
-
if (
|
|
4732
|
-
if (
|
|
4731
|
+
if (l[u] === void 0) break;
|
|
4732
|
+
if (l[u].copyCellsFrom(l[y], E - P, g - P, P, !0), g -= P, g === 0 && (u--, g = d[u]), E -= P, E === 0) {
|
|
4733
4733
|
y--;
|
|
4734
4734
|
let B = Math.max(y, 0);
|
|
4735
|
-
E = bt(
|
|
4735
|
+
E = bt(l, B, this._cols);
|
|
4736
4736
|
}
|
|
4737
4737
|
}
|
|
4738
|
-
for (let P = 0; P <
|
|
4738
|
+
for (let P = 0; P < l.length; P++) d[P] < e && l[P].setCell(d[P], s);
|
|
4739
4739
|
let N = c - _;
|
|
4740
|
-
for (; N-- > 0; ) this.ybase === 0 ? this.y < t - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length +
|
|
4740
|
+
for (; N-- > 0; ) this.ybase === 0 ? this.y < t - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + n) - t && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
|
|
4741
4741
|
this.savedY = Math.min(this.savedY + c, this.ybase + t - 1);
|
|
4742
4742
|
}
|
|
4743
4743
|
if (r.length > 0) {
|
|
4744
|
-
let
|
|
4745
|
-
for (let g = 0; g < this.lines.length; g++)
|
|
4746
|
-
let
|
|
4747
|
-
this.lines.length = Math.min(this.lines.maxLength, this.lines.length +
|
|
4744
|
+
let o = [], h = [];
|
|
4745
|
+
for (let g = 0; g < this.lines.length; g++) h.push(this.lines.get(g));
|
|
4746
|
+
let l = this.lines.length, a = l - 1, d = 0, c = r[d];
|
|
4747
|
+
this.lines.length = Math.min(this.lines.maxLength, this.lines.length + n);
|
|
4748
4748
|
let _ = 0;
|
|
4749
|
-
for (let g = Math.min(this.lines.maxLength - 1,
|
|
4749
|
+
for (let g = Math.min(this.lines.maxLength - 1, l + n - 1); g >= 0; g--) if (c && c.start > a + _) {
|
|
4750
4750
|
for (let y = c.newLines.length - 1; y >= 0; y--) this.lines.set(g--, c.newLines[y]);
|
|
4751
|
-
g++,
|
|
4752
|
-
} else this.lines.set(g,
|
|
4751
|
+
g++, o.push({ index: a + 1, amount: c.newLines.length }), _ += c.newLines.length, c = r[++d];
|
|
4752
|
+
} else this.lines.set(g, h[a--]);
|
|
4753
4753
|
let f = 0;
|
|
4754
|
-
for (let g =
|
|
4755
|
-
let u = Math.max(0,
|
|
4754
|
+
for (let g = o.length - 1; g >= 0; g--) o[g].index += f, this.lines.onInsertEmitter.fire(o[g]), f += o[g].amount;
|
|
4755
|
+
let u = Math.max(0, l + n - this.lines.maxLength);
|
|
4756
4756
|
u > 0 && this.lines.onTrimEmitter.fire(u);
|
|
4757
4757
|
}
|
|
4758
4758
|
}
|
|
@@ -4847,13 +4847,13 @@ var Ts = 4294967295, As = class {
|
|
|
4847
4847
|
scroll(e, t = !1) {
|
|
4848
4848
|
let i = this.buffer, s;
|
|
4849
4849
|
s = this._cachedBlankLine, (!s || s.length !== this.cols || s.getFg(0) !== e.fg || s.getBg(0) !== e.bg) && (s = i.getBlankLine(e, t), this._cachedBlankLine = s), s.isWrapped = t;
|
|
4850
|
-
let r = i.ybase + i.scrollTop,
|
|
4850
|
+
let r = i.ybase + i.scrollTop, n = i.ybase + i.scrollBottom;
|
|
4851
4851
|
if (i.scrollTop === 0) {
|
|
4852
|
-
let
|
|
4853
|
-
|
|
4852
|
+
let o = i.lines.isFull;
|
|
4853
|
+
n === i.lines.length - 1 ? o ? i.lines.recycle().copyFrom(s) : i.lines.push(s.clone()) : i.lines.splice(n + 1, 0, s.clone()), o ? this.isUserScrolling && (i.ydisp = Math.max(i.ydisp - 1, 0)) : (i.ybase++, this.isUserScrolling || i.ydisp++);
|
|
4854
4854
|
} else {
|
|
4855
|
-
let
|
|
4856
|
-
i.lines.shiftElements(r + 1,
|
|
4855
|
+
let o = n - r + 1;
|
|
4856
|
+
i.lines.shiftElements(r + 1, o - 1, -1), i.lines.set(n, s.clone());
|
|
4857
4857
|
}
|
|
4858
4858
|
this.isUserScrolling || (i.ydisp = i.ybase), this._onScroll.fire(i.ydisp);
|
|
4859
4859
|
}
|
|
@@ -4867,7 +4867,7 @@ var Ts = 4294967295, As = class {
|
|
|
4867
4867
|
i.ydisp = Math.max(Math.min(i.ydisp + e, i.ybase), 0), s !== i.ydisp && (t || this._onScroll.fire(i.ydisp));
|
|
4868
4868
|
}
|
|
4869
4869
|
};
|
|
4870
|
-
Fi = q([S(0,
|
|
4870
|
+
Fi = q([S(0, le)], Fi);
|
|
4871
4871
|
var tt = { cols: 80, rows: 24, cursorBlink: !1, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: !0, drawBoldTextInBrightColors: !0, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: !1, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnEraseInDisplay: !1, scrollOnUserInput: !0, scrollSensitivity: 1, screenReaderMode: !1, smoothScrollDuration: 0, macOptionIsMeta: !1, macOptionClickForcesSelection: !1, minimumContrastRatio: 1, disableStdin: !1, allowProposedApi: !1, allowTransparency: !1, tabStopWidth: 8, theme: {}, reflowCursorLine: !1, rescaleOverlappingGlyphs: !1, rightClickSelectsWord: Kt, windowOptions: {}, windowsMode: !1, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: !0, convertEol: !1, termName: "xterm", cancelEvents: !1, overviewRuler: {} }, fa = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"], pa = class extends L {
|
|
4872
4872
|
constructor(e) {
|
|
4873
4873
|
super(), this._onOptionChange = this._register(new m()), this.onOptionChange = this._onOptionChange.event;
|
|
@@ -4970,21 +4970,21 @@ var Os = Object.freeze({ insertMode: !1 }), Is = Object.freeze({ applicationCurs
|
|
|
4970
4970
|
this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${e}"`), this._logService.trace("sending binary (codes)", () => e.split("").map((t) => t.charCodeAt(0))), this._onBinary.fire(e));
|
|
4971
4971
|
}
|
|
4972
4972
|
};
|
|
4973
|
-
$i = q([S(0,
|
|
4973
|
+
$i = q([S(0, he), S(1, or), S(2, le)], $i);
|
|
4974
4974
|
var Ns = { NONE: { events: 0, restrict: () => !1 }, X10: { events: 1, restrict: (e) => e.button === 4 || e.action !== 1 ? !1 : (e.ctrl = !1, e.alt = !1, e.shift = !1, !0) }, VT200: { events: 19, restrict: (e) => e.action !== 32 }, DRAG: { events: 23, restrict: (e) => !(e.action === 32 && e.button === 3) }, ANY: { events: 31, restrict: (e) => !0 } };
|
|
4975
|
-
function
|
|
4975
|
+
function oi(e, t) {
|
|
4976
4976
|
let i = (e.ctrl ? 16 : 0) | (e.shift ? 4 : 0) | (e.alt ? 8 : 0);
|
|
4977
4977
|
return e.button === 4 ? (i |= 64, i |= e.action) : (i |= e.button & 3, e.button & 4 && (i |= 64), e.button & 8 && (i |= 128), e.action === 32 ? i |= 32 : e.action === 0 && !t && (i |= 3)), i;
|
|
4978
4978
|
}
|
|
4979
4979
|
var ai = String.fromCharCode, Hs = { DEFAULT: (e) => {
|
|
4980
|
-
let t = [
|
|
4980
|
+
let t = [oi(e, !1) + 32, e.col + 32, e.row + 32];
|
|
4981
4981
|
return t[0] > 255 || t[1] > 255 || t[2] > 255 ? "" : `\x1B[M${ai(t[0])}${ai(t[1])}${ai(t[2])}`;
|
|
4982
4982
|
}, SGR: (e) => {
|
|
4983
4983
|
let t = e.action === 0 && e.button !== 4 ? "m" : "M";
|
|
4984
|
-
return `\x1B[<${
|
|
4984
|
+
return `\x1B[<${oi(e, !0)};${e.col};${e.row}${t}`;
|
|
4985
4985
|
}, SGR_PIXELS: (e) => {
|
|
4986
4986
|
let t = e.action === 0 && e.button !== 4 ? "m" : "M";
|
|
4987
|
-
return `\x1B[<${
|
|
4987
|
+
return `\x1B[<${oi(e, !0)};${e.x};${e.y}${t}`;
|
|
4988
4988
|
} }, Ki = class extends L {
|
|
4989
4989
|
constructor(e, t, i) {
|
|
4990
4990
|
super(), this._bufferService = e, this._coreService = t, this._optionsService = i, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._wheelPartialScroll = 0, this._onProtocolChange = this._register(new m()), this.onProtocolChange = this._onProtocolChange.event;
|
|
@@ -5041,8 +5041,8 @@ var ai = String.fromCharCode, Hs = { DEFAULT: (e) => {
|
|
|
5041
5041
|
return !(e.button !== t.button || e.action !== t.action || e.ctrl !== t.ctrl || e.alt !== t.alt || e.shift !== t.shift);
|
|
5042
5042
|
}
|
|
5043
5043
|
};
|
|
5044
|
-
Ki = q([S(0,
|
|
5045
|
-
var
|
|
5044
|
+
Ki = q([S(0, he), S(1, Qe), S(2, le)], Ki);
|
|
5045
|
+
var hi = [[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]], va = [[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]], G;
|
|
5046
5046
|
function ma(e, t) {
|
|
5047
5047
|
let i = 0, s = t.length - 1, r;
|
|
5048
5048
|
if (e < t[0][0] || e > t[s][1]) return !1;
|
|
@@ -5055,7 +5055,7 @@ var Sa = class {
|
|
|
5055
5055
|
constructor() {
|
|
5056
5056
|
if (this.version = "6", !G) {
|
|
5057
5057
|
G = new Uint8Array(65536), G.fill(1), G[0] = 0, G.fill(0, 1, 32), G.fill(0, 127, 160), G.fill(2, 4352, 4448), G[9001] = 2, G[9002] = 2, G.fill(2, 11904, 42192), G[12351] = 1, G.fill(2, 44032, 55204), G.fill(2, 63744, 64256), G.fill(2, 65040, 65050), G.fill(2, 65072, 65136), G.fill(2, 65280, 65377), G.fill(2, 65504, 65511);
|
|
5058
|
-
for (let e = 0; e <
|
|
5058
|
+
for (let e = 0; e < hi.length; ++e) G.fill(0, hi[e][0], hi[e][1] + 1);
|
|
5059
5059
|
}
|
|
5060
5060
|
}
|
|
5061
5061
|
wcwidth(e) {
|
|
@@ -5108,15 +5108,15 @@ var Sa = class {
|
|
|
5108
5108
|
}
|
|
5109
5109
|
getStringCellWidth(t) {
|
|
5110
5110
|
let i = 0, s = 0, r = t.length;
|
|
5111
|
-
for (let
|
|
5112
|
-
let
|
|
5113
|
-
if (55296 <=
|
|
5114
|
-
if (++
|
|
5115
|
-
let a = t.charCodeAt(
|
|
5116
|
-
56320 <= a && a <= 57343 ?
|
|
5111
|
+
for (let n = 0; n < r; ++n) {
|
|
5112
|
+
let o = t.charCodeAt(n);
|
|
5113
|
+
if (55296 <= o && o <= 56319) {
|
|
5114
|
+
if (++n >= r) return i + this.wcwidth(o);
|
|
5115
|
+
let a = t.charCodeAt(n);
|
|
5116
|
+
56320 <= a && a <= 57343 ? o = (o - 55296) * 1024 + a - 56320 + 65536 : i += this.wcwidth(a);
|
|
5117
5117
|
}
|
|
5118
|
-
let
|
|
5119
|
-
Wt.extractShouldJoin(
|
|
5118
|
+
let h = this.charProperties(o, s), l = Wt.extractWidth(h);
|
|
5119
|
+
Wt.extractShouldJoin(h) && (l -= Wt.extractWidth(s)), i += l, s = h;
|
|
5120
5120
|
}
|
|
5121
5121
|
return i;
|
|
5122
5122
|
}
|
|
@@ -5151,7 +5151,7 @@ var ct = 2147483647, ba = 256, Fr = class Ui {
|
|
|
5151
5151
|
if (!t.length) return i;
|
|
5152
5152
|
for (let s = Array.isArray(t[0]) ? 1 : 0; s < t.length; ++s) {
|
|
5153
5153
|
let r = t[s];
|
|
5154
|
-
if (Array.isArray(r)) for (let
|
|
5154
|
+
if (Array.isArray(r)) for (let n = 0; n < r.length; ++n) i.addSubParam(r[n]);
|
|
5155
5155
|
else i.addParam(r);
|
|
5156
5156
|
}
|
|
5157
5157
|
return i;
|
|
@@ -5375,11 +5375,11 @@ var zs = class {
|
|
|
5375
5375
|
for (let r = 0; r < e.length; r++) this.table[t << 8 | e[r]] = i << 4 | s;
|
|
5376
5376
|
}
|
|
5377
5377
|
}, me = 160, ka = function() {
|
|
5378
|
-
let e = new xa(4095), t = Array.apply(null, Array(256)).map((
|
|
5378
|
+
let e = new xa(4095), t = Array.apply(null, Array(256)).map((h, l) => l), i = (h, l) => t.slice(h, l), s = i(32, 127), r = i(0, 24);
|
|
5379
5379
|
r.push(25), r.push.apply(r, i(28, 32));
|
|
5380
|
-
let
|
|
5380
|
+
let n = i(0, 14), o;
|
|
5381
5381
|
e.setDefault(1, 0), e.addMany(s, 0, 2, 0);
|
|
5382
|
-
for (
|
|
5382
|
+
for (o in n) e.addMany([24, 26, 153, 154], o, 3, 0), e.addMany(i(128, 144), o, 3, 0), e.addMany(i(144, 152), o, 3, 0), e.add(156, o, 0, 0), e.add(27, o, 11, 1), e.add(157, o, 4, 8), e.addMany([152, 158, 159], o, 0, 7), e.add(155, o, 11, 3), e.add(144, o, 11, 9);
|
|
5383
5383
|
return e.addMany(r, 0, 3, 0), e.addMany(r, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(r, 8, 0, 8), e.addMany(r, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(r, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(r, 6, 3, 6), e.addMany(r, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(r, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(s, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(i(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(s, 7, 0, 7), e.addMany(r, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(i(64, 127), 3, 7, 0), e.addMany(i(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(i(48, 60), 4, 8, 4), e.addMany(i(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(i(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(i(64, 127), 6, 0, 0), e.addMany(i(32, 48), 3, 9, 5), e.addMany(i(32, 48), 5, 9, 5), e.addMany(i(48, 64), 5, 0, 6), e.addMany(i(64, 127), 5, 7, 0), e.addMany(i(32, 48), 4, 9, 5), e.addMany(i(32, 48), 1, 9, 2), e.addMany(i(32, 48), 2, 9, 2), e.addMany(i(48, 127), 2, 10, 0), e.addMany(i(48, 80), 1, 10, 0), e.addMany(i(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(i(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(r, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(i(28, 32), 9, 0, 9), e.addMany(i(32, 48), 9, 9, 12), e.addMany(i(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(r, 11, 0, 11), e.addMany(i(32, 128), 11, 0, 11), e.addMany(i(28, 32), 11, 0, 11), e.addMany(r, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(i(28, 32), 10, 0, 10), e.addMany(i(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(i(32, 48), 10, 9, 12), e.addMany(r, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(i(28, 32), 12, 0, 12), e.addMany(i(32, 48), 12, 9, 12), e.addMany(i(48, 64), 12, 0, 11), e.addMany(i(64, 127), 12, 12, 13), e.addMany(i(64, 127), 10, 12, 13), e.addMany(i(64, 127), 9, 12, 13), e.addMany(r, 13, 13, 13), e.addMany(s, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(me, 0, 2, 0), e.add(me, 8, 5, 8), e.add(me, 6, 0, 6), e.add(me, 11, 0, 11), e.add(me, 13, 13, 13), e;
|
|
5384
5384
|
}(), Ea = class extends L {
|
|
5385
5385
|
constructor(e = ka) {
|
|
@@ -5400,9 +5400,9 @@ var zs = class {
|
|
|
5400
5400
|
if (e.intermediates) {
|
|
5401
5401
|
if (e.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
|
|
5402
5402
|
for (let r = 0; r < e.intermediates.length; ++r) {
|
|
5403
|
-
let
|
|
5404
|
-
if (32 >
|
|
5405
|
-
i <<= 8, i |=
|
|
5403
|
+
let n = e.intermediates.charCodeAt(r);
|
|
5404
|
+
if (32 > n || n > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
|
|
5405
|
+
i <<= 8, i |= n;
|
|
5406
5406
|
}
|
|
5407
5407
|
}
|
|
5408
5408
|
if (e.final.length !== 1) throw new Error("final must be a single byte");
|
|
@@ -5491,53 +5491,53 @@ var zs = class {
|
|
|
5491
5491
|
this._parseStack.state = e, this._parseStack.handlers = t, this._parseStack.handlerPos = i, this._parseStack.transition = s, this._parseStack.chunkPos = r;
|
|
5492
5492
|
}
|
|
5493
5493
|
parse(e, t, i) {
|
|
5494
|
-
let s = 0, r = 0,
|
|
5495
|
-
if (this._parseStack.state) if (this._parseStack.state === 2) this._parseStack.state = 0,
|
|
5494
|
+
let s = 0, r = 0, n = 0, o;
|
|
5495
|
+
if (this._parseStack.state) if (this._parseStack.state === 2) this._parseStack.state = 0, n = this._parseStack.chunkPos + 1;
|
|
5496
5496
|
else {
|
|
5497
5497
|
if (i === void 0 || this._parseStack.state === 1) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
|
|
5498
|
-
let
|
|
5498
|
+
let h = this._parseStack.handlers, l = this._parseStack.handlerPos - 1;
|
|
5499
5499
|
switch (this._parseStack.state) {
|
|
5500
5500
|
case 3:
|
|
5501
|
-
if (i === !1 &&
|
|
5502
|
-
for (;
|
|
5501
|
+
if (i === !1 && l > -1) {
|
|
5502
|
+
for (; l >= 0 && (o = h[l](this._params), o !== !0); l--) if (o instanceof Promise) return this._parseStack.handlerPos = l, o;
|
|
5503
5503
|
}
|
|
5504
5504
|
this._parseStack.handlers = [];
|
|
5505
5505
|
break;
|
|
5506
5506
|
case 4:
|
|
5507
|
-
if (i === !1 &&
|
|
5508
|
-
for (;
|
|
5507
|
+
if (i === !1 && l > -1) {
|
|
5508
|
+
for (; l >= 0 && (o = h[l](), o !== !0); l--) if (o instanceof Promise) return this._parseStack.handlerPos = l, o;
|
|
5509
5509
|
}
|
|
5510
5510
|
this._parseStack.handlers = [];
|
|
5511
5511
|
break;
|
|
5512
5512
|
case 6:
|
|
5513
|
-
if (s = e[this._parseStack.chunkPos],
|
|
5513
|
+
if (s = e[this._parseStack.chunkPos], o = this._dcsParser.unhook(s !== 24 && s !== 26, i), o) return o;
|
|
5514
5514
|
s === 27 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
5515
5515
|
break;
|
|
5516
5516
|
case 5:
|
|
5517
|
-
if (s = e[this._parseStack.chunkPos],
|
|
5517
|
+
if (s = e[this._parseStack.chunkPos], o = this._oscParser.end(s !== 24 && s !== 26, i), o) return o;
|
|
5518
5518
|
s === 27 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
|
|
5519
5519
|
break;
|
|
5520
5520
|
}
|
|
5521
|
-
this._parseStack.state = 0,
|
|
5521
|
+
this._parseStack.state = 0, n = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = this._parseStack.transition & 15;
|
|
5522
5522
|
}
|
|
5523
|
-
for (let
|
|
5524
|
-
switch (s = e[
|
|
5523
|
+
for (let h = n; h < t; ++h) {
|
|
5524
|
+
switch (s = e[h], r = this._transitions.table[this.currentState << 8 | (s < 160 ? s : me)], r >> 4) {
|
|
5525
5525
|
case 2:
|
|
5526
|
-
for (let _ =
|
|
5526
|
+
for (let _ = h + 1; ; ++_) {
|
|
5527
5527
|
if (_ >= t || (s = e[_]) < 32 || s > 126 && s < me) {
|
|
5528
|
-
this._printHandler(e,
|
|
5528
|
+
this._printHandler(e, h, _), h = _ - 1;
|
|
5529
5529
|
break;
|
|
5530
5530
|
}
|
|
5531
5531
|
if (++_ >= t || (s = e[_]) < 32 || s > 126 && s < me) {
|
|
5532
|
-
this._printHandler(e,
|
|
5532
|
+
this._printHandler(e, h, _), h = _ - 1;
|
|
5533
5533
|
break;
|
|
5534
5534
|
}
|
|
5535
5535
|
if (++_ >= t || (s = e[_]) < 32 || s > 126 && s < me) {
|
|
5536
|
-
this._printHandler(e,
|
|
5536
|
+
this._printHandler(e, h, _), h = _ - 1;
|
|
5537
5537
|
break;
|
|
5538
5538
|
}
|
|
5539
5539
|
if (++_ >= t || (s = e[_]) < 32 || s > 126 && s < me) {
|
|
5540
|
-
this._printHandler(e,
|
|
5540
|
+
this._printHandler(e, h, _), h = _ - 1;
|
|
5541
5541
|
break;
|
|
5542
5542
|
}
|
|
5543
5543
|
}
|
|
@@ -5548,11 +5548,11 @@ var zs = class {
|
|
|
5548
5548
|
case 0:
|
|
5549
5549
|
break;
|
|
5550
5550
|
case 1:
|
|
5551
|
-
if (this._errorHandler({ position:
|
|
5551
|
+
if (this._errorHandler({ position: h, code: s, currentState: this.currentState, collect: this._collect, params: this._params, abort: !1 }).abort) return;
|
|
5552
5552
|
break;
|
|
5553
5553
|
case 7:
|
|
5554
|
-
let
|
|
5555
|
-
for (; a >= 0 && (
|
|
5554
|
+
let l = this._csiHandlers[this._collect << 8 | s], a = l ? l.length - 1 : -1;
|
|
5555
|
+
for (; a >= 0 && (o = l[a](this._params), o !== !0); a--) if (o instanceof Promise) return this._preserveStack(3, l, a, r, h), o;
|
|
5556
5556
|
a < 0 && this._csiHandlerFb(this._collect << 8 | s, this._params), this.precedingJoinState = 0;
|
|
5557
5557
|
break;
|
|
5558
5558
|
case 8:
|
|
@@ -5567,15 +5567,15 @@ var zs = class {
|
|
|
5567
5567
|
default:
|
|
5568
5568
|
this._params.addDigit(s - 48);
|
|
5569
5569
|
}
|
|
5570
|
-
while (++
|
|
5571
|
-
|
|
5570
|
+
while (++h < t && (s = e[h]) > 47 && s < 60);
|
|
5571
|
+
h--;
|
|
5572
5572
|
break;
|
|
5573
5573
|
case 9:
|
|
5574
5574
|
this._collect <<= 8, this._collect |= s;
|
|
5575
5575
|
break;
|
|
5576
5576
|
case 10:
|
|
5577
5577
|
let d = this._escHandlers[this._collect << 8 | s], c = d ? d.length - 1 : -1;
|
|
5578
|
-
for (; c >= 0 && (
|
|
5578
|
+
for (; c >= 0 && (o = d[c](), o !== !0); c--) if (o instanceof Promise) return this._preserveStack(4, d, c, r, h), o;
|
|
5579
5579
|
c < 0 && this._escHandlerFb(this._collect << 8 | s), this.precedingJoinState = 0;
|
|
5580
5580
|
break;
|
|
5581
5581
|
case 11:
|
|
@@ -5585,26 +5585,26 @@ var zs = class {
|
|
|
5585
5585
|
this._dcsParser.hook(this._collect << 8 | s, this._params);
|
|
5586
5586
|
break;
|
|
5587
5587
|
case 13:
|
|
5588
|
-
for (let _ =
|
|
5589
|
-
this._dcsParser.put(e,
|
|
5588
|
+
for (let _ = h + 1; ; ++_) if (_ >= t || (s = e[_]) === 24 || s === 26 || s === 27 || s > 127 && s < me) {
|
|
5589
|
+
this._dcsParser.put(e, h, _), h = _ - 1;
|
|
5590
5590
|
break;
|
|
5591
5591
|
}
|
|
5592
5592
|
break;
|
|
5593
5593
|
case 14:
|
|
5594
|
-
if (
|
|
5594
|
+
if (o = this._dcsParser.unhook(s !== 24 && s !== 26), o) return this._preserveStack(6, [], 0, r, h), o;
|
|
5595
5595
|
s === 27 && (r |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
|
5596
5596
|
break;
|
|
5597
5597
|
case 4:
|
|
5598
5598
|
this._oscParser.start();
|
|
5599
5599
|
break;
|
|
5600
5600
|
case 5:
|
|
5601
|
-
for (let _ =
|
|
5602
|
-
this._oscParser.put(e,
|
|
5601
|
+
for (let _ = h + 1; ; _++) if (_ >= t || (s = e[_]) < 32 || s > 127 && s < me) {
|
|
5602
|
+
this._oscParser.put(e, h, _), h = _ - 1;
|
|
5603
5603
|
break;
|
|
5604
5604
|
}
|
|
5605
5605
|
break;
|
|
5606
5606
|
case 6:
|
|
5607
|
-
if (
|
|
5607
|
+
if (o = this._oscParser.end(s !== 24 && s !== 26), o) return this._preserveStack(5, [], 0, r, h), o;
|
|
5608
5608
|
s === 27 && (r |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
|
5609
5609
|
break;
|
|
5610
5610
|
}
|
|
@@ -5625,13 +5625,13 @@ function Fs(e) {
|
|
|
5625
5625
|
} else if (t.indexOf("#") === 0 && (t = t.slice(1), Da.exec(t) && [3, 6, 9, 12].includes(t.length))) {
|
|
5626
5626
|
let i = t.length / 3, s = [0, 0, 0];
|
|
5627
5627
|
for (let r = 0; r < 3; ++r) {
|
|
5628
|
-
let
|
|
5629
|
-
s[r] = i === 1 ?
|
|
5628
|
+
let n = parseInt(t.slice(i * r, i * r + i), 16);
|
|
5629
|
+
s[r] = i === 1 ? n << 4 : i === 2 ? n : i === 3 ? n >> 4 : n >> 8;
|
|
5630
5630
|
}
|
|
5631
5631
|
return s;
|
|
5632
5632
|
}
|
|
5633
5633
|
}
|
|
5634
|
-
function
|
|
5634
|
+
function li(e, t) {
|
|
5635
5635
|
let i = e.toString(16), s = i.length < 2 ? "0" + i : i;
|
|
5636
5636
|
switch (t) {
|
|
5637
5637
|
case 4:
|
|
@@ -5646,7 +5646,7 @@ function hi(e, t) {
|
|
|
5646
5646
|
}
|
|
5647
5647
|
function Ra(e, t = 16) {
|
|
5648
5648
|
let [i, s, r] = e;
|
|
5649
|
-
return `rgb:${
|
|
5649
|
+
return `rgb:${li(i, t)}/${li(s, t)}/${li(r, t)}`;
|
|
5650
5650
|
}
|
|
5651
5651
|
var Ma = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, Fe = 131072, $s = 10;
|
|
5652
5652
|
function Ks(e, t) {
|
|
@@ -5700,8 +5700,8 @@ function Ks(e, t) {
|
|
|
5700
5700
|
return !1;
|
|
5701
5701
|
}
|
|
5702
5702
|
var Us = 5e3, qs = 0, La = class extends L {
|
|
5703
|
-
constructor(e, t, i, s, r, o,
|
|
5704
|
-
super(), this._bufferService = e, this._charsetService = t, this._coreService = i, this._logService = s, this._optionsService = r, this._oscLinkService =
|
|
5703
|
+
constructor(e, t, i, s, r, n, o, h, l = new Ea()) {
|
|
5704
|
+
super(), this._bufferService = e, this._charsetService = t, this._coreService = i, this._logService = s, this._optionsService = r, this._oscLinkService = n, this._coreMouseService = o, this._unicodeService = h, this._parser = l, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new Xr(), this._utf8Decoder = new jr(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = Y.clone(), this._eraseAttrDataInternal = Y.clone(), this._onRequestBell = this._register(new m()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this._register(new m()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this._register(new m()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this._register(new m()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this._register(new m()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this._register(new m()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this._register(new m()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this._register(new m()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this._register(new m()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this._register(new m()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this._register(new m()), this.onScroll = this._onScroll.event, this._onTitleChange = this._register(new m()), this.onTitleChange = this._onTitleChange.event, this._onColor = this._register(new m()), this.onColor = this._onColor.event, this._parseStack = { paused: !1, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this._register(this._parser), this._dirtyRowTracker = new qi(this._bufferService), this._activeBuffer = this._bufferService.buffer, this._register(this._bufferService.buffers.onBufferActivate((a) => this._activeBuffer = a.activeBuffer)), this._parser.setCsiHandlerFallback((a, d) => {
|
|
5705
5705
|
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(a), params: d.toArray() });
|
|
5706
5706
|
}), this._parser.setEscHandlerFallback((a) => {
|
|
5707
5707
|
this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(a) });
|
|
@@ -5731,40 +5731,40 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
5731
5731
|
return this._curAttrData.extended.urlId;
|
|
5732
5732
|
}
|
|
5733
5733
|
parse(e, t) {
|
|
5734
|
-
let i, s = this._activeBuffer.x, r = this._activeBuffer.y,
|
|
5735
|
-
if (
|
|
5734
|
+
let i, s = this._activeBuffer.x, r = this._activeBuffer.y, n = 0, o = this._parseStack.paused;
|
|
5735
|
+
if (o) {
|
|
5736
5736
|
if (i = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t)) return this._logSlowResolvingAsync(i), i;
|
|
5737
|
-
s = this._parseStack.cursorStartX, r = this._parseStack.cursorStartY, this._parseStack.paused = !1, e.length > Fe && (
|
|
5737
|
+
s = this._parseStack.cursorStartX, r = this._parseStack.cursorStartY, this._parseStack.paused = !1, e.length > Fe && (n = this._parseStack.position + Fe);
|
|
5738
5738
|
}
|
|
5739
|
-
if (this._logService.logLevel <= 1 && this._logService.debug(`parsing data ${typeof e == "string" ? ` "${e}"` : ` "${Array.prototype.map.call(e, (a) => String.fromCharCode(a)).join("")}"`}`), this._logService.logLevel === 0 && this._logService.trace("parsing data (codes)", typeof e == "string" ? e.split("").map((a) => a.charCodeAt(0)) : e), this._parseBuffer.length < e.length && this._parseBuffer.length < Fe && (this._parseBuffer = new Uint32Array(Math.min(e.length, Fe))),
|
|
5739
|
+
if (this._logService.logLevel <= 1 && this._logService.debug(`parsing data ${typeof e == "string" ? ` "${e}"` : ` "${Array.prototype.map.call(e, (a) => String.fromCharCode(a)).join("")}"`}`), this._logService.logLevel === 0 && this._logService.trace("parsing data (codes)", typeof e == "string" ? e.split("").map((a) => a.charCodeAt(0)) : e), this._parseBuffer.length < e.length && this._parseBuffer.length < Fe && (this._parseBuffer = new Uint32Array(Math.min(e.length, Fe))), o || this._dirtyRowTracker.clearRange(), e.length > Fe) for (let a = n; a < e.length; a += Fe) {
|
|
5740
5740
|
let d = a + Fe < e.length ? a + Fe : e.length, c = typeof e == "string" ? this._stringDecoder.decode(e.substring(a, d), this._parseBuffer) : this._utf8Decoder.decode(e.subarray(a, d), this._parseBuffer);
|
|
5741
5741
|
if (i = this._parser.parse(this._parseBuffer, c)) return this._preserveStack(s, r, c, a), this._logSlowResolvingAsync(i), i;
|
|
5742
5742
|
}
|
|
5743
|
-
else if (!
|
|
5743
|
+
else if (!o) {
|
|
5744
5744
|
let a = typeof e == "string" ? this._stringDecoder.decode(e, this._parseBuffer) : this._utf8Decoder.decode(e, this._parseBuffer);
|
|
5745
5745
|
if (i = this._parser.parse(this._parseBuffer, a)) return this._preserveStack(s, r, a, 0), this._logSlowResolvingAsync(i), i;
|
|
5746
5746
|
}
|
|
5747
5747
|
(this._activeBuffer.x !== s || this._activeBuffer.y !== r) && this._onCursorMove.fire();
|
|
5748
|
-
let
|
|
5749
|
-
|
|
5748
|
+
let h = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), l = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
|
|
5749
|
+
l < this._bufferService.rows && this._onRequestRefreshRows.fire({ start: Math.min(l, this._bufferService.rows - 1), end: Math.min(h, this._bufferService.rows - 1) });
|
|
5750
5750
|
}
|
|
5751
5751
|
print(e, t, i) {
|
|
5752
|
-
let s, r,
|
|
5752
|
+
let s, r, n = this._charsetService.charset, o = this._optionsService.rawOptions.screenReaderMode, h = this._bufferService.cols, l = this._coreService.decPrivateModes.wraparound, a = this._coreService.modes.insertMode, d = this._curAttrData, c = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
|
5753
5753
|
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i - t > 0 && c.getWidth(this._activeBuffer.x - 1) === 2 && c.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, d);
|
|
5754
5754
|
let _ = this._parser.precedingJoinState;
|
|
5755
5755
|
for (let f = t; f < i; ++f) {
|
|
5756
|
-
if (s = e[f], s < 127 &&
|
|
5757
|
-
let E =
|
|
5756
|
+
if (s = e[f], s < 127 && n) {
|
|
5757
|
+
let E = n[String.fromCharCode(s)];
|
|
5758
5758
|
E && (s = E.charCodeAt(0));
|
|
5759
5759
|
}
|
|
5760
5760
|
let u = this._unicodeService.charProperties(s, _);
|
|
5761
5761
|
r = je.extractWidth(u);
|
|
5762
5762
|
let g = je.extractShouldJoin(u), y = g ? je.extractWidth(_) : 0;
|
|
5763
|
-
if (_ = u,
|
|
5764
|
-
if (
|
|
5763
|
+
if (_ = u, o && this._onA11yChar.fire($e(s)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + r - y > h) {
|
|
5764
|
+
if (l) {
|
|
5765
5765
|
let E = c, N = this._activeBuffer.x - y;
|
|
5766
|
-
for (this._activeBuffer.x = y, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), c = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), y > 0 && c instanceof pt && c.copyCellsFrom(E, N, 0, y, !1); N <
|
|
5767
|
-
} else if (this._activeBuffer.x =
|
|
5766
|
+
for (this._activeBuffer.x = y, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), c = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), y > 0 && c instanceof pt && c.copyCellsFrom(E, N, 0, y, !1); N < h; ) E.setCellFromCodepoint(N++, 0, 1, d);
|
|
5767
|
+
} else if (this._activeBuffer.x = h - 1, r === 2) continue;
|
|
5768
5768
|
}
|
|
5769
5769
|
if (g && this._activeBuffer.x) {
|
|
5770
5770
|
let E = c.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
|
|
@@ -5772,9 +5772,9 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
5772
5772
|
for (let N = r - y; --N >= 0; ) c.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, d);
|
|
5773
5773
|
continue;
|
|
5774
5774
|
}
|
|
5775
|
-
if (a && (c.insertCells(this._activeBuffer.x, r - y, this._activeBuffer.getNullCell(d)), c.getWidth(
|
|
5775
|
+
if (a && (c.insertCells(this._activeBuffer.x, r - y, this._activeBuffer.getNullCell(d)), c.getWidth(h - 1) === 2 && c.setCellFromCodepoint(h - 1, 0, 1, d)), c.setCellFromCodepoint(this._activeBuffer.x++, s, r, d), r > 0) for (; --r; ) c.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, d);
|
|
5776
5776
|
}
|
|
5777
|
-
this._parser.precedingJoinState = _, this._activeBuffer.x <
|
|
5777
|
+
this._parser.precedingJoinState = _, this._activeBuffer.x < h && i - t > 0 && c.getWidth(this._activeBuffer.x) === 0 && !c.hasContent(this._activeBuffer.x) && c.setCellFromCodepoint(this._activeBuffer.x, 0, 1, d), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
|
5778
5778
|
}
|
|
5779
5779
|
registerCsiHandler(e, t) {
|
|
5780
5780
|
return e.final === "t" && !e.prefix && !e.intermediates ? this._parser.registerCsiHandler(e, (i) => Ks(i.params[0], this._optionsService.rawOptions.windowOptions) ? t(i) : !0) : this._parser.registerCsiHandler(e, t);
|
|
@@ -5889,8 +5889,8 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
5889
5889
|
return t === 1 && (this._curAttrData.bg |= 536870912), (t === 2 || t === 0) && (this._curAttrData.bg &= -536870913), !0;
|
|
5890
5890
|
}
|
|
5891
5891
|
_eraseInBufferLine(e, t, i, s = !1, r = !1) {
|
|
5892
|
-
let
|
|
5893
|
-
|
|
5892
|
+
let n = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
|
|
5893
|
+
n.replaceCells(t, i, this._activeBuffer.getNullCell(this._eraseAttrData()), r), s && (n.isWrapped = !1);
|
|
5894
5894
|
}
|
|
5895
5895
|
_resetBufferLine(e, t = !1) {
|
|
5896
5896
|
let i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
|
|
@@ -6018,14 +6018,14 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6018
6018
|
repeatPrecedingCharacter(e) {
|
|
6019
6019
|
let t = this._parser.precedingJoinState;
|
|
6020
6020
|
if (!t) return !0;
|
|
6021
|
-
let i = e.params[0] || 1, s = je.extractWidth(t), r = this._activeBuffer.x - s,
|
|
6022
|
-
for (let a = 0; a <
|
|
6023
|
-
let d =
|
|
6024
|
-
|
|
6021
|
+
let i = e.params[0] || 1, s = je.extractWidth(t), r = this._activeBuffer.x - s, n = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(r), o = new Uint32Array(n.length * i), h = 0;
|
|
6022
|
+
for (let a = 0; a < n.length; ) {
|
|
6023
|
+
let d = n.codePointAt(a) || 0;
|
|
6024
|
+
o[h++] = d, a += d > 65535 ? 2 : 1;
|
|
6025
6025
|
}
|
|
6026
|
-
let
|
|
6027
|
-
for (let a = 1; a < i; ++a)
|
|
6028
|
-
return this.print(
|
|
6026
|
+
let l = h;
|
|
6027
|
+
for (let a = 1; a < i; ++a) o.copyWithin(l, 0, h), l += h;
|
|
6028
|
+
return this.print(o, 0, l), !0;
|
|
6029
6029
|
}
|
|
6030
6030
|
sendDeviceAttributesPrimary(e) {
|
|
6031
6031
|
return e.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(p.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(p.ESC + "[?6c")), !0;
|
|
@@ -6199,26 +6199,26 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6199
6199
|
requestMode(e, t) {
|
|
6200
6200
|
let i;
|
|
6201
6201
|
((g) => (g[g.NOT_RECOGNIZED = 0] = "NOT_RECOGNIZED", g[g.SET = 1] = "SET", g[g.RESET = 2] = "RESET", g[g.PERMANENTLY_SET = 3] = "PERMANENTLY_SET", g[g.PERMANENTLY_RESET = 4] = "PERMANENTLY_RESET"))(i ||= {});
|
|
6202
|
-
let s = this._coreService.decPrivateModes, { activeProtocol: r, activeEncoding:
|
|
6203
|
-
return t ? u === 2 ? _(u, 4) : u === 4 ? _(u, f(
|
|
6202
|
+
let s = this._coreService.decPrivateModes, { activeProtocol: r, activeEncoding: n } = this._coreMouseService, o = this._coreService, { buffers: h, cols: l } = this._bufferService, { active: a, alt: d } = h, c = this._optionsService.rawOptions, _ = (g, y) => (o.triggerDataEvent(`${p.ESC}[${t ? "" : "?"}${g};${y}$y`), !0), f = (g) => g ? 1 : 2, u = e.params[0];
|
|
6203
|
+
return t ? u === 2 ? _(u, 4) : u === 4 ? _(u, f(o.modes.insertMode)) : u === 12 ? _(u, 3) : u === 20 ? _(u, f(c.convertEol)) : _(u, 0) : u === 1 ? _(u, f(s.applicationCursorKeys)) : u === 3 ? _(u, c.windowOptions.setWinLines ? l === 80 ? 2 : l === 132 ? 1 : 0 : 0) : u === 6 ? _(u, f(s.origin)) : u === 7 ? _(u, f(s.wraparound)) : u === 8 ? _(u, 3) : u === 9 ? _(u, f(r === "X10")) : u === 12 ? _(u, f(c.cursorBlink)) : u === 25 ? _(u, f(!o.isCursorHidden)) : u === 45 ? _(u, f(s.reverseWraparound)) : u === 66 ? _(u, f(s.applicationKeypad)) : u === 67 ? _(u, 4) : u === 1e3 ? _(u, f(r === "VT200")) : u === 1002 ? _(u, f(r === "DRAG")) : u === 1003 ? _(u, f(r === "ANY")) : u === 1004 ? _(u, f(s.sendFocus)) : u === 1005 ? _(u, 4) : u === 1006 ? _(u, f(n === "SGR")) : u === 1015 ? _(u, 4) : u === 1016 ? _(u, f(n === "SGR_PIXELS")) : u === 1048 ? _(u, 1) : u === 47 || u === 1047 || u === 1049 ? _(u, f(a === d)) : u === 2004 ? _(u, f(s.bracketedPasteMode)) : u === 2026 ? _(u, f(s.synchronizedOutput)) : _(u, 0);
|
|
6204
6204
|
}
|
|
6205
6205
|
_updateAttrColor(e, t, i, s, r) {
|
|
6206
6206
|
return t === 2 ? (e |= 50331648, e &= -16777216, e |= yt.fromColorRGB([i, s, r])) : t === 5 && (e &= -50331904, e |= 33554432 | i & 255), e;
|
|
6207
6207
|
}
|
|
6208
6208
|
_extractColor(e, t, i) {
|
|
6209
|
-
let s = [0, 0, -1, 0, 0, 0], r = 0,
|
|
6209
|
+
let s = [0, 0, -1, 0, 0, 0], r = 0, n = 0;
|
|
6210
6210
|
do {
|
|
6211
|
-
if (s[
|
|
6212
|
-
let
|
|
6211
|
+
if (s[n + r] = e.params[t + n], e.hasSubParams(t + n)) {
|
|
6212
|
+
let o = e.getSubParams(t + n), h = 0;
|
|
6213
6213
|
do
|
|
6214
|
-
s[1] === 5 && (r = 1), s[
|
|
6215
|
-
while (++
|
|
6214
|
+
s[1] === 5 && (r = 1), s[n + h + 1 + r] = o[h];
|
|
6215
|
+
while (++h < o.length && h + n + 1 + r < s.length);
|
|
6216
6216
|
break;
|
|
6217
6217
|
}
|
|
6218
|
-
if (s[1] === 5 &&
|
|
6218
|
+
if (s[1] === 5 && n + r >= 2 || s[1] === 2 && n + r >= 5) break;
|
|
6219
6219
|
s[1] && (r = 1);
|
|
6220
|
-
} while (++
|
|
6221
|
-
for (let
|
|
6220
|
+
} while (++n + t < e.length && n + r < s.length);
|
|
6221
|
+
for (let o = 2; o < s.length; ++o) s[o] === -1 && (s[o] = 0);
|
|
6222
6222
|
switch (s[0]) {
|
|
6223
6223
|
case 38:
|
|
6224
6224
|
i.fg = this._updateAttrColor(i.fg, s[1], s[3], s[4], s[5]);
|
|
@@ -6229,7 +6229,7 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6229
6229
|
case 58:
|
|
6230
6230
|
i.extended = i.extended.clone(), i.extended.underlineColor = this._updateAttrColor(i.extended.underlineColor, s[1], s[3], s[4], s[5]);
|
|
6231
6231
|
}
|
|
6232
|
-
return
|
|
6232
|
+
return n;
|
|
6233
6233
|
}
|
|
6234
6234
|
_processUnderline(e, t) {
|
|
6235
6235
|
t.extended = t.extended.clone(), (!~e || e > 5) && (e = 1), t.extended.underlineStyle = e, t.fg |= 268435456, e === 0 && (t.fg &= -268435457), t.updateExtended();
|
|
@@ -6333,11 +6333,11 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6333
6333
|
for (; i.length > 1; ) {
|
|
6334
6334
|
let s = i.shift(), r = i.shift();
|
|
6335
6335
|
if (/^\d+$/.exec(s)) {
|
|
6336
|
-
let
|
|
6337
|
-
if (Vs(
|
|
6336
|
+
let n = parseInt(s);
|
|
6337
|
+
if (Vs(n)) if (r === "?") t.push({ type: 0, index: n });
|
|
6338
6338
|
else {
|
|
6339
|
-
let
|
|
6340
|
-
|
|
6339
|
+
let o = Fs(r);
|
|
6340
|
+
o && t.push({ type: 1, index: n, color: o });
|
|
6341
6341
|
}
|
|
6342
6342
|
}
|
|
6343
6343
|
}
|
|
@@ -6351,7 +6351,7 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6351
6351
|
}
|
|
6352
6352
|
_createHyperlink(e, t) {
|
|
6353
6353
|
this._getCurrentLinkId() && this._finishHyperlink();
|
|
6354
|
-
let i = e.split(":"), s, r = i.findIndex((
|
|
6354
|
+
let i = e.split(":"), s, r = i.findIndex((n) => n.startsWith("id="));
|
|
6355
6355
|
return r !== -1 && (s = i[r].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: s, uri: t }), this._curAttrData.updateExtended(), !0;
|
|
6356
6356
|
}
|
|
6357
6357
|
_finishHyperlink() {
|
|
@@ -6443,7 +6443,7 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6443
6443
|
return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), !0;
|
|
6444
6444
|
}
|
|
6445
6445
|
requestStatusString(e, t) {
|
|
6446
|
-
let i = (
|
|
6446
|
+
let i = (o) => (this._coreService.triggerDataEvent(`${p.ESC}${o}${p.ESC}\\`), !0), s = this._bufferService.buffer, r = this._optionsService.rawOptions;
|
|
6447
6447
|
return i(e === '"q' ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : e === '"p' ? 'P1$r61;1"p' : e === "r" ? `P1$r${s.scrollTop + 1};${s.scrollBottom + 1}r` : e === "m" ? "P1$r0m" : e === " q" ? `P1$r${{ block: 2, underline: 4, bar: 6 }[r.cursorStyle] - (r.cursorBlink ? 1 : 0)} q` : "P0$r");
|
|
6448
6448
|
}
|
|
6449
6449
|
markRangeDirty(e, t) {
|
|
@@ -6466,7 +6466,7 @@ var Us = 5e3, qs = 0, La = class extends L {
|
|
|
6466
6466
|
this.markRangeDirty(0, this._bufferService.rows - 1);
|
|
6467
6467
|
}
|
|
6468
6468
|
};
|
|
6469
|
-
qi = q([S(0,
|
|
6469
|
+
qi = q([S(0, he)], qi);
|
|
6470
6470
|
function Vs(e) {
|
|
6471
6471
|
return 0 <= e && e < 256;
|
|
6472
6472
|
}
|
|
@@ -6508,14 +6508,14 @@ var Pa = 5e7, Ys = 12, Ta = 50, Aa = class extends L {
|
|
|
6508
6508
|
for (; this._writeBuffer.length > this._bufferOffset; ) {
|
|
6509
6509
|
let s = this._writeBuffer[this._bufferOffset], r = this._action(s, t);
|
|
6510
6510
|
if (r) {
|
|
6511
|
-
let
|
|
6512
|
-
r.catch((
|
|
6513
|
-
throw
|
|
6514
|
-
}), Promise.resolve(!1))).then(
|
|
6511
|
+
let o = (h) => performance.now() - i >= Ys ? setTimeout(() => this._innerWrite(0, h)) : this._innerWrite(i, h);
|
|
6512
|
+
r.catch((h) => (queueMicrotask(() => {
|
|
6513
|
+
throw h;
|
|
6514
|
+
}), Promise.resolve(!1))).then(o);
|
|
6515
6515
|
return;
|
|
6516
6516
|
}
|
|
6517
|
-
let
|
|
6518
|
-
if (
|
|
6517
|
+
let n = this._callbacks[this._bufferOffset];
|
|
6518
|
+
if (n && n(), this._bufferOffset++, this._pendingData -= s.length, performance.now() - i >= Ys) break;
|
|
6519
6519
|
}
|
|
6520
6520
|
this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > Ta && (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();
|
|
6521
6521
|
}
|
|
@@ -6526,13 +6526,13 @@ var Pa = 5e7, Ys = 12, Ta = 50, Aa = class extends L {
|
|
|
6526
6526
|
registerLink(e) {
|
|
6527
6527
|
let t = this._bufferService.buffer;
|
|
6528
6528
|
if (e.id === void 0) {
|
|
6529
|
-
let
|
|
6530
|
-
return
|
|
6529
|
+
let h = t.addMarker(t.ybase + t.y), l = { data: e, id: this._nextId++, lines: [h] };
|
|
6530
|
+
return h.onDispose(() => this._removeMarkerFromLink(l, h)), this._dataByLinkId.set(l.id, l), l.id;
|
|
6531
6531
|
}
|
|
6532
6532
|
let i = e, s = this._getEntryIdKey(i), r = this._entriesWithId.get(s);
|
|
6533
6533
|
if (r) return this.addLineToLink(r.id, t.ybase + t.y), r.id;
|
|
6534
|
-
let
|
|
6535
|
-
return
|
|
6534
|
+
let n = t.addMarker(t.ybase + t.y), o = { id: this._nextId++, key: this._getEntryIdKey(i), data: i, lines: [n] };
|
|
6535
|
+
return n.onDispose(() => this._removeMarkerFromLink(o, n)), this._entriesWithId.set(o.key, o), this._dataByLinkId.set(o.id, o), o.id;
|
|
6536
6536
|
}
|
|
6537
6537
|
addLineToLink(e, t) {
|
|
6538
6538
|
let i = this._dataByLinkId.get(e);
|
|
@@ -6552,12 +6552,12 @@ var Pa = 5e7, Ys = 12, Ta = 50, Aa = class extends L {
|
|
|
6552
6552
|
i !== -1 && (e.lines.splice(i, 1), e.lines.length === 0 && (e.data.id !== void 0 && this._entriesWithId.delete(e.key), this._dataByLinkId.delete(e.id)));
|
|
6553
6553
|
}
|
|
6554
6554
|
};
|
|
6555
|
-
Vi = q([S(0,
|
|
6555
|
+
Vi = q([S(0, he)], Vi);
|
|
6556
6556
|
var Xs = !1, Oa = class extends L {
|
|
6557
6557
|
constructor(e) {
|
|
6558
|
-
super(), this._windowsWrappingHeuristics = this._register(new st()), this._onBinary = this._register(new m()), this.onBinary = this._onBinary.event, this._onData = this._register(new m()), this.onData = this._onData.event, this._onLineFeed = this._register(new m()), this.onLineFeed = this._onLineFeed.event, this._onResize = this._register(new m()), this.onResize = this._onResize.event, this._onWriteParsed = this._register(new m()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this._register(new m()), this._instantiationService = new
|
|
6558
|
+
super(), this._windowsWrappingHeuristics = this._register(new st()), this._onBinary = this._register(new m()), this.onBinary = this._onBinary.event, this._onData = this._register(new m()), this.onData = this._onData.event, this._onLineFeed = this._register(new m()), this.onLineFeed = this._onLineFeed.event, this._onResize = this._register(new m()), this.onResize = this._onResize.event, this._onWriteParsed = this._register(new m()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this._register(new m()), this._instantiationService = new na(), this.optionsService = this._register(new pa(e)), this._instantiationService.setService(le, this.optionsService), this._bufferService = this._register(this._instantiationService.createInstance(Fi)), this._instantiationService.setService(he, this._bufferService), this._logService = this._register(this._instantiationService.createInstance(zi)), this._instantiationService.setService(or, this._logService), this.coreService = this._register(this._instantiationService.createInstance($i)), this._instantiationService.setService(Qe, this.coreService), this.coreMouseService = this._register(this._instantiationService.createInstance(Ki)), this._instantiationService.setService(nr, this.coreMouseService), this.unicodeService = this._register(this._instantiationService.createInstance(je)), this._instantiationService.setService(Qr, this.unicodeService), this._charsetService = this._instantiationService.createInstance(wa), this._instantiationService.setService(Zr, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(Vi), this._instantiationService.setService(ar, this._oscLinkService), this._inputHandler = this._register(new La(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this._register(ne.forward(this._inputHandler.onLineFeed, this._onLineFeed)), this._register(this._inputHandler), this._register(ne.forward(this._bufferService.onResize, this._onResize)), this._register(ne.forward(this.coreService.onData, this._onData)), this._register(ne.forward(this.coreService.onBinary, this._onBinary)), this._register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom(!0))), this._register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this._register(this.optionsService.onMultipleOptionChange(["windowsMode", "windowsPty"], () => this._handleWindowsPtyOptionChange())), this._register(this._bufferService.onScroll(() => {
|
|
6559
6559
|
this._onScroll.fire({ position: this._bufferService.buffer.ydisp }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
|
6560
|
-
})), this._writeBuffer = this._register(new Aa((t, i) => this._inputHandler.parse(t, i))), this._register(
|
|
6560
|
+
})), this._writeBuffer = this._register(new Aa((t, i) => this._inputHandler.parse(t, i))), this._register(ne.forward(this._writeBuffer.onWriteParsed, this._onWriteParsed));
|
|
6561
6561
|
}
|
|
6562
6562
|
get onScroll() {
|
|
6563
6563
|
return this._onScrollApi || (this._onScrollApi = this._register(new m()), this._onScroll.event((e) => {
|
|
@@ -6642,7 +6642,7 @@ var Xs = !1, Oa = class extends L {
|
|
|
6642
6642
|
}
|
|
6643
6643
|
}, Ia = { 48: ["0", ")"], 49: ["1", "!"], 50: ["2", "@"], 51: ["3", "#"], 52: ["4", "$"], 53: ["5", "%"], 54: ["6", "^"], 55: ["7", "&"], 56: ["8", "*"], 57: ["9", "("], 186: [";", ":"], 187: ["=", "+"], 188: [",", "<"], 189: ["-", "_"], 190: [".", ">"], 191: ["/", "?"], 192: ["`", "~"], 219: ["[", "{"], 220: ["\\", "|"], 221: ["]", "}"], 222: ["'", '"'] };
|
|
6644
6644
|
function Na(e, t, i, s) {
|
|
6645
|
-
let r = { type: 0, cancel: !1, key: void 0 },
|
|
6645
|
+
let r = { type: 0, cancel: !1, key: void 0 }, n = (e.shiftKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.ctrlKey ? 4 : 0) | (e.metaKey ? 8 : 0);
|
|
6646
6646
|
switch (e.keyCode) {
|
|
6647
6647
|
case 0:
|
|
6648
6648
|
e.key === "UIKeyInputUpArrow" ? t ? r.key = p.ESC + "OA" : r.key = p.ESC + "[A" : e.key === "UIKeyInputLeftArrow" ? t ? r.key = p.ESC + "OD" : r.key = p.ESC + "[D" : e.key === "UIKeyInputRightArrow" ? t ? r.key = p.ESC + "OC" : r.key = p.ESC + "[C" : e.key === "UIKeyInputDownArrow" && (t ? r.key = p.ESC + "OB" : r.key = p.ESC + "[B");
|
|
@@ -6665,86 +6665,86 @@ function Na(e, t, i, s) {
|
|
|
6665
6665
|
break;
|
|
6666
6666
|
case 37:
|
|
6667
6667
|
if (e.metaKey) break;
|
|
6668
|
-
|
|
6668
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "D" : t ? r.key = p.ESC + "OD" : r.key = p.ESC + "[D";
|
|
6669
6669
|
break;
|
|
6670
6670
|
case 39:
|
|
6671
6671
|
if (e.metaKey) break;
|
|
6672
|
-
|
|
6672
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "C" : t ? r.key = p.ESC + "OC" : r.key = p.ESC + "[C";
|
|
6673
6673
|
break;
|
|
6674
6674
|
case 38:
|
|
6675
6675
|
if (e.metaKey) break;
|
|
6676
|
-
|
|
6676
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "A" : t ? r.key = p.ESC + "OA" : r.key = p.ESC + "[A";
|
|
6677
6677
|
break;
|
|
6678
6678
|
case 40:
|
|
6679
6679
|
if (e.metaKey) break;
|
|
6680
|
-
|
|
6680
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "B" : t ? r.key = p.ESC + "OB" : r.key = p.ESC + "[B";
|
|
6681
6681
|
break;
|
|
6682
6682
|
case 45:
|
|
6683
6683
|
!e.shiftKey && !e.ctrlKey && (r.key = p.ESC + "[2~");
|
|
6684
6684
|
break;
|
|
6685
6685
|
case 46:
|
|
6686
|
-
|
|
6686
|
+
n ? r.key = p.ESC + "[3;" + (n + 1) + "~" : r.key = p.ESC + "[3~";
|
|
6687
6687
|
break;
|
|
6688
6688
|
case 36:
|
|
6689
|
-
|
|
6689
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "H" : t ? r.key = p.ESC + "OH" : r.key = p.ESC + "[H";
|
|
6690
6690
|
break;
|
|
6691
6691
|
case 35:
|
|
6692
|
-
|
|
6692
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "F" : t ? r.key = p.ESC + "OF" : r.key = p.ESC + "[F";
|
|
6693
6693
|
break;
|
|
6694
6694
|
case 33:
|
|
6695
|
-
e.shiftKey ? r.type = 2 : e.ctrlKey ? r.key = p.ESC + "[5;" + (
|
|
6695
|
+
e.shiftKey ? r.type = 2 : e.ctrlKey ? r.key = p.ESC + "[5;" + (n + 1) + "~" : r.key = p.ESC + "[5~";
|
|
6696
6696
|
break;
|
|
6697
6697
|
case 34:
|
|
6698
|
-
e.shiftKey ? r.type = 3 : e.ctrlKey ? r.key = p.ESC + "[6;" + (
|
|
6698
|
+
e.shiftKey ? r.type = 3 : e.ctrlKey ? r.key = p.ESC + "[6;" + (n + 1) + "~" : r.key = p.ESC + "[6~";
|
|
6699
6699
|
break;
|
|
6700
6700
|
case 112:
|
|
6701
|
-
|
|
6701
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "P" : r.key = p.ESC + "OP";
|
|
6702
6702
|
break;
|
|
6703
6703
|
case 113:
|
|
6704
|
-
|
|
6704
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "Q" : r.key = p.ESC + "OQ";
|
|
6705
6705
|
break;
|
|
6706
6706
|
case 114:
|
|
6707
|
-
|
|
6707
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "R" : r.key = p.ESC + "OR";
|
|
6708
6708
|
break;
|
|
6709
6709
|
case 115:
|
|
6710
|
-
|
|
6710
|
+
n ? r.key = p.ESC + "[1;" + (n + 1) + "S" : r.key = p.ESC + "OS";
|
|
6711
6711
|
break;
|
|
6712
6712
|
case 116:
|
|
6713
|
-
|
|
6713
|
+
n ? r.key = p.ESC + "[15;" + (n + 1) + "~" : r.key = p.ESC + "[15~";
|
|
6714
6714
|
break;
|
|
6715
6715
|
case 117:
|
|
6716
|
-
|
|
6716
|
+
n ? r.key = p.ESC + "[17;" + (n + 1) + "~" : r.key = p.ESC + "[17~";
|
|
6717
6717
|
break;
|
|
6718
6718
|
case 118:
|
|
6719
|
-
|
|
6719
|
+
n ? r.key = p.ESC + "[18;" + (n + 1) + "~" : r.key = p.ESC + "[18~";
|
|
6720
6720
|
break;
|
|
6721
6721
|
case 119:
|
|
6722
|
-
|
|
6722
|
+
n ? r.key = p.ESC + "[19;" + (n + 1) + "~" : r.key = p.ESC + "[19~";
|
|
6723
6723
|
break;
|
|
6724
6724
|
case 120:
|
|
6725
|
-
|
|
6725
|
+
n ? r.key = p.ESC + "[20;" + (n + 1) + "~" : r.key = p.ESC + "[20~";
|
|
6726
6726
|
break;
|
|
6727
6727
|
case 121:
|
|
6728
|
-
|
|
6728
|
+
n ? r.key = p.ESC + "[21;" + (n + 1) + "~" : r.key = p.ESC + "[21~";
|
|
6729
6729
|
break;
|
|
6730
6730
|
case 122:
|
|
6731
|
-
|
|
6731
|
+
n ? r.key = p.ESC + "[23;" + (n + 1) + "~" : r.key = p.ESC + "[23~";
|
|
6732
6732
|
break;
|
|
6733
6733
|
case 123:
|
|
6734
|
-
|
|
6734
|
+
n ? r.key = p.ESC + "[24;" + (n + 1) + "~" : r.key = p.ESC + "[24~";
|
|
6735
6735
|
break;
|
|
6736
6736
|
default:
|
|
6737
6737
|
if (e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey) e.keyCode >= 65 && e.keyCode <= 90 ? r.key = String.fromCharCode(e.keyCode - 64) : e.keyCode === 32 ? r.key = p.NUL : e.keyCode >= 51 && e.keyCode <= 55 ? r.key = String.fromCharCode(e.keyCode - 51 + 27) : e.keyCode === 56 ? r.key = p.DEL : e.keyCode === 219 ? r.key = p.ESC : e.keyCode === 220 ? r.key = p.FS : e.keyCode === 221 && (r.key = p.GS);
|
|
6738
6738
|
else if ((!i || s) && e.altKey && !e.metaKey) {
|
|
6739
|
-
let
|
|
6740
|
-
if (
|
|
6739
|
+
let o = Ia[e.keyCode]?.[e.shiftKey ? 1 : 0];
|
|
6740
|
+
if (o) r.key = p.ESC + o;
|
|
6741
6741
|
else if (e.keyCode >= 65 && e.keyCode <= 90) {
|
|
6742
|
-
let
|
|
6743
|
-
e.shiftKey && (
|
|
6742
|
+
let h = e.ctrlKey ? e.keyCode - 64 : e.keyCode + 32, l = String.fromCharCode(h);
|
|
6743
|
+
e.shiftKey && (l = l.toUpperCase()), r.key = p.ESC + l;
|
|
6744
6744
|
} else if (e.keyCode === 32) r.key = p.ESC + (e.ctrlKey ? p.NUL : " ");
|
|
6745
6745
|
else if (e.key === "Dead" && e.code.startsWith("Key")) {
|
|
6746
|
-
let
|
|
6747
|
-
e.shiftKey || (
|
|
6746
|
+
let h = e.code.slice(3, 4);
|
|
6747
|
+
e.shiftKey || (h = h.toLowerCase()), r.key = p.ESC + h, r.cancel = !0;
|
|
6748
6748
|
}
|
|
6749
6749
|
} else i && !e.altKey && !e.ctrlKey && !e.shiftKey && e.metaKey ? e.keyCode === 65 && (r.type = 1) : e.key && !e.ctrlKey && !e.altKey && !e.metaKey && e.keyCode >= 48 && e.key.length === 1 ? r.key = e.key : e.key && e.ctrlKey && (e.key === "_" && (r.key = p.US), e.key === "@" && (r.key = p.NUL));
|
|
6750
6750
|
break;
|
|
@@ -6762,7 +6762,7 @@ var V = 0, Ha = class {
|
|
|
6762
6762
|
this._flushCleanupDeleted(), this._insertedValues.length === 0 && this._flushInsertedTask.enqueue(() => this._flushInserted()), this._insertedValues.push(e);
|
|
6763
6763
|
}
|
|
6764
6764
|
_flushInserted() {
|
|
6765
|
-
let e = this._insertedValues.sort((r,
|
|
6765
|
+
let e = this._insertedValues.sort((r, n) => this._getKey(r) - this._getKey(n)), t = 0, i = 0, s = new Array(this._array.length + this._insertedValues.length);
|
|
6766
6766
|
for (let r = 0; r < s.length; r++) i >= this._array.length || this._getKey(e[t]) <= this._getKey(this._array[i]) ? (s[r] = e[t], t++) : s[r] = this._array[i++];
|
|
6767
6767
|
this._array = s, this._insertedValues.length = 0;
|
|
6768
6768
|
}
|
|
@@ -6780,7 +6780,7 @@ var V = 0, Ha = class {
|
|
|
6780
6780
|
}
|
|
6781
6781
|
_flushDeleted() {
|
|
6782
6782
|
this._isFlushingDeleted = !0;
|
|
6783
|
-
let e = this._deletedIndices.sort((r,
|
|
6783
|
+
let e = this._deletedIndices.sort((r, n) => r - n), t = 0, i = new Array(this._array.length - e.length), s = 0;
|
|
6784
6784
|
for (let r = 0; r < this._array.length; r++) e[t] === r ? t++ : i[s++] = this._array[r];
|
|
6785
6785
|
this._array = i, this._deletedIndices.length = 0, this._isFlushingDeleted = !1;
|
|
6786
6786
|
}
|
|
@@ -6837,7 +6837,7 @@ var V = 0, Ha = class {
|
|
|
6837
6837
|
}
|
|
6838
6838
|
*getDecorationsAtCell(e, t, i) {
|
|
6839
6839
|
let s = 0, r = 0;
|
|
6840
|
-
for (let
|
|
6840
|
+
for (let n of this._decorations.getKeyIterator(t)) s = n.options.x ?? 0, r = s + (n.options.width ?? 1), e >= s && e < r && (!i || (n.options.layer ?? "bottom") === i) && (yield n);
|
|
6841
6841
|
}
|
|
6842
6842
|
forEachDecorationAtCell(e, t, i, s) {
|
|
6843
6843
|
this._decorations.forEachByKey(t, (r) => {
|
|
@@ -6869,10 +6869,10 @@ var V = 0, Ha = class {
|
|
|
6869
6869
|
let s = performance.now();
|
|
6870
6870
|
if (s - this._lastRefreshMs >= this._debounceThresholdMS) this._lastRefreshMs = s, this._innerRefresh();
|
|
6871
6871
|
else if (!this._additionalRefreshRequested) {
|
|
6872
|
-
let r = s - this._lastRefreshMs,
|
|
6872
|
+
let r = s - this._lastRefreshMs, n = this._debounceThresholdMS - r;
|
|
6873
6873
|
this._additionalRefreshRequested = !0, this._refreshTimeoutID = window.setTimeout(() => {
|
|
6874
6874
|
this._lastRefreshMs = performance.now(), this._innerRefresh(), this._additionalRefreshRequested = !1, this._refreshTimeoutID = void 0;
|
|
6875
|
-
},
|
|
6875
|
+
}, n);
|
|
6876
6876
|
}
|
|
6877
6877
|
}
|
|
6878
6878
|
_innerRefresh() {
|
|
@@ -6885,10 +6885,10 @@ var V = 0, Ha = class {
|
|
|
6885
6885
|
super(), this._terminal = e, this._coreBrowserService = i, this._renderService = s, this._rowColumns = /* @__PURE__ */ new WeakMap(), this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "";
|
|
6886
6886
|
let r = this._coreBrowserService.mainDocument;
|
|
6887
6887
|
this._accessibilityContainer = r.createElement("div"), this._accessibilityContainer.classList.add("xterm-accessibility"), this._rowContainer = r.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
|
|
6888
|
-
for (let
|
|
6889
|
-
if (this._topBoundaryFocusListener = (
|
|
6890
|
-
this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this._register(this._terminal.onResize((
|
|
6891
|
-
`))), this._register(this._terminal.onA11yTab((
|
|
6888
|
+
for (let n = 0; n < this._terminal.rows; n++) this._rowElements[n] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[n]);
|
|
6889
|
+
if (this._topBoundaryFocusListener = (n) => this._handleBoundaryFocus(n, 0), this._bottomBoundaryFocusListener = (n) => this._handleBoundaryFocus(n, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = r.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this._register(new $a(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
|
|
6890
|
+
this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this._register(this._terminal.onResize((n) => this._handleResize(n.rows))), this._register(this._terminal.onRender((n) => this._refreshRows(n.start, n.end))), this._register(this._terminal.onScroll(() => this._refreshRows())), this._register(this._terminal.onA11yChar((n) => this._handleChar(n))), this._register(this._terminal.onLineFeed(() => this._handleChar(`
|
|
6891
|
+
`))), this._register(this._terminal.onA11yTab((n) => this._handleTab(n))), this._register(this._terminal.onKey((n) => this._handleKey(n.key))), this._register(this._terminal.onBlur(() => this._clearLiveRegion())), this._register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions())), this._register(D(r, "selectionchange", () => this._handleSelectionChange())), this._register(this._coreBrowserService.onDprChange(() => this._refreshRowsDimensions())), this._refreshRowsDimensions(), this._refreshRows(), this._register(z(() => {
|
|
6892
6892
|
this._accessibilityContainer.remove(), this._rowElements.length = 0;
|
|
6893
6893
|
}));
|
|
6894
6894
|
}
|
|
@@ -6911,8 +6911,8 @@ var V = 0, Ha = class {
|
|
|
6911
6911
|
_renderRows(e, t) {
|
|
6912
6912
|
let i = this._terminal.buffer, s = i.lines.length.toString();
|
|
6913
6913
|
for (let r = e; r <= t; r++) {
|
|
6914
|
-
let
|
|
6915
|
-
a && (
|
|
6914
|
+
let n = i.lines.get(i.ydisp + r), o = [], h = n?.translateToString(!0, void 0, void 0, o) || "", l = (i.ydisp + r + 1).toString(), a = this._rowElements[r];
|
|
6915
|
+
a && (h.length === 0 ? (a.textContent = " ", this._rowColumns.set(a, [0, 1])) : (a.textContent = h, this._rowColumns.set(a, o)), a.setAttribute("aria-posinset", l), a.setAttribute("aria-setsize", s), this._alignRowWidth(a));
|
|
6916
6916
|
}
|
|
6917
6917
|
this._announceCharacters();
|
|
6918
6918
|
}
|
|
@@ -6920,15 +6920,15 @@ var V = 0, Ha = class {
|
|
|
6920
6920
|
this._charsToAnnounce.length !== 0 && (this._liveRegion.textContent += this._charsToAnnounce, this._charsToAnnounce = "");
|
|
6921
6921
|
}
|
|
6922
6922
|
_handleBoundaryFocus(e, t) {
|
|
6923
|
-
let i = e.target, s = this._rowElements[t === 0 ? 1 : this._rowElements.length - 2], r = i.getAttribute("aria-posinset"),
|
|
6924
|
-
if (r ===
|
|
6925
|
-
let
|
|
6926
|
-
if (t === 0 ? (
|
|
6927
|
-
let
|
|
6928
|
-
this._rowElements.unshift(
|
|
6923
|
+
let i = e.target, s = this._rowElements[t === 0 ? 1 : this._rowElements.length - 2], r = i.getAttribute("aria-posinset"), n = t === 0 ? "1" : `${this._terminal.buffer.lines.length}`;
|
|
6924
|
+
if (r === n || e.relatedTarget !== s) return;
|
|
6925
|
+
let o, h;
|
|
6926
|
+
if (t === 0 ? (o = i, h = this._rowElements.pop(), this._rowContainer.removeChild(h)) : (o = this._rowElements.shift(), h = i, this._rowContainer.removeChild(o)), o.removeEventListener("focus", this._topBoundaryFocusListener), h.removeEventListener("focus", this._bottomBoundaryFocusListener), t === 0) {
|
|
6927
|
+
let l = this._createAccessibilityTreeNode();
|
|
6928
|
+
this._rowElements.unshift(l), this._rowContainer.insertAdjacentElement("afterbegin", l);
|
|
6929
6929
|
} else {
|
|
6930
|
-
let
|
|
6931
|
-
this._rowElements.push(
|
|
6930
|
+
let l = this._createAccessibilityTreeNode();
|
|
6931
|
+
this._rowElements.push(l), this._rowContainer.appendChild(l);
|
|
6932
6932
|
}
|
|
6933
6933
|
this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._terminal.scrollLines(t === 0 ? -1 : 1), this._rowElements[t === 0 ? 1 : this._rowElements.length - 2].focus(), e.preventDefault(), e.stopImmediatePropagation();
|
|
6934
6934
|
}
|
|
@@ -6948,17 +6948,17 @@ var V = 0, Ha = class {
|
|
|
6948
6948
|
if ((t.node.compareDocumentPosition(i.node) & Node.DOCUMENT_POSITION_PRECEDING || t.node === i.node && t.offset > i.offset) && ([t, i] = [i, t]), t.node.compareDocumentPosition(this._rowElements[0]) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_FOLLOWING) && (t = { node: this._rowElements[0].childNodes[0], offset: 0 }), !this._rowContainer.contains(t.node)) return;
|
|
6949
6949
|
let s = this._rowElements.slice(-1)[0];
|
|
6950
6950
|
if (i.node.compareDocumentPosition(s) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_PRECEDING) && (i = { node: s, offset: s.textContent?.length ?? 0 }), !this._rowContainer.contains(i.node)) return;
|
|
6951
|
-
let r = ({ node:
|
|
6952
|
-
let a =
|
|
6951
|
+
let r = ({ node: h, offset: l }) => {
|
|
6952
|
+
let a = h instanceof Text ? h.parentNode : h, d = parseInt(a?.getAttribute("aria-posinset"), 10) - 1;
|
|
6953
6953
|
if (isNaN(d)) return console.warn("row is invalid. Race condition?"), null;
|
|
6954
6954
|
let c = this._rowColumns.get(a);
|
|
6955
6955
|
if (!c) return console.warn("columns is null. Race condition?"), null;
|
|
6956
|
-
let _ =
|
|
6956
|
+
let _ = l < c.length ? c[l] : c.slice(-1)[0] + 1;
|
|
6957
6957
|
return _ >= this._terminal.cols && (++d, _ = 0), { row: d, column: _ };
|
|
6958
|
-
},
|
|
6959
|
-
if (!(!
|
|
6960
|
-
if (
|
|
6961
|
-
this._terminal.select(
|
|
6958
|
+
}, n = r(t), o = r(i);
|
|
6959
|
+
if (!(!n || !o)) {
|
|
6960
|
+
if (n.row > o.row || n.row === o.row && n.column >= o.column) throw new Error("invalid range");
|
|
6961
|
+
this._terminal.select(n.column, n.row, (o.row - n.row) * this._terminal.cols - n.column + o.column);
|
|
6962
6962
|
}
|
|
6963
6963
|
}
|
|
6964
6964
|
_handleResize(e) {
|
|
@@ -7029,21 +7029,21 @@ var Yi = class extends L {
|
|
|
7029
7029
|
});
|
|
7030
7030
|
}), this._activeProviderReplies = /* @__PURE__ */ new Map(), this._activeLine = e.y);
|
|
7031
7031
|
let i = !1;
|
|
7032
|
-
for (let [s, r] of this._linkProviderService.linkProviders.entries()) t ? this._activeProviderReplies?.get(s) && (i = this._checkLinkProviderResult(s, e, i)) : r.provideLinks(e.y, (
|
|
7032
|
+
for (let [s, r] of this._linkProviderService.linkProviders.entries()) t ? this._activeProviderReplies?.get(s) && (i = this._checkLinkProviderResult(s, e, i)) : r.provideLinks(e.y, (n) => {
|
|
7033
7033
|
if (this._isMouseOut) return;
|
|
7034
|
-
let
|
|
7035
|
-
this._activeProviderReplies?.set(s,
|
|
7034
|
+
let o = n?.map((h) => ({ link: h }));
|
|
7035
|
+
this._activeProviderReplies?.set(s, o), i = this._checkLinkProviderResult(s, e, i), this._activeProviderReplies?.size === this._linkProviderService.linkProviders.length && this._removeIntersectingLinks(e.y, this._activeProviderReplies);
|
|
7036
7036
|
});
|
|
7037
7037
|
}
|
|
7038
7038
|
_removeIntersectingLinks(e, t) {
|
|
7039
7039
|
let i = /* @__PURE__ */ new Set();
|
|
7040
7040
|
for (let s = 0; s < t.size; s++) {
|
|
7041
7041
|
let r = t.get(s);
|
|
7042
|
-
if (r) for (let
|
|
7043
|
-
let
|
|
7044
|
-
for (let a =
|
|
7042
|
+
if (r) for (let n = 0; n < r.length; n++) {
|
|
7043
|
+
let o = r[n], h = o.link.range.start.y < e ? 0 : o.link.range.start.x, l = o.link.range.end.y > e ? this._bufferService.cols : o.link.range.end.x;
|
|
7044
|
+
for (let a = h; a <= l; a++) {
|
|
7045
7045
|
if (i.has(a)) {
|
|
7046
|
-
r.splice(
|
|
7046
|
+
r.splice(n--, 1);
|
|
7047
7047
|
break;
|
|
7048
7048
|
}
|
|
7049
7049
|
i.add(a);
|
|
@@ -7054,15 +7054,15 @@ var Yi = class extends L {
|
|
|
7054
7054
|
_checkLinkProviderResult(e, t, i) {
|
|
7055
7055
|
if (!this._activeProviderReplies) return i;
|
|
7056
7056
|
let s = this._activeProviderReplies.get(e), r = !1;
|
|
7057
|
-
for (let
|
|
7057
|
+
for (let n = 0; n < e; n++) (!this._activeProviderReplies.has(n) || this._activeProviderReplies.get(n)) && (r = !0);
|
|
7058
7058
|
if (!r && s) {
|
|
7059
|
-
let
|
|
7060
|
-
|
|
7059
|
+
let n = s.find((o) => this._linkAtPosition(o.link, t));
|
|
7060
|
+
n && (i = !0, this._handleNewLink(n));
|
|
7061
7061
|
}
|
|
7062
|
-
if (this._activeProviderReplies.size === this._linkProviderService.linkProviders.length && !i) for (let
|
|
7063
|
-
let
|
|
7064
|
-
if (
|
|
7065
|
-
i = !0, this._handleNewLink(
|
|
7062
|
+
if (this._activeProviderReplies.size === this._linkProviderService.linkProviders.length && !i) for (let n = 0; n < this._activeProviderReplies.size; n++) {
|
|
7063
|
+
let o = this._activeProviderReplies.get(n)?.find((h) => this._linkAtPosition(h.link, t));
|
|
7064
|
+
if (o) {
|
|
7065
|
+
i = !0, this._handleNewLink(o);
|
|
7066
7066
|
break;
|
|
7067
7067
|
}
|
|
7068
7068
|
}
|
|
@@ -7090,8 +7090,8 @@ var Yi = class extends L {
|
|
|
7090
7090
|
if (!this._currentLink) return;
|
|
7091
7091
|
let s = i.start === 0 ? 0 : i.start + 1 + this._bufferService.buffer.ydisp, r = this._bufferService.buffer.ydisp + 1 + i.end;
|
|
7092
7092
|
if (this._currentLink.link.range.start.y >= s && this._currentLink.link.range.end.y <= r && (this._clearCurrentLink(s, r), this._lastMouseEvent)) {
|
|
7093
|
-
let
|
|
7094
|
-
|
|
7093
|
+
let n = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
|
|
7094
|
+
n && this._askForLink(n, !1);
|
|
7095
7095
|
}
|
|
7096
7096
|
})));
|
|
7097
7097
|
}
|
|
@@ -7117,13 +7117,13 @@ var Yi = class extends L {
|
|
|
7117
7117
|
return { x1: e, y1: t, x2: i, y2: s, cols: this._bufferService.cols, fg: r };
|
|
7118
7118
|
}
|
|
7119
7119
|
};
|
|
7120
|
-
Yi = q([S(1, ji), S(2, Oe), S(3,
|
|
7120
|
+
Yi = q([S(1, ji), S(2, Oe), S(3, he), S(4, lr)], Yi);
|
|
7121
7121
|
function Ka(e, t) {
|
|
7122
7122
|
return e.text === t.text && e.range.start.x === t.range.start.x && e.range.start.y === t.range.start.y && e.range.end.x === t.range.end.x && e.range.end.y === t.range.end.y;
|
|
7123
7123
|
}
|
|
7124
7124
|
var Ua = class extends Oa {
|
|
7125
7125
|
constructor(e = {}) {
|
|
7126
|
-
super(e), this._linkifier = this._register(new st()), this.browser = Dr, this._keyDownHandled = !1, this._keyDownSeen = !1, this._keyPressHandled = !1, this._unprocessedDeadKey = !1, this._accessibilityManager = this._register(new st()), this._onCursorMove = this._register(new m()), this.onCursorMove = this._onCursorMove.event, this._onKey = this._register(new m()), this.onKey = this._onKey.event, this._onRender = this._register(new m()), this.onRender = this._onRender.event, this._onSelectionChange = this._register(new m()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this._register(new m()), this.onTitleChange = this._onTitleChange.event, this._onBell = this._register(new m()), this.onBell = this._onBell.event, this._onFocus = this._register(new m()), this._onBlur = this._register(new m()), this._onA11yCharEmitter = this._register(new m()), this._onA11yTabEmitter = this._register(new m()), this._onWillOpen = this._register(new m()), this._setup(), this._decorationService = this._instantiationService.createInstance(Wa), this._instantiationService.setService(Ct, this._decorationService), this._linkProviderService = this._instantiationService.createInstance(
|
|
7126
|
+
super(e), this._linkifier = this._register(new st()), this.browser = Dr, this._keyDownHandled = !1, this._keyDownSeen = !1, this._keyPressHandled = !1, this._unprocessedDeadKey = !1, this._accessibilityManager = this._register(new st()), this._onCursorMove = this._register(new m()), this.onCursorMove = this._onCursorMove.event, this._onKey = this._register(new m()), this.onKey = this._onKey.event, this._onRender = this._register(new m()), this.onRender = this._onRender.event, this._onSelectionChange = this._register(new m()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this._register(new m()), this.onTitleChange = this._onTitleChange.event, this._onBell = this._register(new m()), this.onBell = this._onBell.event, this._onFocus = this._register(new m()), this._onBlur = this._register(new m()), this._onA11yCharEmitter = this._register(new m()), this._onA11yTabEmitter = this._register(new m()), this._onWillOpen = this._register(new m()), this._setup(), this._decorationService = this._instantiationService.createInstance(Wa), this._instantiationService.setService(Ct, this._decorationService), this._linkProviderService = this._instantiationService.createInstance(To), this._instantiationService.setService(lr, this._linkProviderService), this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(fi)), this._register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this._register(this._inputHandler.onRequestRefreshRows((t) => this.refresh(t?.start ?? 0, t?.end ?? this.rows - 1))), this._register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this._register(this._inputHandler.onRequestReset(() => this.reset())), this._register(this._inputHandler.onRequestWindowsOptionsReport((t) => this._reportWindowsOptions(t))), this._register(this._inputHandler.onColor((t) => this._handleColorEvent(t))), this._register(ne.forward(this._inputHandler.onCursorMove, this._onCursorMove)), this._register(ne.forward(this._inputHandler.onTitleChange, this._onTitleChange)), this._register(ne.forward(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this._register(ne.forward(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this._register(this._bufferService.onResize((t) => this._afterResize(t.cols, t.rows))), this._register(z(() => {
|
|
7127
7127
|
this._customKeyEventHandler = void 0, this.element?.parentNode?.removeChild(this.element);
|
|
7128
7128
|
}));
|
|
7129
7129
|
}
|
|
@@ -7167,10 +7167,10 @@ var Ua = class extends Oa {
|
|
|
7167
7167
|
this.coreService.triggerDataEvent(`${p.ESC}]${s};${Ra(r)}${Er.ST}`);
|
|
7168
7168
|
break;
|
|
7169
7169
|
case 1:
|
|
7170
|
-
if (i === "ansi") this._themeService.modifyColors((
|
|
7170
|
+
if (i === "ansi") this._themeService.modifyColors((n) => n.ansi[t.index] = X.toColor(...t.color));
|
|
7171
7171
|
else {
|
|
7172
|
-
let
|
|
7173
|
-
this._themeService.modifyColors((
|
|
7172
|
+
let n = i;
|
|
7173
|
+
this._themeService.modifyColors((o) => o[n] = X.toColor(...t.color));
|
|
7174
7174
|
}
|
|
7175
7175
|
break;
|
|
7176
7176
|
case 2:
|
|
@@ -7204,8 +7204,8 @@ var Ua = class extends Oa {
|
|
|
7204
7204
|
if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper.isComposing || !this._renderService) return;
|
|
7205
7205
|
let e = this.buffer.ybase + this.buffer.y, t = this.buffer.lines.get(e);
|
|
7206
7206
|
if (!t) return;
|
|
7207
|
-
let i = Math.min(this.buffer.x, this.cols - 1), s = this._renderService.dimensions.css.cell.height, r = t.getWidth(i),
|
|
7208
|
-
this.textarea.style.left =
|
|
7207
|
+
let i = Math.min(this.buffer.x, this.cols - 1), s = this._renderService.dimensions.css.cell.height, r = t.getWidth(i), n = this._renderService.dimensions.css.cell.width * r, o = this.buffer.y * this._renderService.dimensions.css.cell.height, h = i * this._renderService.dimensions.css.cell.width;
|
|
7208
|
+
this.textarea.style.left = h + "px", this.textarea.style.top = o + "px", this.textarea.style.width = n + "px", this.textarea.style.height = s + "px", this.textarea.style.lineHeight = s + "px", this.textarea.style.zIndex = "-5";
|
|
7209
7209
|
}
|
|
7210
7210
|
_initGlobal() {
|
|
7211
7211
|
this._bindKeys(), this._register(D(this.element, "copy", (t) => {
|
|
@@ -7213,9 +7213,9 @@ var Ua = class extends Oa {
|
|
|
7213
7213
|
}));
|
|
7214
7214
|
let e = (t) => Yr(t, this.textarea, this.coreService, this.optionsService);
|
|
7215
7215
|
this._register(D(this.textarea, "paste", e)), this._register(D(this.element, "paste", e)), Rr ? this._register(D(this.element, "mousedown", (t) => {
|
|
7216
|
-
t.button === 2 &&
|
|
7216
|
+
t.button === 2 && os(t, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
|
|
7217
7217
|
})) : this._register(D(this.element, "contextmenu", (t) => {
|
|
7218
|
-
|
|
7218
|
+
os(t, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
|
|
7219
7219
|
})), ss && this._register(D(this.element, "auxclick", (t) => {
|
|
7220
7220
|
t.button === 1 && er(t, this.textarea, this.screenElement);
|
|
7221
7221
|
}));
|
|
@@ -7233,7 +7233,7 @@ var Ua = class extends Oa {
|
|
|
7233
7233
|
let t = this._document.createDocumentFragment();
|
|
7234
7234
|
this._viewportElement = this._document.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), t.appendChild(this._viewportElement), this.screenElement = this._document.createElement("div"), this.screenElement.classList.add("xterm-screen"), this._register(D(this.screenElement, "mousemove", (r) => this.updateCursorStyle(r))), this._helperContainer = this._document.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), t.appendChild(this.screenElement);
|
|
7235
7235
|
let i = this.textarea = this._document.createElement("textarea");
|
|
7236
|
-
this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", di.get()), Pr || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._register(this.optionsService.onSpecificOptionChange("disableStdin", () => i.readOnly = this.optionsService.rawOptions.disableStdin)), this.textarea.readOnly = this.optionsService.rawOptions.disableStdin, this._coreBrowserService = this._register(this._instantiationService.createInstance(
|
|
7236
|
+
this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", di.get()), Pr || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._register(this.optionsService.onSpecificOptionChange("disableStdin", () => i.readOnly = this.optionsService.rawOptions.disableStdin)), this.textarea.readOnly = this.optionsService.rawOptions.disableStdin, this._coreBrowserService = this._register(this._instantiationService.createInstance(Lo, this.textarea, e.ownerDocument.defaultView ?? window, this._document ?? typeof window < "u" ? window.document : null)), this._instantiationService.setService(Ae, this._coreBrowserService), this._register(D(this.textarea, "focus", (r) => this._handleTextAreaFocus(r))), this._register(D(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(Oi, this._document, this._helperContainer), this._instantiationService.setService(Yt, this._charSizeService), this._themeService = this._instantiationService.createInstance(Wi), this._instantiationService.setService(rt, this._themeService), this._characterJoinerService = this._instantiationService.createInstance($t), this._instantiationService.setService(hr, this._characterJoinerService), this._renderService = this._register(this._instantiationService.createInstance(Ni, this.rows, this.screenElement)), this._instantiationService.setService(Oe, this._renderService), this._register(this._renderService.onRenderedViewportChange((r) => this._onRender.fire(r))), this.onResize((r) => this._renderService.resize(r.cols, r.rows)), this._compositionView = this._document.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(Pi, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this._mouseService = this._instantiationService.createInstance(Ii), this._instantiationService.setService(ji, this._mouseService);
|
|
7237
7237
|
let s = this._linkifier.value = this._register(this._instantiationService.createInstance(Yi, this.screenElement));
|
|
7238
7238
|
this.element.appendChild(t);
|
|
7239
7239
|
try {
|
|
@@ -7244,9 +7244,9 @@ var Ua = class extends Oa {
|
|
|
7244
7244
|
this._renderService.handleCursorMove(), this._syncTextArea();
|
|
7245
7245
|
})), this._register(this.onResize(() => this._renderService.handleResize(this.cols, this.rows))), this._register(this.onBlur(() => this._renderService.handleBlur())), this._register(this.onFocus(() => this._renderService.handleFocus())), this._viewport = this._register(this._instantiationService.createInstance(Mi, this.element, this.screenElement)), this._register(this._viewport.onRequestScrollLines((r) => {
|
|
7246
7246
|
super.scrollLines(r, !1), this.refresh(0, this.rows - 1);
|
|
7247
|
-
})), this._selectionService = this._register(this._instantiationService.createInstance(Hi, this.element, this.screenElement, s)), this._instantiationService.setService(
|
|
7247
|
+
})), this._selectionService = this._register(this._instantiationService.createInstance(Hi, this.element, this.screenElement, s)), this._instantiationService.setService(tn, this._selectionService), this._register(this._selectionService.onRequestScrollLines((r) => this.scrollLines(r.amount, r.suppressScrollEvent))), this._register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this._register(this._selectionService.onRequestRedraw((r) => this._renderService.handleSelectionChanged(r.start, r.end, r.columnSelectMode))), this._register(this._selectionService.onLinuxMouseSelection((r) => {
|
|
7248
7248
|
this.textarea.value = r, this.textarea.focus(), this.textarea.select();
|
|
7249
|
-
})), this._register(
|
|
7249
|
+
})), this._register(ne.any(this._onScroll.event, this._inputHandler.onScroll)(() => {
|
|
7250
7250
|
this._selectionService.refresh(), this._viewport?.queueSync();
|
|
7251
7251
|
})), this._register(this._instantiationService.createInstance(Li, this.screenElement)), this._register(D(this.element, "mousedown", (r) => this._selectionService.handleMouseDown(r))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager.value = this._instantiationService.createInstance(qt, this)), this._register(this.optionsService.onSpecificOptionChange("screenReaderMode", (r) => this._handleScreenReaderModeOptionChange(r))), this.options.overviewRuler.width && (this._overviewRulerRenderer = this._register(this._instantiationService.createInstance(Ft, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRuler", (r) => {
|
|
7252
7252
|
!this._overviewRulerRenderer && r && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this._register(this._instantiationService.createInstance(Ft, this._viewportElement, this.screenElement)));
|
|
@@ -7257,48 +7257,48 @@ var Ua = class extends Oa {
|
|
|
7257
7257
|
}
|
|
7258
7258
|
bindMouse() {
|
|
7259
7259
|
let e = this, t = this.element;
|
|
7260
|
-
function i(
|
|
7261
|
-
let
|
|
7262
|
-
if (!
|
|
7263
|
-
let
|
|
7264
|
-
switch (
|
|
7260
|
+
function i(n) {
|
|
7261
|
+
let o = e._mouseService.getMouseReportCoords(n, e.screenElement);
|
|
7262
|
+
if (!o) return !1;
|
|
7263
|
+
let h, l;
|
|
7264
|
+
switch (n.overrideType || n.type) {
|
|
7265
7265
|
case "mousemove":
|
|
7266
|
-
|
|
7266
|
+
l = 32, n.buttons === void 0 ? (h = 3, n.button !== void 0 && (h = n.button < 3 ? n.button : 3)) : h = n.buttons & 1 ? 0 : n.buttons & 4 ? 1 : n.buttons & 2 ? 2 : 3;
|
|
7267
7267
|
break;
|
|
7268
7268
|
case "mouseup":
|
|
7269
|
-
|
|
7269
|
+
l = 0, h = n.button < 3 ? n.button : 3;
|
|
7270
7270
|
break;
|
|
7271
7271
|
case "mousedown":
|
|
7272
|
-
|
|
7272
|
+
l = 1, h = n.button < 3 ? n.button : 3;
|
|
7273
7273
|
break;
|
|
7274
7274
|
case "wheel":
|
|
7275
|
-
if (e._customWheelEventHandler && e._customWheelEventHandler(
|
|
7276
|
-
let a =
|
|
7277
|
-
if (a === 0 || e.coreMouseService.consumeWheelEvent(
|
|
7278
|
-
|
|
7275
|
+
if (e._customWheelEventHandler && e._customWheelEventHandler(n) === !1) return !1;
|
|
7276
|
+
let a = n.deltaY;
|
|
7277
|
+
if (a === 0 || e.coreMouseService.consumeWheelEvent(n, e._renderService?.dimensions?.device?.cell?.height, e._coreBrowserService?.dpr) === 0) return !1;
|
|
7278
|
+
l = a < 0 ? 0 : 1, h = 4;
|
|
7279
7279
|
break;
|
|
7280
7280
|
default:
|
|
7281
7281
|
return !1;
|
|
7282
7282
|
}
|
|
7283
|
-
return
|
|
7283
|
+
return l === void 0 || h === void 0 || h > 4 ? !1 : e.coreMouseService.triggerMouseEvent({ col: o.col, row: o.row, x: o.x, y: o.y, button: h, action: l, ctrl: n.ctrlKey, alt: n.altKey, shift: n.shiftKey });
|
|
7284
7284
|
}
|
|
7285
|
-
let s = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, r = { mouseup: (
|
|
7286
|
-
|
|
7287
|
-
}, mousemove: (
|
|
7288
|
-
|
|
7285
|
+
let s = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, r = { mouseup: (n) => (i(n), n.buttons || (this._document.removeEventListener("mouseup", s.mouseup), s.mousedrag && this._document.removeEventListener("mousemove", s.mousedrag)), this.cancel(n)), wheel: (n) => (i(n), this.cancel(n, !0)), mousedrag: (n) => {
|
|
7286
|
+
n.buttons && i(n);
|
|
7287
|
+
}, mousemove: (n) => {
|
|
7288
|
+
n.buttons || i(n);
|
|
7289
7289
|
} };
|
|
7290
|
-
this._register(this.coreMouseService.onProtocolChange((
|
|
7291
|
-
|
|
7292
|
-
})), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this._register(D(t, "mousedown", (
|
|
7293
|
-
if (
|
|
7294
|
-
})), this._register(D(t, "wheel", (
|
|
7290
|
+
this._register(this.coreMouseService.onProtocolChange((n) => {
|
|
7291
|
+
n ? (this.optionsService.rawOptions.logLevel === "debug" && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(n)), this.element.classList.add("enable-mouse-events"), this._selectionService.disable()) : (this._logService.debug("Unbinding from mouse events."), this.element.classList.remove("enable-mouse-events"), this._selectionService.enable()), n & 8 ? s.mousemove || (t.addEventListener("mousemove", r.mousemove), s.mousemove = r.mousemove) : (t.removeEventListener("mousemove", s.mousemove), s.mousemove = null), n & 16 ? s.wheel || (t.addEventListener("wheel", r.wheel, { passive: !1 }), s.wheel = r.wheel) : (t.removeEventListener("wheel", s.wheel), s.wheel = null), n & 2 ? s.mouseup || (s.mouseup = r.mouseup) : (this._document.removeEventListener("mouseup", s.mouseup), s.mouseup = null), n & 4 ? s.mousedrag || (s.mousedrag = r.mousedrag) : (this._document.removeEventListener("mousemove", s.mousedrag), s.mousedrag = null);
|
|
7292
|
+
})), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this._register(D(t, "mousedown", (n) => {
|
|
7293
|
+
if (n.preventDefault(), this.focus(), !(!this.coreMouseService.areMouseEventsActive || this._selectionService.shouldForceSelection(n))) return i(n), s.mouseup && this._document.addEventListener("mouseup", s.mouseup), s.mousedrag && this._document.addEventListener("mousemove", s.mousedrag), this.cancel(n);
|
|
7294
|
+
})), this._register(D(t, "wheel", (n) => {
|
|
7295
7295
|
if (!s.wheel) {
|
|
7296
|
-
if (this._customWheelEventHandler && this._customWheelEventHandler(
|
|
7296
|
+
if (this._customWheelEventHandler && this._customWheelEventHandler(n) === !1) return !1;
|
|
7297
7297
|
if (!this.buffer.hasScrollback) {
|
|
7298
|
-
if (
|
|
7299
|
-
if (e.coreMouseService.consumeWheelEvent(
|
|
7300
|
-
let
|
|
7301
|
-
return this.coreService.triggerDataEvent(
|
|
7298
|
+
if (n.deltaY === 0) return !1;
|
|
7299
|
+
if (e.coreMouseService.consumeWheelEvent(n, e._renderService?.dimensions?.device?.cell?.height, e._coreBrowserService?.dpr) === 0) return this.cancel(n, !0);
|
|
7300
|
+
let o = p.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? "O" : "[") + (n.deltaY < 0 ? "A" : "B");
|
|
7301
|
+
return this.coreService.triggerDataEvent(o, !0), this.cancel(n, !0);
|
|
7302
7302
|
}
|
|
7303
7303
|
}
|
|
7304
7304
|
}, { passive: !1 }));
|
|
@@ -7591,7 +7591,7 @@ var Va = class {
|
|
|
7591
7591
|
set activeVersion(e) {
|
|
7592
7592
|
this._core.unicodeService.activeVersion = e;
|
|
7593
7593
|
}
|
|
7594
|
-
}, Ja = ["cols", "rows"], Ee = 0,
|
|
7594
|
+
}, Ja = ["cols", "rows"], Ee = 0, ih = class extends L {
|
|
7595
7595
|
constructor(e) {
|
|
7596
7596
|
super(), this._core = this._register(new Ua(e)), this._addonManager = this._register(new Va()), this._publicOptions = { ...this._core.options };
|
|
7597
7597
|
let t = (s) => this._core.options[s], i = (s, r) => {
|
|
@@ -7822,7 +7822,7 @@ var Va = class {
|
|
|
7822
7822
|
* http://bellard.org/jslinux/
|
|
7823
7823
|
* Copyright (c) 2011 Fabrice Bellard
|
|
7824
7824
|
*/
|
|
7825
|
-
var Za = 2, Qa = 1,
|
|
7825
|
+
var Za = 2, Qa = 1, sh = class {
|
|
7826
7826
|
activate(e) {
|
|
7827
7827
|
this._terminal = e;
|
|
7828
7828
|
}
|
|
@@ -7838,44 +7838,44 @@ var Za = 2, Qa = 1, sl = class {
|
|
|
7838
7838
|
if (!this._terminal || !this._terminal.element || !this._terminal.element.parentElement) return;
|
|
7839
7839
|
let e = this._terminal._core._renderService.dimensions;
|
|
7840
7840
|
if (e.css.cell.width === 0 || e.css.cell.height === 0) return;
|
|
7841
|
-
let t = this._terminal.options.scrollback === 0 ? 0 : this._terminal.options.overviewRuler?.width || 14, i = window.getComputedStyle(this._terminal.element.parentElement), s = parseInt(i.getPropertyValue("height")), r = Math.max(0, parseInt(i.getPropertyValue("width"))),
|
|
7841
|
+
let t = this._terminal.options.scrollback === 0 ? 0 : this._terminal.options.overviewRuler?.width || 14, i = window.getComputedStyle(this._terminal.element.parentElement), s = parseInt(i.getPropertyValue("height")), r = Math.max(0, parseInt(i.getPropertyValue("width"))), n = window.getComputedStyle(this._terminal.element), o = { top: parseInt(n.getPropertyValue("padding-top")), bottom: parseInt(n.getPropertyValue("padding-bottom")), right: parseInt(n.getPropertyValue("padding-right")), left: parseInt(n.getPropertyValue("padding-left")) }, h = o.top + o.bottom, l = o.right + o.left, a = s - h, d = r - l - t;
|
|
7842
7842
|
return { cols: Math.max(Za, Math.floor(d / e.css.cell.width)), rows: Math.max(Qa, Math.floor(a / e.css.cell.height)) };
|
|
7843
7843
|
}
|
|
7844
7844
|
};
|
|
7845
|
-
const
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
*/:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm.focus,:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *) .xterm:focus{outline:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-helpers{position:absolute;top:0;z-index:5}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .composition-view.active{display:block}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;inset:0}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-screen{position:relative}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-screen canvas{position:absolute;left:0;top:0}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm.enable-mouse-events{cursor:default}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm.xterm-cursor-pointer,:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *) .xterm .xterm-cursor-pointer{cursor:pointer}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm.column-select.focus{cursor:crosshair}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-accessibility:not(.debug),:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *) .xterm .xterm-message{position:absolute;inset:0;z-index:10;color:transparent;pointer-events:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-accessibility-tree{font-family:monospace;user-select:text;white-space:pre}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-dim{opacity:1!important}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-underline-1{text-decoration:underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-underline-2{text-decoration:double underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-underline-3{text-decoration:wavy underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-underline-4{text-decoration:dotted underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-underline-5{text-decoration:dashed underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-overline{text-decoration:overline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-overline.xterm-underline-1{text-decoration:overline underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-overline.xterm-underline-2{text-decoration:overline double underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-strikethrough{text-decoration:line-through}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm-decoration-top{z-index:2;position:relative}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.scrollbar{cursor:default}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}:where([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn],[data-web-shell-root][data-web-shell-shadcn] *,[data-web-shell-portal-root][data-web-shell-shadcn] *).xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}`;
|
|
7845
|
+
const rh = `@scope ([data-web-shell-root][data-web-shell-shadcn],[data-web-shell-portal-root][data-web-shell-shadcn]){/**
|
|
7846
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
7847
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
7848
|
+
* https://github.com/chjj/term.js
|
|
7849
|
+
* @license MIT
|
|
7850
|
+
*
|
|
7851
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7852
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
7853
|
+
* in the Software without restriction, including without limitation the rights
|
|
7854
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7855
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
7856
|
+
* furnished to do so, subject to the following conditions:
|
|
7857
|
+
*
|
|
7858
|
+
* The above copyright notice and this permission notice shall be included in
|
|
7859
|
+
* all copies or substantial portions of the Software.
|
|
7860
|
+
*
|
|
7861
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
7862
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
7863
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
7864
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
7865
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
7866
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
7867
|
+
* THE SOFTWARE.
|
|
7868
|
+
*
|
|
7869
|
+
* Originally forked from (with the author's permission):
|
|
7870
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
7871
|
+
* http://bellard.org/jslinux/
|
|
7872
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
7873
|
+
* The original design remains. The terminal itself
|
|
7874
|
+
* has been extended to include xterm CSI codes, among
|
|
7875
|
+
* other features.
|
|
7876
|
+
*/:where(:scope).xterm,.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}:where(:scope).xterm.focus,.xterm.focus,:where(:scope) .xterm:focus,.xterm:focus{outline:none}:where(:scope).xterm .xterm-helpers,.xterm .xterm-helpers{position:absolute;top:0;z-index:5}:where(:scope).xterm .xterm-helper-textarea,.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}:where(:scope).xterm .composition-view,.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}:where(:scope).xterm .composition-view.active,.xterm .composition-view.active{display:block}:where(:scope).xterm .xterm-viewport,.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;inset:0}:where(:scope).xterm .xterm-screen,.xterm .xterm-screen{position:relative}:where(:scope).xterm .xterm-screen canvas,.xterm .xterm-screen canvas{position:absolute;left:0;top:0}:where(:scope).xterm-char-measure-element,.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}:where(:scope).xterm.enable-mouse-events,.xterm.enable-mouse-events{cursor:default}:where(:scope).xterm.xterm-cursor-pointer,.xterm.xterm-cursor-pointer,:where(:scope) .xterm .xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}:where(:scope).xterm.column-select.focus,.xterm.column-select.focus{cursor:crosshair}:where(:scope).xterm .xterm-accessibility:not(.debug),.xterm .xterm-accessibility:not(.debug),:where(:scope) .xterm .xterm-message,.xterm .xterm-message{position:absolute;inset:0;z-index:10;color:transparent;pointer-events:none}:where(:scope).xterm .xterm-accessibility-tree:not(.debug) *::selection,.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}:where(:scope).xterm .xterm-accessibility-tree,.xterm .xterm-accessibility-tree{font-family:monospace;user-select:text;white-space:pre}:where(:scope).xterm .xterm-accessibility-tree>div,.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}:where(:scope).xterm .live-region,.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}:where(:scope).xterm-dim,.xterm-dim{opacity:1!important}:where(:scope).xterm-underline-1,.xterm-underline-1{text-decoration:underline}:where(:scope).xterm-underline-2,.xterm-underline-2{text-decoration:double underline}:where(:scope).xterm-underline-3,.xterm-underline-3{text-decoration:wavy underline}:where(:scope).xterm-underline-4,.xterm-underline-4{text-decoration:dotted underline}:where(:scope).xterm-underline-5,.xterm-underline-5{text-decoration:dashed underline}:where(:scope).xterm-overline,.xterm-overline{text-decoration:overline}:where(:scope).xterm-overline.xterm-underline-1,.xterm-overline.xterm-underline-1{text-decoration:overline underline}:where(:scope).xterm-overline.xterm-underline-2,.xterm-overline.xterm-underline-2{text-decoration:overline double underline}:where(:scope).xterm-overline.xterm-underline-3,.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}:where(:scope).xterm-overline.xterm-underline-4,.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}:where(:scope).xterm-overline.xterm-underline-5,.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}:where(:scope).xterm-strikethrough,.xterm-strikethrough{text-decoration:line-through}:where(:scope).xterm-screen .xterm-decoration-container .xterm-decoration,.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}:where(:scope).xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer,.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}:where(:scope).xterm-decoration-overview-ruler,.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}:where(:scope).xterm-decoration-top,.xterm-decoration-top{z-index:2;position:relative}:where(:scope).xterm .xterm-scrollable-element>.scrollbar,.xterm .xterm-scrollable-element>.scrollbar{cursor:default}:where(:scope).xterm .xterm-scrollable-element>.scrollbar>.scra,.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}:where(:scope).xterm .xterm-scrollable-element>.visible,.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}:where(:scope).xterm .xterm-scrollable-element>.invisible,.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}:where(:scope).xterm .xterm-scrollable-element>.invisible.fade,.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}:where(:scope).xterm .xterm-scrollable-element>.shadow,.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}:where(:scope).xterm .xterm-scrollable-element>.shadow.top,.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}:where(:scope).xterm .xterm-scrollable-element>.shadow.left,.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:where(:scope).xterm .xterm-scrollable-element>.shadow.top-left-corner,.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}:where(:scope).xterm .xterm-scrollable-element>.shadow.top.left,.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}}`;
|
|
7877
7877
|
export {
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7878
|
+
sh as FitAddon,
|
|
7879
|
+
ih as Terminal,
|
|
7880
|
+
rh as styles
|
|
7881
7881
|
};
|