');
- const h = wC(d, o);
+ o.appendString('
');
+ const h = TG(a, o);
o.appendString("
");
let u = null;
- return _f && Ese && r.isBasicASCII && l.useMonospaceOptimizations && h.containsForeignElements === 0 && (u = new oS(this._renderedViewLine ? this._renderedViewLine.domNode : null, d, h.characterMapping)), u || (u = bU(this._renderedViewLine ? this._renderedViewLine.domNode : null, d, h.characterMapping, h.containsRTL, h.containsForeignElements)), this._renderedViewLine = u, !0;
+ return Mg && Noe && l.isBasicASCII && r.useMonospaceOptimizations && h.containsForeignElements === 0 && (u = new f1(this._renderedViewLine ? this._renderedViewLine.domNode : null, a, h.characterMapping)), u || (u = $_(this._renderedViewLine ? this._renderedViewLine.domNode : null, a, h.characterMapping, h.containsRTL, h.containsForeignElements)), this._renderedViewLine = u, !0;
}
layoutLine(e, t, i) {
this._renderedViewLine && this._renderedViewLine.domNode && (this._renderedViewLine.domNode.setTop(t), this._renderedViewLine.domNode.setHeight(i));
@@ -20784,13 +20784,13 @@ const oZ = class oZ {
return this._renderedViewLine ? this._renderedViewLine.getWidthIsFast() : !0;
}
needsMonospaceFontCheck() {
- return this._renderedViewLine ? this._renderedViewLine instanceof oS : !1;
+ return this._renderedViewLine ? this._renderedViewLine instanceof f1 : !1;
}
monospaceAssumptionsAreValid() {
- return this._renderedViewLine && this._renderedViewLine instanceof oS ? this._renderedViewLine.monospaceAssumptionsAreValid() : _f;
+ return this._renderedViewLine && this._renderedViewLine instanceof f1 ? this._renderedViewLine.monospaceAssumptionsAreValid() : Mg;
}
onMonospaceAssumptionsInvalidated() {
- this._renderedViewLine && this._renderedViewLine instanceof oS && (this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine());
+ this._renderedViewLine && this._renderedViewLine instanceof f1 && (this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine());
}
getVisibleRangesForRange(e, t, i, n) {
if (!this._renderedViewLine)
@@ -20798,18 +20798,18 @@ const oZ = class oZ {
t = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, t)), i = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, i));
const o = this._renderedViewLine.input.stopRenderingLineAfter;
if (o !== -1 && t > o + 1 && i > o + 1)
- return new PF(!0, [new cg(this.getWidth(n), 0)]);
+ return new bF(!0, [new bm(this.getWidth(n), 0)]);
o !== -1 && t > o + 1 && (t = o + 1), o !== -1 && i > o + 1 && (i = o + 1);
- const r = this._renderedViewLine.getVisibleRangesForRange(e, t, i, n);
- return r && r.length > 0 ? new PF(!1, r) : null;
+ const l = this._renderedViewLine.getVisibleRangesForRange(e, t, i, n);
+ return l && l.length > 0 ? new bF(!1, l) : null;
}
getColumnOfNodeOffset(e, t) {
return this._renderedViewLine ? this._renderedViewLine.getColumnOfNodeOffset(e, t) : 1;
}
};
-oZ.CLASS_NAME = "view-line";
-let wc = oZ;
-class oS {
+W2.CLASS_NAME = "view-line";
+let Vd = W2;
+class f1 {
constructor(e, t, i) {
this._cachedWidth = -1, this.domNode = e, this.input = t;
const n = Math.floor(
@@ -20836,15 +20836,15 @@ class oS {
}
monospaceAssumptionsAreValid() {
if (!this.domNode)
- return _f;
+ return Mg;
if (this.input.lineContent.length < 300) {
const e = this.getWidth(null), t = this.domNode.domNode.firstChild.offsetWidth;
- Math.abs(e - t) >= 2 && (console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"), _f = !1);
+ Math.abs(e - t) >= 2 && (console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"), Mg = !1);
}
- return _f;
+ return Mg;
}
toSlowRenderedLine() {
- return bU(
+ return $_(
this.domNode,
this.input,
this._characterMapping,
@@ -20854,25 +20854,25 @@ class oS {
);
}
getVisibleRangesForRange(e, t, i, n) {
- const o = this._getColumnPixelOffset(e, t, n), r = this._getColumnPixelOffset(e, i, n);
- return [new cg(o, r - o)];
+ const o = this._getColumnPixelOffset(e, t, n), l = this._getColumnPixelOffset(e, i, n);
+ return [new bm(o, l - o)];
}
_getColumnPixelOffset(e, t, i) {
if (t <= 300) {
- const c = this._characterMapping.getHorizontalOffset(t);
- return this._charWidth * c;
+ const d = this._characterMapping.getHorizontalOffset(t);
+ return this._charWidth * d;
}
const n = Math.floor(
(t - 1) / 300
/* Constants.MaxMonospaceDistance */
) - 1, o = (n + 1) * 300 + 1;
- let r = -1;
- if (this._keyColumnPixelOffsetCache && (r = this._keyColumnPixelOffsetCache[n], r === -1 && (r = this._actualReadPixelOffset(e, o, i), this._keyColumnPixelOffsetCache[n] = r)), r === -1) {
- const c = this._characterMapping.getHorizontalOffset(t);
- return this._charWidth * c;
+ let l = -1;
+ if (this._keyColumnPixelOffsetCache && (l = this._keyColumnPixelOffsetCache[n], l === -1 && (l = this._actualReadPixelOffset(e, o, i), this._keyColumnPixelOffsetCache[n] = l)), l === -1) {
+ const d = this._characterMapping.getHorizontalOffset(t);
+ return this._charWidth * d;
}
- const l = this._characterMapping.getHorizontalOffset(o), a = this._characterMapping.getHorizontalOffset(t);
- return r + this._charWidth * (a - l);
+ const r = this._characterMapping.getHorizontalOffset(o), c = this._characterMapping.getHorizontalOffset(t);
+ return l + this._charWidth * (c - r);
}
_getReadingTarget(e) {
return e.domNode.firstChild;
@@ -20880,19 +20880,19 @@ class oS {
_actualReadPixelOffset(e, t, i) {
if (!this.domNode)
return -1;
- const n = this._characterMapping.getDomPosition(t), o = CL.readHorizontalRanges(this._getReadingTarget(this.domNode), n.partIndex, n.charIndex, n.partIndex, n.charIndex, i);
+ const n = this._characterMapping.getDomPosition(t), o = kX.readHorizontalRanges(this._getReadingTarget(this.domNode), n.partIndex, n.charIndex, n.partIndex, n.charIndex, i);
return !o || o.length === 0 ? -1 : o[0].left;
}
getColumnOfNodeOffset(e, t) {
- return OE(this._characterMapping, e, t);
+ return gJ(this._characterMapping, e, t);
}
}
-class fU {
+class q_ {
constructor(e, t, i, n, o) {
if (this.domNode = e, this.input = t, this._characterMapping = i, this._isWhitespaceOnly = /^\s*$/.test(t.lineContent), this._containsForeignElements = o, this._cachedWidth = -1, this._pixelOffsetCache = null, !n || this._characterMapping.length === 0) {
this._pixelOffsetCache = new Float32Array(Math.max(2, this._characterMapping.length + 1));
- for (let r = 0, l = this._characterMapping.length; r <= l; r++)
- this._pixelOffsetCache[r] = -1;
+ for (let l = 0, r = this._characterMapping.length; l <= r; l++)
+ this._pixelOffsetCache[l] = -1;
}
}
// --- Reading from the DOM methods
@@ -20918,15 +20918,15 @@ class fU {
const o = this._readPixelOffset(this.domNode, e, t, n);
if (o === -1)
return null;
- const r = this._readPixelOffset(this.domNode, e, i, n);
- return r === -1 ? null : [new cg(o, r - o)];
+ const l = this._readPixelOffset(this.domNode, e, i, n);
+ return l === -1 ? null : [new bm(o, l - o)];
}
return this._readVisibleRangesForRange(this.domNode, e, t, i, n);
}
_readVisibleRangesForRange(e, t, i, n, o) {
if (i === n) {
- const r = this._readPixelOffset(e, t, i, o);
- return r === -1 ? null : [new cg(r, 0)];
+ const l = this._readPixelOffset(e, t, i, o);
+ return l === -1 ? null : [new bm(l, 0)];
} else
return this._readRawVisibleRangesForRange(e, i, n, o);
}
@@ -20943,79 +20943,79 @@ class fU {
const o = this._pixelOffsetCache[i];
if (o !== -1)
return o;
- const r = this._actualReadPixelOffset(e, t, i, n);
- return this._pixelOffsetCache[i] = r, r;
+ const l = this._actualReadPixelOffset(e, t, i, n);
+ return this._pixelOffsetCache[i] = l, l;
}
return this._actualReadPixelOffset(e, t, i, n);
}
_actualReadPixelOffset(e, t, i, n) {
if (this._characterMapping.length === 0) {
- const a = CL.readHorizontalRanges(this._getReadingTarget(e), 0, 0, 0, 0, n);
- return !a || a.length === 0 ? -1 : a[0].left;
+ const c = kX.readHorizontalRanges(this._getReadingTarget(e), 0, 0, 0, 0, n);
+ return !c || c.length === 0 ? -1 : c[0].left;
}
if (i === this._characterMapping.length && this._isWhitespaceOnly && this._containsForeignElements === 0)
return this.getWidth(n);
- const o = this._characterMapping.getDomPosition(i), r = CL.readHorizontalRanges(this._getReadingTarget(e), o.partIndex, o.charIndex, o.partIndex, o.charIndex, n);
- if (!r || r.length === 0)
+ const o = this._characterMapping.getDomPosition(i), l = kX.readHorizontalRanges(this._getReadingTarget(e), o.partIndex, o.charIndex, o.partIndex, o.charIndex, n);
+ if (!l || l.length === 0)
return -1;
- const l = r[0].left;
+ const r = l[0].left;
if (this.input.isBasicASCII) {
- const a = this._characterMapping.getHorizontalOffset(i), c = Math.round(this.input.spaceWidth * a);
- if (Math.abs(c - l) <= 1)
- return c;
+ const c = this._characterMapping.getHorizontalOffset(i), d = Math.round(this.input.spaceWidth * c);
+ if (Math.abs(d - r) <= 1)
+ return d;
}
- return l;
+ return r;
}
_readRawVisibleRangesForRange(e, t, i, n) {
if (t === 1 && i === this._characterMapping.length)
- return [new cg(0, this.getWidth(n))];
- const o = this._characterMapping.getDomPosition(t), r = this._characterMapping.getDomPosition(i);
- return CL.readHorizontalRanges(this._getReadingTarget(e), o.partIndex, o.charIndex, r.partIndex, r.charIndex, n);
+ return [new bm(0, this.getWidth(n))];
+ const o = this._characterMapping.getDomPosition(t), l = this._characterMapping.getDomPosition(i);
+ return kX.readHorizontalRanges(this._getReadingTarget(e), o.partIndex, o.charIndex, l.partIndex, l.charIndex, n);
}
/**
* Returns the column for the text found at a specific offset inside a rendered dom node
*/
getColumnOfNodeOffset(e, t) {
- return OE(this._characterMapping, e, t);
+ return gJ(this._characterMapping, e, t);
}
}
-class Xse extends fU {
+class woe extends q_ {
_readVisibleRangesForRange(e, t, i, n, o) {
- const r = super._readVisibleRangesForRange(e, t, i, n, o);
- if (!r || r.length === 0 || i === n || i === 1 && n === this._characterMapping.length)
- return r;
+ const l = super._readVisibleRangesForRange(e, t, i, n, o);
+ if (!l || l.length === 0 || i === n || i === 1 && n === this._characterMapping.length)
+ return l;
if (!this.input.containsRTL) {
- const l = this._readPixelOffset(e, t, n, o);
- if (l !== -1) {
- const a = r[r.length - 1];
- a.left < l && (a.width = l - a.left);
+ const r = this._readPixelOffset(e, t, n, o);
+ if (r !== -1) {
+ const c = l[l.length - 1];
+ c.left < r && (c.width = r - c.left);
}
}
- return r;
+ return l;
}
}
-const bU = /* @__PURE__ */ function() {
- return Z_ ? Fse : Yse;
+const $_ = /* @__PURE__ */ function() {
+ return FS ? Toe : Moe;
}();
-function Fse(s, e, t, i, n) {
- return new Xse(s, e, t, i, n);
+function Toe(s, e, t, i, n) {
+ return new woe(s, e, t, i, n);
}
-function Yse(s, e, t, i, n) {
- return new fU(s, e, t, i, n);
+function Moe(s, e, t, i, n) {
+ return new q_(s, e, t, i, n);
}
-function OE(s, e, t) {
+function gJ(s, e, t) {
const i = e.textContent.length;
let n = -1;
for (; e; )
e = e.previousSibling, n++;
- return s.getColumn(new mU(n, t), i);
+ return s.getColumn(new O_(n, t), i);
}
-class wd {
+class Va {
constructor(e = null) {
this.hitTarget = e, this.type = 0;
}
}
-class yU {
+class eQ {
get hitTarget() {
return this.spanNode;
}
@@ -21023,22 +21023,22 @@ class yU {
this.position = e, this.spanNode = t, this.injectedText = i, this.type = 1;
}
}
-var Vu;
+var Eu;
(function(s) {
function e(t, i, n) {
const o = t.getPositionFromDOMInfo(i, n);
- return o ? new yU(o, i, null) : new wd(i);
+ return o ? new eQ(o, i, null) : new Va(i);
}
s.createFromDOMInfo = e;
-})(Vu || (Vu = {}));
-class zse {
+})(Eu || (Eu = {}));
+class Yoe {
constructor(e, t) {
this.lastViewCursorsRenderData = e, this.lastTextareaPosition = t;
}
}
-class Hn {
+class _n {
static _deduceRage(e, t = null) {
- return !t && e ? new M(e.lineNumber, e.column, e.lineNumber, e.column) : t ?? null;
+ return !t && e ? new I(e.lineNumber, e.column, e.lineNumber, e.column) : t ?? null;
}
static createUnknown(e, t, i) {
return { type: 0, element: e, mouseColumn: t, position: i, range: this._deduceRage(i) };
@@ -21046,8 +21046,8 @@ class Hn {
static createTextarea(e, t) {
return { type: 1, element: e, mouseColumn: t, position: null, range: null };
}
- static createMargin(e, t, i, n, o, r) {
- return { type: e, element: t, mouseColumn: i, position: n, range: o, detail: r };
+ static createMargin(e, t, i, n, o, l) {
+ return { type: e, element: t, mouseColumn: i, position: n, range: o, detail: l };
}
static createViewZone(e, t, i, n, o) {
return { type: e, element: t, mouseColumn: i, position: n, range: this._deduceRage(n), detail: o };
@@ -21077,7 +21077,7 @@ class Hn {
return this._typeToString(e.type) + ": " + e.position + " - " + e.range + " - " + JSON.stringify(e.detail);
}
}
-class ns {
+class os {
static isTextArea(e) {
return e.length === 2 && e[0] === 3 && e[1] === 7;
}
@@ -21109,7 +21109,7 @@ class ns {
return e.length >= 1 && e[0] === 5;
}
}
-class gb {
+class yZ {
constructor(e, t, i) {
this.viewModel = e.viewModel;
const n = e.configuration.options;
@@ -21128,19 +21128,19 @@ class gb {
).typicalHalfwidthCharacterWidth, this.lastRenderData = i, this._context = e, this._viewHelper = t;
}
getZoneAtCoord(e) {
- return gb.getZoneAtCoord(this._context, e);
+ return yZ.getZoneAtCoord(this._context, e);
}
static getZoneAtCoord(e, t) {
const i = e.viewLayout.getWhitespaceAtVerticalOffset(t);
if (i) {
const n = i.verticalOffset + i.height / 2, o = e.viewModel.getLineCount();
- let r = null, l, a = null;
- return i.afterLineNumber !== o && (a = new V(i.afterLineNumber + 1, 1)), i.afterLineNumber > 0 && (r = new V(i.afterLineNumber, e.viewModel.getLineMaxColumn(i.afterLineNumber))), a === null ? l = r : r === null ? l = a : t < n ? l = r : l = a, {
+ let l = null, r, c = null;
+ return i.afterLineNumber !== o && (c = new Y(i.afterLineNumber + 1, 1)), i.afterLineNumber > 0 && (l = new Y(i.afterLineNumber, e.viewModel.getLineMaxColumn(i.afterLineNumber))), c === null ? r = l : l === null ? r = c : t < n ? r = l : r = c, {
viewZoneId: i.id,
afterLineNumber: i.afterLineNumber,
- positionBefore: r,
- positionAfter: a,
- position: l
+ positionBefore: l,
+ positionAfter: c,
+ position: r
};
}
return null;
@@ -21149,13 +21149,13 @@ class gb {
if (this._context.viewLayout.isAfterLines(e)) {
const n = this._context.viewModel.getLineCount(), o = this._context.viewModel.getLineMaxColumn(n);
return {
- range: new M(n, o, n, o),
+ range: new I(n, o, n, o),
isAfterLines: !0
};
}
const t = this._context.viewLayout.getLineNumberAtVerticalOffset(e), i = this._context.viewModel.getLineMaxColumn(t);
return {
- range: new M(t, 1, t, i),
+ range: new I(t, 1, t, i),
isAfterLines: !1
};
}
@@ -21175,7 +21175,7 @@ class gb {
return this._context.viewLayout.getVerticalOffsetForLineNumber(e);
}
findAttribute(e, t) {
- return gb._findAttribute(e, t, this._viewHelper.viewDomNode);
+ return yZ._findAttribute(e, t, this._viewHelper.viewDomNode);
}
static _findAttribute(e, t, i) {
for (; e && e !== e.ownerDocument.body; ) {
@@ -21203,22 +21203,22 @@ class gb {
return this._context.viewLayout.getCurrentScrollLeft();
}
}
-class Pse {
+class koe {
constructor(e, t, i, n) {
- this.editorPos = t, this.pos = i, this.relativePos = n, this.mouseVerticalOffset = Math.max(0, e.getCurrentScrollTop() + this.relativePos.y), this.mouseContentHorizontalOffset = e.getCurrentScrollLeft() + this.relativePos.x - e.layoutInfo.contentLeft, this.isInMarginArea = this.relativePos.x < e.layoutInfo.contentLeft && this.relativePos.x >= e.layoutInfo.glyphMarginLeft, this.isInContentArea = !this.isInMarginArea, this.mouseColumn = Math.max(0, On._getMouseColumn(this.mouseContentHorizontalOffset, e.typicalHalfwidthCharacterWidth));
+ this.editorPos = t, this.pos = i, this.relativePos = n, this.mouseVerticalOffset = Math.max(0, e.getCurrentScrollTop() + this.relativePos.y), this.mouseContentHorizontalOffset = e.getCurrentScrollLeft() + this.relativePos.x - e.layoutInfo.contentLeft, this.isInMarginArea = this.relativePos.x < e.layoutInfo.contentLeft && this.relativePos.x >= e.layoutInfo.glyphMarginLeft, this.isInContentArea = !this.isInMarginArea, this.mouseColumn = Math.max(0, Bn._getMouseColumn(this.mouseContentHorizontalOffset, e.typicalHalfwidthCharacterWidth));
}
}
-class Bse extends Pse {
+class voe extends koe {
get target() {
return this._useHitTestTarget ? this.hitTestResult.value.hitTarget : this._eventTarget;
}
get targetPath() {
- return this._targetPathCacheElement !== this.target && (this._targetPathCacheElement = this.target, this._targetPathCacheValue = Tl.collect(this.target, this._ctx.viewDomNode)), this._targetPathCacheValue;
+ return this._targetPathCacheElement !== this.target && (this._targetPathCacheElement = this.target, this._targetPathCacheValue = vr.collect(this.target, this._ctx.viewDomNode)), this._targetPathCacheValue;
}
constructor(e, t, i, n, o) {
- super(e, t, i, n), this.hitTestResult = new Wl(() => On.doHitTest(this._ctx, this)), this._targetPathCacheElement = null, this._targetPathCacheValue = new Uint8Array(0), this._ctx = e, this._eventTarget = o;
- const r = !!this._eventTarget;
- this._useHitTestTarget = !r;
+ super(e, t, i, n), this.hitTestResult = new Yr(() => Bn.doHitTest(this._ctx, this)), this._targetPathCacheElement = null, this._targetPathCacheValue = new Uint8Array(0), this._ctx = e, this._eventTarget = o;
+ const l = !!this._eventTarget;
+ this._useHitTestTarget = !l;
}
toString() {
return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
@@ -21231,62 +21231,62 @@ class Bse extends Pse {
this._useHitTestTarget = !0;
}
_getMouseColumn(e = null) {
- return e && e.column < this._ctx.viewModel.getLineMaxColumn(e.lineNumber) ? Yi.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber), e.column, this._ctx.viewModel.model.getOptions().tabSize) + 1 : this.mouseColumn;
+ return e && e.column < this._ctx.viewModel.getLineMaxColumn(e.lineNumber) ? zi.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber), e.column, this._ctx.viewModel.model.getOptions().tabSize) + 1 : this.mouseColumn;
}
fulfillUnknown(e = null) {
- return Hn.createUnknown(this.target, this._getMouseColumn(e), e);
+ return _n.createUnknown(this.target, this._getMouseColumn(e), e);
}
fulfillTextarea() {
- return Hn.createTextarea(this.target, this._getMouseColumn());
+ return _n.createTextarea(this.target, this._getMouseColumn());
}
fulfillMargin(e, t, i, n) {
- return Hn.createMargin(e, this.target, this._getMouseColumn(t), t, i, n);
+ return _n.createMargin(e, this.target, this._getMouseColumn(t), t, i, n);
}
fulfillViewZone(e, t, i) {
- return Hn.createViewZone(e, this.target, this._getMouseColumn(t), t, i);
+ return _n.createViewZone(e, this.target, this._getMouseColumn(t), t, i);
}
fulfillContentText(e, t, i) {
- return Hn.createContentText(this.target, this._getMouseColumn(e), e, t, i);
+ return _n.createContentText(this.target, this._getMouseColumn(e), e, t, i);
}
fulfillContentEmpty(e, t) {
- return Hn.createContentEmpty(this.target, this._getMouseColumn(e), e, t);
+ return _n.createContentEmpty(this.target, this._getMouseColumn(e), e, t);
}
fulfillContentWidget(e) {
- return Hn.createContentWidget(this.target, this._getMouseColumn(), e);
+ return _n.createContentWidget(this.target, this._getMouseColumn(), e);
}
fulfillScrollbar(e) {
- return Hn.createScrollbar(this.target, this._getMouseColumn(e), e);
+ return _n.createScrollbar(this.target, this._getMouseColumn(e), e);
}
fulfillOverlayWidget(e) {
- return Hn.createOverlayWidget(this.target, this._getMouseColumn(), e);
+ return _n.createOverlayWidget(this.target, this._getMouseColumn(), e);
}
}
-const HF = { isAfterLines: !0 };
-function zN(s) {
+const ZF = { isAfterLines: !0 };
+function sR(s) {
return {
isAfterLines: !1,
horizontalDistanceToText: s
};
}
-class On {
+class Bn {
constructor(e, t) {
this._context = e, this._viewHelper = t;
}
mouseTargetIsWidget(e) {
- const t = e.target, i = Tl.collect(t, this._viewHelper.viewDomNode);
- return !!(ns.isChildOfContentWidgets(i) || ns.isChildOfOverflowingContentWidgets(i) || ns.isChildOfOverlayWidgets(i) || ns.isChildOfOverflowingOverlayWidgets(i));
+ const t = e.target, i = vr.collect(t, this._viewHelper.viewDomNode);
+ return !!(os.isChildOfContentWidgets(i) || os.isChildOfOverflowingContentWidgets(i) || os.isChildOfOverlayWidgets(i) || os.isChildOfOverflowingOverlayWidgets(i));
}
createMouseTarget(e, t, i, n, o) {
- const r = new gb(this._context, this._viewHelper, e), l = new Bse(r, t, i, n, o);
+ const l = new yZ(this._context, this._viewHelper, e), r = new voe(l, t, i, n, o);
try {
- const a = On._createMouseTarget(r, l);
- if (a.type === 6 && r.stickyTabStops && a.position !== null) {
- const c = On._snapToSoftTabBoundary(a.position, r.viewModel), d = M.fromPositions(c, c).plusRange(a.range);
- return l.fulfillContentText(c, d, a.detail);
+ const c = Bn._createMouseTarget(l, r);
+ if (c.type === 6 && l.stickyTabStops && c.position !== null) {
+ const d = Bn._snapToSoftTabBoundary(c.position, l.viewModel), a = I.fromPositions(d, d).plusRange(c.range);
+ return r.fulfillContentText(d, a, c.detail);
}
- return a;
+ return c;
} catch {
- return l.fulfillUnknown();
+ return r.fulfillUnknown();
}
}
static _createMouseTarget(e, t) {
@@ -21294,17 +21294,17 @@ class On {
return t.fulfillUnknown();
const i = t;
let n = null;
- return !ns.isChildOfOverflowGuard(t.targetPath) && !ns.isChildOfOverflowingContentWidgets(t.targetPath) && !ns.isChildOfOverflowingOverlayWidgets(t.targetPath) && (n = n || t.fulfillUnknown()), n = n || On._hitTestContentWidget(e, i), n = n || On._hitTestOverlayWidget(e, i), n = n || On._hitTestMinimap(e, i), n = n || On._hitTestScrollbarSlider(e, i), n = n || On._hitTestViewZone(e, i), n = n || On._hitTestMargin(e, i), n = n || On._hitTestViewCursor(e, i), n = n || On._hitTestTextArea(e, i), n = n || On._hitTestViewLines(e, i), n = n || On._hitTestScrollbar(e, i), n || t.fulfillUnknown();
+ return !os.isChildOfOverflowGuard(t.targetPath) && !os.isChildOfOverflowingContentWidgets(t.targetPath) && !os.isChildOfOverflowingOverlayWidgets(t.targetPath) && (n = n || t.fulfillUnknown()), n = n || Bn._hitTestContentWidget(e, i), n = n || Bn._hitTestOverlayWidget(e, i), n = n || Bn._hitTestMinimap(e, i), n = n || Bn._hitTestScrollbarSlider(e, i), n = n || Bn._hitTestViewZone(e, i), n = n || Bn._hitTestMargin(e, i), n = n || Bn._hitTestViewCursor(e, i), n = n || Bn._hitTestTextArea(e, i), n = n || Bn._hitTestViewLines(e, i), n = n || Bn._hitTestScrollbar(e, i), n || t.fulfillUnknown();
}
static _hitTestContentWidget(e, t) {
- if (ns.isChildOfContentWidgets(t.targetPath) || ns.isChildOfOverflowingContentWidgets(t.targetPath)) {
+ if (os.isChildOfContentWidgets(t.targetPath) || os.isChildOfOverflowingContentWidgets(t.targetPath)) {
const i = e.findAttribute(t.target, "widgetId");
return i ? t.fulfillContentWidget(i) : t.fulfillUnknown();
}
return null;
}
static _hitTestOverlayWidget(e, t) {
- if (ns.isChildOfOverlayWidgets(t.targetPath) || ns.isChildOfOverflowingOverlayWidgets(t.targetPath)) {
+ if (os.isChildOfOverlayWidgets(t.targetPath) || os.isChildOfOverflowingOverlayWidgets(t.targetPath)) {
const i = e.findAttribute(t.target, "widgetId");
return i ? t.fulfillOverlayWidget(i) : t.fulfillUnknown();
}
@@ -21319,12 +21319,12 @@ class On {
}
if (t.isInContentArea) {
const i = e.lastRenderData.lastViewCursorsRenderData, n = t.mouseContentHorizontalOffset, o = t.mouseVerticalOffset;
- for (const r of i) {
- if (n < r.contentLeft || n > r.contentLeft + r.width)
+ for (const l of i) {
+ if (n < l.contentLeft || n > l.contentLeft + l.width)
continue;
- const l = e.getVerticalOffsetForLineNumber(r.position.lineNumber);
- if (l <= o && o <= l + r.height)
- return t.fulfillContentText(r.position, null, { mightBeForeignElement: !1, injectedText: null });
+ const r = e.getVerticalOffsetForLineNumber(l.position.lineNumber);
+ if (r <= o && o <= r + l.height)
+ return t.fulfillContentText(l.position, null, { mightBeForeignElement: !1, injectedText: null });
}
}
return null;
@@ -21338,13 +21338,13 @@ class On {
return null;
}
static _hitTestTextArea(e, t) {
- return ns.isTextArea(t.targetPath) ? e.lastRenderData.lastTextareaPosition ? t.fulfillContentText(e.lastRenderData.lastTextareaPosition, null, { mightBeForeignElement: !1, injectedText: null }) : t.fulfillTextarea() : null;
+ return os.isTextArea(t.targetPath) ? e.lastRenderData.lastTextareaPosition ? t.fulfillContentText(e.lastRenderData.lastTextareaPosition, null, { mightBeForeignElement: !1, injectedText: null }) : t.fulfillTextarea() : null;
}
static _hitTestMargin(e, t) {
if (t.isInMarginArea) {
const i = e.getFullLineRangeAtCoord(t.mouseVerticalOffset), n = i.range.getStartPosition();
let o = Math.abs(t.relativePos.x);
- const r = {
+ const l = {
isAfterLines: i.isAfterLines,
glyphMarginLeft: e.layoutInfo.glyphMarginLeft,
glyphMarginWidth: e.layoutInfo.glyphMarginWidth,
@@ -21352,58 +21352,58 @@ class On {
offsetX: o
};
if (o -= e.layoutInfo.glyphMarginLeft, o <= e.layoutInfo.glyphMarginWidth) {
- const l = e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()), a = e.viewModel.glyphLanes.getLanesAtLine(l.lineNumber);
- return r.glyphMarginLane = a[Math.floor(o / e.lineHeight)], t.fulfillMargin(2, n, i.range, r);
+ const r = e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()), c = e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);
+ return l.glyphMarginLane = c[Math.floor(o / e.lineHeight)], t.fulfillMargin(2, n, i.range, l);
}
- return o -= e.layoutInfo.glyphMarginWidth, o <= e.layoutInfo.lineNumbersWidth ? t.fulfillMargin(3, n, i.range, r) : (o -= e.layoutInfo.lineNumbersWidth, t.fulfillMargin(4, n, i.range, r));
+ return o -= e.layoutInfo.glyphMarginWidth, o <= e.layoutInfo.lineNumbersWidth ? t.fulfillMargin(3, n, i.range, l) : (o -= e.layoutInfo.lineNumbersWidth, t.fulfillMargin(4, n, i.range, l));
}
return null;
}
static _hitTestViewLines(e, t) {
- if (!ns.isChildOfViewLines(t.targetPath))
+ if (!os.isChildOfViewLines(t.targetPath))
return null;
if (e.isInTopPadding(t.mouseVerticalOffset))
- return t.fulfillContentEmpty(new V(1, 1), HF);
+ return t.fulfillContentEmpty(new Y(1, 1), ZF);
if (e.isAfterLines(t.mouseVerticalOffset) || e.isInBottomPadding(t.mouseVerticalOffset)) {
const n = e.viewModel.getLineCount(), o = e.viewModel.getLineMaxColumn(n);
- return t.fulfillContentEmpty(new V(n, o), HF);
+ return t.fulfillContentEmpty(new Y(n, o), ZF);
}
- if (ns.isStrictChildOfViewLines(t.targetPath)) {
+ if (os.isStrictChildOfViewLines(t.targetPath)) {
const n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);
if (e.viewModel.getLineLength(n) === 0) {
- const r = e.getLineWidth(n), l = zN(t.mouseContentHorizontalOffset - r);
- return t.fulfillContentEmpty(new V(n, 1), l);
+ const l = e.getLineWidth(n), r = sR(t.mouseContentHorizontalOffset - l);
+ return t.fulfillContentEmpty(new Y(n, 1), r);
}
const o = e.getLineWidth(n);
if (t.mouseContentHorizontalOffset >= o) {
- const r = zN(t.mouseContentHorizontalOffset - o), l = new V(n, e.viewModel.getLineMaxColumn(n));
- return t.fulfillContentEmpty(l, r);
+ const l = sR(t.mouseContentHorizontalOffset - o), r = new Y(n, e.viewModel.getLineMaxColumn(n));
+ return t.fulfillContentEmpty(r, l);
}
}
const i = t.hitTestResult.value;
- return i.type === 1 ? On.createMouseTargetFromHitTestPosition(e, t, i.spanNode, i.position, i.injectedText) : t.wouldBenefitFromHitTestTargetSwitch ? (t.switchToHitTestTarget(), this._createMouseTarget(e, t)) : t.fulfillUnknown();
+ return i.type === 1 ? Bn.createMouseTargetFromHitTestPosition(e, t, i.spanNode, i.position, i.injectedText) : t.wouldBenefitFromHitTestTargetSwitch ? (t.switchToHitTestTarget(), this._createMouseTarget(e, t)) : t.fulfillUnknown();
}
static _hitTestMinimap(e, t) {
- if (ns.isChildOfMinimap(t.targetPath)) {
+ if (os.isChildOfMinimap(t.targetPath)) {
const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), n = e.viewModel.getLineMaxColumn(i);
- return t.fulfillScrollbar(new V(i, n));
+ return t.fulfillScrollbar(new Y(i, n));
}
return null;
}
static _hitTestScrollbarSlider(e, t) {
- if (ns.isChildOfScrollableElement(t.targetPath) && t.target && t.target.nodeType === 1) {
+ if (os.isChildOfScrollableElement(t.targetPath) && t.target && t.target.nodeType === 1) {
const i = t.target.className;
if (i && /\b(slider|scrollbar)\b/.test(i)) {
const n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), o = e.viewModel.getLineMaxColumn(n);
- return t.fulfillScrollbar(new V(n, o));
+ return t.fulfillScrollbar(new Y(n, o));
}
}
return null;
}
static _hitTestScrollbar(e, t) {
- if (ns.isChildOfScrollableElement(t.targetPath)) {
+ if (os.isChildOfScrollableElement(t.targetPath)) {
const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), n = e.viewModel.getLineMaxColumn(i);
- return t.fulfillScrollbar(new V(i, n));
+ return t.fulfillScrollbar(new Y(i, n));
}
return null;
}
@@ -21412,7 +21412,7 @@ class On {
146
/* EditorOption.layoutInfo */
), n = this._context.viewLayout.getCurrentScrollLeft() + e.x - i.contentLeft;
- return On._getMouseColumn(n, t.get(
+ return Bn._getMouseColumn(n, t.get(
50
/* EditorOption.fontInfo */
).typicalHalfwidthCharacterWidth);
@@ -21421,40 +21421,40 @@ class On {
return e < 0 ? 1 : Math.round(e / t) + 1;
}
static createMouseTargetFromHitTestPosition(e, t, i, n, o) {
- const r = n.lineNumber, l = n.column, a = e.getLineWidth(r);
- if (t.mouseContentHorizontalOffset > a) {
- const y = zN(t.mouseContentHorizontalOffset - a);
- return t.fulfillContentEmpty(n, y);
+ const l = n.lineNumber, r = n.column, c = e.getLineWidth(l);
+ if (t.mouseContentHorizontalOffset > c) {
+ const f = sR(t.mouseContentHorizontalOffset - c);
+ return t.fulfillContentEmpty(n, f);
}
- const c = e.visibleRangeForPosition(r, l);
- if (!c)
+ const d = e.visibleRangeForPosition(l, r);
+ if (!d)
return t.fulfillUnknown(n);
- const d = c.left;
- if (Math.abs(t.mouseContentHorizontalOffset - d) < 1)
+ const a = d.left;
+ if (Math.abs(t.mouseContentHorizontalOffset - a) < 1)
return t.fulfillContentText(n, null, { mightBeForeignElement: !!o, injectedText: o });
const h = [];
- if (h.push({ offset: c.left, column: l }), l > 1) {
- const y = e.visibleRangeForPosition(r, l - 1);
- y && h.push({ offset: y.left, column: l - 1 });
- }
- const u = e.viewModel.getLineMaxColumn(r);
- if (l < u) {
- const y = e.visibleRangeForPosition(r, l + 1);
- y && h.push({ offset: y.left, column: l + 1 });
- }
- h.sort((y, w) => y.offset - w.offset);
- const g = t.pos.toClientCoordinates(xe(e.viewDomNode)), m = i.getBoundingClientRect(), f = m.left <= g.clientX && g.clientX <= m.right;
- let b = null;
- for (let y = 1; y < h.length; y++) {
- const w = h[y - 1], C = h[y];
- if (w.offset <= t.mouseContentHorizontalOffset && t.mouseContentHorizontalOffset <= C.offset) {
- b = new M(r, w.column, r, C.column);
- const S = Math.abs(w.offset - t.mouseContentHorizontalOffset), L = Math.abs(C.offset - t.mouseContentHorizontalOffset);
- n = S < L ? new V(r, w.column) : new V(r, C.column);
+ if (h.push({ offset: d.left, column: r }), r > 1) {
+ const f = e.visibleRangeForPosition(l, r - 1);
+ f && h.push({ offset: f.left, column: r - 1 });
+ }
+ const u = e.viewModel.getLineMaxColumn(l);
+ if (r < u) {
+ const f = e.visibleRangeForPosition(l, r + 1);
+ f && h.push({ offset: f.left, column: r + 1 });
+ }
+ h.sort((f, y) => f.offset - y.offset);
+ const m = t.pos.toClientCoordinates(Le(e.viewDomNode)), b = i.getBoundingClientRect(), g = b.left <= m.clientX && m.clientX <= b.right;
+ let Z = null;
+ for (let f = 1; f < h.length; f++) {
+ const y = h[f - 1], W = h[f];
+ if (y.offset <= t.mouseContentHorizontalOffset && t.mouseContentHorizontalOffset <= W.offset) {
+ Z = new I(l, y.column, l, W.column);
+ const G = Math.abs(y.offset - t.mouseContentHorizontalOffset), X = Math.abs(W.offset - t.mouseContentHorizontalOffset);
+ n = G < X ? new Y(l, y.column) : new Y(l, W.column);
break;
}
}
- return t.fulfillContentText(n, b, { mightBeForeignElement: !f || !!o, injectedText: o });
+ return t.fulfillContentText(n, Z, { mightBeForeignElement: !g || !!o, injectedText: o });
}
/**
* Most probably WebKit browsers and Edge
@@ -21462,29 +21462,29 @@ class On {
static _doHitTestWithCaretRangeFromPoint(e, t) {
const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), n = e.getVerticalOffsetForLineNumber(i), o = n + e.lineHeight;
if (!(i === e.viewModel.getLineCount() && t.mouseVerticalOffset > o)) {
- const l = Math.floor((n + o) / 2);
- let a = t.pos.y + (l - t.mouseVerticalOffset);
- a <= t.editorPos.y && (a = t.editorPos.y + 1), a >= t.editorPos.y + t.editorPos.height && (a = t.editorPos.y + t.editorPos.height - 1);
- const c = new aI(t.pos.x, a), d = this._actualDoHitTestWithCaretRangeFromPoint(e, c.toClientCoordinates(xe(e.viewDomNode)));
- if (d.type === 1)
- return d;
+ const r = Math.floor((n + o) / 2);
+ let c = t.pos.y + (r - t.mouseVerticalOffset);
+ c <= t.editorPos.y && (c = t.editorPos.y + 1), c >= t.editorPos.y + t.editorPos.height && (c = t.editorPos.y + t.editorPos.height - 1);
+ const d = new Vx(t.pos.x, c), a = this._actualDoHitTestWithCaretRangeFromPoint(e, d.toClientCoordinates(Le(e.viewDomNode)));
+ if (a.type === 1)
+ return a;
}
- return this._actualDoHitTestWithCaretRangeFromPoint(e, t.pos.toClientCoordinates(xe(e.viewDomNode)));
+ return this._actualDoHitTestWithCaretRangeFromPoint(e, t.pos.toClientCoordinates(Le(e.viewDomNode)));
}
static _actualDoHitTestWithCaretRangeFromPoint(e, t) {
- const i = hm(e.viewDomNode);
+ const i = gb(e.viewDomNode);
let n;
- if (i ? typeof i.caretRangeFromPoint > "u" ? n = Ose(i, t.clientX, t.clientY) : n = i.caretRangeFromPoint(t.clientX, t.clientY) : n = e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX, t.clientY), !n || !n.startContainer)
- return new wd();
+ if (i ? typeof i.caretRangeFromPoint > "u" ? n = Joe(i, t.clientX, t.clientY) : n = i.caretRangeFromPoint(t.clientX, t.clientY) : n = e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX, t.clientY), !n || !n.startContainer)
+ return new Va();
const o = n.startContainer;
if (o.nodeType === o.TEXT_NODE) {
- const r = o.parentNode, l = r ? r.parentNode : null, a = l ? l.parentNode : null;
- return (a && a.nodeType === a.ELEMENT_NODE ? a.className : null) === wc.CLASS_NAME ? Vu.createFromDOMInfo(e, r, n.startOffset) : new wd(o.parentNode);
+ const l = o.parentNode, r = l ? l.parentNode : null, c = r ? r.parentNode : null;
+ return (c && c.nodeType === c.ELEMENT_NODE ? c.className : null) === Vd.CLASS_NAME ? Eu.createFromDOMInfo(e, l, n.startOffset) : new Va(o.parentNode);
} else if (o.nodeType === o.ELEMENT_NODE) {
- const r = o.parentNode, l = r ? r.parentNode : null;
- return (l && l.nodeType === l.ELEMENT_NODE ? l.className : null) === wc.CLASS_NAME ? Vu.createFromDOMInfo(e, o, o.textContent.length) : new wd(o);
+ const l = o.parentNode, r = l ? l.parentNode : null;
+ return (r && r.nodeType === r.ELEMENT_NODE ? r.className : null) === Vd.CLASS_NAME ? Eu.createFromDOMInfo(e, o, o.textContent.length) : new Va(o);
}
- return new wd();
+ return new Va();
}
/**
* Most probably Gecko
@@ -21492,70 +21492,70 @@ class On {
static _doHitTestWithCaretPositionFromPoint(e, t) {
const i = e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX, t.clientY);
if (i.offsetNode.nodeType === i.offsetNode.TEXT_NODE) {
- const n = i.offsetNode.parentNode, o = n ? n.parentNode : null, r = o ? o.parentNode : null;
- return (r && r.nodeType === r.ELEMENT_NODE ? r.className : null) === wc.CLASS_NAME ? Vu.createFromDOMInfo(e, i.offsetNode.parentNode, i.offset) : new wd(i.offsetNode.parentNode);
+ const n = i.offsetNode.parentNode, o = n ? n.parentNode : null, l = o ? o.parentNode : null;
+ return (l && l.nodeType === l.ELEMENT_NODE ? l.className : null) === Vd.CLASS_NAME ? Eu.createFromDOMInfo(e, i.offsetNode.parentNode, i.offset) : new Va(i.offsetNode.parentNode);
}
if (i.offsetNode.nodeType === i.offsetNode.ELEMENT_NODE) {
- const n = i.offsetNode.parentNode, o = n && n.nodeType === n.ELEMENT_NODE ? n.className : null, r = n ? n.parentNode : null, l = r && r.nodeType === r.ELEMENT_NODE ? r.className : null;
- if (o === wc.CLASS_NAME) {
- const a = i.offsetNode.childNodes[Math.min(i.offset, i.offsetNode.childNodes.length - 1)];
- if (a)
- return Vu.createFromDOMInfo(e, a, 0);
- } else if (l === wc.CLASS_NAME)
- return Vu.createFromDOMInfo(e, i.offsetNode, 0);
+ const n = i.offsetNode.parentNode, o = n && n.nodeType === n.ELEMENT_NODE ? n.className : null, l = n ? n.parentNode : null, r = l && l.nodeType === l.ELEMENT_NODE ? l.className : null;
+ if (o === Vd.CLASS_NAME) {
+ const c = i.offsetNode.childNodes[Math.min(i.offset, i.offsetNode.childNodes.length - 1)];
+ if (c)
+ return Eu.createFromDOMInfo(e, c, 0);
+ } else if (r === Vd.CLASS_NAME)
+ return Eu.createFromDOMInfo(e, i.offsetNode, 0);
}
- return new wd(i.offsetNode);
+ return new Va(i.offsetNode);
}
static _snapToSoftTabBoundary(e, t) {
- const i = t.getLineContent(e.lineNumber), { tabSize: n } = t.model.getOptions(), o = kw.atomicPosition(
+ const i = t.getLineContent(e.lineNumber), { tabSize: n } = t.model.getOptions(), o = By.atomicPosition(
i,
e.column - 1,
n,
2
/* Direction.Nearest */
);
- return o !== -1 ? new V(e.lineNumber, o + 1) : e;
+ return o !== -1 ? new Y(e.lineNumber, o + 1) : e;
}
static doHitTest(e, t) {
- let i = new wd();
- if (typeof e.viewDomNode.ownerDocument.caretRangeFromPoint == "function" ? i = this._doHitTestWithCaretRangeFromPoint(e, t) : e.viewDomNode.ownerDocument.caretPositionFromPoint && (i = this._doHitTestWithCaretPositionFromPoint(e, t.pos.toClientCoordinates(xe(e.viewDomNode)))), i.type === 1) {
+ let i = new Va();
+ if (typeof e.viewDomNode.ownerDocument.caretRangeFromPoint == "function" ? i = this._doHitTestWithCaretRangeFromPoint(e, t) : e.viewDomNode.ownerDocument.caretPositionFromPoint && (i = this._doHitTestWithCaretPositionFromPoint(e, t.pos.toClientCoordinates(Le(e.viewDomNode)))), i.type === 1) {
const n = e.viewModel.getInjectedTextAt(i.position), o = e.viewModel.normalizePosition(
i.position,
2
/* PositionAffinity.None */
);
- (n || !o.equals(i.position)) && (i = new yU(o, i.spanNode, n));
+ (n || !o.equals(i.position)) && (i = new eQ(o, i.spanNode, n));
}
return i;
}
}
-function Ose(s, e, t) {
+function Joe(s, e, t) {
const i = document.createRange();
let n = s.elementFromPoint(e, t);
if (n !== null) {
for (; n && n.firstChild && n.firstChild.nodeType !== n.firstChild.TEXT_NODE && n.lastChild && n.lastChild.firstChild; )
n = n.lastChild;
- const o = n.getBoundingClientRect(), r = xe(n), l = r.getComputedStyle(n, null).getPropertyValue("font-style"), a = r.getComputedStyle(n, null).getPropertyValue("font-variant"), c = r.getComputedStyle(n, null).getPropertyValue("font-weight"), d = r.getComputedStyle(n, null).getPropertyValue("font-size"), h = r.getComputedStyle(n, null).getPropertyValue("line-height"), u = r.getComputedStyle(n, null).getPropertyValue("font-family"), g = `${l} ${a} ${c} ${d}/${h} ${u}`, m = n.innerText;
- let f = o.left, b = 0, y;
+ const o = n.getBoundingClientRect(), l = Le(n), r = l.getComputedStyle(n, null).getPropertyValue("font-style"), c = l.getComputedStyle(n, null).getPropertyValue("font-variant"), d = l.getComputedStyle(n, null).getPropertyValue("font-weight"), a = l.getComputedStyle(n, null).getPropertyValue("font-size"), h = l.getComputedStyle(n, null).getPropertyValue("line-height"), u = l.getComputedStyle(n, null).getPropertyValue("font-family"), m = `${r} ${c} ${d} ${a}/${h} ${u}`, b = n.innerText;
+ let g = o.left, Z = 0, f;
if (e > o.left + o.width)
- b = m.length;
+ Z = b.length;
else {
- const w = av.getInstance();
- for (let C = 0; C < m.length + 1; C++) {
- if (y = w.getCharWidth(m.charAt(C), g) / 2, f += y, e < f) {
- b = C;
+ const y = Rw.getInstance();
+ for (let W = 0; W < b.length + 1; W++) {
+ if (f = y.getCharWidth(b.charAt(W), m) / 2, g += f, e < g) {
+ Z = W;
break;
}
- f += y;
+ g += f;
}
}
- i.setStart(n.firstChild, b), i.setEnd(n.firstChild, b);
+ i.setStart(n.firstChild, Z), i.setEnd(n.firstChild, Z);
}
return i;
}
-const Ju = class Ju {
+const qu = class qu {
static getInstance() {
- return Ju._INSTANCE || (Ju._INSTANCE = new Ju()), Ju._INSTANCE;
+ return qu._INSTANCE || (qu._INSTANCE = new qu()), qu._INSTANCE;
}
constructor() {
this._cache = {}, this._canvas = document.createElement("canvas");
@@ -21566,58 +21566,58 @@ const Ju = class Ju {
return this._cache[i];
const n = this._canvas.getContext("2d");
n.font = t;
- const r = n.measureText(e).width;
- return this._cache[i] = r, r;
+ const l = n.measureText(e).width;
+ return this._cache[i] = l, l;
}
};
-Ju._INSTANCE = null;
-let av = Ju;
-function Zi(s, e, t) {
+qu._INSTANCE = null;
+let Rw = qu;
+function xi(s, e, t) {
let i = null, n = null;
if (typeof t.value == "function" ? (i = "value", n = t.value, n.length !== 0 && console.warn("Memoize should only be used in functions with zero parameters")) : typeof t.get == "function" && (i = "get", n = t.get), !n)
throw new Error("not supported");
const o = `$memoize$${e}`;
- t[i] = function(...r) {
+ t[i] = function(...l) {
return this.hasOwnProperty(o) || Object.defineProperty(this, o, {
configurable: !1,
enumerable: !1,
writable: !1,
- value: n.apply(this, r)
+ value: n.apply(this, l)
}), this[o];
};
}
-var Hse = function(s, e, t, i) {
- var n = arguments.length, o = n < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, r;
+var Hoe = function(s, e, t, i) {
+ var n = arguments.length, o = n < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, l;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, e, t, i);
- else for (var l = s.length - 1; l >= 0; l--) (r = s[l]) && (o = (n < 3 ? r(o) : n > 3 ? r(e, t, o) : r(e, t)) || o);
+ else for (var r = s.length - 1; r >= 0; r--) (l = s[r]) && (o = (n < 3 ? l(o) : n > 3 ? l(e, t, o) : l(e, t)) || o);
return n > 3 && o && Object.defineProperty(e, t, o), o;
-}, Rt;
+}, Jt;
(function(s) {
s.Tap = "-monaco-gesturetap", s.Change = "-monaco-gesturechange", s.Start = "-monaco-gesturestart", s.End = "-monaco-gesturesend", s.Contextmenu = "-monaco-gesturecontextmenu";
-})(Rt || (Rt = {}));
-const An = class An extends R {
+})(Jt || (Jt = {}));
+const Ln = class Ln extends J {
// ms
constructor() {
- super(), this.dispatched = !1, this.targets = new cs(), this.ignoreTargets = new cs(), this.activeTouches = {}, this.handle = null, this._lastSetTapCountTime = 0, this._register(se.runAndSubscribe(D_, ({ window: e, disposables: t }) => {
+ super(), this.dispatched = !1, this.targets = new hs(), this.ignoreTargets = new hs(), this.activeTouches = {}, this.handle = null, this._lastSetTapCountTime = 0, this._register(se.runAndSubscribe(_S, ({ window: e, disposables: t }) => {
t.add(z(e.document, "touchstart", (i) => this.onTouchStart(i), { passive: !1 })), t.add(z(e.document, "touchend", (i) => this.onTouchEnd(e, i))), t.add(z(e.document, "touchmove", (i) => this.onTouchMove(i), { passive: !1 }));
- }, { window: vt, disposables: this._store }));
+ }, { window: wt, disposables: this._store }));
}
static addTarget(e) {
- if (!An.isTouchDevice())
- return R.None;
- An.INSTANCE || (An.INSTANCE = new An());
- const t = An.INSTANCE.targets.push(e);
- return Ce(t);
+ if (!Ln.isTouchDevice())
+ return J.None;
+ Ln.INSTANCE || (Ln.INSTANCE = new Ln());
+ const t = Ln.INSTANCE.targets.push(e);
+ return We(t);
}
static ignoreTarget(e) {
- if (!An.isTouchDevice())
- return R.None;
- An.INSTANCE || (An.INSTANCE = new An());
- const t = An.INSTANCE.ignoreTargets.push(e);
- return Ce(t);
+ if (!Ln.isTouchDevice())
+ return J.None;
+ Ln.INSTANCE || (Ln.INSTANCE = new Ln());
+ const t = Ln.INSTANCE.ignoreTargets.push(e);
+ return We(t);
}
static isTouchDevice() {
- return "ontouchstart" in vt || navigator.maxTouchPoints > 0;
+ return "ontouchstart" in wt || navigator.maxTouchPoints > 0;
}
dispose() {
this.handle && (this.handle.dispose(), this.handle = null), super.dispose();
@@ -21637,48 +21637,48 @@ const An = class An extends R {
rollingPageX: [o.pageX],
rollingPageY: [o.pageY]
};
- const r = this.newGestureEvent(Rt.Start, o.target);
- r.pageX = o.pageX, r.pageY = o.pageY, this.dispatchEvent(r);
+ const l = this.newGestureEvent(Jt.Start, o.target);
+ l.pageX = o.pageX, l.pageY = o.pageY, this.dispatchEvent(l);
}
this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1);
}
onTouchEnd(e, t) {
const i = Date.now(), n = Object.keys(this.activeTouches).length;
- for (let o = 0, r = t.changedTouches.length; o < r; o++) {
- const l = t.changedTouches.item(o);
- if (!this.activeTouches.hasOwnProperty(String(l.identifier))) {
- console.warn("move of an UNKNOWN touch", l);
+ for (let o = 0, l = t.changedTouches.length; o < l; o++) {
+ const r = t.changedTouches.item(o);
+ if (!this.activeTouches.hasOwnProperty(String(r.identifier))) {
+ console.warn("move of an UNKNOWN touch", r);
continue;
}
- const a = this.activeTouches[l.identifier], c = Date.now() - a.initialTimeStamp;
- if (c < An.HOLD_DELAY && Math.abs(a.initialPageX - er(a.rollingPageX)) < 30 && Math.abs(a.initialPageY - er(a.rollingPageY)) < 30) {
- const d = this.newGestureEvent(Rt.Tap, a.initialTarget);
- d.pageX = er(a.rollingPageX), d.pageY = er(a.rollingPageY), this.dispatchEvent(d);
- } else if (c >= An.HOLD_DELAY && Math.abs(a.initialPageX - er(a.rollingPageX)) < 30 && Math.abs(a.initialPageY - er(a.rollingPageY)) < 30) {
- const d = this.newGestureEvent(Rt.Contextmenu, a.initialTarget);
- d.pageX = er(a.rollingPageX), d.pageY = er(a.rollingPageY), this.dispatchEvent(d);
+ const c = this.activeTouches[r.identifier], d = Date.now() - c.initialTimeStamp;
+ if (d < Ln.HOLD_DELAY && Math.abs(c.initialPageX - il(c.rollingPageX)) < 30 && Math.abs(c.initialPageY - il(c.rollingPageY)) < 30) {
+ const a = this.newGestureEvent(Jt.Tap, c.initialTarget);
+ a.pageX = il(c.rollingPageX), a.pageY = il(c.rollingPageY), this.dispatchEvent(a);
+ } else if (d >= Ln.HOLD_DELAY && Math.abs(c.initialPageX - il(c.rollingPageX)) < 30 && Math.abs(c.initialPageY - il(c.rollingPageY)) < 30) {
+ const a = this.newGestureEvent(Jt.Contextmenu, c.initialTarget);
+ a.pageX = il(c.rollingPageX), a.pageY = il(c.rollingPageY), this.dispatchEvent(a);
} else if (n === 1) {
- const d = er(a.rollingPageX), h = er(a.rollingPageY), u = er(a.rollingTimestamps) - a.rollingTimestamps[0], g = d - a.rollingPageX[0], m = h - a.rollingPageY[0], f = [...this.targets].filter((b) => a.initialTarget instanceof Node && b.contains(a.initialTarget));
+ const a = il(c.rollingPageX), h = il(c.rollingPageY), u = il(c.rollingTimestamps) - c.rollingTimestamps[0], m = a - c.rollingPageX[0], b = h - c.rollingPageY[0], g = [...this.targets].filter((Z) => c.initialTarget instanceof Node && Z.contains(c.initialTarget));
this.inertia(
e,
- f,
+ g,
i,
// time now
- Math.abs(g) / u,
+ Math.abs(m) / u,
// speed
- g > 0 ? 1 : -1,
+ m > 0 ? 1 : -1,
// x direction
- d,
+ a,
// x now
- Math.abs(m) / u,
+ Math.abs(b) / u,
// y speed
- m > 0 ? 1 : -1,
+ b > 0 ? 1 : -1,
// y direction
h
// y now
);
}
- this.dispatchEvent(this.newGestureEvent(Rt.End, a.initialTarget)), delete this.activeTouches[l.identifier];
+ this.dispatchEvent(this.newGestureEvent(Jt.End, c.initialTarget)), delete this.activeTouches[r.identifier];
}
this.dispatched && (t.preventDefault(), t.stopPropagation(), this.dispatched = !1);
}
@@ -21687,11 +21687,11 @@ const An = class An extends R {
return i.initEvent(e, !1, !0), i.initialTarget = t, i.tapCount = 0, i;
}
dispatchEvent(e) {
- if (e.type === Rt.Tap) {
+ if (e.type === Jt.Tap) {
const t = (/* @__PURE__ */ new Date()).getTime();
let i = 0;
- t - this._lastSetTapCountTime > An.CLEAR_TAP_COUNT_TIME ? i = 1 : i = 2, this._lastSetTapCountTime = t, e.tapCount = i;
- } else (e.type === Rt.Change || e.type === Rt.Contextmenu) && (this._lastSetTapCountTime = 0);
+ t - this._lastSetTapCountTime > Ln.CLEAR_TAP_COUNT_TIME ? i = 1 : i = 2, this._lastSetTapCountTime = t, e.tapCount = i;
+ } else (e.type === Jt.Change || e.type === Jt.Contextmenu) && (this._lastSetTapCountTime = 0);
if (e.initialTarget instanceof Node) {
for (const i of this.ignoreTargets)
if (i.contains(e.initialTarget))
@@ -21709,13 +21709,13 @@ const An = class An extends R {
n.dispatchEvent(e), this.dispatched = !0;
}
}
- inertia(e, t, i, n, o, r, l, a, c) {
- this.handle = po(e, () => {
- const d = Date.now(), h = d - i;
- let u = 0, g = 0, m = !0;
- n += An.SCROLL_FRICTION * h, l += An.SCROLL_FRICTION * h, n > 0 && (m = !1, u = o * n * h), l > 0 && (m = !1, g = a * l * h);
- const f = this.newGestureEvent(Rt.Change);
- f.translationX = u, f.translationY = g, t.forEach((b) => b.dispatchEvent(f)), m || this.inertia(e, t, d, n, o, r + u, l, a, c + g);
+ inertia(e, t, i, n, o, l, r, c, d) {
+ this.handle = Zo(e, () => {
+ const a = Date.now(), h = a - i;
+ let u = 0, m = 0, b = !0;
+ n += Ln.SCROLL_FRICTION * h, r += Ln.SCROLL_FRICTION * h, n > 0 && (b = !1, u = o * n * h), r > 0 && (b = !1, m = c * r * h);
+ const g = this.newGestureEvent(Jt.Change);
+ g.translationX = u, g.translationY = m, t.forEach((Z) => Z.dispatchEvent(g)), b || this.inertia(e, t, a, n, o, l + u, r, c, d + m);
});
}
onTouchMove(e) {
@@ -21726,35 +21726,35 @@ const An = class An extends R {
console.warn("end of an UNKNOWN touch", o);
continue;
}
- const r = this.activeTouches[o.identifier], l = this.newGestureEvent(Rt.Change, r.initialTarget);
- l.translationX = o.pageX - er(r.rollingPageX), l.translationY = o.pageY - er(r.rollingPageY), l.pageX = o.pageX, l.pageY = o.pageY, this.dispatchEvent(l), r.rollingPageX.length > 3 && (r.rollingPageX.shift(), r.rollingPageY.shift(), r.rollingTimestamps.shift()), r.rollingPageX.push(o.pageX), r.rollingPageY.push(o.pageY), r.rollingTimestamps.push(t);
+ const l = this.activeTouches[o.identifier], r = this.newGestureEvent(Jt.Change, l.initialTarget);
+ r.translationX = o.pageX - il(l.rollingPageX), r.translationY = o.pageY - il(l.rollingPageY), r.pageX = o.pageX, r.pageY = o.pageY, this.dispatchEvent(r), l.rollingPageX.length > 3 && (l.rollingPageX.shift(), l.rollingPageY.shift(), l.rollingTimestamps.shift()), l.rollingPageX.push(o.pageX), l.rollingPageY.push(o.pageY), l.rollingTimestamps.push(t);
}
this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1);
}
};
-An.SCROLL_FRICTION = -5e-3, An.HOLD_DELAY = 700, An.CLEAR_TAP_COUNT_TIME = 400;
-let Rn = An;
-Hse([
- Zi
-], Rn, "isTouchDevice", null);
-let Ko = class extends R {
+Ln.SCROLL_FRICTION = -5e-3, Ln.HOLD_DELAY = 700, Ln.CLEAR_TAP_COUNT_TIME = 400;
+let En = Ln;
+Hoe([
+ xi
+], En, "isTouchDevice", null);
+let jo = class extends J {
onclick(e, t) {
- this._register(z(e, ie.CLICK, (i) => t(new Er(xe(e), i))));
+ this._register(z(e, ie.CLICK, (i) => t(new Fl(Le(e), i))));
}
onmousedown(e, t) {
- this._register(z(e, ie.MOUSE_DOWN, (i) => t(new Er(xe(e), i))));
+ this._register(z(e, ie.MOUSE_DOWN, (i) => t(new Fl(Le(e), i))));
}
onmouseover(e, t) {
- this._register(z(e, ie.MOUSE_OVER, (i) => t(new Er(xe(e), i))));
+ this._register(z(e, ie.MOUSE_OVER, (i) => t(new Fl(Le(e), i))));
}
onmouseleave(e, t) {
- this._register(z(e, ie.MOUSE_LEAVE, (i) => t(new Er(xe(e), i))));
+ this._register(z(e, ie.MOUSE_LEAVE, (i) => t(new Fl(Le(e), i))));
}
onkeydown(e, t) {
- this._register(z(e, ie.KEY_DOWN, (i) => t(new Vt(i))));
+ this._register(z(e, ie.KEY_DOWN, (i) => t(new Yt(i))));
}
onkeyup(e, t) {
- this._register(z(e, ie.KEY_UP, (i) => t(new Vt(i))));
+ this._register(z(e, ie.KEY_UP, (i) => t(new Yt(i))));
}
oninput(e, t) {
this._register(z(e, ie.INPUT, t));
@@ -21766,19 +21766,19 @@ let Ko = class extends R {
this._register(z(e, ie.FOCUS, t));
}
ignoreGesture(e) {
- return Rn.ignoreTarget(e);
+ return En.ignoreTarget(e);
}
};
-const mb = 11;
-class Jse extends Ko {
+const WZ = 11;
+class Eoe extends jo {
constructor(e) {
- 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.classList.add(...Ze.asClassNameArray(e.icon)), this.domNode.style.position = "absolute", this.domNode.style.width = mb + "px", this.domNode.style.height = mb + "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 n0()), this._register(ai(this.bgDomNode, ie.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._register(ai(this.domNode, ie.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._pointerdownRepeatTimer = this._register(new aE()), this._pointerdownScheduleRepeatTimer = this._register(new qr());
+ 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.classList.add(...Se.asClassNameArray(e.icon)), this.domNode.style.position = "absolute", this.domNode.style.width = WZ + "px", this.domNode.style.height = WZ + "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 d0()), this._register(di(this.bgDomNode, ie.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._register(di(this.domNode, ie.POINTER_DOWN, (t) => this._arrowPointerDown(t))), this._pointerdownRepeatTimer = this._register(new Mv()), this._pointerdownScheduleRepeatTimer = this._register(new tr());
}
_arrowPointerDown(e) {
if (!e.target || !(e.target instanceof Element))
return;
const t = () => {
- this._pointerdownRepeatTimer.cancelAndSet(() => this._onActivate(), 1e3 / 24, xe(e));
+ this._pointerdownRepeatTimer.cancelAndSet(() => this._onActivate(), 1e3 / 24, Le(e));
};
this._onActivate(), this._pointerdownRepeatTimer.cancel(), this._pointerdownScheduleRepeatTimer.cancelAndSet(t, 200), this._pointerMoveMonitor.startMonitoring(e.target, e.pointerId, e.buttons, (i) => {
}, () => {
@@ -21786,9 +21786,9 @@ class Jse extends Ko {
}), e.preventDefault();
}
}
-class Use extends R {
+class Doe extends J {
constructor(e, t, i) {
- 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 qr());
+ 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 tr());
}
setVisibility(e) {
this._visibility !== e && (this._visibility = e, this._updateShouldBeVisible());
@@ -21828,24 +21828,24 @@ class Use extends R {
this._revealTimer.cancel(), this._isVisible && (this._isVisible = !1, (t = this._domNode) == null || t.setClassName(this._invisibleClassName + (e ? " fade" : "")));
}
}
-const Kse = 140;
-class wU extends Ko {
+const Foe = 140;
+class tQ extends jo {
constructor(e) {
- 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 Use(e.visibility, "visible scrollbar " + e.extraScrollbarClassName, "invisible scrollbar " + e.extraScrollbarClassName)), this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._pointerMoveMonitor = this._register(new n0()), this._shouldRender = !0, this.domNode = yt(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(z(this.domNode.domNode, ie.POINTER_DOWN, (t) => this._domNodePointerDown(t)));
+ 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 Doe(e.visibility, "visible scrollbar " + e.extraScrollbarClassName, "invisible scrollbar " + e.extraScrollbarClassName)), this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._pointerMoveMonitor = this._register(new d0()), this._shouldRender = !0, this.domNode = ft(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(z(this.domNode.domNode, ie.POINTER_DOWN, (t) => this._domNodePointerDown(t)));
}
// ----------------- creation
/**
* Creates the dom node for an arrow & adds it to the container
*/
_createArrow(e) {
- const t = this._register(new Jse(e));
+ const t = this._register(new Eoe(e));
this.domNode.domNode.appendChild(t.bgDomNode), this.domNode.domNode.appendChild(t.domNode);
}
/**
* Creates the slider dom node, adds it to the container & hooks up the events
*/
_createSlider(e, t, i, n) {
- this.slider = yt(document.createElement("div")), this.slider.setClassName("slider"), this.slider.setPosition("absolute"), this.slider.setTop(e), this.slider.setLeft(t), typeof i == "number" && this.slider.setWidth(i), typeof n == "number" && this.slider.setHeight(n), this.slider.setLayerHinting(!0), this.slider.setContain("strict"), this.domNode.domNode.appendChild(this.slider.domNode), this._register(z(this.slider.domNode, ie.POINTER_DOWN, (o) => {
+ this.slider = ft(document.createElement("div")), this.slider.setClassName("slider"), this.slider.setPosition("absolute"), this.slider.setTop(e), this.slider.setLeft(t), typeof i == "number" && this.slider.setWidth(i), typeof n == "number" && this.slider.setHeight(n), this.slider.setLayerHinting(!0), this.slider.setContain("strict"), this.domNode.domNode.appendChild(this.slider.domNode), this._register(z(this.slider.domNode, ie.POINTER_DOWN, (o) => {
o.button === 0 && (o.preventDefault(), this._sliderPointerDown(o));
})), this.onclick(this.slider.domNode, (o) => {
o.leftButton && o.stopPropagation();
@@ -21895,13 +21895,13 @@ class wU extends Ko {
return;
const t = this._sliderPointerPosition(e), i = this._sliderOrthogonalPointerPosition(e), n = this._scrollbarState.clone();
this.slider.toggleClassName("active", !0), this._pointerMoveMonitor.startMonitoring(e.target, e.pointerId, e.buttons, (o) => {
- const r = this._sliderOrthogonalPointerPosition(o), l = Math.abs(r - i);
- if (kn && l > Kse) {
+ const l = this._sliderOrthogonalPointerPosition(o), r = Math.abs(l - i);
+ if (Jn && r > Foe) {
this._setDesiredScrollPositionNow(n.getScrollPosition());
return;
}
- const c = this._sliderPointerPosition(o) - t;
- this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(c));
+ const d = this._sliderPointerPosition(o) - t;
+ this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(d));
}, () => {
this.slider.toggleClassName("active", !1), this._host.onDragEnd();
}), this._host.onDragStart();
@@ -21917,13 +21917,13 @@ class wU extends Ko {
return this._scrollbarState.isNeeded();
}
}
-const Qse = 20;
-class pb {
- constructor(e, t, i, n, o, r) {
- this._scrollbarSize = Math.round(t), this._oppositeScrollbarSize = Math.round(i), this._arrowSize = Math.round(e), this._visibleSize = n, this._scrollSize = o, this._scrollPosition = r, this._computedAvailableSize = 0, this._computedIsNeeded = !1, this._computedSliderSize = 0, this._computedSliderRatio = 0, this._computedSliderPosition = 0, this._refreshComputedValues();
+const zoe = 20;
+class GZ {
+ constructor(e, t, i, n, o, l) {
+ this._scrollbarSize = Math.round(t), this._oppositeScrollbarSize = Math.round(i), this._arrowSize = Math.round(e), this._visibleSize = n, this._scrollSize = o, this._scrollPosition = l, this._computedAvailableSize = 0, this._computedIsNeeded = !1, this._computedSliderSize = 0, this._computedSliderRatio = 0, this._computedSliderPosition = 0, this._refreshComputedValues();
}
clone() {
- return new pb(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition);
+ return new GZ(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition);
}
setVisibleSize(e) {
const t = Math.round(e);
@@ -21944,26 +21944,26 @@ class pb {
this._oppositeScrollbarSize = Math.round(e);
}
static _computeValues(e, t, i, n, o) {
- const r = Math.max(0, i - e), l = Math.max(0, r - 2 * t), a = n > 0 && n > i;
- if (!a)
+ const l = Math.max(0, i - e), r = Math.max(0, l - 2 * t), c = n > 0 && n > i;
+ if (!c)
return {
- computedAvailableSize: Math.round(r),
- computedIsNeeded: a,
- computedSliderSize: Math.round(l),
+ computedAvailableSize: Math.round(l),
+ computedIsNeeded: c,
+ computedSliderSize: Math.round(r),
computedSliderRatio: 0,
computedSliderPosition: 0
};
- const c = Math.round(Math.max(Qse, Math.floor(i * l / n))), d = (l - c) / (n - i), h = o * d;
+ const d = Math.round(Math.max(zoe, Math.floor(i * r / n))), a = (r - d) / (n - i), h = o * a;
return {
- computedAvailableSize: Math.round(r),
- computedIsNeeded: a,
- computedSliderSize: Math.round(c),
- computedSliderRatio: d,
+ computedAvailableSize: Math.round(l),
+ computedIsNeeded: c,
+ computedSliderSize: Math.round(d),
+ computedSliderRatio: a,
computedSliderPosition: Math.round(h)
};
}
_refreshComputedValues() {
- const e = pb._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);
+ const e = GZ._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);
this._computedAvailableSize = e.computedAvailableSize, this._computedIsNeeded = e.computedIsNeeded, this._computedSliderSize = e.computedSliderSize, this._computedSliderRatio = e.computedSliderRatio, this._computedSliderPosition = e.computedSliderPosition;
}
getArrowSize() {
@@ -22020,39 +22020,39 @@ class pb {
return Math.round(t / this._computedSliderRatio);
}
}
-class jse extends wU {
+class Aoe extends tQ {
constructor(e, t, i) {
const n = e.getScrollDimensions(), o = e.getCurrentScrollPosition();
if (super({
lazyRender: t.lazyRender,
host: i,
- scrollbarState: new pb(t.horizontalHasArrows ? t.arrowSize : 0, t.horizontal === 2 ? 0 : t.horizontalScrollbarSize, t.vertical === 2 ? 0 : t.verticalScrollbarSize, n.width, n.scrollWidth, o.scrollLeft),
+ scrollbarState: new GZ(t.horizontalHasArrows ? t.arrowSize : 0, t.horizontal === 2 ? 0 : t.horizontalScrollbarSize, t.vertical === 2 ? 0 : t.verticalScrollbarSize, n.width, n.scrollWidth, o.scrollLeft),
visibility: t.horizontal,
extraScrollbarClassName: "horizontal",
scrollable: e,
scrollByPage: t.scrollByPage
}), t.horizontalHasArrows) {
- const r = (t.arrowSize - mb) / 2, l = (t.horizontalScrollbarSize - mb) / 2;
+ const l = (t.arrowSize - WZ) / 2, r = (t.horizontalScrollbarSize - WZ) / 2;
this._createArrow({
className: "scra",
icon: te.scrollbarButtonLeft,
- top: l,
- left: r,
+ top: r,
+ left: l,
bottom: void 0,
right: void 0,
bgWidth: t.arrowSize,
bgHeight: t.horizontalScrollbarSize,
- onActivate: () => this._host.onMouseWheel(new am(null, 1, 0))
+ onActivate: () => this._host.onMouseWheel(new mb(null, 1, 0))
}), this._createArrow({
className: "scra",
icon: te.scrollbarButtonRight,
- top: l,
+ top: r,
left: void 0,
bottom: void 0,
- right: r,
+ right: l,
bgWidth: t.arrowSize,
bgHeight: t.horizontalScrollbarSize,
- onActivate: () => this._host.onMouseWheel(new am(null, -1, 0))
+ onActivate: () => this._host.onMouseWheel(new mb(null, -1, 0))
});
}
this._createSlider(Math.floor((t.horizontalScrollbarSize - t.horizontalSliderSize) / 2), 0, void 0, t.horizontalSliderSize);
@@ -22085,13 +22085,13 @@ class jse extends wU {
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;
}
}
-class qse extends wU {
+class Koe extends tQ {
constructor(e, t, i) {
const n = e.getScrollDimensions(), o = e.getCurrentScrollPosition();
if (super({
lazyRender: t.lazyRender,
host: i,
- scrollbarState: new pb(
+ scrollbarState: new GZ(
t.verticalHasArrows ? t.arrowSize : 0,
t.vertical === 2 ? 0 : t.verticalScrollbarSize,
// give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom
@@ -22105,27 +22105,27 @@ class qse extends wU {
scrollable: e,
scrollByPage: t.scrollByPage
}), t.verticalHasArrows) {
- const r = (t.arrowSize - mb) / 2, l = (t.verticalScrollbarSize - mb) / 2;
+ const l = (t.arrowSize - WZ) / 2, r = (t.verticalScrollbarSize - WZ) / 2;
this._createArrow({
className: "scra",
icon: te.scrollbarButtonUp,
- top: r,
- left: l,
+ top: l,
+ left: r,
bottom: void 0,
right: void 0,
bgWidth: t.verticalScrollbarSize,
bgHeight: t.arrowSize,
- onActivate: () => this._host.onMouseWheel(new am(null, 0, 1))
+ onActivate: () => this._host.onMouseWheel(new mb(null, 0, 1))
}), this._createArrow({
className: "scra",
icon: te.scrollbarButtonDown,
top: void 0,
- left: l,
- bottom: r,
+ left: r,
+ bottom: l,
right: void 0,
bgWidth: t.verticalScrollbarSize,
bgHeight: t.arrowSize,
- onActivate: () => this._host.onMouseWheel(new am(null, 0, -1))
+ onActivate: () => this._host.onMouseWheel(new mb(null, 0, -1))
});
}
this._createSlider(0, Math.floor((t.verticalScrollbarSize - t.verticalSliderSize) / 2), t.verticalSliderSize, void 0);
@@ -22158,21 +22158,21 @@ class qse extends wU {
this.updateScrollbarSize(e.vertical === 2 ? 0 : e.verticalScrollbarSize), this._scrollbarState.setOppositeScrollbarSize(0), this._visibilityController.setVisibility(e.vertical), this._scrollByPage = e.scrollByPage;
}
}
-class NA {
- constructor(e, t, i, n, o, r, l) {
- this._forceIntegerValues = e, this._scrollStateBrand = void 0, this._forceIntegerValues && (t = t | 0, i = i | 0, n = n | 0, o = o | 0, r = r | 0, l = l | 0), this.rawScrollLeft = n, this.rawScrollTop = l, t < 0 && (t = 0), n + t > i && (n = i - t), n < 0 && (n = 0), o < 0 && (o = 0), l + o > r && (l = r - o), l < 0 && (l = 0), this.width = t, this.scrollWidth = i, this.scrollLeft = n, this.height = o, this.scrollHeight = r, this.scrollTop = l;
+class KV {
+ constructor(e, t, i, n, o, l, r) {
+ this._forceIntegerValues = e, this._scrollStateBrand = void 0, this._forceIntegerValues && (t = t | 0, i = i | 0, n = n | 0, o = o | 0, l = l | 0, r = r | 0), this.rawScrollLeft = n, this.rawScrollTop = r, t < 0 && (t = 0), n + t > i && (n = i - t), n < 0 && (n = 0), o < 0 && (o = 0), r + o > l && (r = l - o), r < 0 && (r = 0), this.width = t, this.scrollWidth = i, this.scrollLeft = n, this.height = o, this.scrollHeight = l, this.scrollTop = r;
}
equals(e) {
return this.rawScrollLeft === e.rawScrollLeft && this.rawScrollTop === e.rawScrollTop && this.width === e.width && this.scrollWidth === e.scrollWidth && this.scrollLeft === e.scrollLeft && this.height === e.height && this.scrollHeight === e.scrollHeight && this.scrollTop === e.scrollTop;
}
withScrollDimensions(e, t) {
- return new NA(this._forceIntegerValues, typeof e.width < "u" ? e.width : this.width, typeof e.scrollWidth < "u" ? e.scrollWidth : this.scrollWidth, t ? this.rawScrollLeft : this.scrollLeft, typeof e.height < "u" ? e.height : this.height, typeof e.scrollHeight < "u" ? e.scrollHeight : this.scrollHeight, t ? this.rawScrollTop : this.scrollTop);
+ return new KV(this._forceIntegerValues, typeof e.width < "u" ? e.width : this.width, typeof e.scrollWidth < "u" ? e.scrollWidth : this.scrollWidth, t ? this.rawScrollLeft : this.scrollLeft, typeof e.height < "u" ? e.height : this.height, typeof e.scrollHeight < "u" ? e.scrollHeight : this.scrollHeight, t ? this.rawScrollTop : this.scrollTop);
}
withScrollPosition(e) {
- return new NA(this._forceIntegerValues, this.width, this.scrollWidth, typeof e.scrollLeft < "u" ? e.scrollLeft : this.rawScrollLeft, this.height, this.scrollHeight, typeof e.scrollTop < "u" ? e.scrollTop : this.rawScrollTop);
+ return new KV(this._forceIntegerValues, this.width, this.scrollWidth, typeof e.scrollLeft < "u" ? e.scrollLeft : this.rawScrollLeft, this.height, this.scrollHeight, typeof e.scrollTop < "u" ? e.scrollTop : this.rawScrollTop);
}
createScrollEvent(e, t) {
- const i = this.width !== e.width, n = this.scrollWidth !== e.scrollWidth, o = this.scrollLeft !== e.scrollLeft, r = this.height !== e.height, l = this.scrollHeight !== e.scrollHeight, a = this.scrollTop !== e.scrollTop;
+ const i = this.width !== e.width, n = this.scrollWidth !== e.scrollWidth, o = this.scrollLeft !== e.scrollLeft, l = this.height !== e.height, r = this.scrollHeight !== e.scrollHeight, c = this.scrollTop !== e.scrollTop;
return {
inSmoothScrolling: t,
oldWidth: e.width,
@@ -22190,15 +22190,15 @@ class NA {
widthChanged: i,
scrollWidthChanged: n,
scrollLeftChanged: o,
- heightChanged: r,
- scrollHeightChanged: l,
- scrollTopChanged: a
+ heightChanged: l,
+ scrollHeightChanged: r,
+ scrollTopChanged: c
};
}
}
-class o0 extends R {
+class h0 extends J {
constructor(e) {
- super(), this._scrollableBrand = void 0, this._onScroll = this._register(new k()), this.onScroll = this._onScroll.event, this._smoothScrollDuration = e.smoothScrollDuration, this._scheduleAtNextAnimationFrame = e.scheduleAtNextAnimationFrame, this._state = new NA(e.forceIntegerValues, 0, 0, 0, 0, 0, 0), this._smoothScrolling = null;
+ super(), this._scrollableBrand = void 0, this._onScroll = this._register(new k()), this.onScroll = this._onScroll.event, this._smoothScrollDuration = e.smoothScrollDuration, this._scheduleAtNextAnimationFrame = e.scheduleAtNextAnimationFrame, this._state = new KV(e.forceIntegerValues, 0, 0, 0, 0, 0, 0), this._smoothScrolling = null;
}
dispose() {
this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), super.dispose();
@@ -22247,10 +22247,10 @@ class o0 extends R {
if (this._smoothScrolling.to.scrollLeft === i.scrollLeft && this._smoothScrolling.to.scrollTop === i.scrollTop)
return;
let n;
- t ? n = new Kw(this._smoothScrolling.from, i, this._smoothScrolling.startTime, this._smoothScrolling.duration) : n = this._smoothScrolling.combine(this._state, i, this._smoothScrollDuration), this._smoothScrolling.dispose(), this._smoothScrolling = n;
+ t ? n = new rW(this._smoothScrolling.from, i, this._smoothScrolling.startTime, this._smoothScrolling.duration) : n = this._smoothScrolling.combine(this._state, i, this._smoothScrollDuration), this._smoothScrolling.dispose(), this._smoothScrolling = n;
} else {
const i = this._state.withScrollPosition(e);
- this._smoothScrolling = Kw.start(this._state, i, this._smoothScrollDuration);
+ this._smoothScrolling = rW.start(this._state, i, this._smoothScrollDuration);
}
this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => {
this._smoothScrolling && (this._smoothScrolling.animationFrameDisposable = null, this._performSmoothScrolling());
@@ -22278,23 +22278,23 @@ class o0 extends R {
i.equals(e) || (this._state = e, this._onScroll.fire(this._state.createScrollEvent(i, t)));
}
}
-class JF {
+class fF {
constructor(e, t, i) {
this.scrollLeft = e, this.scrollTop = t, this.isDone = i;
}
}
-function PN(s, e) {
+function oR(s, e) {
const t = e - s;
return function(i) {
- return s + t * toe(i);
+ return s + t * Boe(i);
};
}
-function $se(s, e, t) {
+function Uoe(s, e, t) {
return function(i) {
return i < t ? s(i / t) : e((i - t) / (1 - t));
};
}
-class Kw {
+class rW {
constructor(e, t, i, n) {
this.from = e, this.to = t, this.duration = n, this.startTime = i, this.animationFrameDisposable = null, this._initAnimations();
}
@@ -22303,10 +22303,10 @@ class Kw {
}
_initAnimation(e, t, i) {
if (Math.abs(e - t) > 2.5 * i) {
- let o, r;
- return e < t ? (o = e + 0.75 * i, r = t - 0.75 * i) : (o = e - 0.75 * i, r = t + 0.75 * i), $se(PN(e, o), PN(r, t), 0.33);
+ let o, l;
+ return e < t ? (o = e + 0.75 * i, l = t - 0.75 * i) : (o = e - 0.75 * i, l = t + 0.75 * i), Uoe(oR(e, o), oR(l, t), 0.33);
}
- return PN(e, t);
+ return oR(e, t);
}
dispose() {
this.animationFrameDisposable !== null && (this.animationFrameDisposable.dispose(), this.animationFrameDisposable = null);
@@ -22321,32 +22321,32 @@ class Kw {
const t = (e - this.startTime) / this.duration;
if (t < 1) {
const i = this.scrollLeft(t), n = this.scrollTop(t);
- return new JF(i, n, !1);
+ return new fF(i, n, !1);
}
- return new JF(this.to.scrollLeft, this.to.scrollTop, !0);
+ return new fF(this.to.scrollLeft, this.to.scrollTop, !0);
}
combine(e, t, i) {
- return Kw.start(e, t, i);
+ return rW.start(e, t, i);
}
static start(e, t, i) {
i = i + 10;
const n = Date.now() - 10;
- return new Kw(e, t, n, i);
+ return new rW(e, t, n, i);
}
}
-function eoe(s) {
+function Poe(s) {
return Math.pow(s, 3);
}
-function toe(s) {
- return 1 - eoe(1 - s);
+function Boe(s) {
+ return 1 - Poe(1 - s);
}
-const ioe = 500, UF = 50;
-class noe {
+const _oe = 500, yF = 50;
+class Qoe {
constructor(e, t, i) {
this.timestamp = e, this.deltaX = t, this.deltaY = i, this.score = 0;
}
}
-const rZ = class rZ {
+const G2 = class G2 {
constructor() {
this._capacity = 5, this._memory = [], this._front = -1, this._rear = -1;
}
@@ -22363,15 +22363,15 @@ const rZ = class rZ {
return t <= 0.5;
}
acceptStandardWheelEvent(e) {
- if (lC) {
- const t = xe(e.browserEvent), i = Y8(t);
+ if (WG) {
+ const t = Le(e.browserEvent), i = M6(t);
this.accept(Date.now(), e.deltaX * i, e.deltaY * i);
} else
this.accept(Date.now(), e.deltaX, e.deltaY);
}
accept(e, t, i) {
let n = null;
- const o = new noe(e, t, i);
+ const o = new Qoe(e, t, i);
this._front === -1 && this._rear === -1 ? (this._memory[0] = o, this._front = 0, this._rear = 0) : (n = 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] = o), o.score = this._computeScore(o, n);
}
/**
@@ -22384,8 +22384,8 @@ const rZ = class rZ {
return 1;
let i = 0.5;
if ((!this._isAlmostInt(e.deltaX) || !this._isAlmostInt(e.deltaY)) && (i += 0.25), t) {
- const n = Math.abs(e.deltaX), o = Math.abs(e.deltaY), r = Math.abs(t.deltaX), l = Math.abs(t.deltaY), a = Math.max(Math.min(n, r), 1), c = Math.max(Math.min(o, l), 1), d = Math.max(n, r), h = Math.max(o, l);
- d % a === 0 && h % c === 0 && (i -= 0.5);
+ const n = Math.abs(e.deltaX), o = Math.abs(e.deltaY), l = Math.abs(t.deltaX), r = Math.abs(t.deltaY), c = Math.max(Math.min(n, l), 1), d = Math.max(Math.min(o, r), 1), a = Math.max(n, l), h = Math.max(o, r);
+ a % c === 0 && h % d === 0 && (i -= 0.5);
}
return Math.min(Math.max(i, 0), 1);
}
@@ -22393,14 +22393,14 @@ const rZ = class rZ {
return Math.abs(Math.round(e) - e) < 0.01;
}
};
-rZ.INSTANCE = new rZ();
-let WA = rZ;
-class HE extends Ko {
+G2.INSTANCE = new G2();
+let UV = G2;
+class ZJ extends jo {
get options() {
return this._options;
}
constructor(e, t, i) {
- super(), this._onScroll = this._register(new k()), this.onScroll = this._onScroll.event, this._onWillScroll = this._register(new k()), e.style.overflow = "hidden", this._options = soe(t), this._scrollable = i, this._register(this._scrollable.onScroll((o) => {
+ super(), this._onScroll = this._register(new k()), this.onScroll = this._onScroll.event, this._onWillScroll = this._register(new k()), e.style.overflow = "hidden", this._options = Ooe(t), this._scrollable = i, this._register(this._scrollable.onScroll((o) => {
this._onWillScroll.fire(o), this._onDidScroll(o), this._onScroll.fire(o);
}));
const n = {
@@ -22408,10 +22408,10 @@ class HE extends Ko {
onDragStart: () => this._onDragStart(),
onDragEnd: () => this._onDragEnd()
};
- this._verticalScrollbar = this._register(new qse(this._scrollable, this._options, n)), this._horizontalScrollbar = this._register(new jse(this._scrollable, this._options, n)), this._domNode = document.createElement("div"), this._domNode.className = "monaco-scrollable-element " + this._options.className, this._domNode.setAttribute("role", "presentation"), this._domNode.style.position = "relative", this._domNode.style.overflow = "hidden", this._domNode.appendChild(e), this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode), this._domNode.appendChild(this._verticalScrollbar.domNode.domNode), this._options.useShadows ? (this._leftShadowDomNode = yt(document.createElement("div")), this._leftShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._leftShadowDomNode.domNode), this._topShadowDomNode = yt(document.createElement("div")), this._topShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._topShadowDomNode.domNode), this._topLeftShadowDomNode = yt(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, (o) => this._onMouseOver(o)), this.onmouseleave(this._listenOnDomNode, (o) => this._onMouseLeave(o)), this._hideTimeout = this._register(new qr()), this._isDragging = !1, this._mouseIsOver = !1, this._shouldRender = !0, this._revealOnScroll = !0;
+ this._verticalScrollbar = this._register(new Koe(this._scrollable, this._options, n)), this._horizontalScrollbar = this._register(new Aoe(this._scrollable, this._options, n)), this._domNode = document.createElement("div"), this._domNode.className = "monaco-scrollable-element " + this._options.className, this._domNode.setAttribute("role", "presentation"), this._domNode.style.position = "relative", this._domNode.style.overflow = "hidden", this._domNode.appendChild(e), this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode), this._domNode.appendChild(this._verticalScrollbar.domNode.domNode), this._options.useShadows ? (this._leftShadowDomNode = ft(document.createElement("div")), this._leftShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._leftShadowDomNode.domNode), this._topShadowDomNode = ft(document.createElement("div")), this._topShadowDomNode.setClassName("shadow"), this._domNode.appendChild(this._topShadowDomNode.domNode), this._topLeftShadowDomNode = ft(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, (o) => this._onMouseOver(o)), this.onmouseleave(this._listenOnDomNode, (o) => this._onMouseLeave(o)), this._hideTimeout = this._register(new tr()), this._isDragging = !1, this._mouseIsOver = !1, this._shouldRender = !0, this._revealOnScroll = !0;
}
dispose() {
- this._mouseWheelToDispose = Wt(this._mouseWheelToDispose), super.dispose();
+ this._mouseWheelToDispose = Nt(this._mouseWheelToDispose), super.dispose();
}
/**
* Get the generated 'scrollable' dom node
@@ -22451,13 +22451,13 @@ class HE extends Ko {
typeof e.handleMouseWheel < "u" && (this._options.handleMouseWheel = e.handleMouseWheel, this._setListeningToMouseWheel(this._options.handleMouseWheel)), typeof e.mouseWheelScrollSensitivity < "u" && (this._options.mouseWheelScrollSensitivity = e.mouseWheelScrollSensitivity), typeof e.fastScrollSensitivity < "u" && (this._options.fastScrollSensitivity = e.fastScrollSensitivity), typeof e.scrollPredominantAxis < "u" && (this._options.scrollPredominantAxis = e.scrollPredominantAxis), typeof e.horizontal < "u" && (this._options.horizontal = e.horizontal), typeof e.vertical < "u" && (this._options.vertical = e.vertical), typeof e.horizontalScrollbarSize < "u" && (this._options.horizontalScrollbarSize = e.horizontalScrollbarSize), typeof e.verticalScrollbarSize < "u" && (this._options.verticalScrollbarSize = e.verticalScrollbarSize), typeof e.scrollByPage < "u" && (this._options.scrollByPage = e.scrollByPage), this._horizontalScrollbar.updateOptions(this._options), this._verticalScrollbar.updateOptions(this._options), this._options.lazyRender || this._render();
}
delegateScrollFromMouseWheelEvent(e) {
- this._onMouseWheel(new am(e));
+ this._onMouseWheel(new mb(e));
}
// -------------------- mouse wheel scrolling --------------------
_setListeningToMouseWheel(e) {
- if (this._mouseWheelToDispose.length > 0 !== e && (this._mouseWheelToDispose = Wt(this._mouseWheelToDispose), e)) {
+ if (this._mouseWheelToDispose.length > 0 !== e && (this._mouseWheelToDispose = Nt(this._mouseWheelToDispose), e)) {
const i = (n) => {
- this._onMouseWheel(new am(n));
+ this._onMouseWheel(new mb(n));
};
this._mouseWheelToDispose.push(z(this._listenOnDomNode, ie.MOUSE_WHEEL, i, { passive: !1 }));
}
@@ -22466,25 +22466,25 @@ class HE extends Ko {
var o;
if ((o = e.browserEvent) != null && o.defaultPrevented)
return;
- const t = WA.INSTANCE;
+ const t = UV.INSTANCE;
t.acceptStandardWheelEvent(e);
let i = !1;
if (e.deltaY || e.deltaX) {
- let r = e.deltaY * this._options.mouseWheelScrollSensitivity, l = e.deltaX * this._options.mouseWheelScrollSensitivity;
- this._options.scrollPredominantAxis && (this._options.scrollYToX && l + r === 0 ? l = r = 0 : Math.abs(r) >= Math.abs(l) ? l = 0 : r = 0), this._options.flipAxes && ([r, l] = [l, r]);
- const a = !qe && e.browserEvent && e.browserEvent.shiftKey;
- (this._options.scrollYToX || a) && !l && (l = r, r = 0), e.browserEvent && e.browserEvent.altKey && (l = l * this._options.fastScrollSensitivity, r = r * this._options.fastScrollSensitivity);
- const c = this._scrollable.getFutureScrollPosition();
- let d = {};
- if (r) {
- const h = UF * r, u = c.scrollTop - (h < 0 ? Math.floor(h) : Math.ceil(h));
- this._verticalScrollbar.writeScrollPosition(d, u);
- }
+ let l = e.deltaY * this._options.mouseWheelScrollSensitivity, r = e.deltaX * this._options.mouseWheelScrollSensitivity;
+ this._options.scrollPredominantAxis && (this._options.scrollYToX && r + l === 0 ? r = l = 0 : Math.abs(l) >= Math.abs(r) ? r = 0 : l = 0), this._options.flipAxes && ([l, r] = [r, l]);
+ const c = !qe && e.browserEvent && e.browserEvent.shiftKey;
+ (this._options.scrollYToX || c) && !r && (r = l, l = 0), e.browserEvent && e.browserEvent.altKey && (r = r * this._options.fastScrollSensitivity, l = l * this._options.fastScrollSensitivity);
+ const d = this._scrollable.getFutureScrollPosition();
+ let a = {};
if (l) {
- const h = UF * l, u = c.scrollLeft - (h < 0 ? Math.floor(h) : Math.ceil(h));
- this._horizontalScrollbar.writeScrollPosition(d, u);
+ const h = yF * l, u = d.scrollTop - (h < 0 ? Math.floor(h) : Math.ceil(h));
+ this._verticalScrollbar.writeScrollPosition(a, u);
+ }
+ if (r) {
+ const h = yF * r, u = d.scrollLeft - (h < 0 ? Math.floor(h) : Math.ceil(h));
+ this._horizontalScrollbar.writeScrollPosition(a, u);
}
- d = this._scrollable.validateScrollPosition(d), (c.scrollLeft !== d.scrollLeft || c.scrollTop !== d.scrollTop) && (this._options.mouseWheelSmoothScroll && t.isPhysicalMouseWheel() ? this._scrollable.setScrollPositionSmooth(d) : this._scrollable.setScrollPositionNow(d), i = !0);
+ a = this._scrollable.validateScrollPosition(a), (d.scrollLeft !== a.scrollLeft || d.scrollTop !== a.scrollTop) && (this._options.mouseWheelSmoothScroll && t.isPhysicalMouseWheel() ? this._scrollable.setScrollPositionSmooth(a) : this._scrollable.setScrollPositionNow(a), i = !0);
}
let n = i;
!n && this._options.alwaysConsumeMouseWheel && (n = !0), !n && this._options.consumeMouseWheelIfScrollbarIsNeeded && (this._verticalScrollbar.isNeeded() || this._horizontalScrollbar.isNeeded()) && (n = !0), n && (e.preventDefault(), e.stopPropagation());
@@ -22503,8 +22503,8 @@ class HE extends Ko {
}
_render() {
if (this._shouldRender && (this._shouldRender = !1, this._horizontalScrollbar.render(), this._verticalScrollbar.render(), this._options.useShadows)) {
- const e = this._scrollable.getCurrentScrollPosition(), t = e.scrollTop > 0, i = e.scrollLeft > 0, n = i ? " left" : "", o = t ? " top" : "", r = i || t ? " top-left-corner" : "";
- this._leftShadowDomNode.setClassName(`shadow${n}`), this._topShadowDomNode.setClassName(`shadow${o}`), this._topLeftShadowDomNode.setClassName(`shadow${r}${o}${n}`);
+ const e = this._scrollable.getCurrentScrollPosition(), t = e.scrollTop > 0, i = e.scrollLeft > 0, n = i ? " left" : "", o = t ? " top" : "", l = i || t ? " top-left-corner" : "";
+ this._leftShadowDomNode.setClassName(`shadow${n}`), this._topShadowDomNode.setClassName(`shadow${o}`), this._topLeftShadowDomNode.setClassName(`shadow${l}${o}${n}`);
}
}
// -------------------- fade in / fade out --------------------
@@ -22527,16 +22527,16 @@ class HE extends Ko {
!this._mouseIsOver && !this._isDragging && (this._verticalScrollbar.beginHide(), this._horizontalScrollbar.beginHide());
}
_scheduleHide() {
- !this._mouseIsOver && !this._isDragging && this._hideTimeout.cancelAndSet(() => this._hide(), ioe);
+ !this._mouseIsOver && !this._isDragging && this._hideTimeout.cancelAndSet(() => this._hide(), _oe);
}
}
-class CU extends HE {
+class iQ extends ZJ {
constructor(e, t) {
t = t || {}, t.mouseWheelSmoothScroll = !1;
- const i = new o0({
+ const i = new h0({
forceIntegerValues: !0,
smoothScrollDuration: 0,
- scheduleAtNextAnimationFrame: (n) => po(xe(e), n)
+ scheduleAtNextAnimationFrame: (n) => Zo(Le(e), n)
});
super(e, t, i), this._register(i);
}
@@ -22544,7 +22544,7 @@ class CU extends HE {
this._scrollable.setScrollPositionNow(e);
}
}
-class uI extends HE {
+class xx extends ZJ {
constructor(e, t, i) {
super(e, t, i);
}
@@ -22555,14 +22555,14 @@ class uI extends HE {
return this._scrollable.getCurrentScrollPosition();
}
}
-class CC extends HE {
+class MG extends ZJ {
constructor(e, t) {
t = t || {}, t.mouseWheelSmoothScroll = !1;
- const i = new o0({
+ const i = new h0({
forceIntegerValues: !1,
// See https://github.com/microsoft/vscode/issues/139877
smoothScrollDuration: 0,
- scheduleAtNextAnimationFrame: (n) => po(xe(e), n)
+ scheduleAtNextAnimationFrame: (n) => Zo(Le(e), n)
});
super(e, t, i), this._register(i), this._element = e, this._register(this.onScroll((n) => {
n.scrollTopChanged && (this._element.scrollTop = n.scrollTop), n.scrollLeftChanged && (this._element.scrollLeft = n.scrollLeft);
@@ -22586,7 +22586,7 @@ class CC extends HE {
});
}
}
-function soe(s) {
+function Ooe(s) {
const e = {
lazyRender: typeof s.lazyRender < "u" ? s.lazyRender : !1,
className: typeof s.className < "u" ? s.className : "",
@@ -22614,46 +22614,46 @@ function soe(s) {
};
return e.horizontalSliderSize = typeof s.horizontalSliderSize < "u" ? s.horizontalSliderSize : e.horizontalScrollbarSize, e.verticalSliderSize = typeof s.verticalSliderSize < "u" ? s.verticalSliderSize : e.verticalScrollbarSize, qe && (e.className += " mac"), e;
}
-class JE extends yC {
+class fJ extends wG {
constructor(e, t, i) {
- super(), this._mouseLeaveMonitor = null, this._context = e, this.viewController = t, this.viewHelper = i, this.mouseTargetFactory = new On(this._context, i), this._mouseDownOperation = this._register(new ooe(this._context, this.viewController, this.viewHelper, this.mouseTargetFactory, (r, l) => this._createMouseTarget(r, l), (r) => this._getMouseColumn(r))), this.lastMouseLeaveTime = -1, this._height = this._context.configuration.options.get(
+ super(), this._mouseLeaveMonitor = null, this._context = e, this.viewController = t, this.viewHelper = i, this.mouseTargetFactory = new Bn(this._context, i), this._mouseDownOperation = this._register(new joe(this._context, this.viewController, this.viewHelper, this.mouseTargetFactory, (l, r) => this._createMouseTarget(l, r), (l) => this._getMouseColumn(l))), this.lastMouseLeaveTime = -1, this._height = this._context.configuration.options.get(
146
/* EditorOption.layoutInfo */
).height;
- const n = new bse(this.viewHelper.viewDomNode);
- this._register(n.onContextMenu(this.viewHelper.viewDomNode, (r) => this._onContextMenu(r, !0))), this._register(n.onMouseMove(this.viewHelper.viewDomNode, (r) => {
- this._onMouseMove(r), this._mouseLeaveMonitor || (this._mouseLeaveMonitor = z(this.viewHelper.viewDomNode.ownerDocument, "mousemove", (l) => {
- this.viewHelper.viewDomNode.contains(l.target) || this._onMouseLeave(new Vh(l, !1, this.viewHelper.viewDomNode));
+ const n = new doe(this.viewHelper.viewDomNode);
+ this._register(n.onContextMenu(this.viewHelper.viewDomNode, (l) => this._onContextMenu(l, !0))), this._register(n.onMouseMove(this.viewHelper.viewDomNode, (l) => {
+ this._onMouseMove(l), this._mouseLeaveMonitor || (this._mouseLeaveMonitor = z(this.viewHelper.viewDomNode.ownerDocument, "mousemove", (r) => {
+ this.viewHelper.viewDomNode.contains(r.target) || this._onMouseLeave(new Hh(r, !1, this.viewHelper.viewDomNode));
}));
- })), this._register(n.onMouseUp(this.viewHelper.viewDomNode, (r) => this._onMouseUp(r))), this._register(n.onMouseLeave(this.viewHelper.viewDomNode, (r) => this._onMouseLeave(r)));
+ })), this._register(n.onMouseUp(this.viewHelper.viewDomNode, (l) => this._onMouseUp(l))), this._register(n.onMouseLeave(this.viewHelper.viewDomNode, (l) => this._onMouseLeave(l)));
let o = 0;
- this._register(n.onPointerDown(this.viewHelper.viewDomNode, (r, l) => {
- o = l;
- })), this._register(z(this.viewHelper.viewDomNode, ie.POINTER_UP, (r) => {
+ this._register(n.onPointerDown(this.viewHelper.viewDomNode, (l, r) => {
+ o = r;
+ })), this._register(z(this.viewHelper.viewDomNode, ie.POINTER_UP, (l) => {
this._mouseDownOperation.onPointerUp();
- })), this._register(n.onMouseDown(this.viewHelper.viewDomNode, (r) => this._onMouseDown(r, o))), this._setupMouseWheelZoomListener(), this._context.addEventHandler(this);
+ })), this._register(n.onMouseDown(this.viewHelper.viewDomNode, (l) => this._onMouseDown(l, o))), this._setupMouseWheelZoomListener(), this._context.addEventHandler(this);
}
_setupMouseWheelZoomListener() {
- const e = WA.INSTANCE;
- let t = 0, i = lr.getZoomLevel(), n = !1, o = 0;
- const r = (a) => {
- if (this.viewController.emitMouseWheel(a), !this._context.configuration.options.get(
+ const e = UV.INSTANCE;
+ let t = 0, i = dl.getZoomLevel(), n = !1, o = 0;
+ const l = (c) => {
+ if (this.viewController.emitMouseWheel(c), !this._context.configuration.options.get(
76
/* EditorOption.mouseWheelZoom */
))
return;
- const c = new am(a);
- if (e.acceptStandardWheelEvent(c), e.isPhysicalMouseWheel()) {
- if (l(a)) {
- const d = lr.getZoomLevel(), h = c.deltaY > 0 ? 1 : -1;
- lr.setZoomLevel(d + h), c.preventDefault(), c.stopPropagation();
+ const d = new mb(c);
+ if (e.acceptStandardWheelEvent(d), e.isPhysicalMouseWheel()) {
+ if (r(c)) {
+ const a = dl.getZoomLevel(), h = d.deltaY > 0 ? 1 : -1;
+ dl.setZoomLevel(a + h), d.preventDefault(), d.stopPropagation();
}
} else
- Date.now() - t > 50 && (i = lr.getZoomLevel(), n = l(a), o = 0), t = Date.now(), o += c.deltaY, n && (lr.setZoomLevel(i + o / 5), c.preventDefault(), c.stopPropagation());
+ Date.now() - t > 50 && (i = dl.getZoomLevel(), n = r(c), o = 0), t = Date.now(), o += d.deltaY, n && (dl.setZoomLevel(i + o / 5), d.preventDefault(), d.stopPropagation());
};
- this._register(z(this.viewHelper.viewDomNode, ie.MOUSE_WHEEL, r, { capture: !0, passive: !1 }));
- function l(a) {
- return qe ? (a.metaKey || a.ctrlKey) && !a.shiftKey && !a.altKey : a.ctrlKey && !a.metaKey && !a.shiftKey && !a.altKey;
+ this._register(z(this.viewHelper.viewDomNode, ie.MOUSE_WHEEL, l, { capture: !0, passive: !1 }));
+ function r(c) {
+ return qe ? (c.metaKey || c.ctrlKey) && !c.shiftKey && !c.altKey : c.ctrlKey && !c.metaKey && !c.shiftKey && !c.altKey;
}
}
dispose() {
@@ -22681,16 +22681,16 @@ class JE extends yC {
}
// --- end event handlers
getTargetAtClientPoint(e, t) {
- const n = new uU(e, t).toPageCoordinates(xe(this.viewHelper.viewDomNode)), o = PE(this.viewHelper.viewDomNode);
+ const n = new __(e, t).toPageCoordinates(Le(this.viewHelper.viewDomNode)), o = bJ(this.viewHelper.viewDomNode);
if (n.y < o.y || n.y > o.y + o.height || n.x < o.x || n.x > o.x + o.width)
return null;
- const r = BE(this.viewHelper.viewDomNode, o, n);
- return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), o, n, r, null);
+ const l = pJ(this.viewHelper.viewDomNode, o, n);
+ return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), o, n, l, null);
}
_createMouseTarget(e, t) {
let i = e.target;
if (!this.viewHelper.viewDomNode.contains(i)) {
- const n = hm(this.viewHelper.viewDomNode);
+ const n = gb(this.viewHelper.viewDomNode);
n && (i = n.elementsFromPoint(e.posx, e.posy).find((o) => this.viewHelper.viewDomNode.contains(o)));
}
return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, e.relativePos, t ? i : null);
@@ -22723,32 +22723,32 @@ class JE extends yC {
});
}
_onMouseDown(e, t) {
- const i = this._createMouseTarget(e, !0), n = i.type === 6 || i.type === 7, o = i.type === 2 || i.type === 3 || i.type === 4, r = i.type === 3, l = this._context.configuration.options.get(
+ const i = this._createMouseTarget(e, !0), n = i.type === 6 || i.type === 7, o = i.type === 2 || i.type === 3 || i.type === 4, l = i.type === 3, r = this._context.configuration.options.get(
110
/* EditorOption.selectOnLineNumbers */
- ), a = i.type === 8 || i.type === 5, c = i.type === 9;
- let d = e.leftButton || e.middleButton;
- qe && e.leftButton && e.ctrlKey && (d = !1);
+ ), c = i.type === 8 || i.type === 5, d = i.type === 9;
+ let a = e.leftButton || e.middleButton;
+ qe && e.leftButton && e.ctrlKey && (a = !1);
const h = () => {
e.preventDefault(), this.viewHelper.focusTextArea();
};
- if (d && (n || r && l))
+ if (a && (n || l && r))
h(), this._mouseDownOperation.start(i.type, e, t);
else if (o)
e.preventDefault();
- else if (a) {
+ else if (c) {
const u = i.detail;
- d && this.viewHelper.shouldSuppressMouseDownOnViewZone(u.viewZoneId) && (h(), this._mouseDownOperation.start(i.type, e, t), e.preventDefault());
- } else c && this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail) && (h(), e.preventDefault());
+ a && this.viewHelper.shouldSuppressMouseDownOnViewZone(u.viewZoneId) && (h(), this._mouseDownOperation.start(i.type, e, t), e.preventDefault());
+ } else d && this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail) && (h(), e.preventDefault());
this.viewController.emitMouseDown({
event: e,
target: i
});
}
}
-class ooe extends R {
- constructor(e, t, i, n, o, r) {
- super(), this._context = e, this._viewController = t, this._viewHelper = i, this._mouseTargetFactory = n, this._createMouseTarget = o, this._getMouseColumn = r, this._mouseMoveMonitor = this._register(new wse(this._viewHelper.viewDomNode)), this._topBottomDragScrolling = this._register(new roe(this._context, this._viewHelper, this._mouseTargetFactory, (l, a, c) => this._dispatchMouse(l, a, c))), this._mouseState = new cv(), this._currentSelection = new fe(1, 1, 1, 1), this._isActive = !1, this._lastMouseEvent = null;
+class joe extends J {
+ constructor(e, t, i, n, o, l) {
+ super(), this._context = e, this._viewController = t, this._viewHelper = i, this._mouseTargetFactory = n, this._createMouseTarget = o, this._getMouseColumn = l, this._mouseMoveMonitor = this._register(new hoe(this._viewHelper.viewDomNode)), this._topBottomDragScrolling = this._register(new qoe(this._context, this._viewHelper, this._mouseTargetFactory, (r, c, d) => this._dispatchMouse(r, c, d))), this._mouseState = new Nw(), this._currentSelection = new ge(1, 1, 1, 1), this._isActive = !1, this._lastMouseEvent = null;
}
dispose() {
super.dispose();
@@ -22789,11 +22789,11 @@ class ooe extends R {
22
/* EditorOption.columnSelection */
) && !this._mouseState.altKey && t.detail < 2 && !this._isActive && !this._currentSelection.isEmpty() && n.type === 6 && n.position && this._currentSelection.containsPosition(n.position)) {
- this._mouseState.isDragAndDrop = !0, this._isActive = !0, this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode, i, t.buttons, (r) => this._onMouseDownThenMove(r), (r) => {
- const l = this._findMousePosition(this._lastMouseEvent, !1);
- uc(r) ? this._viewController.emitMouseDropCanceled() : this._viewController.emitMouseDrop({
+ this._mouseState.isDragAndDrop = !0, this._isActive = !0, this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode, i, t.buttons, (l) => this._onMouseDownThenMove(l), (l) => {
+ const r = this._findMousePosition(this._lastMouseEvent, !1);
+ gd(l) ? this._viewController.emitMouseDropCanceled() : this._viewController.emitMouseDrop({
event: this._lastMouseEvent,
- target: l ? this._createMouseTarget(this._lastMouseEvent, !0) : null
+ target: r ? this._createMouseTarget(this._lastMouseEvent, !0) : null
// Ignoring because position is unknown, e.g., Content View Zone
}), this._stop();
});
@@ -22804,7 +22804,7 @@ class ooe extends R {
t.shiftKey,
1
/* NavigationCommandRevealType.Minimal */
- ), this._isActive || (this._isActive = !0, this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode, i, t.buttons, (r) => this._onMouseDownThenMove(r), () => this._stop()));
+ ), this._isActive || (this._isActive = !0, this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode, i, t.buttons, (l) => this._onMouseDownThenMove(l), () => this._stop()));
}
_stop() {
this._isActive = !1, this._topBottomDragScrolling.stop();
@@ -22821,33 +22821,33 @@ class ooe extends R {
_getPositionOutsideEditor(e) {
const t = e.editorPos, i = this._context.viewModel, n = this._context.viewLayout, o = this._getMouseColumn(e);
if (e.posy < t.y) {
- const l = t.y - e.posy, a = Math.max(n.getCurrentScrollTop() - l, 0), c = gb.getZoneAtCoord(this._context, a);
- if (c) {
- const h = this._helpPositionJumpOverViewZone(c);
+ const r = t.y - e.posy, c = Math.max(n.getCurrentScrollTop() - r, 0), d = yZ.getZoneAtCoord(this._context, c);
+ if (d) {
+ const h = this._helpPositionJumpOverViewZone(d);
if (h)
- return Hn.createOutsideEditor(o, h, "above", l);
+ return _n.createOutsideEditor(o, h, "above", r);
}
- const d = n.getLineNumberAtVerticalOffset(a);
- return Hn.createOutsideEditor(o, new V(d, 1), "above", l);
+ const a = n.getLineNumberAtVerticalOffset(c);
+ return _n.createOutsideEditor(o, new Y(a, 1), "above", r);
}
if (e.posy > t.y + t.height) {
- const l = e.posy - t.y - t.height, a = n.getCurrentScrollTop() + e.relativePos.y, c = gb.getZoneAtCoord(this._context, a);
- if (c) {
- const h = this._helpPositionJumpOverViewZone(c);
+ const r = e.posy - t.y - t.height, c = n.getCurrentScrollTop() + e.relativePos.y, d = yZ.getZoneAtCoord(this._context, c);
+ if (d) {
+ const h = this._helpPositionJumpOverViewZone(d);
if (h)
- return Hn.createOutsideEditor(o, h, "below", l);
+ return _n.createOutsideEditor(o, h, "below", r);
}
- const d = n.getLineNumberAtVerticalOffset(a);
- return Hn.createOutsideEditor(o, new V(d, i.getLineMaxColumn(d)), "below", l);
+ const a = n.getLineNumberAtVerticalOffset(c);
+ return _n.createOutsideEditor(o, new Y(a, i.getLineMaxColumn(a)), "below", r);
}
- const r = n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop() + e.relativePos.y);
+ const l = n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop() + e.relativePos.y);
if (e.posx < t.x) {
- const l = t.x - e.posx;
- return Hn.createOutsideEditor(o, new V(r, 1), "left", l);
+ const r = t.x - e.posx;
+ return _n.createOutsideEditor(o, new Y(l, 1), "left", r);
}
if (e.posx > t.x + t.width) {
- const l = e.posx - t.x - t.width;
- return Hn.createOutsideEditor(o, new V(r, i.getLineMaxColumn(r)), "right", l);
+ const r = e.posx - t.x - t.width;
+ return _n.createOutsideEditor(o, new Y(l, i.getLineMaxColumn(l)), "right", r);
}
return null;
}
@@ -22859,14 +22859,14 @@ class ooe extends R {
if (!n.position)
return null;
if (n.type === 8 || n.type === 5) {
- const r = this._helpPositionJumpOverViewZone(n.detail);
- if (r)
- return Hn.createViewZone(n.type, n.element, n.mouseColumn, r, n.detail);
+ const l = this._helpPositionJumpOverViewZone(n.detail);
+ if (l)
+ return _n.createViewZone(n.type, n.element, n.mouseColumn, l, n.detail);
}
return n;
}
_helpPositionJumpOverViewZone(e) {
- const t = new V(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn), i = e.positionBefore, n = e.positionAfter;
+ const t = new Y(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn), i = e.positionBefore, n = e.positionAfter;
return i && n ? i.isBefore(t) ? i : n : null;
}
_dispatchMouse(e, t, i) {
@@ -22887,7 +22887,7 @@ class ooe extends R {
});
}
}
-class roe extends R {
+class qoe extends J {
constructor(e, t, i, n) {
super(), this._context = e, this._viewHelper = t, this._mouseTargetFactory = i, this._dispatchMouse = n, this._operation = null;
}
@@ -22895,15 +22895,15 @@ class roe extends R {
super.dispose(), this.stop();
}
start(e, t) {
- this._operation ? this._operation.setPosition(e, t) : this._operation = new loe(this._context, this._viewHelper, this._mouseTargetFactory, this._dispatchMouse, e, t);
+ this._operation ? this._operation.setPosition(e, t) : this._operation = new $oe(this._context, this._viewHelper, this._mouseTargetFactory, this._dispatchMouse, e, t);
}
stop() {
this._operation && (this._operation.dispose(), this._operation = null);
}
}
-class loe extends R {
- constructor(e, t, i, n, o, r) {
- super(), this._context = e, this._viewHelper = t, this._mouseTargetFactory = i, this._dispatchMouse = n, this._position = o, this._mouseEvent = r, this._lastTime = Date.now(), this._animationFrameDisposable = po(xe(r.browserEvent), () => this._execute());
+class $oe extends J {
+ constructor(e, t, i, n, o, l) {
+ super(), this._context = e, this._viewHelper = t, this._mouseTargetFactory = i, this._dispatchMouse = n, this._position = o, this._mouseEvent = l, this._lastTime = Date.now(), this._animationFrameDisposable = Zo(Le(l.browserEvent), () => this._execute());
}
dispose() {
this._animationFrameDisposable.dispose(), super.dispose();
@@ -22937,24 +22937,24 @@ class loe extends R {
/* EditorOption.lineHeight */
), t = this._getScrollSpeed(), i = this._tick(), n = t * (i / 1e3) * e, o = this._position.outsidePosition === "above" ? -n : n;
this._context.viewModel.viewLayout.deltaScrollNow(0, o), this._viewHelper.renderNow();
- const r = this._context.viewLayout.getLinesViewportData(), l = this._position.outsidePosition === "above" ? r.startLineNumber : r.endLineNumber;
- let a;
+ const l = this._context.viewLayout.getLinesViewportData(), r = this._position.outsidePosition === "above" ? l.startLineNumber : l.endLineNumber;
+ let c;
{
- const c = PE(this._viewHelper.viewDomNode), d = this._context.configuration.options.get(
+ const d = bJ(this._viewHelper.viewDomNode), a = this._context.configuration.options.get(
146
/* EditorOption.layoutInfo */
- ).horizontalScrollbarHeight, h = new aI(this._mouseEvent.pos.x, c.y + c.height - d - 0.1), u = BE(this._viewHelper.viewDomNode, c, h);
- a = this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(), c, h, u, null);
+ ).horizontalScrollbarHeight, h = new Vx(this._mouseEvent.pos.x, d.y + d.height - a - 0.1), u = pJ(this._viewHelper.viewDomNode, d, h);
+ c = this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(), d, h, u, null);
}
- (!a.position || a.position.lineNumber !== l) && (this._position.outsidePosition === "above" ? a = Hn.createOutsideEditor(this._position.mouseColumn, new V(l, 1), "above", this._position.outsideDistance) : a = Hn.createOutsideEditor(this._position.mouseColumn, new V(l, this._context.viewModel.getLineMaxColumn(l)), "below", this._position.outsideDistance)), this._dispatchMouse(
- a,
+ (!c.position || c.position.lineNumber !== r) && (this._position.outsidePosition === "above" ? c = _n.createOutsideEditor(this._position.mouseColumn, new Y(r, 1), "above", this._position.outsideDistance) : c = _n.createOutsideEditor(this._position.mouseColumn, new Y(r, this._context.viewModel.getLineMaxColumn(r)), "below", this._position.outsideDistance)), this._dispatchMouse(
+ c,
!0,
2
/* NavigationCommandRevealType.None */
- ), this._animationFrameDisposable = po(xe(a.element), () => this._execute());
+ ), this._animationFrameDisposable = Zo(Le(c.element), () => this._execute());
}
}
-const lZ = class lZ {
+const X2 = class X2 {
// ms
get altKey() {
return this._altKey;
@@ -22994,11 +22994,11 @@ const lZ = class lZ {
}
trySetCount(e, t) {
const i = (/* @__PURE__ */ new Date()).getTime();
- i - this._lastSetMouseDownCountTime > lZ.CLEAR_MOUSE_DOWN_COUNT_TIME && (e = 1), this._lastSetMouseDownCountTime = i, e > this._lastMouseDownCount + 1 && (e = this._lastMouseDownCount + 1), this._lastMouseDownPosition && this._lastMouseDownPosition.equals(t) ? this._lastMouseDownPositionEqualCount++ : this._lastMouseDownPositionEqualCount = 1, this._lastMouseDownPosition = t, this._lastMouseDownCount = Math.min(e, this._lastMouseDownPositionEqualCount);
+ i - this._lastSetMouseDownCountTime > X2.CLEAR_MOUSE_DOWN_COUNT_TIME && (e = 1), this._lastSetMouseDownCountTime = i, e > this._lastMouseDownCount + 1 && (e = this._lastMouseDownCount + 1), this._lastMouseDownPosition && this._lastMouseDownPosition.equals(t) ? this._lastMouseDownPositionEqualCount++ : this._lastMouseDownPositionEqualCount = 1, this._lastMouseDownPosition = t, this._lastMouseDownCount = Math.min(e, this._lastMouseDownPositionEqualCount);
}
};
-lZ.CLEAR_MOUSE_DOWN_COUNT_TIME = 400;
-let cv = lZ;
+X2.CLEAR_MOUSE_DOWN_COUNT_TIME = 400;
+let Nw = X2;
class et {
get event() {
return this.emitter.event;
@@ -23014,7 +23014,7 @@ class et {
this.emitter.dispose();
}
}
-const cf = class cf {
+const pg = class pg {
constructor(e, t, i, n, o) {
this.value = e, this.selectionStart = t, this.selectionEnd = i, this.selection = n, this.newlineCountBeforeSelection = o;
}
@@ -23023,34 +23023,34 @@ const cf = class cf {
}
static readFromTextArea(e, t) {
const i = e.getValue(), n = e.getSelectionStart(), o = e.getSelectionEnd();
- let r;
+ let l;
if (t) {
- const l = i.substring(0, n), a = t.value.substring(0, t.selectionStart);
- l === a && (r = t.newlineCountBeforeSelection);
+ const r = i.substring(0, n), c = t.value.substring(0, t.selectionStart);
+ r === c && (l = t.newlineCountBeforeSelection);
}
- return new cf(i, n, o, null, r);
+ return new pg(i, n, o, null, l);
}
collapseSelection() {
- return this.selectionStart === this.value.length ? this : new cf(this.value, this.value.length, this.value.length, null, void 0);
+ return this.selectionStart === this.value.length ? this : new pg(this.value, this.value.length, this.value.length, null, void 0);
}
writeToTextArea(e, t, i) {
t.setValue(e, this.value), i && t.setSelectionRange(e, this.selectionStart, this.selectionEnd);
}
deduceEditorPosition(e) {
- var n, o, r, l;
+ var n, o, l, r;
if (e <= this.selectionStart) {
- const a = this.value.substring(e, this.selectionStart);
- return this._finishDeduceEditorPosition(((n = this.selection) == null ? void 0 : n.getStartPosition()) ?? null, a, -1);
+ const c = this.value.substring(e, this.selectionStart);
+ return this._finishDeduceEditorPosition(((n = this.selection) == null ? void 0 : n.getStartPosition()) ?? null, c, -1);
}
if (e >= this.selectionEnd) {
- const a = this.value.substring(this.selectionEnd, e);
- return this._finishDeduceEditorPosition(((o = this.selection) == null ? void 0 : o.getEndPosition()) ?? null, a, 1);
+ const c = this.value.substring(this.selectionEnd, e);
+ return this._finishDeduceEditorPosition(((o = this.selection) == null ? void 0 : o.getEndPosition()) ?? null, c, 1);
}
const t = this.value.substring(this.selectionStart, e);
if (t.indexOf("…") === -1)
- return this._finishDeduceEditorPosition(((r = this.selection) == null ? void 0 : r.getStartPosition()) ?? null, t, 1);
+ return this._finishDeduceEditorPosition(((l = this.selection) == null ? void 0 : l.getStartPosition()) ?? null, t, 1);
const i = this.value.substring(e, this.selectionEnd);
- return this._finishDeduceEditorPosition(((l = this.selection) == null ? void 0 : l.getEndPosition()) ?? null, i, -1);
+ return this._finishDeduceEditorPosition(((r = this.selection) == null ? void 0 : r.getEndPosition()) ?? null, i, -1);
}
_finishDeduceEditorPosition(e, t, i) {
let n = 0, o = -1;
@@ -23067,21 +23067,21 @@ const cf = class cf {
replaceNextCharCnt: 0,
positionDelta: 0
};
- const n = Math.min(Ih(e.value, t.value), e.selectionStart, t.selectionStart), o = Math.min(eA(e.value, t.value), e.value.length - e.selectionEnd, t.value.length - t.selectionEnd);
+ const n = Math.min(Th(e.value, t.value), e.selectionStart, t.selectionStart), o = Math.min(pV(e.value, t.value), e.value.length - e.selectionEnd, t.value.length - t.selectionEnd);
e.value.substring(n, e.value.length - o);
- const r = t.value.substring(n, t.value.length - o), l = e.selectionStart - n, a = e.selectionEnd - n, c = t.selectionStart - n, d = t.selectionEnd - n;
- if (c === d) {
+ const l = t.value.substring(n, t.value.length - o), r = e.selectionStart - n, c = e.selectionEnd - n, d = t.selectionStart - n, a = t.selectionEnd - n;
+ if (d === a) {
const u = e.selectionStart - n;
return {
- text: r,
+ text: l,
replacePrevCharCnt: u,
replaceNextCharCnt: 0,
positionDelta: 0
};
}
- const h = a - l;
+ const h = c - r;
return {
- text: r,
+ text: l,
replacePrevCharCnt: h,
replaceNextCharCnt: 0,
positionDelta: 0
@@ -23102,97 +23102,97 @@ const cf = class cf {
replaceNextCharCnt: 0,
positionDelta: t.selectionEnd - e.selectionEnd
};
- const i = Math.min(Ih(e.value, t.value), e.selectionEnd), n = Math.min(eA(e.value, t.value), e.value.length - e.selectionEnd), o = e.value.substring(i, e.value.length - n), r = t.value.substring(i, t.value.length - n);
+ const i = Math.min(Th(e.value, t.value), e.selectionEnd), n = Math.min(pV(e.value, t.value), e.value.length - e.selectionEnd), o = e.value.substring(i, e.value.length - n), l = t.value.substring(i, t.value.length - n);
e.selectionStart - i;
- const l = e.selectionEnd - i;
+ const r = e.selectionEnd - i;
t.selectionStart - i;
- const a = t.selectionEnd - i;
+ const c = t.selectionEnd - i;
return {
- text: r,
- replacePrevCharCnt: l,
- replaceNextCharCnt: o.length - l,
- positionDelta: a - r.length
+ text: l,
+ replacePrevCharCnt: r,
+ replaceNextCharCnt: o.length - r,
+ positionDelta: c - l.length
};
}
};
-cf.EMPTY = new cf("", 0, 0, null, void 0);
-let Jn = cf;
-class Rp {
+pg.EMPTY = new pg("", 0, 0, null, void 0);
+let Qn = pg;
+class Ap {
static _getPageOfLine(e, t) {
return Math.floor((e - 1) / t);
}
static _getRangeForPage(e, t) {
const i = e * t, n = i + 1, o = i + t;
- return new M(n, 1, o + 1, 1);
+ return new I(n, 1, o + 1, 1);
}
static fromEditorSelection(e, t, i, n) {
- const r = Rp._getPageOfLine(t.startLineNumber, i), l = Rp._getRangeForPage(r, i), a = Rp._getPageOfLine(t.endLineNumber, i), c = Rp._getRangeForPage(a, i);
- let d = l.intersectRanges(new M(1, 1, t.startLineNumber, t.startColumn));
+ const l = Ap._getPageOfLine(t.startLineNumber, i), r = Ap._getRangeForPage(l, i), c = Ap._getPageOfLine(t.endLineNumber, i), d = Ap._getRangeForPage(c, i);
+ let a = r.intersectRanges(new I(1, 1, t.startLineNumber, t.startColumn));
if (n && e.getValueLengthInRange(
- d,
+ a,
1
/* EndOfLinePreference.LF */
) > 500) {
- const y = e.modifyPosition(d.getEndPosition(), -500);
- d = M.fromPositions(y, d.getEndPosition());
+ const f = e.modifyPosition(a.getEndPosition(), -500);
+ a = I.fromPositions(f, a.getEndPosition());
}
const h = e.getValueInRange(
- d,
+ a,
1
/* EndOfLinePreference.LF */
- ), u = e.getLineCount(), g = e.getLineMaxColumn(u);
- let m = c.intersectRanges(new M(t.endLineNumber, t.endColumn, u, g));
+ ), u = e.getLineCount(), m = e.getLineMaxColumn(u);
+ let b = d.intersectRanges(new I(t.endLineNumber, t.endColumn, u, m));
if (n && e.getValueLengthInRange(
- m,
+ b,
1
/* EndOfLinePreference.LF */
) > 500) {
- const y = e.modifyPosition(m.getStartPosition(), 500);
- m = M.fromPositions(m.getStartPosition(), y);
+ const f = e.modifyPosition(b.getStartPosition(), 500);
+ b = I.fromPositions(b.getStartPosition(), f);
}
- const f = e.getValueInRange(
- m,
+ const g = e.getValueInRange(
+ b,
1
/* EndOfLinePreference.LF */
);
- let b;
- if (r === a || r + 1 === a)
- b = e.getValueInRange(
+ let Z;
+ if (l === c || l + 1 === c)
+ Z = e.getValueInRange(
t,
1
/* EndOfLinePreference.LF */
);
else {
- const y = l.intersectRanges(t), w = c.intersectRanges(t);
- b = e.getValueInRange(
- y,
+ const f = r.intersectRanges(t), y = d.intersectRanges(t);
+ Z = e.getValueInRange(
+ f,
1
/* EndOfLinePreference.LF */
) + "…" + e.getValueInRange(
- w,
+ y,
1
/* EndOfLinePreference.LF */
);
}
- return n && b.length > 2 * 500 && (b = b.substring(0, 500) + "…" + b.substring(b.length - 500, b.length)), new Jn(h + b + f, h.length, h.length + b.length, t, d.endLineNumber - d.startLineNumber);
+ return n && Z.length > 2 * 500 && (Z = Z.substring(0, 500) + "…" + Z.substring(Z.length - 500, Z.length)), new Qn(h + Z + g, h.length, h.length + Z.length, t, a.endLineNumber - a.startLineNumber);
}
}
-var aoe = function(s, e, t, i) {
- var n = arguments.length, o = n < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, r;
+var ele = function(s, e, t, i) {
+ var n = arguments.length, o = n < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, l;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, e, t, i);
- else for (var l = s.length - 1; l >= 0; l--) (r = s[l]) && (o = (n < 3 ? r(o) : n > 3 ? r(e, t, o) : r(e, t)) || o);
+ else for (var r = s.length - 1; r >= 0; r--) (l = s[r]) && (o = (n < 3 ? l(o) : n > 3 ? l(e, t, o) : l(e, t)) || o);
return n > 3 && o && Object.defineProperty(e, t, o), o;
-}, KF = function(s, e) {
+}, WF = function(s, e) {
return function(t, i) {
e(t, i, s);
};
-}, vA;
+}, PV;
(function(s) {
s.Tap = "-monaco-textarea-synthetic-tap";
-})(vA || (vA = {}));
-const dv = {
+})(PV || (PV = {}));
+const ww = {
forceCopyWithSyntaxHighlighting: !1
-}, aZ = class aZ {
+}, V2 = class V2 {
constructor() {
this._lastState = null;
}
@@ -23203,9 +23203,9 @@ const dv = {
return this._lastState && this._lastState.lastCopiedValue === e ? this._lastState.data : (this._lastState = null, null);
}
};
-aZ.INSTANCE = new aZ();
-let Qw = aZ;
-class coe {
+V2.INSTANCE = new V2();
+let cW = V2;
+class tle {
constructor() {
this._lastTypeTextLength = 0;
}
@@ -23220,90 +23220,90 @@ class coe {
return this._lastTypeTextLength = e.length, t;
}
}
-let hv = class extends R {
+let Tw = class extends J {
get textAreaState() {
return this._textAreaState;
}
- constructor(e, t, i, n, o, r) {
- super(), this._host = e, this._textArea = t, this._OS = i, this._browser = n, this._accessibilityService = o, this._logService = r, this._onFocus = this._register(new k()), this.onFocus = this._onFocus.event, this._onBlur = this._register(new k()), this.onBlur = this._onBlur.event, this._onKeyDown = this._register(new k()), this.onKeyDown = this._onKeyDown.event, this._onKeyUp = this._register(new k()), this.onKeyUp = this._onKeyUp.event, this._onCut = this._register(new k()), this.onCut = this._onCut.event, this._onPaste = this._register(new k()), this.onPaste = this._onPaste.event, this._onType = this._register(new k()), this.onType = this._onType.event, this._onCompositionStart = this._register(new k()), this.onCompositionStart = this._onCompositionStart.event, this._onCompositionUpdate = this._register(new k()), this.onCompositionUpdate = this._onCompositionUpdate.event, this._onCompositionEnd = this._register(new k()), this.onCompositionEnd = this._onCompositionEnd.event, this._onSelectionChangeRequest = this._register(new k()), this.onSelectionChangeRequest = this._onSelectionChangeRequest.event, this._asyncFocusGainWriteScreenReaderContent = this._register(new fn()), this._asyncTriggerCut = this._register(new Zt(() => this._onCut.fire(), 0)), this._textAreaState = Jn.EMPTY, this._selectionChangeListener = null, this._accessibilityService.isScreenReaderOptimized() && this.writeNativeTextAreaContent("ctor"), this._register(se.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized, () => {
- this._accessibilityService.isScreenReaderOptimized() && !this._asyncFocusGainWriteScreenReaderContent.value ? this._asyncFocusGainWriteScreenReaderContent.value = this._register(new Zt(() => this.writeNativeTextAreaContent("asyncFocusGain"), 0)) : this._asyncFocusGainWriteScreenReaderContent.clear();
+ constructor(e, t, i, n, o, l) {
+ super(), this._host = e, this._textArea = t, this._OS = i, this._browser = n, this._accessibilityService = o, this._logService = l, this._onFocus = this._register(new k()), this.onFocus = this._onFocus.event, this._onBlur = this._register(new k()), this.onBlur = this._onBlur.event, this._onKeyDown = this._register(new k()), this.onKeyDown = this._onKeyDown.event, this._onKeyUp = this._register(new k()), this.onKeyUp = this._onKeyUp.event, this._onCut = this._register(new k()), this.onCut = this._onCut.event, this._onPaste = this._register(new k()), this.onPaste = this._onPaste.event, this._onType = this._register(new k()), this.onType = this._onType.event, this._onCompositionStart = this._register(new k()), this.onCompositionStart = this._onCompositionStart.event, this._onCompositionUpdate = this._register(new k()), this.onCompositionUpdate = this._onCompositionUpdate.event, this._onCompositionEnd = this._register(new k()), this.onCompositionEnd = this._onCompositionEnd.event, this._onSelectionChangeRequest = this._register(new k()), this.onSelectionChangeRequest = this._onSelectionChangeRequest.event, this._asyncFocusGainWriteScreenReaderContent = this._register(new Zn()), this._asyncTriggerCut = this._register(new St(() => this._onCut.fire(), 0)), this._textAreaState = Qn.EMPTY, this._selectionChangeListener = null, this._accessibilityService.isScreenReaderOptimized() && this.writeNativeTextAreaContent("ctor"), this._register(se.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized, () => {
+ this._accessibilityService.isScreenReaderOptimized() && !this._asyncFocusGainWriteScreenReaderContent.value ? this._asyncFocusGainWriteScreenReaderContent.value = this._register(new St(() => this.writeNativeTextAreaContent("asyncFocusGain"), 0)) : this._asyncFocusGainWriteScreenReaderContent.clear();
})), this._hasFocus = !1, this._currentComposition = null;
- let l = null;
- this._register(this._textArea.onKeyDown((a) => {
- const c = new Vt(a);
- (c.keyCode === 114 || this._currentComposition && c.keyCode === 1) && c.stopPropagation(), c.equals(
+ let r = null;
+ this._register(this._textArea.onKeyDown((c) => {
+ const d = new Yt(c);
+ (d.keyCode === 114 || this._currentComposition && d.keyCode === 1) && d.stopPropagation(), d.equals(
9
/* KeyCode.Escape */
- ) && c.preventDefault(), l = c, this._onKeyDown.fire(c);
- })), this._register(this._textArea.onKeyUp((a) => {
- const c = new Vt(a);
- this._onKeyUp.fire(c);
- })), this._register(this._textArea.onCompositionStart((a) => {
- const c = new coe();
+ ) && d.preventDefault(), r = d, this._onKeyDown.fire(d);
+ })), this._register(this._textArea.onKeyUp((c) => {
+ const d = new Yt(c);
+ this._onKeyUp.fire(d);
+ })), this._register(this._textArea.onCompositionStart((c) => {
+ const d = new tle();
if (this._currentComposition) {
- this._currentComposition = c;
+ this._currentComposition = d;
return;
}
- if (this._currentComposition = c, this._OS === 2 && l && l.equals(
+ if (this._currentComposition = d, this._OS === 2 && r && r.equals(
114
/* KeyCode.KEY_IN_COMPOSITION */
- ) && this._textAreaState.selectionStart === this._textAreaState.selectionEnd && this._textAreaState.selectionStart > 0 && this._textAreaState.value.substr(this._textAreaState.selectionStart - 1, 1) === a.data && (l.code === "ArrowRight" || l.code === "ArrowLeft")) {
- c.handleCompositionUpdate("x"), this._onCompositionStart.fire({ data: a.data });
+ ) && this._textAreaState.selectionStart === this._textAreaState.selectionEnd && this._textAreaState.selectionStart > 0 && this._textAreaState.value.substr(this._textAreaState.selectionStart - 1, 1) === c.data && (r.code === "ArrowRight" || r.code === "ArrowLeft")) {
+ d.handleCompositionUpdate("x"), this._onCompositionStart.fire({ data: c.data });
return;
}
if (this._browser.isAndroid) {
- this._onCompositionStart.fire({ data: a.data });
+ this._onCompositionStart.fire({ data: c.data });
return;
}
- this._onCompositionStart.fire({ data: a.data });
- })), this._register(this._textArea.onCompositionUpdate((a) => {
- const c = this._currentComposition;
- if (!c)
+ this._onCompositionStart.fire({ data: c.data });
+ })), this._register(this._textArea.onCompositionUpdate((c) => {
+ const d = this._currentComposition;
+ if (!d)
return;
if (this._browser.isAndroid) {
- const h = Jn.readFromTextArea(this._textArea, this._textAreaState), u = Jn.deduceAndroidCompositionInput(this._textAreaState, h);
- this._textAreaState = h, this._onType.fire(u), this._onCompositionUpdate.fire(a);
+ const h = Qn.readFromTextArea(this._textArea, this._textAreaState), u = Qn.deduceAndroidCompositionInput(this._textAreaState, h);
+ this._textAreaState = h, this._onType.fire(u), this._onCompositionUpdate.fire(c);
return;
}
- const d = c.handleCompositionUpdate(a.data);
- this._textAreaState = Jn.readFromTextArea(this._textArea, this._textAreaState), this._onType.fire(d), this._onCompositionUpdate.fire(a);
- })), this._register(this._textArea.onCompositionEnd((a) => {
- const c = this._currentComposition;
- if (!c)
+ const a = d.handleCompositionUpdate(c.data);
+ this._textAreaState = Qn.readFromTextArea(this._textArea, this._textAreaState), this._onType.fire(a), this._onCompositionUpdate.fire(c);
+ })), this._register(this._textArea.onCompositionEnd((c) => {
+ const d = this._currentComposition;
+ if (!d)
return;
if (this._currentComposition = null, this._browser.isAndroid) {
- const h = Jn.readFromTextArea(this._textArea, this._textAreaState), u = Jn.deduceAndroidCompositionInput(this._textAreaState, h);
+ const h = Qn.readFromTextArea(this._textArea, this._textAreaState), u = Qn.deduceAndroidCompositionInput(this._textAreaState, h);
this._textAreaState = h, this._onType.fire(u), this._onCompositionEnd.fire();
return;
}
- const d = c.handleCompositionUpdate(a.data);
- this._textAreaState = Jn.readFromTextArea(this._textArea, this._textAreaState), this._onType.fire(d), this._onCompositionEnd.fire();
- })), this._register(this._textArea.onInput((a) => {
+ const a = d.handleCompositionUpdate(c.data);
+ this._textAreaState = Qn.readFromTextArea(this._textArea, this._textAreaState), this._onType.fire(a), this._onCompositionEnd.fire();
+ })), this._register(this._textArea.onInput((c) => {
if (this._textArea.setIgnoreSelectionChangeTime("received input event"), this._currentComposition)
return;
- const c = Jn.readFromTextArea(this._textArea, this._textAreaState), d = Jn.deduceInput(
+ const d = Qn.readFromTextArea(this._textArea, this._textAreaState), a = Qn.deduceInput(
this._textAreaState,
- c,
+ d,
/*couldBeEmojiInput*/
this._OS === 2
/* OperatingSystem.Macintosh */
);
- d.replacePrevCharCnt === 0 && d.text.length === 1 && (Hi(d.text.charCodeAt(0)) || d.text.charCodeAt(0) === 127) || (this._textAreaState = c, (d.text !== "" || d.replacePrevCharCnt !== 0 || d.replaceNextCharCnt !== 0 || d.positionDelta !== 0) && this._onType.fire(d));
- })), this._register(this._textArea.onCut((a) => {
- this._textArea.setIgnoreSelectionChangeTime("received cut event"), this._ensureClipboardGetsEditorSelection(a), this._asyncTriggerCut.schedule();
- })), this._register(this._textArea.onCopy((a) => {
- this._ensureClipboardGetsEditorSelection(a);
- })), this._register(this._textArea.onPaste((a) => {
- if (this._textArea.setIgnoreSelectionChangeTime("received paste event"), a.preventDefault(), !a.clipboardData)
+ a.replacePrevCharCnt === 0 && a.text.length === 1 && (Bi(a.text.charCodeAt(0)) || a.text.charCodeAt(0) === 127) || (this._textAreaState = d, (a.text !== "" || a.replacePrevCharCnt !== 0 || a.replaceNextCharCnt !== 0 || a.positionDelta !== 0) && this._onType.fire(a));
+ })), this._register(this._textArea.onCut((c) => {
+ this._textArea.setIgnoreSelectionChangeTime("received cut event"), this._ensureClipboardGetsEditorSelection(c), this._asyncTriggerCut.schedule();
+ })), this._register(this._textArea.onCopy((c) => {
+ this._ensureClipboardGetsEditorSelection(c);
+ })), this._register(this._textArea.onPaste((c) => {
+ if (this._textArea.setIgnoreSelectionChangeTime("received paste event"), c.preventDefault(), !c.clipboardData)
return;
- let [c, d] = uv.getTextData(a.clipboardData);
- c && (d = d || Qw.INSTANCE.get(c), this._onPaste.fire({
- text: c,
- metadata: d
+ let [d, a] = Mw.getTextData(c.clipboardData);
+ d && (a = a || cW.INSTANCE.get(d), this._onPaste.fire({
+ text: d,
+ metadata: a
}));
})), this._register(this._textArea.onFocus(() => {
- const a = this._hasFocus;
- this._setHasFocus(!0), this._accessibilityService.isScreenReaderOptimized() && this._browser.isSafari && !a && this._hasFocus && (this._asyncFocusGainWriteScreenReaderContent.value || (this._asyncFocusGainWriteScreenReaderContent.value = new Zt(() => this.writeNativeTextAreaContent("asyncFocusGain"), 0)), this._asyncFocusGainWriteScreenReaderContent.value.schedule());
+ const c = this._hasFocus;
+ this._setHasFocus(!0), this._accessibilityService.isScreenReaderOptimized() && this._browser.isSafari && !c && this._hasFocus && (this._asyncFocusGainWriteScreenReaderContent.value || (this._asyncFocusGainWriteScreenReaderContent.value = new St(() => this.writeNativeTextAreaContent("asyncFocusGain"), 0)), this._asyncFocusGainWriteScreenReaderContent.value.schedule());
})), this._register(this._textArea.onBlur(() => {
this._currentComposition && (this._currentComposition = null, this.writeNativeTextAreaContent("blurWithoutCompositionEnd"), this._onCompositionEnd.fire()), this._setHasFocus(!1);
})), this._register(this._textArea.onSyntheticTap(() => {
@@ -23313,7 +23313,7 @@ let hv = class extends R {
_installSelectionChangeListener() {
let e = 0;
return z(this._textArea.ownerDocument, "selectionchange", (t) => {
- if (Fd.onSelectionChange(), !this._hasFocus || this._currentComposition || !this._browser.isChrome)
+ if (Ka.onSelectionChange(), !this._hasFocus || this._currentComposition || !this._browser.isChrome)
return;
const i = Date.now(), n = i - e;
if (e = i, n < 5)
@@ -23321,14 +23321,14 @@ let hv = class extends R {
const o = i - this._textArea.getIgnoreSelectionChangeTime();
if (this._textArea.resetSelectionChangeTime(), o < 100 || !this._textAreaState.selection)
return;
- const r = this._textArea.getValue();
- if (this._textAreaState.value !== r)
+ const l = this._textArea.getValue();
+ if (this._textAreaState.value !== l)
return;
- const l = this._textArea.getSelectionStart(), a = this._textArea.getSelectionEnd();
- if (this._textAreaState.selectionStart === l && this._textAreaState.selectionEnd === a)
+ const r = this._textArea.getSelectionStart(), c = this._textArea.getSelectionEnd();
+ if (this._textAreaState.selectionStart === r && this._textAreaState.selectionEnd === c)
return;
- const c = this._textAreaState.deduceEditorPosition(l), d = this._host.deduceModelPosition(c[0], c[1], c[2]), h = this._textAreaState.deduceEditorPosition(a), u = this._host.deduceModelPosition(h[0], h[1], h[2]), g = new fe(d.lineNumber, d.column, u.lineNumber, u.column);
- this._onSelectionChangeRequest.fire(g);
+ const d = this._textAreaState.deduceEditorPosition(r), a = this._host.deduceModelPosition(d[0], d[1], d[2]), h = this._textAreaState.deduceEditorPosition(c), u = this._host.deduceModelPosition(h[0], h[1], h[2]), m = new ge(a.lineNumber, a.column, u.lineNumber, u.column);
+ this._onSelectionChangeRequest.fire(m);
});
}
dispose() {
@@ -23359,22 +23359,22 @@ let hv = class extends R {
multicursorText: t.multicursorText,
mode: t.mode
};
- Qw.INSTANCE.set(
+ cW.INSTANCE.set(
// When writing "LINE\r\n" to the clipboard and then pasting,
// Firefox pastes "LINE\n", so let's work around this quirk
this._browser.isFirefox ? t.text.replace(/\r\n/g, `
`) : t.text,
i
- ), e.preventDefault(), e.clipboardData && uv.setTextData(e.clipboardData, t.text, t.html, i);
+ ), e.preventDefault(), e.clipboardData && Mw.setTextData(e.clipboardData, t.text, t.html, i);
}
};
-hv = aoe([
- KF(4, yo),
- KF(5, Xn)
-], hv);
-const uv = {
+Tw = ele([
+ WF(4, Wo),
+ WF(5, Fn)
+], Tw);
+const Mw = {
getTextData(s) {
- const e = s.getData(bi.text);
+ const e = s.getData(fi.text);
let t = null;
const i = s.getData("vscode-editor-data");
if (typeof i == "string")
@@ -23386,19 +23386,19 @@ const uv = {
`), null] : [e, t];
},
setTextData(s, e, t, i) {
- s.setData(bi.text, e), typeof t == "string" && s.setData("text/html", t), s.setData("vscode-editor-data", JSON.stringify(i));
+ s.setData(fi.text, e), typeof t == "string" && s.setData("text/html", t), s.setData("vscode-editor-data", JSON.stringify(i));
}
};
-class doe extends R {
+class ile extends J {
get ownerDocument() {
return this._actual.ownerDocument;
}
constructor(e) {
- super(), this._actual = e, this.onKeyDown = this._register(new et(this._actual, "keydown")).event, this.onKeyUp = this._register(new et(this._actual, "keyup")).event, this.onCompositionStart = this._register(new et(this._actual, "compositionstart")).event, this.onCompositionUpdate = this._register(new et(this._actual, "compositionupdate")).event, this.onCompositionEnd = this._register(new et(this._actual, "compositionend")).event, this.onBeforeInput = this._register(new et(this._actual, "beforeinput")).event, this.onInput = this._register(new et(this._actual, "input")).event, this.onCut = this._register(new et(this._actual, "cut")).event, this.onCopy = this._register(new et(this._actual, "copy")).event, this.onPaste = this._register(new et(this._actual, "paste")).event, this.onFocus = this._register(new et(this._actual, "focus")).event, this.onBlur = this._register(new et(this._actual, "blur")).event, this._onSyntheticTap = this._register(new k()), this.onSyntheticTap = this._onSyntheticTap.event, this._ignoreSelectionChangeTime = 0, this._register(this.onKeyDown(() => Fd.onKeyDown())), this._register(this.onBeforeInput(() => Fd.onBeforeInput())), this._register(this.onInput(() => Fd.onInput())), this._register(this.onKeyUp(() => Fd.onKeyUp())), this._register(z(this._actual, vA.Tap, () => this._onSyntheticTap.fire()));
+ super(), this._actual = e, this.onKeyDown = this._register(new et(this._actual, "keydown")).event, this.onKeyUp = this._register(new et(this._actual, "keyup")).event, this.onCompositionStart = this._register(new et(this._actual, "compositionstart")).event, this.onCompositionUpdate = this._register(new et(this._actual, "compositionupdate")).event, this.onCompositionEnd = this._register(new et(this._actual, "compositionend")).event, this.onBeforeInput = this._register(new et(this._actual, "beforeinput")).event, this.onInput = this._register(new et(this._actual, "input")).event, this.onCut = this._register(new et(this._actual, "cut")).event, this.onCopy = this._register(new et(this._actual, "copy")).event, this.onPaste = this._register(new et(this._actual, "paste")).event, this.onFocus = this._register(new et(this._actual, "focus")).event, this.onBlur = this._register(new et(this._actual, "blur")).event, this._onSyntheticTap = this._register(new k()), this.onSyntheticTap = this._onSyntheticTap.event, this._ignoreSelectionChangeTime = 0, this._register(this.onKeyDown(() => Ka.onKeyDown())), this._register(this.onBeforeInput(() => Ka.onBeforeInput())), this._register(this.onInput(() => Ka.onInput())), this._register(this.onKeyUp(() => Ka.onKeyUp())), this._register(z(this._actual, PV.Tap, () => this._onSyntheticTap.fire()));
}
hasFocus() {
- const e = hm(this._actual);
- return e ? e.activeElement === this._actual : this._actual.isConnected ? _n() === this._actual : !1;
+ const e = gb(this._actual);
+ return e ? e.activeElement === this._actual : this._actual.isConnected ? Cn() === this._actual : !1;
}
setIgnoreSelectionChangeTime(e) {
this._ignoreSelectionChangeTime = Date.now();
@@ -23425,35 +23425,35 @@ class doe extends R {
setSelectionRange(e, t, i) {
const n = this._actual;
let o = null;
- const r = hm(n);
- r ? o = r.activeElement : o = _n();
- const l = xe(o), a = o === n, c = n.selectionStart, d = n.selectionEnd;
- if (a && c === t && d === i) {
- pr && l.parent !== l && n.focus();
+ const l = gb(n);
+ l ? o = l.activeElement : o = Cn();
+ const r = Le(o), c = o === n, d = n.selectionStart, a = n.selectionEnd;
+ if (c && d === t && a === i) {
+ fl && r.parent !== r && n.focus();
return;
}
- if (a) {
- this.setIgnoreSelectionChangeTime("setSelectionRange"), n.setSelectionRange(t, i), pr && l.parent !== l && n.focus();
+ if (c) {
+ this.setIgnoreSelectionChangeTime("setSelectionRange"), n.setSelectionRange(t, i), fl && r.parent !== r && n.focus();
return;
}
try {
- const h = s$(n);
- this.setIgnoreSelectionChangeTime("setSelectionRange"), n.focus(), n.setSelectionRange(t, i), o$(n, h);
+ const h = O$(n);
+ this.setIgnoreSelectionChangeTime("setSelectionRange"), n.focus(), n.setSelectionRange(t, i), j$(n, h);
} catch {
}
}
}
-class hoe extends JE {
+class nle extends fJ {
constructor(e, t, i) {
- super(e, t, i), this._register(Rn.addTarget(this.viewHelper.linesContentDomNode)), this._register(z(this.viewHelper.linesContentDomNode, Rt.Tap, (o) => this.onTap(o))), this._register(z(this.viewHelper.linesContentDomNode, Rt.Change, (o) => this.onChange(o))), this._register(z(this.viewHelper.linesContentDomNode, Rt.Contextmenu, (o) => this._onContextMenu(new Vh(o, !1, this.viewHelper.viewDomNode), !1))), this._lastPointerType = "mouse", this._register(z(this.viewHelper.linesContentDomNode, "pointerdown", (o) => {
- const r = o.pointerType;
- if (r === "mouse") {
+ super(e, t, i), this._register(En.addTarget(this.viewHelper.linesContentDomNode)), this._register(z(this.viewHelper.linesContentDomNode, Jt.Tap, (o) => this.onTap(o))), this._register(z(this.viewHelper.linesContentDomNode, Jt.Change, (o) => this.onChange(o))), this._register(z(this.viewHelper.linesContentDomNode, Jt.Contextmenu, (o) => this._onContextMenu(new Hh(o, !1, this.viewHelper.viewDomNode), !1))), this._lastPointerType = "mouse", this._register(z(this.viewHelper.linesContentDomNode, "pointerdown", (o) => {
+ const l = o.pointerType;
+ if (l === "mouse") {
this._lastPointerType = "mouse";
return;
- } else r === "touch" ? this._lastPointerType = "touch" : this._lastPointerType = "pen";
+ } else l === "touch" ? this._lastPointerType = "touch" : this._lastPointerType = "pen";
}));
- const n = new yse(this.viewHelper.viewDomNode);
- this._register(n.onPointerMove(this.viewHelper.viewDomNode, (o) => this._onMouseMove(o))), this._register(n.onPointerUp(this.viewHelper.viewDomNode, (o) => this._onMouseUp(o))), this._register(n.onPointerLeave(this.viewHelper.viewDomNode, (o) => this._onMouseLeave(o))), this._register(n.onPointerDown(this.viewHelper.viewDomNode, (o, r) => this._onMouseDown(o, r)));
+ const n = new aoe(this.viewHelper.viewDomNode);
+ this._register(n.onPointerMove(this.viewHelper.viewDomNode, (o) => this._onMouseMove(o))), this._register(n.onPointerUp(this.viewHelper.viewDomNode, (o) => this._onMouseUp(o))), this._register(n.onPointerLeave(this.viewHelper.viewDomNode, (o) => this._onMouseLeave(o))), this._register(n.onPointerDown(this.viewHelper.viewDomNode, (o, l) => this._onMouseDown(o, l)));
}
onTap(e) {
!e.initialTarget || !this.viewHelper.linesContentDomNode.contains(e.initialTarget) || (e.preventDefault(), this.viewHelper.focusTextArea(), this._dispatchGesture(
@@ -23470,7 +23470,7 @@ class hoe extends JE {
);
}
_dispatchGesture(e, t) {
- const i = this._createMouseTarget(new Vh(e, !1, this.viewHelper.viewDomNode), !1);
+ const i = this._createMouseTarget(new Hh(e, !1, this.viewHelper.viewDomNode), !1);
i.position && this.viewController.dispatchMouse({
position: i.position,
mouseColumn: i.position.column,
@@ -23491,16 +23491,16 @@ class hoe extends JE {
e.browserEvent.pointerType !== "touch" && super._onMouseDown(e, t);
}
}
-class uoe extends JE {
+class sle extends fJ {
constructor(e, t, i) {
- super(e, t, i), this._register(Rn.addTarget(this.viewHelper.linesContentDomNode)), this._register(z(this.viewHelper.linesContentDomNode, Rt.Tap, (n) => this.onTap(n))), this._register(z(this.viewHelper.linesContentDomNode, Rt.Change, (n) => this.onChange(n))), this._register(z(this.viewHelper.linesContentDomNode, Rt.Contextmenu, (n) => this._onContextMenu(new Vh(n, !1, this.viewHelper.viewDomNode), !1)));
+ super(e, t, i), this._register(En.addTarget(this.viewHelper.linesContentDomNode)), this._register(z(this.viewHelper.linesContentDomNode, Jt.Tap, (n) => this.onTap(n))), this._register(z(this.viewHelper.linesContentDomNode, Jt.Change, (n) => this.onChange(n))), this._register(z(this.viewHelper.linesContentDomNode, Jt.Contextmenu, (n) => this._onContextMenu(new Hh(n, !1, this.viewHelper.viewDomNode), !1)));
}
onTap(e) {
e.preventDefault(), this.viewHelper.focusTextArea();
- const t = this._createMouseTarget(new Vh(e, !1, this.viewHelper.viewDomNode), !1);
+ const t = this._createMouseTarget(new Hh(e, !1, this.viewHelper.viewDomNode), !1);
if (t.position) {
const i = document.createEvent("CustomEvent");
- i.initEvent(vA.Tap, !1, !0), this.viewHelper.dispatchTextAreaEvent(i), this.viewController.moveTo(
+ i.initEvent(PV.Tap, !1, !0), this.viewHelper.dispatchTextAreaEvent(i), this.viewController.moveTo(
t.position,
1
/* NavigationCommandRevealType.Minimal */
@@ -23511,41 +23511,41 @@ class uoe extends JE {
this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);
}
}
-class goe extends R {
+class ole extends J {
constructor(e, t, i) {
- super(), (Wa || t6 && pH) && HR.pointerEvents ? this.handler = this._register(new hoe(e, t, i)) : vt.TouchEvent ? this.handler = this._register(new uoe(e, t, i)) : this.handler = this._register(new JE(e, t, i));
+ super(), (Yc || B6 && jP) && Zv.pointerEvents ? this.handler = this._register(new nle(e, t, i)) : wt.TouchEvent ? this.handler = this._register(new sle(e, t, i)) : this.handler = this._register(new fJ(e, t, i));
}
getTargetAtClientPoint(e, t) {
return this.handler.getTargetAtClientPoint(e, t);
}
}
-class Xm extends yC {
+class Kb extends wG {
}
-const Pi = $e("themeService");
-function fi(s) {
+const Ki = $e("themeService");
+function Zi(s) {
return { id: s };
}
-function gv(s) {
+function Yw(s) {
switch (s) {
- case cr.DARK:
+ case hl.DARK:
return "vs-dark";
- case cr.HIGH_CONTRAST_DARK:
+ case hl.HIGH_CONTRAST_DARK:
return "hc-black";
- case cr.HIGH_CONTRAST_LIGHT:
+ case hl.HIGH_CONTRAST_LIGHT:
return "hc-light";
default:
return "vs";
}
}
-const SU = {
+const nQ = {
ThemingContribution: "base.contributions.theming"
};
-class moe {
+class lle {
constructor() {
this.themingParticipants = [], this.themingParticipants = [], this.onThemingParticipantAddedEmitter = new k();
}
onColorThemeChange(e) {
- return this.themingParticipants.push(e), this.onThemingParticipantAddedEmitter.fire(e), Ce(() => {
+ return this.themingParticipants.push(e), this.onThemingParticipantAddedEmitter.fire(e), We(() => {
const t = this.themingParticipants.indexOf(e);
this.themingParticipants.splice(t, 1);
});
@@ -23554,12 +23554,12 @@ class moe {
return this.themingParticipants;
}
}
-const LU = new moe();
-Di.add(SU.ThemingContribution, LU);
-function Lr(s) {
- return LU.onColorThemeChange(s);
+const sQ = new lle();
+ki.add(nQ.ThemingContribution, sQ);
+function Il(s) {
+ return sQ.onColorThemeChange(s);
}
-class poe extends R {
+class rle extends J {
constructor(e) {
super(), this.themeService = e, this.theme = e.getColorTheme(), this._register(this.themeService.onDidColorThemeChange((t) => this.onThemeChange(t)));
}
@@ -23569,35 +23569,35 @@ class poe extends R {
updateStyles() {
}
}
-const AU = N("editor.lineHighlightBackground", null, p("lineHighlight", "Background color for the highlight of line at the cursor position.")), QF = N("editor.lineHighlightBorder", { dark: "#282828", light: "#eeeeee", hcDark: "#f38518", hcLight: rt }, p("lineHighlightBorderBox", "Background color for the border around the line at the cursor position."));
-N("editor.rangeHighlightBackground", { dark: "#ffffff0b", light: "#fdff0033", hcDark: null, hcLight: null }, p("rangeHighlight", "Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."), !0);
-N("editor.rangeHighlightBorder", { dark: null, light: null, hcDark: Ut, hcLight: Ut }, p("rangeHighlightBorder", "Background color of the border around highlighted ranges."));
-N("editor.symbolHighlightBackground", { dark: xc, light: xc, hcDark: null, hcLight: null }, p("symbolHighlight", "Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."), !0);
-N("editor.symbolHighlightBorder", { dark: null, light: null, hcDark: Ut, hcLight: Ut }, p("symbolHighlightBorder", "Background color of the border around highlighted symbols."));
-const gI = N("editorCursor.foreground", { dark: "#AEAFAD", light: K.black, hcDark: K.white, hcLight: "#0F4A85" }, p("caret", "Color of the editor cursor.")), UE = N("editorCursor.background", null, p("editorCursorBackground", "The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")), xU = N("editorMultiCursor.primary.foreground", gI, p("editorMultiCursorPrimaryForeground", "Color of the primary editor cursor when multiple cursors are present.")), foe = N("editorMultiCursor.primary.background", UE, p("editorMultiCursorPrimaryBackground", "The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")), MU = N("editorMultiCursor.secondary.foreground", gI, p("editorMultiCursorSecondaryForeground", "Color of secondary editor cursors when multiple cursors are present.")), boe = N("editorMultiCursor.secondary.background", UE, p("editorMultiCursorSecondaryBackground", "The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")), KE = N("editorWhitespace.foreground", { dark: "#e3e4e229", light: "#33333333", hcDark: "#e3e4e229", hcLight: "#CCCCCC" }, p("editorWhitespaces", "Color of whitespace characters in the editor.")), yoe = N("editorLineNumber.foreground", { dark: "#858585", light: "#237893", hcDark: K.white, hcLight: "#292929" }, p("editorLineNumbers", "Color of editor line numbers.")), woe = N("editorIndentGuide.background", KE, p("editorIndentGuides", "Color of the editor indentation guides."), !1, p("deprecatedEditorIndentGuides", "'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")), Coe = N("editorIndentGuide.activeBackground", KE, p("editorActiveIndentGuide", "Color of the active editor indentation guides."), !1, p("deprecatedEditorActiveIndentGuide", "'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")), SC = N("editorIndentGuide.background1", woe, p("editorIndentGuides1", "Color of the editor indentation guides (1).")), Soe = N("editorIndentGuide.background2", "#00000000", p("editorIndentGuides2", "Color of the editor indentation guides (2).")), Loe = N("editorIndentGuide.background3", "#00000000", p("editorIndentGuides3", "Color of the editor indentation guides (3).")), Aoe = N("editorIndentGuide.background4", "#00000000", p("editorIndentGuides4", "Color of the editor indentation guides (4).")), xoe = N("editorIndentGuide.background5", "#00000000", p("editorIndentGuides5", "Color of the editor indentation guides (5).")), Moe = N("editorIndentGuide.background6", "#00000000", p("editorIndentGuides6", "Color of the editor indentation guides (6).")), LC = N("editorIndentGuide.activeBackground1", Coe, p("editorActiveIndentGuide1", "Color of the active editor indentation guides (1).")), Zoe = N("editorIndentGuide.activeBackground2", "#00000000", p("editorActiveIndentGuide2", "Color of the active editor indentation guides (2).")), _oe = N("editorIndentGuide.activeBackground3", "#00000000", p("editorActiveIndentGuide3", "Color of the active editor indentation guides (3).")), Ioe = N("editorIndentGuide.activeBackground4", "#00000000", p("editorActiveIndentGuide4", "Color of the active editor indentation guides (4).")), Noe = N("editorIndentGuide.activeBackground5", "#00000000", p("editorActiveIndentGuide5", "Color of the active editor indentation guides (5).")), Woe = N("editorIndentGuide.activeBackground6", "#00000000", p("editorActiveIndentGuide6", "Color of the active editor indentation guides (6).")), voe = N("editorActiveLineNumber.foreground", { dark: "#c6c6c6", light: "#0B216F", hcDark: Ut, hcLight: Ut }, p("editorActiveLineNumber", "Color of editor active line number"), !1, p("deprecatedEditorActiveLineNumber", "Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));
-N("editorLineNumber.activeForeground", voe, p("editorActiveLineNumber", "Color of editor active line number"));
-const Toe = N("editorLineNumber.dimmedForeground", null, p("editorDimmedLineNumber", "Color of the final editor line when editor.renderFinalNewline is set to dimmed."));
-N("editorRuler.foreground", { dark: "#5A5A5A", light: K.lightgrey, hcDark: K.white, hcLight: "#292929" }, p("editorRuler", "Color of the editor rulers."));
-N("editorCodeLens.foreground", { dark: "#999999", light: "#919191", hcDark: "#999999", hcLight: "#292929" }, p("editorCodeLensForeground", "Foreground color of editor CodeLens"));
-N("editorBracketMatch.background", { dark: "#0064001a", light: "#0064001a", hcDark: "#0064001a", hcLight: "#0000" }, p("editorBracketMatchBackground", "Background color behind matching brackets"));
-N("editorBracketMatch.border", { dark: "#888", light: "#B9B9B9", hcDark: rt, hcLight: rt }, p("editorBracketMatchBorder", "Color for matching brackets boxes"));
-const Doe = N("editorOverviewRuler.border", { dark: "#7f7f7f4d", light: "#7f7f7f4d", hcDark: "#7f7f7f4d", hcLight: "#666666" }, p("editorOverviewRulerBorder", "Color of the overview ruler border.")), Voe = N("editorOverviewRuler.background", null, p("editorOverviewRulerBackground", "Background color of the editor overview ruler."));
-N("editorGutter.background", Hr, p("editorGutter", "Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));
-N("editorUnnecessaryCode.border", { dark: null, light: null, hcDark: K.fromHex("#fff").transparent(0.8), hcLight: rt }, p("unnecessaryCodeBorder", "Border color of unnecessary (unused) source code in the editor."));
-const koe = N("editorUnnecessaryCode.opacity", { dark: K.fromHex("#000a"), light: K.fromHex("#0007"), hcDark: null, hcLight: null }, p("unnecessaryCodeOpacity", `Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));
-N("editorGhostText.border", { dark: null, light: null, hcDark: K.fromHex("#fff").transparent(0.8), hcLight: K.fromHex("#292929").transparent(0.8) }, p("editorGhostTextBorder", "Border color of ghost text in the editor."));
-const Goe = N("editorGhostText.foreground", { dark: K.fromHex("#ffffff56"), light: K.fromHex("#0007"), hcDark: null, hcLight: null }, p("editorGhostTextForeground", "Foreground color of the ghost text in the editor."));
-N("editorGhostText.background", null, p("editorGhostTextBackground", "Background color of the ghost text in the editor."));
-const Roe = new K(new lt(0, 122, 204, 0.6)), Eoe = N("editorOverviewRuler.rangeHighlightForeground", Roe, p("overviewRulerRangeHighlight", "Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."), !0), Xoe = N("editorOverviewRuler.errorForeground", { dark: new K(new lt(255, 18, 18, 0.7)), light: new K(new lt(255, 18, 18, 0.7)), hcDark: new K(new lt(255, 50, 50, 1)), hcLight: "#B5200D" }, p("overviewRuleError", "Overview ruler marker color for errors.")), Foe = N("editorOverviewRuler.warningForeground", { dark: Jc, light: Jc, hcDark: Bw, hcLight: Bw }, p("overviewRuleWarning", "Overview ruler marker color for warnings.")), Yoe = N("editorOverviewRuler.infoForeground", { dark: Da, light: Da, hcDark: Ow, hcLight: Ow }, p("overviewRuleInfo", "Overview ruler marker color for infos.")), ZU = N("editorBracketHighlight.foreground1", { dark: "#FFD700", light: "#0431FAFF", hcDark: "#FFD700", hcLight: "#0431FAFF" }, p("editorBracketHighlightForeground1", "Foreground color of brackets (1). Requires enabling bracket pair colorization.")), _U = N("editorBracketHighlight.foreground2", { dark: "#DA70D6", light: "#319331FF", hcDark: "#DA70D6", hcLight: "#319331FF" }, p("editorBracketHighlightForeground2", "Foreground color of brackets (2). Requires enabling bracket pair colorization.")), IU = N("editorBracketHighlight.foreground3", { dark: "#179FFF", light: "#7B3814FF", hcDark: "#87CEFA", hcLight: "#7B3814FF" }, p("editorBracketHighlightForeground3", "Foreground color of brackets (3). Requires enabling bracket pair colorization.")), NU = N("editorBracketHighlight.foreground4", "#00000000", p("editorBracketHighlightForeground4", "Foreground color of brackets (4). Requires enabling bracket pair colorization.")), WU = N("editorBracketHighlight.foreground5", "#00000000", p("editorBracketHighlightForeground5", "Foreground color of brackets (5). Requires enabling bracket pair colorization.")), vU = N("editorBracketHighlight.foreground6", "#00000000", p("editorBracketHighlightForeground6", "Foreground color of brackets (6). Requires enabling bracket pair colorization.")), zoe = N("editorBracketHighlight.unexpectedBracket.foreground", { dark: new K(new lt(255, 18, 18, 0.8)), light: new K(new lt(255, 18, 18, 0.8)), hcDark: "new Color(new RGBA(255, 50, 50, 1))", hcLight: "#B5200D" }, p("editorBracketHighlightUnexpectedBracketForeground", "Foreground color of unexpected brackets.")), Poe = N("editorBracketPairGuide.background1", "#00000000", p("editorBracketPairGuide.background1", "Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")), Boe = N("editorBracketPairGuide.background2", "#00000000", p("editorBracketPairGuide.background2", "Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")), Ooe = N("editorBracketPairGuide.background3", "#00000000", p("editorBracketPairGuide.background3", "Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")), Hoe = N("editorBracketPairGuide.background4", "#00000000", p("editorBracketPairGuide.background4", "Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")), Joe = N("editorBracketPairGuide.background5", "#00000000", p("editorBracketPairGuide.background5", "Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")), Uoe = N("editorBracketPairGuide.background6", "#00000000", p("editorBracketPairGuide.background6", "Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")), Koe = N("editorBracketPairGuide.activeBackground1", "#00000000", p("editorBracketPairGuide.activeBackground1", "Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")), Qoe = N("editorBracketPairGuide.activeBackground2", "#00000000", p("editorBracketPairGuide.activeBackground2", "Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")), joe = N("editorBracketPairGuide.activeBackground3", "#00000000", p("editorBracketPairGuide.activeBackground3", "Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")), qoe = N("editorBracketPairGuide.activeBackground4", "#00000000", p("editorBracketPairGuide.activeBackground4", "Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")), $oe = N("editorBracketPairGuide.activeBackground5", "#00000000", p("editorBracketPairGuide.activeBackground5", "Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")), ere = N("editorBracketPairGuide.activeBackground6", "#00000000", p("editorBracketPairGuide.activeBackground6", "Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));
-N("editorUnicodeHighlight.border", Jc, p("editorUnicodeHighlight.border", "Border color used to highlight unicode characters."));
-N("editorUnicodeHighlight.background", Eie, p("editorUnicodeHighlight.background", "Background color used to highlight unicode characters."));
-Lr((s, e) => {
- const t = s.getColor(Hr), i = s.getColor(AU), n = i && !i.isTransparent() ? i : t;
+const oQ = R("editor.lineHighlightBackground", null, p("lineHighlight", "Background color for the highlight of line at the cursor position.")), GF = R("editor.lineHighlightBorder", { dark: "#282828", light: "#eeeeee", hcDark: "#f38518", hcLight: lt }, p("lineHighlightBorderBox", "Background color for the border around the line at the cursor position."));
+R("editor.rangeHighlightBackground", { dark: "#ffffff0b", light: "#fdff0033", hcDark: null, hcLight: null }, p("rangeHighlight", "Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."), !0);
+R("editor.rangeHighlightBorder", { dark: null, light: null, hcDark: _t, hcLight: _t }, p("rangeHighlightBorder", "Background color of the border around highlighted ranges."));
+R("editor.symbolHighlightBackground", { dark: Cd, light: Cd, hcDark: null, hcLight: null }, p("symbolHighlight", "Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."), !0);
+R("editor.symbolHighlightBorder", { dark: null, light: null, hcDark: _t, hcLight: _t }, p("symbolHighlightBorder", "Background color of the border around highlighted symbols."));
+const Cx = R("editorCursor.foreground", { dark: "#AEAFAD", light: Q.black, hcDark: Q.white, hcLight: "#0F4A85" }, p("caret", "Color of the editor cursor.")), yJ = R("editorCursor.background", null, p("editorCursorBackground", "The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")), lQ = R("editorMultiCursor.primary.foreground", Cx, p("editorMultiCursorPrimaryForeground", "Color of the primary editor cursor when multiple cursors are present.")), cle = R("editorMultiCursor.primary.background", yJ, p("editorMultiCursorPrimaryBackground", "The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")), rQ = R("editorMultiCursor.secondary.foreground", Cx, p("editorMultiCursorSecondaryForeground", "Color of secondary editor cursors when multiple cursors are present.")), dle = R("editorMultiCursor.secondary.background", yJ, p("editorMultiCursorSecondaryBackground", "The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")), WJ = R("editorWhitespace.foreground", { dark: "#e3e4e229", light: "#33333333", hcDark: "#e3e4e229", hcLight: "#CCCCCC" }, p("editorWhitespaces", "Color of whitespace characters in the editor.")), ale = R("editorLineNumber.foreground", { dark: "#858585", light: "#237893", hcDark: Q.white, hcLight: "#292929" }, p("editorLineNumbers", "Color of editor line numbers.")), hle = R("editorIndentGuide.background", WJ, p("editorIndentGuides", "Color of the editor indentation guides."), !1, p("deprecatedEditorIndentGuides", "'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")), ule = R("editorIndentGuide.activeBackground", WJ, p("editorActiveIndentGuide", "Color of the active editor indentation guides."), !1, p("deprecatedEditorActiveIndentGuide", "'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")), YG = R("editorIndentGuide.background1", hle, p("editorIndentGuides1", "Color of the editor indentation guides (1).")), mle = R("editorIndentGuide.background2", "#00000000", p("editorIndentGuides2", "Color of the editor indentation guides (2).")), ble = R("editorIndentGuide.background3", "#00000000", p("editorIndentGuides3", "Color of the editor indentation guides (3).")), ple = R("editorIndentGuide.background4", "#00000000", p("editorIndentGuides4", "Color of the editor indentation guides (4).")), gle = R("editorIndentGuide.background5", "#00000000", p("editorIndentGuides5", "Color of the editor indentation guides (5).")), Zle = R("editorIndentGuide.background6", "#00000000", p("editorIndentGuides6", "Color of the editor indentation guides (6).")), kG = R("editorIndentGuide.activeBackground1", ule, p("editorActiveIndentGuide1", "Color of the active editor indentation guides (1).")), fle = R("editorIndentGuide.activeBackground2", "#00000000", p("editorActiveIndentGuide2", "Color of the active editor indentation guides (2).")), yle = R("editorIndentGuide.activeBackground3", "#00000000", p("editorActiveIndentGuide3", "Color of the active editor indentation guides (3).")), Wle = R("editorIndentGuide.activeBackground4", "#00000000", p("editorActiveIndentGuide4", "Color of the active editor indentation guides (4).")), Gle = R("editorIndentGuide.activeBackground5", "#00000000", p("editorActiveIndentGuide5", "Color of the active editor indentation guides (5).")), Xle = R("editorIndentGuide.activeBackground6", "#00000000", p("editorActiveIndentGuide6", "Color of the active editor indentation guides (6).")), Vle = R("editorActiveLineNumber.foreground", { dark: "#c6c6c6", light: "#0B216F", hcDark: _t, hcLight: _t }, p("editorActiveLineNumber", "Color of editor active line number"), !1, p("deprecatedEditorActiveLineNumber", "Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));
+R("editorLineNumber.activeForeground", Vle, p("editorActiveLineNumber", "Color of editor active line number"));
+const Lle = R("editorLineNumber.dimmedForeground", null, p("editorDimmedLineNumber", "Color of the final editor line when editor.renderFinalNewline is set to dimmed."));
+R("editorRuler.foreground", { dark: "#5A5A5A", light: Q.lightgrey, hcDark: Q.white, hcLight: "#292929" }, p("editorRuler", "Color of the editor rulers."));
+R("editorCodeLens.foreground", { dark: "#999999", light: "#919191", hcDark: "#999999", hcLight: "#292929" }, p("editorCodeLensForeground", "Foreground color of editor CodeLens"));
+R("editorBracketMatch.background", { dark: "#0064001a", light: "#0064001a", hcDark: "#0064001a", hcLight: "#0000" }, p("editorBracketMatchBackground", "Background color behind matching brackets"));
+R("editorBracketMatch.border", { dark: "#888", light: "#B9B9B9", hcDark: lt, hcLight: lt }, p("editorBracketMatchBorder", "Color for matching brackets boxes"));
+const Ile = R("editorOverviewRuler.border", { dark: "#7f7f7f4d", light: "#7f7f7f4d", hcDark: "#7f7f7f4d", hcLight: "#666666" }, p("editorOverviewRulerBorder", "Color of the overview ruler border.")), Sle = R("editorOverviewRuler.background", null, p("editorOverviewRulerBackground", "Background color of the editor overview ruler."));
+R("editorGutter.background", Ql, p("editorGutter", "Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));
+R("editorUnnecessaryCode.border", { dark: null, light: null, hcDark: Q.fromHex("#fff").transparent(0.8), hcLight: lt }, p("unnecessaryCodeBorder", "Border color of unnecessary (unused) source code in the editor."));
+const xle = R("editorUnnecessaryCode.opacity", { dark: Q.fromHex("#000a"), light: Q.fromHex("#0007"), hcDark: null, hcLight: null }, p("unnecessaryCodeOpacity", `Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));
+R("editorGhostText.border", { dark: null, light: null, hcDark: Q.fromHex("#fff").transparent(0.8), hcLight: Q.fromHex("#292929").transparent(0.8) }, p("editorGhostTextBorder", "Border color of ghost text in the editor."));
+const Cle = R("editorGhostText.foreground", { dark: Q.fromHex("#ffffff56"), light: Q.fromHex("#0007"), hcDark: null, hcLight: null }, p("editorGhostTextForeground", "Foreground color of the ghost text in the editor."));
+R("editorGhostText.background", null, p("editorGhostTextBackground", "Background color of the ghost text in the editor."));
+const Rle = new Q(new rt(0, 122, 204, 0.6)), Nle = R("editorOverviewRuler.rangeHighlightForeground", Rle, p("overviewRulerRangeHighlight", "Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."), !0), wle = R("editorOverviewRuler.errorForeground", { dark: new Q(new rt(255, 18, 18, 0.7)), light: new Q(new rt(255, 18, 18, 0.7)), hcDark: new Q(new rt(255, 50, 50, 1)), hcLight: "#B5200D" }, p("overviewRuleError", "Overview ruler marker color for errors.")), Tle = R("editorOverviewRuler.warningForeground", { dark: jd, light: jd, hcDark: iW, hcLight: iW }, p("overviewRuleWarning", "Overview ruler marker color for warnings.")), Mle = R("editorOverviewRuler.infoForeground", { dark: Jc, light: Jc, hcDark: nW, hcLight: nW }, p("overviewRuleInfo", "Overview ruler marker color for infos.")), cQ = R("editorBracketHighlight.foreground1", { dark: "#FFD700", light: "#0431FAFF", hcDark: "#FFD700", hcLight: "#0431FAFF" }, p("editorBracketHighlightForeground1", "Foreground color of brackets (1). Requires enabling bracket pair colorization.")), dQ = R("editorBracketHighlight.foreground2", { dark: "#DA70D6", light: "#319331FF", hcDark: "#DA70D6", hcLight: "#319331FF" }, p("editorBracketHighlightForeground2", "Foreground color of brackets (2). Requires enabling bracket pair colorization.")), aQ = R("editorBracketHighlight.foreground3", { dark: "#179FFF", light: "#7B3814FF", hcDark: "#87CEFA", hcLight: "#7B3814FF" }, p("editorBracketHighlightForeground3", "Foreground color of brackets (3). Requires enabling bracket pair colorization.")), hQ = R("editorBracketHighlight.foreground4", "#00000000", p("editorBracketHighlightForeground4", "Foreground color of brackets (4). Requires enabling bracket pair colorization.")), uQ = R("editorBracketHighlight.foreground5", "#00000000", p("editorBracketHighlightForeground5", "Foreground color of brackets (5). Requires enabling bracket pair colorization.")), mQ = R("editorBracketHighlight.foreground6", "#00000000", p("editorBracketHighlightForeground6", "Foreground color of brackets (6). Requires enabling bracket pair colorization.")), Yle = R("editorBracketHighlight.unexpectedBracket.foreground", { dark: new Q(new rt(255, 18, 18, 0.8)), light: new Q(new rt(255, 18, 18, 0.8)), hcDark: "new Color(new RGBA(255, 50, 50, 1))", hcLight: "#B5200D" }, p("editorBracketHighlightUnexpectedBracketForeground", "Foreground color of unexpected brackets.")), kle = R("editorBracketPairGuide.background1", "#00000000", p("editorBracketPairGuide.background1", "Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")), vle = R("editorBracketPairGuide.background2", "#00000000", p("editorBracketPairGuide.background2", "Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")), Jle = R("editorBracketPairGuide.background3", "#00000000", p("editorBracketPairGuide.background3", "Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")), Hle = R("editorBracketPairGuide.background4", "#00000000", p("editorBracketPairGuide.background4", "Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")), Ele = R("editorBracketPairGuide.background5", "#00000000", p("editorBracketPairGuide.background5", "Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")), Dle = R("editorBracketPairGuide.background6", "#00000000", p("editorBracketPairGuide.background6", "Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")), Fle = R("editorBracketPairGuide.activeBackground1", "#00000000", p("editorBracketPairGuide.activeBackground1", "Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")), zle = R("editorBracketPairGuide.activeBackground2", "#00000000", p("editorBracketPairGuide.activeBackground2", "Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")), Ale = R("editorBracketPairGuide.activeBackground3", "#00000000", p("editorBracketPairGuide.activeBackground3", "Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")), Kle = R("editorBracketPairGuide.activeBackground4", "#00000000", p("editorBracketPairGuide.activeBackground4", "Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")), Ule = R("editorBracketPairGuide.activeBackground5", "#00000000", p("editorBracketPairGuide.activeBackground5", "Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")), Ple = R("editorBracketPairGuide.activeBackground6", "#00000000", p("editorBracketPairGuide.activeBackground6", "Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));
+R("editorUnicodeHighlight.border", jd, p("editorUnicodeHighlight.border", "Border color used to highlight unicode characters."));
+R("editorUnicodeHighlight.background", Nne, p("editorUnicodeHighlight.background", "Background color used to highlight unicode characters."));
+Il((s, e) => {
+ const t = s.getColor(Ql), i = s.getColor(oQ), n = i && !i.isTransparent() ? i : t;
n && e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${n}; }`);
});
-const cZ = class cZ extends Xm {
+const L2 = class L2 extends Kb {
constructor(e) {
- super(), this._context = e, this._readConfig(), this._lastCursorModelPosition = new V(1, 1), this._renderResult = null, this._activeLineNumber = 1, this._context.addEventHandler(this);
+ super(), this._context = e, this._readConfig(), this._lastCursorModelPosition = new Y(1, 1), this._renderResult = null, this._activeLineNumber = 1, this._context.addEventHandler(this);
}
_readConfig() {
const e = this._context.configuration.options;
@@ -23655,7 +23655,7 @@ const cZ = class cZ extends Xm {
}
// --- end event handlers
_getLineRenderLineNumber(e) {
- const t = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new V(e, 1));
+ const t = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Y(e, 1));
if (t.column !== 1)
return "";
const i = t.lineNumber;
@@ -23678,26 +23678,26 @@ const cZ = class cZ extends Xm {
this._renderResult = null;
return;
}
- const t = fs ? this._lineHeight % 2 === 0 ? " lh-even" : " lh-odd" : "", i = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, o = this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((c) => !!c.options.lineNumberClassName);
- o.sort((c, d) => M.compareRangesUsingEnds(c.range, d.range));
- let r = 0;
- const l = this._context.viewModel.getLineCount(), a = [];
- for (let c = i; c <= n; c++) {
- const d = c - i;
- let h = this._getLineRenderLineNumber(c), u = "";
- for (; r < o.length && o[r].range.endLineNumber < c; )
- r++;
- for (let g = r; g < o.length; g++) {
- const { range: m, options: f } = o[g];
- m.startLineNumber <= c && (u += " " + f.lineNumberClassName);
+ const t = fs ? this._lineHeight % 2 === 0 ? " lh-even" : " lh-odd" : "", i = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, o = this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((d) => !!d.options.lineNumberClassName);
+ o.sort((d, a) => I.compareRangesUsingEnds(d.range, a.range));
+ let l = 0;
+ const r = this._context.viewModel.getLineCount(), c = [];
+ for (let d = i; d <= n; d++) {
+ const a = d - i;
+ let h = this._getLineRenderLineNumber(d), u = "";
+ for (; l < o.length && o[l].range.endLineNumber < d; )
+ l++;
+ for (let m = l; m < o.length; m++) {
+ const { range: b, options: g } = o[m];
+ b.startLineNumber <= d && (u += " " + g.lineNumberClassName);
}
if (!h && !u) {
- a[d] = "";
+ c[a] = "";
continue;
}
- c === l && this._context.viewModel.getLineLength(c) === 0 && (this._renderFinalNewline === "off" && (h = ""), this._renderFinalNewline === "dimmed" && (u += " dimmed-line-number")), c === this._activeLineNumber && (u += " active-line-number"), a[d] = `
${h}
`;
+ d === r && this._context.viewModel.getLineLength(d) === 0 && (this._renderFinalNewline === "off" && (h = ""), this._renderFinalNewline === "dimmed" && (u += " dimmed-line-number")), d === this._activeLineNumber && (u += " active-line-number"), c[a] = `
${h}
`;
}
- this._renderResult = a;
+ this._renderResult = c;
}
render(e, t) {
if (!this._renderResult)
@@ -23706,13 +23706,13 @@ const cZ = class cZ extends Xm {
return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[i];
}
};
-cZ.CLASS_NAME = "line-numbers";
-let TA = cZ;
-Lr((s, e) => {
- const t = s.getColor(yoe), i = s.getColor(Toe);
+L2.CLASS_NAME = "line-numbers";
+let BV = L2;
+Il((s, e) => {
+ const t = s.getColor(ale), i = s.getColor(Lle);
i ? e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`) : t && e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(0.4)}; }`);
});
-const df = class df extends wo {
+const gg = class gg extends Go {
constructor(e) {
super(e);
const t = this._context.configuration.options, i = t.get(
@@ -23722,7 +23722,7 @@ const df = class df extends wo {
this._canUseLayerHinting = !t.get(
32
/* EditorOption.disableLayerHinting */
- ), this._contentLeft = i.contentLeft, this._glyphMarginLeft = i.glyphMarginLeft, this._glyphMarginWidth = i.glyphMarginWidth, this._domNode = yt(document.createElement("div")), this._domNode.setClassName(df.OUTER_CLASS_NAME), this._domNode.setPosition("absolute"), this._domNode.setAttribute("role", "presentation"), this._domNode.setAttribute("aria-hidden", "true"), this._glyphMarginBackgroundDomNode = yt(document.createElement("div")), this._glyphMarginBackgroundDomNode.setClassName(df.CLASS_NAME), this._domNode.appendChild(this._glyphMarginBackgroundDomNode);
+ ), this._contentLeft = i.contentLeft, this._glyphMarginLeft = i.glyphMarginLeft, this._glyphMarginWidth = i.glyphMarginWidth, this._domNode = ft(document.createElement("div")), this._domNode.setClassName(gg.OUTER_CLASS_NAME), this._domNode.setPosition("absolute"), this._domNode.setAttribute("role", "presentation"), this._domNode.setAttribute("aria-hidden", "true"), this._glyphMarginBackgroundDomNode = ft(document.createElement("div")), this._glyphMarginBackgroundDomNode.setClassName(gg.CLASS_NAME), this._domNode.appendChild(this._glyphMarginBackgroundDomNode);
}
dispose() {
super.dispose();
@@ -23755,10 +23755,10 @@ const df = class df extends wo {
this._domNode.setHeight(i), this._domNode.setWidth(this._contentLeft), this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft), this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth), this._glyphMarginBackgroundDomNode.setHeight(i);
}
};
-df.CLASS_NAME = "glyph-margin", df.OUTER_CLASS_NAME = "margin";
-let DA = df;
-const If = "monaco-mouse-cursor-text";
-let TU = class {
+gg.CLASS_NAME = "glyph-margin", gg.OUTER_CLASS_NAME = "margin";
+let _V = gg;
+const Yg = "monaco-mouse-cursor-text";
+let bQ = class {
constructor() {
this._tokenizationSupports = /* @__PURE__ */ new Map(), this._factories = /* @__PURE__ */ new Map(), this._onDidChange = new k(), this.onDidChange = this._onDidChange.event, this._colorMap = null;
}
@@ -23769,7 +23769,7 @@ let TU = class {
});
}
register(e, t) {
- return this._tokenizationSupports.set(e, t), this.handleChange([e]), Ce(() => {
+ return this._tokenizationSupports.set(e, t), this.handleChange([e]), We(() => {
this._tokenizationSupports.get(e) === t && (this._tokenizationSupports.delete(e), this.handleChange([e]));
});
}
@@ -23779,8 +23779,8 @@ let TU = class {
registerFactory(e, t) {
var n;
(n = this._factories.get(e)) == null || n.dispose();
- const i = new tre(this, e, t);
- return this._factories.set(e, i), Ce(() => {
+ const i = new Ble(this, e, t);
+ return this._factories.set(e, i), We(() => {
const o = this._factories.get(e);
!o || o !== i || (this._factories.delete(e), o.dispose());
});
@@ -23814,7 +23814,7 @@ let TU = class {
] : null;
}
};
-class tre extends R {
+class Ble extends J {
get isResolved() {
return this._isResolved;
}
@@ -23832,7 +23832,7 @@ class tre extends R {
this._isResolved = !0, e && !this._isDisposed && this._register(this._registry.register(this._languageId, e));
}
}
-let jw = class {
+let dW = class {
constructor(e, t, i) {
this.offset = e, this.type = t, this.language = i, this._tokenBrand = void 0;
}
@@ -23840,27 +23840,27 @@ let jw = class {
return "(" + this.offset + ", " + this.type + ")";
}
};
-class QE {
+class GJ {
constructor(e, t) {
this.tokens = e, this.endState = t, this._tokenizationResultBrand = void 0;
}
}
-class mI {
+class Rx {
constructor(e, t) {
this.tokens = e, this.endState = t, this._encodedTokenizationResultBrand = void 0;
}
}
-var io;
+var so;
(function(s) {
s[s.Increase = 0] = "Increase", s[s.Decrease = 1] = "Decrease";
-})(io || (io = {}));
-var qw;
+})(so || (so = {}));
+var aW;
(function(s) {
const e = /* @__PURE__ */ new Map();
e.set(0, te.symbolMethod), e.set(1, te.symbolFunction), e.set(2, te.symbolConstructor), e.set(3, te.symbolField), e.set(4, te.symbolVariable), e.set(5, te.symbolClass), e.set(6, te.symbolStruct), e.set(7, te.symbolInterface), e.set(8, te.symbolModule), e.set(9, te.symbolProperty), e.set(10, te.symbolEvent), e.set(11, te.symbolOperator), e.set(12, te.symbolUnit), e.set(13, te.symbolValue), e.set(15, te.symbolEnum), e.set(14, te.symbolConstant), e.set(15, te.symbolEnum), e.set(16, te.symbolEnumMember), e.set(17, te.symbolKeyword), e.set(27, te.symbolSnippet), e.set(18, te.symbolText), e.set(19, te.symbolColor), e.set(20, te.symbolFile), e.set(21, te.symbolReference), e.set(22, te.symbolCustomColor), e.set(23, te.symbolFolder), e.set(24, te.symbolTypeParameter), e.set(25, te.account), e.set(26, te.issues);
function t(o) {
- let r = e.get(o);
- return r || (console.info("No codicon found for CompletionItemKind " + o), r = te.symbolProperty), r;
+ let l = e.get(o);
+ return l || (console.info("No codicon found for CompletionItemKind " + o), l = te.symbolProperty), l;
}
s.toIcon = t;
const i = /* @__PURE__ */ new Map();
@@ -23985,41 +23985,41 @@ var qw;
26
/* CompletionItemKind.Issue */
);
- function n(o, r) {
- let l = i.get(o);
- return typeof l > "u" && !r && (l = 9), l;
+ function n(o, l) {
+ let r = i.get(o);
+ return typeof r > "u" && !l && (r = 9), r;
}
s.fromString = n;
-})(qw || (qw = {}));
-var _l;
+})(aW || (aW = {}));
+var wr;
(function(s) {
s[s.Automatic = 0] = "Automatic", s[s.Explicit = 1] = "Explicit";
-})(_l || (_l = {}));
-class DU {
+})(wr || (wr = {}));
+class pQ {
constructor(e, t, i, n) {
this.range = e, this.text = t, this.completionKind = i, this.isSnippetText = n;
}
equals(e) {
- return M.lift(this.range).equalsRange(e.range) && this.text === e.text && this.completionKind === e.completionKind && this.isSnippetText === e.isSnippetText;
+ return I.lift(this.range).equalsRange(e.range) && this.text === e.text && this.completionKind === e.completionKind && this.isSnippetText === e.isSnippetText;
}
}
-var $w;
+var hW;
(function(s) {
s[s.Automatic = 0] = "Automatic", s[s.PasteAs = 1] = "PasteAs";
-})($w || ($w = {}));
-var Za;
+})(hW || (hW = {}));
+var Nc;
(function(s) {
s[s.Invoke = 1] = "Invoke", s[s.TriggerCharacter = 2] = "TriggerCharacter", s[s.ContentChange = 3] = "ContentChange";
-})(Za || (Za = {}));
-var fb;
+})(Nc || (Nc = {}));
+var XZ;
(function(s) {
s[s.Text = 0] = "Text", s[s.Read = 1] = "Read", s[s.Write = 2] = "Write";
-})(fb || (fb = {}));
-function ire(s) {
- return s && Le.isUri(s.uri) && M.isIRange(s.range) && (M.isIRange(s.originSelectionRange) || M.isIRange(s.targetSelectionRange));
+})(XZ || (XZ = {}));
+function _le(s) {
+ return s && Xe.isUri(s.uri) && I.isIRange(s.range) && (I.isIRange(s.originSelectionRange) || I.isIRange(s.targetSelectionRange));
}
p("Array", "array"), p("Boolean", "boolean"), p("Class", "class"), p("Constant", "constant"), p("Constructor", "constructor"), p("Enum", "enumeration"), p("EnumMember", "enumeration member"), p("Event", "event"), p("Field", "field"), p("File", "file"), p("Function", "function"), p("Interface", "interface"), p("Key", "key"), p("Method", "method"), p("Module", "module"), p("Namespace", "namespace"), p("Null", "null"), p("Number", "number"), p("Object", "object"), p("Operator", "operator"), p("Package", "package"), p("Property", "property"), p("String", "string"), p("Struct", "struct"), p("TypeParameter", "type parameter"), p("Variable", "variable");
-var mv;
+var kw;
(function(s) {
const e = /* @__PURE__ */ new Map();
e.set(0, te.symbolFile), e.set(1, te.symbolModule), e.set(2, te.symbolNamespace), e.set(3, te.symbolPackage), e.set(4, te.symbolClass), e.set(5, te.symbolMethod), e.set(6, te.symbolProperty), e.set(7, te.symbolField), e.set(8, te.symbolConstructor), e.set(9, te.symbolEnum), e.set(10, te.symbolInterface), e.set(11, te.symbolFunction), e.set(12, te.symbolVariable), e.set(13, te.symbolConstant), e.set(14, te.symbolString), e.set(15, te.symbolNumber), e.set(16, te.symbolBoolean), e.set(17, te.symbolArray), e.set(18, te.symbolObject), e.set(19, te.symbolKey), e.set(20, te.symbolNull), e.set(21, te.symbolEnumMember), e.set(22, te.symbolStruct), e.set(23, te.symbolEvent), e.set(24, te.symbolOperator), e.set(25, te.symbolTypeParameter);
@@ -24028,9 +24028,9 @@ var mv;
return n || (console.info("No codicon found for SymbolKind " + i), n = te.symbolProperty), n;
}
s.toIcon = t;
-})(mv || (mv = {}));
-var qs;
-let r0 = (qs = class {
+})(kw || (kw = {}));
+var eo;
+let u0 = (eo = class {
/**
* Returns a {@link FoldingRangeKind} for the given value.
*
@@ -24039,13 +24039,13 @@ let r0 = (qs = class {
static fromValue(e) {
switch (e) {
case "comment":
- return qs.Comment;
+ return eo.Comment;
case "imports":
- return qs.Imports;
+ return eo.Imports;
case "region":
- return qs.Region;
+ return eo.Region;
}
- return new qs(e);
+ return new eo(e);
}
/**
* Creates a new {@link FoldingRangeKind}.
@@ -24055,27 +24055,27 @@ let r0 = (qs = class {
constructor(e) {
this.value = e;
}
-}, qs.Comment = new qs("comment"), qs.Imports = new qs("imports"), qs.Region = new qs("region"), qs);
-var pv;
+}, eo.Comment = new eo("comment"), eo.Imports = new eo("imports"), eo.Region = new eo("region"), eo);
+var vw;
(function(s) {
s[s.AIGenerated = 1] = "AIGenerated";
-})(pv || (pv = {}));
-var e1;
+})(vw || (vw = {}));
+var uW;
(function(s) {
s[s.Invoke = 0] = "Invoke", s[s.Automatic = 1] = "Automatic";
-})(e1 || (e1 = {}));
-var fv;
+})(uW || (uW = {}));
+var Jw;
(function(s) {
function e(t) {
return !t || typeof t != "object" ? !1 : typeof t.id == "string" && typeof t.title == "string";
}
s.is = e;
-})(fv || (fv = {}));
-var VA;
+})(Jw || (Jw = {}));
+var QV;
(function(s) {
s[s.Type = 1] = "Type", s[s.Parameter = 2] = "Parameter";
-})(VA || (VA = {}));
-class nre {
+})(QV || (QV = {}));
+class Qle {
constructor(e) {
this.createSupport = e, this._tokenizationSupport = null;
}
@@ -24088,12 +24088,12 @@ class nre {
return this._tokenizationSupport || (this._tokenizationSupport = this.createSupport()), this._tokenizationSupport;
}
}
-const Wi = new TU(), bv = new TU();
-var kA;
+const Ti = new bQ(), Hw = new bQ();
+var OV;
(function(s) {
s[s.Invoke = 0] = "Invoke", s[s.Automatic = 1] = "Automatic";
-})(kA || (kA = {}));
-class sre {
+})(OV || (OV = {}));
+class Ole {
constructor() {
this._onDidChange = new k(), this.onDidChange = this._onDidChange.event, this._enabled = !0;
}
@@ -24113,23 +24113,23 @@ class sre {
this._enabled = !1, this._onDidChange.fire();
}
}
-const vy = new sre(), xt = $e("keybindingService");
-var ore = function(s, e, t, i) {
- var n = arguments.length, o = n < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, r;
+const zf = new Ole(), Lt = $e("keybindingService");
+var jle = function(s, e, t, i) {
+ var n = arguments.length, o = n < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, l;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, e, t, i);
- else for (var l = s.length - 1; l >= 0; l--) (r = s[l]) && (o = (n < 3 ? r(o) : n > 3 ? r(e, t, o) : r(e, t)) || o);
+ else for (var r = s.length - 1; r >= 0; r--) (l = s[r]) && (o = (n < 3 ? l(o) : n > 3 ? l(e, t, o) : l(e, t)) || o);
return n > 3 && o && Object.defineProperty(e, t, o), o;
-}, jF = function(s, e) {
+}, XF = function(s, e) {
return function(t, i) {
e(t, i, s);
};
};
-class rre {
+class qle {
constructor(e, t, i, n, o) {
this._context = e, this.modelLineNumber = t, this.distanceToModelLineStart = i, this.widthOfHiddenLineTextBefore = n, this.distanceToModelLineEnd = o, this._visibleTextAreaBrand = void 0, this.startPosition = null, this.endPosition = null, this.visibleTextareaStart = null, this.visibleTextareaEnd = null, this._previousPresentation = null;
}
prepareRender(e) {
- const t = new V(this.modelLineNumber, this.distanceToModelLineStart + 1), i = new V(this.modelLineNumber, this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber) - this.distanceToModelLineEnd);
+ const t = new Y(this.modelLineNumber, this.distanceToModelLineStart + 1), i = new Y(this.modelLineNumber, this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber) - this.distanceToModelLineEnd);
this.startPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t), this.endPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i), this.startPosition.lineNumber === this.endPosition.lineNumber ? (this.visibleTextareaStart = e.visibleRangeForPosition(this.startPosition), this.visibleTextareaEnd = e.visibleRangeForPosition(this.endPosition)) : (this.visibleTextareaStart = null, this.visibleTextareaEnd = null);
}
definePresentation(e) {
@@ -24142,122 +24142,122 @@ class rre {
}), this._previousPresentation;
}
}
-const BN = pr;
-let yv = class extends wo {
+const lR = fl;
+let Ew = class extends Go {
constructor(e, t, i, n, o) {
- super(e), this._keybindingService = n, this._instantiationService = o, this._primaryCursorPosition = new V(1, 1), this._primaryCursorVisibleRange = null, this._viewController = t, this._visibleRangeProvider = i, this._scrollLeft = 0, this._scrollTop = 0;
- const r = this._context.configuration.options, l = r.get(
+ super(e), this._keybindingService = n, this._instantiationService = o, this._primaryCursorPosition = new Y(1, 1), this._primaryCursorVisibleRange = null, this._viewController = t, this._visibleRangeProvider = i, this._scrollLeft = 0, this._scrollTop = 0;
+ const l = this._context.configuration.options, r = l.get(
146
/* EditorOption.layoutInfo */
);
- this._setAccessibilityOptions(r), this._contentLeft = l.contentLeft, this._contentWidth = l.contentWidth, this._contentHeight = l.height, this._fontInfo = r.get(
+ this._setAccessibilityOptions(l), this._contentLeft = r.contentLeft, this._contentWidth = r.contentWidth, this._contentHeight = r.height, this._fontInfo = l.get(
50
/* EditorOption.fontInfo */
- ), this._lineHeight = r.get(
+ ), this._lineHeight = l.get(
67
/* EditorOption.lineHeight */
- ), this._emptySelectionClipboard = r.get(
+ ), this._emptySelectionClipboard = l.get(
37
/* EditorOption.emptySelectionClipboard */
- ), this._copyWithSyntaxHighlighting = r.get(
+ ), this._copyWithSyntaxHighlighting = l.get(
25
/* EditorOption.copyWithSyntaxHighlighting */
- ), this._visibleTextArea = null, this._selections = [new fe(1, 1, 1, 1)], this._modelSelections = [new fe(1, 1, 1, 1)], this._lastRenderPosition = null, this.textArea = yt(document.createElement("textarea")), Tl.write(
+ ), this._visibleTextArea = null, this._selections = [new ge(1, 1, 1, 1)], this._modelSelections = [new ge(1, 1, 1, 1)], this._lastRenderPosition = null, this.textArea = ft(document.createElement("textarea")), vr.write(
this.textArea,
7
/* PartFingerprint.TextArea */
- ), this.textArea.setClassName(`inputarea ${If}`), this.textArea.setAttribute("wrap", this._textAreaWrapping && !this._visibleTextArea ? "on" : "off");
- const { tabSize: a } = this._context.viewModel.model.getOptions();
- this.textArea.domNode.style.tabSize = `${a * this._fontInfo.spaceWidth}px`, this.textArea.setAttribute("autocorrect", "off"), this.textArea.setAttribute("autocapitalize", "off"), this.textArea.setAttribute("autocomplete", "off"), this.textArea.setAttribute("spellcheck", "false"), this.textArea.setAttribute("aria-label", this._getAriaLabel(r)), this.textArea.setAttribute("aria-required", r.get(
+ ), this.textArea.setClassName(`inputarea ${Yg}`), this.textArea.setAttribute("wrap", this._textAreaWrapping && !this._visibleTextArea ? "on" : "off");
+ const { tabSize: c } = this._context.viewModel.model.getOptions();
+ this.textArea.domNode.style.tabSize = `${c * this._fontInfo.spaceWidth}px`, this.textArea.setAttribute("autocorrect", "off"), this.textArea.setAttribute("autocapitalize", "off"), this.textArea.setAttribute("autocomplete", "off"), this.textArea.setAttribute("spellcheck", "false"), this.textArea.setAttribute("aria-label", this._getAriaLabel(l)), this.textArea.setAttribute("aria-required", l.get(
5
/* EditorOption.ariaRequired */
- ) ? "true" : "false"), this.textArea.setAttribute("tabindex", String(r.get(
+ ) ? "true" : "false"), this.textArea.setAttribute("tabindex", String(l.get(
125
/* EditorOption.tabIndex */
- ))), this.textArea.setAttribute("role", "textbox"), this.textArea.setAttribute("aria-roledescription", p("editor", "editor")), this.textArea.setAttribute("aria-multiline", "true"), this.textArea.setAttribute("aria-autocomplete", r.get(
+ ))), this.textArea.setAttribute("role", "textbox"), this.textArea.setAttribute("aria-roledescription", p("editor", "editor")), this.textArea.setAttribute("aria-multiline", "true"), this.textArea.setAttribute("aria-autocomplete", l.get(
92
/* EditorOption.readOnly */
- ) ? "none" : "both"), this._ensureReadOnlyAttribute(), this.textAreaCover = yt(document.createElement("div")), this.textAreaCover.setPosition("absolute");
- const c = {
+ ) ? "none" : "both"), this._ensureReadOnlyAttribute(), this.textAreaCover = ft(document.createElement("div")), this.textAreaCover.setPosition("absolute");
+ const d = {
getLineCount: () => this._context.viewModel.getLineCount(),
getLineMaxColumn: (u) => this._context.viewModel.getLineMaxColumn(u),
- getValueInRange: (u, g) => this._context.viewModel.getValueInRange(u, g),
- getValueLengthInRange: (u, g) => this._context.viewModel.getValueLengthInRange(u, g),
- modifyPosition: (u, g) => this._context.viewModel.modifyPosition(u, g)
- }, d = {
+ getValueInRange: (u, m) => this._context.viewModel.getValueInRange(u, m),
+ getValueLengthInRange: (u, m) => this._context.viewModel.getValueLengthInRange(u, m),
+ modifyPosition: (u, m) => this._context.viewModel.modifyPosition(u, m)
+ }, a = {
getDataToCopy: () => {
- const u = this._context.viewModel.getPlainTextToCopy(this._modelSelections, this._emptySelectionClipboard, kn), g = this._context.viewModel.model.getEOL(), m = this._emptySelectionClipboard && this._modelSelections.length === 1 && this._modelSelections[0].isEmpty(), f = Array.isArray(u) ? u : null, b = Array.isArray(u) ? u.join(g) : u;
- let y, w = null;
- if (dv.forceCopyWithSyntaxHighlighting || this._copyWithSyntaxHighlighting && b.length < 65536) {
- const C = this._context.viewModel.getRichTextToCopy(this._modelSelections, this._emptySelectionClipboard);
- C && (y = C.html, w = C.mode);
+ const u = this._context.viewModel.getPlainTextToCopy(this._modelSelections, this._emptySelectionClipboard, Jn), m = this._context.viewModel.model.getEOL(), b = this._emptySelectionClipboard && this._modelSelections.length === 1 && this._modelSelections[0].isEmpty(), g = Array.isArray(u) ? u : null, Z = Array.isArray(u) ? u.join(m) : u;
+ let f, y = null;
+ if (ww.forceCopyWithSyntaxHighlighting || this._copyWithSyntaxHighlighting && Z.length < 65536) {
+ const W = this._context.viewModel.getRichTextToCopy(this._modelSelections, this._emptySelectionClipboard);
+ W && (f = W.html, y = W.mode);
}
return {
- isFromEmptySelection: m,
- multicursorText: f,
- text: b,
- html: y,
- mode: w
+ isFromEmptySelection: b,
+ multicursorText: g,
+ text: Z,
+ html: f,
+ mode: y
};
},
getScreenReaderContent: () => {
if (this._accessibilitySupport === 1) {
const u = this._selections[0];
if (qe && u.isEmpty()) {
- const m = u.getStartPosition();
- let f = this._getWordBeforePosition(m);
- if (f.length === 0 && (f = this._getCharacterBeforePosition(m)), f.length > 0)
- return new Jn(f, f.length, f.length, M.fromPositions(m), 0);
+ const b = u.getStartPosition();
+ let g = this._getWordBeforePosition(b);
+ if (g.length === 0 && (g = this._getCharacterBeforePosition(b)), g.length > 0)
+ return new Qn(g, g.length, g.length, I.fromPositions(b), 0);
}
- if (qe && !u.isEmpty() && c.getValueLengthInRange(
+ if (qe && !u.isEmpty() && d.getValueLengthInRange(
u,
0
/* EndOfLinePreference.TextDefined */
) < 500) {
- const m = c.getValueInRange(
+ const b = d.getValueInRange(
u,
0
/* EndOfLinePreference.TextDefined */
);
- return new Jn(m, 0, m.length, u, 0);
+ return new Qn(b, 0, b.length, u, 0);
}
- if (xh && !u.isEmpty()) {
- const m = "vscode-placeholder";
- return new Jn(m, 0, m.length, null, void 0);
+ if (Ch && !u.isEmpty()) {
+ const b = "vscode-placeholder";
+ return new Qn(b, 0, b.length, null, void 0);
}
- return Jn.EMPTY;
+ return Qn.EMPTY;
}
- if (D9) {
+ if (sD) {
const u = this._selections[0];
if (u.isEmpty()) {
- const g = u.getStartPosition(), [m, f] = this._getAndroidWordAtPosition(g);
- if (m.length > 0)
- return new Jn(m, f, f, M.fromPositions(g), 0);
+ const m = u.getStartPosition(), [b, g] = this._getAndroidWordAtPosition(m);
+ if (b.length > 0)
+ return new Qn(b, g, g, I.fromPositions(m), 0);
}
- return Jn.EMPTY;
+ return Qn.EMPTY;
}
- return Rp.fromEditorSelection(
- c,
+ return Ap.fromEditorSelection(
+ d,
this._selections[0],
this._accessibilityPageSize,
this._accessibilitySupport === 0
/* AccessibilitySupport.Unknown */
);
},
- deduceModelPosition: (u, g, m) => this._context.viewModel.deduceModelPositionRelativeToViewPosition(u, g, m)
- }, h = this._register(new doe(this.textArea.domNode));
- this._textAreaInput = this._register(this._instantiationService.createInstance(hv, d, h, ro, {
- isAndroid: D9,
- isChrome: lC,
- isFirefox: pr,
- isSafari: xh
+ deduceModelPosition: (u, m, b) => this._context.viewModel.deduceModelPositionRelativeToViewPosition(u, m, b)
+ }, h = this._register(new ile(this.textArea.domNode));
+ this._textAreaInput = this._register(this._instantiationService.createInstance(Tw, a, h, co, {
+ isAndroid: sD,
+ isChrome: WG,
+ isFirefox: fl,
+ isSafari: Ch
})), this._register(this._textAreaInput.onKeyDown((u) => {
this._viewController.emitKeyDown(u);
})), this._register(this._textAreaInput.onKeyUp((u) => {
this._viewController.emitKeyUp(u);
})), this._register(this._textAreaInput.onPaste((u) => {
- let g = !1, m = null, f = null;
- u.metadata && (g = this._emptySelectionClipboard && !!u.metadata.isFromEmptySelection, m = typeof u.metadata.multicursorText < "u" ? u.metadata.multicursorText : null, f = u.metadata.mode), this._viewController.paste(u.text, g, m, f);
+ let m = !1, b = null, g = null;
+ u.metadata && (m = this._emptySelectionClipboard && !!u.metadata.isFromEmptySelection, b = typeof u.metadata.multicursorText < "u" ? u.metadata.multicursorText : null, g = u.metadata.mode), this._viewController.paste(u.text, m, b, g);
})), this._register(this._textAreaInput.onCut(() => {
this._viewController.cut();
})), this._register(this._textAreaInput.onType((u) => {
@@ -24265,32 +24265,32 @@ let yv = class extends wo {
})), this._register(this._textAreaInput.onSelectionChangeRequest((u) => {
this._viewController.setSelection(u);
})), this._register(this._textAreaInput.onCompositionStart((u) => {
- const g = this.textArea.domNode, m = this._modelSelections[0], { distanceToModelLineStart: f, widthOfHiddenTextBefore: b } = (() => {
- const w = g.value.substring(0, Math.min(g.selectionStart, g.selectionEnd)), C = w.lastIndexOf(`
-`), S = w.substring(C + 1), L = S.lastIndexOf(" "), x = S.length - L - 1, Z = m.getStartPosition(), _ = Math.min(Z.column - 1, x), v = Z.column - 1 - _, P = S.substring(0, S.length - _), { tabSize: E } = this._context.viewModel.model.getOptions(), Y = lre(this.textArea.domNode.ownerDocument, P, this._fontInfo, E);
- return { distanceToModelLineStart: v, widthOfHiddenTextBefore: Y };
- })(), { distanceToModelLineEnd: y } = (() => {
- const w = g.value.substring(Math.max(g.selectionStart, g.selectionEnd)), C = w.indexOf(`
-`), S = C === -1 ? w : w.substring(0, C), L = S.indexOf(" "), x = L === -1 ? S.length : S.length - L - 1, Z = m.getEndPosition(), _ = Math.min(this._context.viewModel.model.getLineMaxColumn(Z.lineNumber) - Z.column, x);
- return { distanceToModelLineEnd: this._context.viewModel.model.getLineMaxColumn(Z.lineNumber) - Z.column - _ };
+ const m = this.textArea.domNode, b = this._modelSelections[0], { distanceToModelLineStart: g, widthOfHiddenTextBefore: Z } = (() => {
+ const y = m.value.substring(0, Math.min(m.selectionStart, m.selectionEnd)), W = y.lastIndexOf(`
+`), G = y.substring(W + 1), X = G.lastIndexOf(" "), L = G.length - X - 1, S = b.getStartPosition(), x = Math.min(S.column - 1, L), w = S.column - 1 - x, A = G.substring(0, G.length - x), { tabSize: H } = this._context.viewModel.model.getOptions(), F = $le(this.textArea.domNode.ownerDocument, A, this._fontInfo, H);
+ return { distanceToModelLineStart: w, widthOfHiddenTextBefore: F };
+ })(), { distanceToModelLineEnd: f } = (() => {
+ const y = m.value.substring(Math.max(m.selectionStart, m.selectionEnd)), W = y.indexOf(`
+`), G = W === -1 ? y : y.substring(0, W), X = G.indexOf(" "), L = X === -1 ? G.length : G.length - X - 1, S = b.getEndPosition(), x = Math.min(this._context.viewModel.model.getLineMaxColumn(S.lineNumber) - S.column, L);
+ return { distanceToModelLineEnd: this._context.viewModel.model.getLineMaxColumn(S.lineNumber) - S.column - x };
})();
this._context.viewModel.revealRange(
"keyboard",
!0,
- M.fromPositions(this._selections[0].getStartPosition()),
+ I.fromPositions(this._selections[0].getStartPosition()),
0,
1
/* ScrollType.Immediate */
- ), this._visibleTextArea = new rre(this._context, m.startLineNumber, f, b, y), this.textArea.setAttribute("wrap", this._textAreaWrapping && !this._visibleTextArea ? "on" : "off"), this._visibleTextArea.prepareRender(this._visibleRangeProvider), this._render(), this.textArea.setClassName(`inputarea ${If} ime-input`), this._viewController.compositionStart(), this._context.viewModel.onCompositionStart();
+ ), this._visibleTextArea = new qle(this._context, b.startLineNumber, g, Z, f), this.textArea.setAttribute("wrap", this._textAreaWrapping && !this._visibleTextArea ? "on" : "off"), this._visibleTextArea.prepareRender(this._visibleRangeProvider), this._render(), this.textArea.setClassName(`inputarea ${Yg} ime-input`), this._viewController.compositionStart(), this._context.viewModel.onCompositionStart();
})), this._register(this._textAreaInput.onCompositionUpdate((u) => {
this._visibleTextArea && (this._visibleTextArea.prepareRender(this._visibleRangeProvider), this._render());
})), this._register(this._textAreaInput.onCompositionEnd(() => {
- this._visibleTextArea = null, this.textArea.setAttribute("wrap", this._textAreaWrapping && !this._visibleTextArea ? "on" : "off"), this._render(), this.textArea.setClassName(`inputarea ${If}`), this._viewController.compositionEnd(), this._context.viewModel.onCompositionEnd();
+ this._visibleTextArea = null, this.textArea.setAttribute("wrap", this._textAreaWrapping && !this._visibleTextArea ? "on" : "off"), this._render(), this.textArea.setClassName(`inputarea ${Yg}`), this._viewController.compositionEnd(), this._context.viewModel.onCompositionEnd();
})), this._register(this._textAreaInput.onFocus(() => {
this._context.viewModel.setHasFocus(!0);
})), this._register(this._textAreaInput.onBlur(() => {
this._context.viewModel.setHasFocus(!1);
- })), this._register(vy.onDidChange(() => {
+ })), this._register(zf.onDidChange(() => {
this._ensureReadOnlyAttribute();
}));
}
@@ -24301,30 +24301,30 @@ let yv = class extends wo {
super.dispose();
}
_getAndroidWordAtPosition(e) {
- const t = '`~!@#$%^&*()-=+[{]}\\|;:",.<>/?', i = this._context.viewModel.getLineContent(e.lineNumber), n = yr(t, []);
- let o = !0, r = e.column, l = !0, a = e.column, c = 0;
- for (; c < 50 && (o || l); ) {
- if (o && r <= 1 && (o = !1), o) {
- const d = i.charCodeAt(r - 2);
- n.get(d) !== 0 ? o = !1 : r--;
+ const t = '`~!@#$%^&*()-=+[{]}\\|;:",.<>/?', i = this._context.viewModel.getLineContent(e.lineNumber), n = Gl(t, []);
+ let o = !0, l = e.column, r = !0, c = e.column, d = 0;
+ for (; d < 50 && (o || r); ) {
+ if (o && l <= 1 && (o = !1), o) {
+ const a = i.charCodeAt(l - 2);
+ n.get(a) !== 0 ? o = !1 : l--;
}
- if (l && a > i.length && (l = !1), l) {
- const d = i.charCodeAt(a - 1);
- n.get(d) !== 0 ? l = !1 : a++;
+ if (r && c > i.length && (r = !1), r) {
+ const a = i.charCodeAt(c - 1);
+ n.get(a) !== 0 ? r = !1 : c++;
}
- c++;
+ d++;
}
- return [i.substring(r - 1, a - 1), e.column - r];
+ return [i.substring(l - 1, c - 1), e.column - l];
}
_getWordBeforePosition(e) {
- const t = this._context.viewModel.getLineContent(e.lineNumber), i = yr(this._context.configuration.options.get(
+ const t = this._context.viewModel.getLineContent(e.lineNumber), i = Gl(this._context.configuration.options.get(
132
/* EditorOption.wordSeparators */
), []);
let n = e.column, o = 0;
for (; n > 1; ) {
- const r = t.charCodeAt(n - 2);
- if (i.get(r) !== 0 || o > 50)
+ const l = t.charCodeAt(n - 2);
+ if (i.get(l) !== 0 || o > 50)
return t.substring(n - 1, e.column - 1);
o++, n--;
}
@@ -24333,7 +24333,7 @@ let yv = class extends wo {
_getCharacterBeforePosition(e) {
if (e.column > 1) {
const i = this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column - 2);
- if (!Hi(i.charCodeAt(0)))
+ if (!Bi(i.charCodeAt(0)))
return i;
}
return "";
@@ -24344,8 +24344,8 @@ let yv = class extends wo {
2
/* EditorOption.accessibilitySupport */
) === 1) {
- const r = (i = this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")) == null ? void 0 : i.getAriaLabel(), l = (n = this._keybindingService.lookupKeybinding("workbench.action.showCommands")) == null ? void 0 : n.getAriaLabel(), a = (o = this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")) == null ? void 0 : o.getAriaLabel(), c = p("accessibilityModeOff", "The editor is not accessible at this time.");
- return r ? p("accessibilityOffAriaLabel", "{0} To enable screen reader optimized mode, use {1}", c, r) : l ? p("accessibilityOffAriaLabelNoKb", "{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.", c, l) : a ? p("accessibilityOffAriaLabelNoKbs", "{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.", c, a) : c;
+ const l = (i = this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")) == null ? void 0 : i.getAriaLabel(), r = (n = this._keybindingService.lookupKeybinding("workbench.action.showCommands")) == null ? void 0 : n.getAriaLabel(), c = (o = this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")) == null ? void 0 : o.getAriaLabel(), d = p("accessibilityModeOff", "The editor is not accessible at this time.");
+ return l ? p("accessibilityOffAriaLabel", "{0} To enable screen reader optimized mode, use {1}", d, l) : r ? p("accessibilityOffAriaLabelNoKb", "{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.", d, r) : c ? p("accessibilityOffAriaLabelNoKbs", "{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.", d, c) : d;
}
return e.get(
4
@@ -24361,7 +24361,7 @@ let yv = class extends wo {
3
/* EditorOption.accessibilityPageSize */
);
- this._accessibilitySupport === 2 && t === El.accessibilityPageSize.defaultValue ? this._accessibilityPageSize = 500 : this._accessibilityPageSize = t;
+ this._accessibilitySupport === 2 && t === zr.accessibilityPageSize.defaultValue ? this._accessibilityPageSize = 500 : this._accessibilityPageSize = t;
const n = e.get(
146
/* EditorOption.layoutInfo */
@@ -24373,7 +24373,7 @@ let yv = class extends wo {
);
this._textAreaWrapping = !0, this._textAreaWidth = Math.round(n * o.typicalHalfwidthCharacterWidth);
} else
- this._textAreaWrapping = !1, this._textAreaWidth = BN ? 0 : 1;
+ this._textAreaWrapping = !1, this._textAreaWidth = lR ? 0 : 1;
}
// --- begin event handlers
onConfigurationChanged(e) {
@@ -24453,7 +24453,7 @@ let yv = class extends wo {
// --- end view API
_ensureReadOnlyAttribute() {
const e = this._context.configuration.options;
- !vy.enabled || e.get(
+ !zf.enabled || e.get(
34
/* EditorOption.domReadOnly */
) && e.get(
@@ -24463,35 +24463,35 @@ let yv = class extends wo {
}
prepareRender(e) {
var t;
- this._primaryCursorPosition = new V(this._selections[0].positionLineNumber, this._selections[0].positionColumn), this._primaryCursorVisibleRange = e.visibleRangeForPosition(this._primaryCursorPosition), (t = this._visibleTextArea) == null || t.prepareRender(e);
+ this._primaryCursorPosition = new Y(this._selections[0].positionLineNumber, this._selections[0].positionColumn), this._primaryCursorVisibleRange = e.visibleRangeForPosition(this._primaryCursorPosition), (t = this._visibleTextArea) == null || t.prepareRender(e);
}
render(e) {
this._textAreaInput.writeNativeTextAreaContent("render"), this._render();
}
_render() {
if (this._visibleTextArea) {
- const i = this._visibleTextArea.visibleTextareaStart, n = this._visibleTextArea.visibleTextareaEnd, o = this._visibleTextArea.startPosition, r = this._visibleTextArea.endPosition;
- if (o && r && i && n && n.left >= this._scrollLeft && i.left <= this._scrollLeft + this._contentWidth) {
- const l = this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber) - this._scrollTop, a = this._newlinecount(this.textArea.domNode.value.substr(0, this.textArea.domNode.selectionStart));
- let c = this._visibleTextArea.widthOfHiddenLineTextBefore, d = this._contentLeft + i.left - this._scrollLeft, h = n.left - i.left + 1;
- if (d < this._contentLeft) {
- const y = this._contentLeft - d;
- d += y, c += y, h -= y;
+ const i = this._visibleTextArea.visibleTextareaStart, n = this._visibleTextArea.visibleTextareaEnd, o = this._visibleTextArea.startPosition, l = this._visibleTextArea.endPosition;
+ if (o && l && i && n && n.left >= this._scrollLeft && i.left <= this._scrollLeft + this._contentWidth) {
+ const r = this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber) - this._scrollTop, c = this._newlinecount(this.textArea.domNode.value.substr(0, this.textArea.domNode.selectionStart));
+ let d = this._visibleTextArea.widthOfHiddenLineTextBefore, a = this._contentLeft + i.left - this._scrollLeft, h = n.left - i.left + 1;
+ if (a < this._contentLeft) {
+ const f = this._contentLeft - a;
+ a += f, d += f, h -= f;
}
h > this._contentWidth && (h = this._contentWidth);
- const u = this._context.viewModel.getViewLineData(o.lineNumber), g = u.tokens.findTokenIndexAtOffset(o.column - 1), m = u.tokens.findTokenIndexAtOffset(r.column - 1), f = g === m, b = this._visibleTextArea.definePresentation(f ? u.tokens.getPresentation(g) : null);
- this.textArea.domNode.scrollTop = a * this._lineHeight, this.textArea.domNode.scrollLeft = c, this._doRender({
+ const u = this._context.viewModel.getViewLineData(o.lineNumber), m = u.tokens.findTokenIndexAtOffset(o.column - 1), b = u.tokens.findTokenIndexAtOffset(l.column - 1), g = m === b, Z = this._visibleTextArea.definePresentation(g ? u.tokens.getPresentation(m) : null);
+ this.textArea.domNode.scrollTop = c * this._lineHeight, this.textArea.domNode.scrollLeft = d, this._doRender({
lastRenderPosition: null,
- top: l,
- left: d,
+ top: r,
+ left: a,
width: h,
height: this._lineHeight,
useCover: !1,
- color: (Wi.getColorMap() || [])[b.foreground],
- italic: b.italic,
- bold: b.bold,
- underline: b.underline,
- strikethrough: b.strikethrough
+ color: (Ti.getColorMap() || [])[Z.foreground],
+ italic: Z.italic,
+ bold: Z.bold,
+ underline: Z.underline,
+ strikethrough: Z.strikethrough
});
}
return;
@@ -24528,7 +24528,7 @@ let yv = class extends wo {
top: t,
left: this._textAreaWrapping ? this._contentLeft : e,
width: this._textAreaWidth,
- height: BN ? 0 : 1,
+ height: lR ? 0 : 1,
useCover: !1
});
}
@@ -24548,39 +24548,39 @@ let yv = class extends wo {
top: 0,
left: 0,
width: this._textAreaWidth,
- height: BN ? 0 : 1,
+ height: lR ? 0 : 1,
useCover: !0
});
}
_doRender(e) {
this._lastRenderPosition = e.lastRenderPosition;
const t = this.textArea, i = this.textAreaCover;
- mn(t, this._fontInfo), t.setTop(e.top), t.setLeft(e.left), t.setWidth(e.width), t.setHeight(e.height), t.setColor(e.color ? K.Format.CSS.formatHex(e.color) : ""), t.setFontStyle(e.italic ? "italic" : ""), e.bold && t.setFontWeight("bold"), t.setTextDecoration(`${e.underline ? " underline" : ""}${e.strikethrough ? " line-through" : ""}`), i.setTop(e.useCover ? e.top : 0), i.setLeft(e.useCover ? e.left : 0), i.setWidth(e.useCover ? e.width : 0), i.setHeight(e.useCover ? e.height : 0);
+ pn(t, this._fontInfo), t.setTop(e.top), t.setLeft(e.left), t.setWidth(e.width), t.setHeight(e.height), t.setColor(e.color ? Q.Format.CSS.formatHex(e.color) : ""), t.setFontStyle(e.italic ? "italic" : ""), e.bold && t.setFontWeight("bold"), t.setTextDecoration(`${e.underline ? " underline" : ""}${e.strikethrough ? " line-through" : ""}`), i.setTop(e.useCover ? e.top : 0), i.setLeft(e.useCover ? e.left : 0), i.setWidth(e.useCover ? e.width : 0), i.setHeight(e.useCover ? e.height : 0);
const n = this._context.configuration.options;
n.get(
57
/* EditorOption.glyphMargin */
- ) ? i.setClassName("monaco-editor-background textAreaCover " + DA.OUTER_CLASS_NAME) : n.get(
+ ) ? i.setClassName("monaco-editor-background textAreaCover " + _V.OUTER_CLASS_NAME) : n.get(
68
/* EditorOption.lineNumbers */
- ).renderType !== 0 ? i.setClassName("monaco-editor-background textAreaCover " + TA.CLASS_NAME) : i.setClassName("monaco-editor-background textAreaCover");
+ ).renderType !== 0 ? i.setClassName("monaco-editor-background textAreaCover " + BV.CLASS_NAME) : i.setClassName("monaco-editor-background textAreaCover");
}
};
-yv = ore([
- jF(3, xt),
- jF(4, Se)
-], yv);
-function lre(s, e, t, i) {
+Ew = jle([
+ XF(3, Lt),
+ XF(4, Ge)
+], Ew);
+function $le(s, e, t, i) {
if (e.length === 0)
return 0;
const n = s.createElement("div");
n.style.position = "absolute", n.style.top = "-50000px", n.style.width = "50000px";
const o = s.createElement("span");
- mn(o, t), o.style.whiteSpace = "pre", o.style.tabSize = `${i * t.spaceWidth}px`, o.append(e), n.appendChild(o), s.body.appendChild(n);
- const r = o.offsetWidth;
- return n.remove(), r;
+ pn(o, t), o.style.whiteSpace = "pre", o.style.tabSize = `${i * t.spaceWidth}px`, o.append(e), n.appendChild(o), s.body.appendChild(n);
+ const l = o.offsetWidth;
+ return n.remove(), l;
}
-class are {
+class ere {
constructor(e, t, i, n) {
this.configuration = e, this.viewModel = t, this.userInputEvents = i, this.commandDelegate = n;
}
@@ -24603,14 +24603,14 @@ class are {
this.commandDelegate.cut();
}
setSelection(e) {
- ji.SetSelection.runCoreEditorCommand(this.viewModel, {
+ qi.SetSelection.runCoreEditorCommand(this.viewModel, {
source: "keyboard",
selection: e
});
}
_validateViewColumn(e) {
const t = this.viewModel.getLineMinColumn(e.lineNumber);
- return e.column < t ? new V(e.lineNumber, t) : e;
+ return e.column < t ? new Y(e.lineNumber, t) : e;
}
_hasMulticursorModifier(e) {
switch (this.configuration.options.get(
@@ -24661,13 +24661,13 @@ class are {
};
}
moveTo(e, t) {
- ji.MoveTo.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.MoveTo.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_moveToSelect(e, t) {
- ji.MoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.MoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_columnSelect(e, t, i) {
- e = this._validateViewColumn(e), ji.ColumnSelect.runCoreEditorCommand(this.viewModel, {
+ e = this._validateViewColumn(e), qi.ColumnSelect.runCoreEditorCommand(this.viewModel, {
source: "mouse",
position: this._convertViewToModelPosition(e),
viewPosition: e,
@@ -24676,7 +24676,7 @@ class are {
});
}
_createCursor(e, t) {
- e = this._validateViewColumn(e), ji.CreateCursor.runCoreEditorCommand(this.viewModel, {
+ e = this._validateViewColumn(e), qi.CreateCursor.runCoreEditorCommand(this.viewModel, {
source: "mouse",
position: this._convertViewToModelPosition(e),
viewPosition: e,
@@ -24684,31 +24684,31 @@ class are {
});
}
_lastCursorMoveToSelect(e, t) {
- ji.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_wordSelect(e, t) {
- ji.WordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.WordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_wordSelectDrag(e, t) {
- ji.WordSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.WordSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_lastCursorWordSelect(e, t) {
- ji.LastCursorWordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.LastCursorWordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_lineSelect(e, t) {
- ji.LineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.LineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_lineSelectDrag(e, t) {
- ji.LineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.LineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_lastCursorLineSelect(e, t) {
- ji.LastCursorLineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.LastCursorLineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_lastCursorLineSelectDrag(e, t) {
- ji.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
+ qi.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(e, t));
}
_selectAll() {
- ji.SelectAll.runCoreEditorCommand(this.viewModel, { source: "mouse" });
+ qi.SelectAll.runCoreEditorCommand(this.viewModel, { source: "mouse" });
}
// ----------------------
_convertViewToModelPosition(e) {
@@ -24748,24 +24748,24 @@ class are {
this.userInputEvents.emitMouseWheel(e);
}
}
-function nd(s, e) {
+function ra(s, e) {
var i;
const t = globalThis.MonacoEnvironment;
if (t != null && t.createTrustedTypesPolicy)
try {
return t.createTrustedTypesPolicy(s, e);
} catch (n) {
- De(n);
+ Me(n);
return;
}
try {
return (i = globalThis.trustedTypes) == null ? void 0 : i.createPolicy(s, e);
} catch (n) {
- De(n);
+ Me(n);
return;
}
}
-class VU {
+class gQ {
constructor(e) {
this._lineFactory = e, this._set(1, []);
}
@@ -24799,7 +24799,7 @@ class VU {
getLine(e) {
const t = e - this._rendLineNumberStart;
if (t < 0 || t >= this._lines.length)
- throw new mt("Illegal value for lineNumber");
+ throw new bt("Illegal value for lineNumber");
return this._lines[t];
}
/**
@@ -24810,31 +24810,31 @@ class VU {
return null;
const i = this.getStartLineNumber(), n = this.getEndLineNumber();
if (t < i) {
- const a = t - e + 1;
- return this._rendLineNumberStart -= a, null;
+ const c = t - e + 1;
+ return this._rendLineNumberStart -= c, null;
}
if (e > n)
return null;
- let o = 0, r = 0;
- for (let a = i; a <= n; a++) {
- const c = a - this._rendLineNumberStart;
- e <= a && a <= t && (r === 0 ? (o = c, r = 1) : r++);
+ let o = 0, l = 0;
+ for (let c = i; c <= n; c++) {
+ const d = c - this._rendLineNumberStart;
+ e <= c && c <= t && (l === 0 ? (o = d, l = 1) : l++);
}
if (e < i) {
- let a = 0;
- t < i ? a = t - e + 1 : a = i - e, this._rendLineNumberStart -= a;
+ let c = 0;
+ t < i ? c = t - e + 1 : c = i - e, this._rendLineNumberStart -= c;
}
- return this._lines.splice(o, r);
+ return this._lines.splice(o, l);
}
onLinesChanged(e, t) {
const i = e + t - 1;
if (this.getCount() === 0)
return !1;
const n = this.getStartLineNumber(), o = this.getEndLineNumber();
- let r = !1;
- for (let l = e; l <= i; l++)
- l >= n && l <= o && (this._lines[l - this._rendLineNumberStart].onContentChanged(), r = !0);
- return r;
+ let l = !1;
+ for (let r = e; r <= i; r++)
+ r >= n && r <= o && (this._lines[r - this._rendLineNumberStart].onContentChanged(), l = !0);
+ return l;
}
onLinesInserted(e, t) {
if (this.getCount() === 0)
@@ -24846,36 +24846,36 @@ class VU {
return null;
if (i + e > o)
return this._lines.splice(e - this._rendLineNumberStart, o - e + 1);
- const r = [];
+ const l = [];
for (let h = 0; h < i; h++)
- r[h] = this._lineFactory.createLine();
- const l = e - this._rendLineNumberStart, a = this._lines.slice(0, l), c = this._lines.slice(l, this._lines.length - i), d = this._lines.slice(this._lines.length - i, this._lines.length);
- return this._lines = a.concat(r).concat(c), d;
+ l[h] = this._lineFactory.createLine();
+ const r = e - this._rendLineNumberStart, c = this._lines.slice(0, r), d = this._lines.slice(r, this._lines.length - i), a = this._lines.slice(this._lines.length - i, this._lines.length);
+ return this._lines = c.concat(l).concat(d), a;
}
onTokensChanged(e) {
if (this.getCount() === 0)
return !1;
const t = this.getStartLineNumber(), i = this.getEndLineNumber();
let n = !1;
- for (let o = 0, r = e.length; o < r; o++) {
- const l = e[o];
- if (l.toLineNumber < t || l.fromLineNumber > i)
+ for (let o = 0, l = e.length; o < l; o++) {
+ const r = e[o];
+ if (r.toLineNumber < t || r.fromLineNumber > i)
continue;
- const a = Math.max(t, l.fromLineNumber), c = Math.min(i, l.toLineNumber);
- for (let d = a; d <= c; d++) {
- const h = d - this._rendLineNumberStart;
+ const c = Math.max(t, r.fromLineNumber), d = Math.min(i, r.toLineNumber);
+ for (let a = c; a <= d; a++) {
+ const h = a - this._rendLineNumberStart;
this._lines[h].onTokensChanged(), n = !0;
}
}
return n;
}
}
-class kU {
+class ZQ {
constructor(e) {
- this._lineFactory = e, this.domNode = this._createDomNode(), this._linesCollection = new VU(this._lineFactory);
+ this._lineFactory = e, this.domNode = this._createDomNode(), this._linesCollection = new gQ(this._lineFactory);
}
_createDomNode() {
- const e = yt(document.createElement("div"));
+ const e = ft(document.createElement("div"));
return e.setClassName("view-layer"), e.setPosition("absolute"), e.domNode.setAttribute("role", "presentation"), e.domNode.setAttribute("aria-hidden", "true"), e;
}
// ---- begin view event handlers
@@ -24929,7 +24929,7 @@ class kU {
return this._linesCollection.getLine(e);
}
renderLines(e) {
- const t = this._linesCollection._get(), i = new wv(this.domNode.domNode, this._lineFactory, e), n = {
+ const t = this._linesCollection._get(), i = new Dw(this.domNode.domNode, this._lineFactory, e), n = {
rendLineNumberStart: t.rendLineNumberStart,
lines: t.lines,
linesLength: t.lines.length
@@ -24937,7 +24937,7 @@ class kU {
this._linesCollection._set(o.rendLineNumberStart, o.lines);
}
}
-const dc = class dc {
+const bd = class bd {
constructor(e, t, i) {
this._domNode = e, this._lineFactory = t, this._viewportData = i;
}
@@ -24949,39 +24949,39 @@ const dc = class dc {
};
if (o.rendLineNumberStart + o.linesLength - 1 < t || i < o.rendLineNumberStart) {
o.rendLineNumberStart = t, o.linesLength = i - t + 1, o.lines = [];
- for (let r = t; r <= i; r++)
- o.lines[r - t] = this._lineFactory.createLine();
+ for (let l = t; l <= i; l++)
+ o.lines[l - t] = this._lineFactory.createLine();
return this._finishRendering(o, !0, n), o;
}
if (this._renderUntouchedLines(o, Math.max(t - o.rendLineNumberStart, 0), Math.min(i - o.rendLineNumberStart, o.linesLength - 1), n, t), o.rendLineNumberStart > t) {
- const r = t, l = Math.min(i, o.rendLineNumberStart - 1);
- r <= l && (this._insertLinesBefore(o, r, l, n, t), o.linesLength += l - r + 1);
+ const l = t, r = Math.min(i, o.rendLineNumberStart - 1);
+ l <= r && (this._insertLinesBefore(o, l, r, n, t), o.linesLength += r - l + 1);
} else if (o.rendLineNumberStart < t) {
- const r = Math.min(o.linesLength, t - o.rendLineNumberStart);
- r > 0 && (this._removeLinesBefore(o, r), o.linesLength -= r);
+ const l = Math.min(o.linesLength, t - o.rendLineNumberStart);
+ l > 0 && (this._removeLinesBefore(o, l), o.linesLength -= l);
}
if (o.rendLineNumberStart = t, o.rendLineNumberStart + o.linesLength - 1 < i) {
- const r = o.rendLineNumberStart + o.linesLength, l = i;
- r <= l && (this._insertLinesAfter(o, r, l, n, t), o.linesLength += l - r + 1);
+ const l = o.rendLineNumberStart + o.linesLength, r = i;
+ l <= r && (this._insertLinesAfter(o, l, r, n, t), o.linesLength += r - l + 1);
} else if (o.rendLineNumberStart + o.linesLength - 1 > i) {
- const r = Math.max(0, i - o.rendLineNumberStart + 1), a = o.linesLength - 1 - r + 1;
- a > 0 && (this._removeLinesAfter(o, a), o.linesLength -= a);
+ const l = Math.max(0, i - o.rendLineNumberStart + 1), c = o.linesLength - 1 - l + 1;
+ c > 0 && (this._removeLinesAfter(o, c), o.linesLength -= c);
}
return this._finishRendering(o, !1, n), o;
}
_renderUntouchedLines(e, t, i, n, o) {
- const r = e.rendLineNumberStart, l = e.lines;
- for (let a = t; a <= i; a++) {
- const c = r + a;
- l[a].layoutLine(c, n[c - o], this._viewportData.lineHeight);
+ const l = e.rendLineNumberStart, r = e.lines;
+ for (let c = t; c <= i; c++) {
+ const d = l + c;
+ r[c].layoutLine(d, n[d - o], this._viewportData.lineHeight);
}
}
_insertLinesBefore(e, t, i, n, o) {
- const r = [];
- let l = 0;
- for (let a = t; a <= i; a++)
- r[l++] = this._lineFactory.createLine();
- e.lines = r.concat(e.lines);
+ const l = [];
+ let r = 0;
+ for (let c = t; c <= i; c++)
+ l[r++] = this._lineFactory.createLine();
+ e.lines = l.concat(e.lines);
}
_removeLinesBefore(e, t) {
for (let i = 0; i < t; i++) {
@@ -24991,11 +24991,11 @@ const dc = class dc {
e.lines.splice(0, t);
}
_insertLinesAfter(e, t, i, n, o) {
- const r = [];
- let l = 0;
- for (let a = t; a <= i; a++)
- r[l++] = this._lineFactory.createLine();
- e.lines = e.lines.concat(r);
+ const l = [];
+ let r = 0;
+ for (let c = t; c <= i; c++)
+ l[r++] = this._lineFactory.createLine();
+ e.lines = e.lines.concat(l);
}
_removeLinesAfter(e, t) {
const i = e.linesLength - t;
@@ -25006,61 +25006,61 @@ const dc = class dc {
e.lines.splice(i, t);
}
_finishRenderingNewLines(e, t, i, n) {
- dc._ttPolicy && (i = dc._ttPolicy.createHTML(i));
+ bd._ttPolicy && (i = bd._ttPolicy.createHTML(i));
const o = this._domNode.lastChild;
t || !o ? this._domNode.innerHTML = i : o.insertAdjacentHTML("afterend", i);
- let r = this._domNode.lastChild;
- for (let l = e.linesLength - 1; l >= 0; l--) {
- const a = e.lines[l];
- n[l] && (a.setDomNode(r), r = r.previousSibling);
+ let l = this._domNode.lastChild;
+ for (let r = e.linesLength - 1; r >= 0; r--) {
+ const c = e.lines[r];
+ n[r] && (c.setDomNode(l), l = l.previousSibling);
}
}
_finishRenderingInvalidLines(e, t, i) {
const n = document.createElement("div");
- dc._ttPolicy && (t = dc._ttPolicy.createHTML(t)), n.innerHTML = t;
+ bd._ttPolicy && (t = bd._ttPolicy.createHTML(t)), n.innerHTML = t;
for (let o = 0; o < e.linesLength; o++) {
- const r = e.lines[o];
+ const l = e.lines[o];
if (i[o]) {
- const l = n.firstChild, a = r.getDomNode();
- a.parentNode.replaceChild(l, a), r.setDomNode(l);
+ const r = n.firstChild, c = l.getDomNode();
+ c.parentNode.replaceChild(r, c), l.setDomNode(r);
}
}
}
_finishRendering(e, t, i) {
- const n = dc._sb, o = e.linesLength, r = e.lines, l = e.rendLineNumberStart, a = [];
+ const n = bd._sb, o = e.linesLength, l = e.lines, r = e.rendLineNumberStart, c = [];
{
n.reset();
- let c = !1;
- for (let d = 0; d < o; d++) {
- const h = r[d];
- a[d] = !1, !(h.getDomNode() || !h.renderLine(d + l, i[d], this._viewportData.lineHeight, this._viewportData, n)) && (a[d] = !0, c = !0);
+ let d = !1;
+ for (let a = 0; a < o; a++) {
+ const h = l[a];
+ c[a] = !1, !(h.getDomNode() || !h.renderLine(a + r, i[a], this._viewportData.lineHeight, this._viewportData, n)) && (c[a] = !0, d = !0);
}
- c && this._finishRenderingNewLines(e, t, n.build(), a);
+ d && this._finishRenderingNewLines(e, t, n.build(), c);
}
{
n.reset();
- let c = !1;
- const d = [];
+ let d = !1;
+ const a = [];
for (let h = 0; h < o; h++) {
- const u = r[h];
- d[h] = !1, !(a[h] || !u.renderLine(h + l, i[h], this._viewportData.lineHeight, this._viewportData, n)) && (d[h] = !0, c = !0);
+ const u = l[h];
+ a[h] = !1, !(c[h] || !u.renderLine(h + r, i[h], this._viewportData.lineHeight, this._viewportData, n)) && (a[h] = !0, d = !0);
}
- c && this._finishRenderingInvalidLines(e, n.build(), d);
+ d && this._finishRenderingInvalidLines(e, n.build(), a);
}
}
};
-dc._ttPolicy = nd("editorViewLayer", { createHTML: (e) => e }), dc._sb = new e0(1e5);
-let wv = dc;
-class GU extends wo {
+bd._ttPolicy = ra("editorViewLayer", { createHTML: (e) => e }), bd._sb = new l0(1e5);
+let Dw = bd;
+class fQ extends Go {
constructor(e) {
- super(e), this._dynamicOverlays = [], this._isFocused = !1, this._visibleLines = new kU({
- createLine: () => new cre(this._dynamicOverlays)
+ super(e), this._dynamicOverlays = [], this._isFocused = !1, this._visibleLines = new ZQ({
+ createLine: () => new tre(this._dynamicOverlays)
}), this.domNode = this._visibleLines.domNode;
const i = this._context.configuration.options.get(
50
/* EditorOption.fontInfo */
);
- mn(this.domNode, i), this.domNode.setClassName("view-overlays");
+ pn(this.domNode, i), this.domNode.setClassName("view-overlays");
}
shouldRender() {
if (super.shouldRender())
@@ -25089,7 +25089,7 @@ class GU extends wo {
50
/* EditorOption.fontInfo */
);
- return mn(this.domNode, i), !0;
+ return pn(this.domNode, i), !0;
}
onFlushed(e) {
return this._visibleLines.onFlushed(e);
@@ -25130,7 +25130,7 @@ class GU extends wo {
this._visibleLines.renderLines(e.viewportData);
}
}
-class cre {
+class tre {
constructor(e) {
this._dynamicOverlays = e, this._domNode = null, this._renderedContent = null;
}
@@ -25138,25 +25138,25 @@ class cre {
return this._domNode ? this._domNode.domNode : null;
}
setDomNode(e) {
- this._domNode = yt(e);
+ this._domNode = ft(e);
}
onContentChanged() {
}
onTokensChanged() {
}
renderLine(e, t, i, n, o) {
- let r = "";
- for (let l = 0, a = this._dynamicOverlays.length; l < a; l++) {
- const c = this._dynamicOverlays[l];
- r += c.render(n.startLineNumber, e);
+ let l = "";
+ for (let r = 0, c = this._dynamicOverlays.length; r < c; r++) {
+ const d = this._dynamicOverlays[r];
+ l += d.render(n.startLineNumber, e);
}
- return this._renderedContent === r ? !1 : (this._renderedContent = r, o.appendString('
'), o.appendString(r), o.appendString("
"), !0);
+ return this._renderedContent === l ? !1 : (this._renderedContent = l, o.appendString('
'), o.appendString(l), o.appendString("
"), !0);
}
layoutLine(e, t, i) {
this._domNode && (this._domNode.setTop(t), this._domNode.setHeight(i));
}
}
-class dre extends GU {
+class ire extends fQ {
constructor(e) {
super(e);
const i = this._context.configuration.options.get(
@@ -25181,21 +25181,21 @@ class dre extends GU {
super._viewOverlaysRender(e), this.domNode.setWidth(Math.max(e.scrollWidth, this._contentWidth));
}
}
-class hre extends GU {
+class nre extends fQ {
constructor(e) {
super(e);
const t = this._context.configuration.options, i = t.get(
146
/* EditorOption.layoutInfo */
);
- this._contentLeft = i.contentLeft, this.domNode.setClassName("margin-view-overlays"), this.domNode.setWidth(1), mn(this.domNode, t.get(
+ this._contentLeft = i.contentLeft, this.domNode.setClassName("margin-view-overlays"), this.domNode.setWidth(1), pn(this.domNode, t.get(
50
/* EditorOption.fontInfo */
));
}
onConfigurationChanged(e) {
const t = this._context.configuration.options;
- mn(this.domNode, t.get(
+ pn(this.domNode, t.get(
50
/* EditorOption.fontInfo */
));
@@ -25214,7 +25214,7 @@ class hre extends GU {
this.domNode.setHeight(t), this.domNode.setWidth(this._contentLeft);
}
}
-class pI {
+class Nx {
constructor(e) {
this.onKeyDown = null, this.onKeyUp = null, this.onContextMenu = null, this.onMouseMove = null, this.onMouseLeave = null, this.onMouseDown = null, this.onMouseUp = null, this.onMouseDrag = null, this.onMouseDrop = null, this.onMouseDropCanceled = null, this.onMouseWheel = null, this._coordinatesConverter = e;
}
@@ -25269,7 +25269,7 @@ class pI {
} : e;
}
_convertViewToModelMouseTarget(e) {
- return pI.convertViewToModelMouseTarget(e, this._coordinatesConverter);
+ return Nx.convertViewToModelMouseTarget(e, this._coordinatesConverter);
}
static convertViewToModelMouseTarget(e, t) {
const i = { ...e };
@@ -25281,13 +25281,13 @@ class pI {
positionBefore: e.positionBefore ? t.convertViewPositionToModelPosition(e.positionBefore) : e.positionBefore,
positionAfter: e.positionAfter ? t.convertViewPositionToModelPosition(e.positionAfter) : e.positionAfter,
position: t.convertViewPositionToModelPosition(e.position),
- afterLineNumber: t.convertViewPositionToModelPosition(new V(e.afterLineNumber, 1)).lineNumber
+ afterLineNumber: t.convertViewPositionToModelPosition(new Y(e.afterLineNumber, 1)).lineNumber
};
}
}
-class ure extends wo {
+class sre extends Go {
constructor(e) {
- super(e), this.blocks = [], this.contentWidth = -1, this.contentLeft = 0, this.domNode = yt(document.createElement("div")), this.domNode.setAttribute("role", "presentation"), this.domNode.setAttribute("aria-hidden", "true"), this.domNode.setClassName("blockDecorations-container"), this.update();
+ super(e), this.blocks = [], this.contentWidth = -1, this.contentLeft = 0, this.domNode = ft(document.createElement("div")), this.domNode.setAttribute("role", "presentation"), this.domNode.setAttribute("aria-hidden", "true"), this.domNode.setClassName("blockDecorations-container"), this.update();
}
update() {
let e = !1;
@@ -25325,24 +25325,24 @@ class ure extends wo {
if (!n.options.blockClassName)
continue;
let o = this.blocks[t];
- o || (o = this.blocks[t] = yt(document.createElement("div")), this.domNode.appendChild(o));
- let r, l;
- n.options.blockIsAfterEnd ? (r = e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber, !1), l = e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber, !0)) : (r = e.getVerticalOffsetForLineNumber(n.range.startLineNumber, !0), l = n.range.isEmpty() && !n.options.blockDoesNotCollapse ? e.getVerticalOffsetForLineNumber(n.range.startLineNumber, !1) : e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber, !0));
- const [a, c, d, h] = n.options.blockPadding ?? [0, 0, 0, 0];
- o.setClassName("blockDecorations-block " + n.options.blockClassName), o.setLeft(this.contentLeft - h), o.setWidth(this.contentWidth + h + c), o.setTop(r - e.scrollTop - a), o.setHeight(l - r + a + d), t++;
+ o || (o = this.blocks[t] = ft(document.createElement("div")), this.domNode.appendChild(o));
+ let l, r;
+ n.options.blockIsAfterEnd ? (l = e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber, !1), r = e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber, !0)) : (l = e.getVerticalOffsetForLineNumber(n.range.startLineNumber, !0), r = n.range.isEmpty() && !n.options.blockDoesNotCollapse ? e.getVerticalOffsetForLineNumber(n.range.startLineNumber, !1) : e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber, !0));
+ const [c, d, a, h] = n.options.blockPadding ?? [0, 0, 0, 0];
+ o.setClassName("blockDecorations-block " + n.options.blockClassName), o.setLeft(this.contentLeft - h), o.setWidth(this.contentWidth + h + d), o.setTop(l - e.scrollTop - c), o.setHeight(r - l + c + a), t++;
}
for (let n = t; n < this.blocks.length; n++)
this.blocks[n].domNode.remove();
this.blocks.length = t;
}
}
-class gre extends wo {
+class ore extends Go {
constructor(e, t) {
- super(e), this._viewDomNode = t, this._widgets = {}, this.domNode = yt(document.createElement("div")), Tl.write(
+ super(e), this._viewDomNode = t, this._widgets = {}, this.domNode = ft(document.createElement("div")), vr.write(
this.domNode,
1
/* PartFingerprint.ContentWidgets */
- ), this.domNode.setClassName("contentWidgets"), this.domNode.setPosition("absolute"), this.domNode.setTop(0), this.overflowingContentWidgetsDomNode = yt(document.createElement("div")), Tl.write(
+ ), this.domNode.setClassName("contentWidgets"), this.domNode.setPosition("absolute"), this.domNode.setTop(0), this.overflowingContentWidgetsDomNode = ft(document.createElement("div")), vr.write(
this.overflowingContentWidgetsDomNode,
2
/* PartFingerprint.OverflowingContentWidgets */
@@ -25389,7 +25389,7 @@ class gre extends wo {
this._widgets[t].updateAnchorViewPosition();
}
addWidget(e) {
- const t = new mre(this._context, this._viewDomNode, e);
+ const t = new lre(this._context, this._viewDomNode, e);
this._widgets[t.id] = t, t.allowEditorOverflow ? this.overflowingContentWidgetsDomNode.appendChild(t.domNode) : this.domNode.appendChild(t.domNode), this.setShouldRender();
}
setWidgetPosition(e, t, i, n, o) {
@@ -25423,9 +25423,9 @@ class gre extends wo {
this._widgets[i].render(e);
}
}
-class mre {
+class lre {
constructor(e, t, i) {
- this._primaryAnchor = new k0(null, null), this._secondaryAnchor = new k0(null, null), this._context = e, this._viewDomNode = t, this._actual = i, this.domNode = yt(this._actual.getDomNode()), this.id = this._actual.getId(), this.allowEditorOverflow = this._actual.allowEditorOverflow || !1, this.suppressMouseDown = this._actual.suppressMouseDown || !1;
+ this._primaryAnchor = new z0(null, null), this._secondaryAnchor = new z0(null, null), this._context = e, this._viewDomNode = t, this._actual = i, this.domNode = ft(this._actual.getDomNode()), this.id = this._actual.getId(), this.allowEditorOverflow = this._actual.allowEditorOverflow || !1, this.suppressMouseDown = this._actual.suppressMouseDown || !1;
const n = this._context.configuration.options, o = n.get(
146
/* EditorOption.layoutInfo */
@@ -25459,15 +25459,15 @@ class mre {
}
_setPosition(e, t, i) {
this._affinity = e, this._primaryAnchor = n(t, this._context.viewModel, this._affinity), this._secondaryAnchor = n(i, this._context.viewModel, this._affinity);
- function n(o, r, l) {
+ function n(o, l, r) {
if (!o)
- return new k0(null, null);
- const a = r.model.validatePosition(o);
- if (r.coordinatesConverter.modelPositionIsVisible(a)) {
- const c = r.coordinatesConverter.convertModelPositionToViewPosition(a, l ?? void 0);
- return new k0(o, c);
+ return new z0(null, null);
+ const c = l.model.validatePosition(o);
+ if (l.coordinatesConverter.modelPositionIsVisible(c)) {
+ const d = l.coordinatesConverter.convertModelPositionToViewPosition(c, r ?? void 0);
+ return new z0(o, d);
}
- return new k0(o, null);
+ return new z0(o, null);
}
}
_getMaxWidth() {
@@ -25478,35 +25478,35 @@ class mre {
this._setPosition(n, e, t), this._preference = i, this._primaryAnchor.viewPosition && this._preference && this._preference.length > 0 ? this.domNode.setDisplay("block") : this.domNode.setDisplay("none"), this._cachedDomNodeOffsetWidth = -1, this._cachedDomNodeOffsetHeight = -1;
}
_layoutBoxInViewport(e, t, i, n) {
- const o = e.top, r = o, l = e.top + e.height, a = n.viewportHeight - l, c = o - i, d = r >= i, h = l, u = a >= i;
- let g = e.left;
- return g + t > n.scrollLeft + n.viewportWidth && (g = n.scrollLeft + n.viewportWidth - t), g < n.scrollLeft && (g = n.scrollLeft), { fitsAbove: d, aboveTop: c, fitsBelow: u, belowTop: h, left: g };
+ const o = e.top, l = o, r = e.top + e.height, c = n.viewportHeight - r, d = o - i, a = l >= i, h = r, u = c >= i;
+ let m = e.left;
+ return m + t > n.scrollLeft + n.viewportWidth && (m = n.scrollLeft + n.viewportWidth - t), m < n.scrollLeft && (m = n.scrollLeft), { fitsAbove: a, aboveTop: d, fitsBelow: u, belowTop: h, left: m };
}
_layoutHorizontalSegmentInPage(e, t, i, n) {
- const l = Math.max(15, t.left - n), a = Math.min(t.left + t.width + n, e.width - 15), d = this._viewDomNode.domNode.ownerDocument.defaultView;
- let h = t.left + i - ((d == null ? void 0 : d.scrollX) ?? 0);
- if (h + n > a) {
- const u = h - (a - n);
+ const r = Math.max(15, t.left - n), c = Math.min(t.left + t.width + n, e.width - 15), a = this._viewDomNode.domNode.ownerDocument.defaultView;
+ let h = t.left + i - ((a == null ? void 0 : a.scrollX) ?? 0);
+ if (h + n > c) {
+ const u = h - (c - n);
h -= u, i -= u;
}
- if (h < l) {
- const u = h - l;
+ if (h < r) {
+ const u = h - r;
h -= u, i -= u;
}
return [i, h];
}
_layoutBoxInPage(e, t, i, n) {
- const o = e.top - i, r = e.top + e.height, l = yi(this._viewDomNode.domNode), a = this._viewDomNode.domNode.ownerDocument, c = a.defaultView, d = l.top + o - ((c == null ? void 0 : c.scrollY) ?? 0), h = l.top + r - ((c == null ? void 0 : c.scrollY) ?? 0), u = Wh(a.body), [g, m] = this._layoutHorizontalSegmentInPage(u, l, e.left - n.scrollLeft + this._contentLeft, t), f = 22, b = 22, y = d >= f, w = h + i <= u.height - b;
+ const o = e.top - i, l = e.top + e.height, r = yi(this._viewDomNode.domNode), c = this._viewDomNode.domNode.ownerDocument, d = c.defaultView, a = r.top + o - ((d == null ? void 0 : d.scrollY) ?? 0), h = r.top + l - ((d == null ? void 0 : d.scrollY) ?? 0), u = Yh(c.body), [m, b] = this._layoutHorizontalSegmentInPage(u, r, e.left - n.scrollLeft + this._contentLeft, t), g = 22, Z = 22, f = a >= g, y = h + i <= u.height - Z;
return this._fixedOverflowWidgets ? {
- fitsAbove: y,
- aboveTop: Math.max(d, f),
- fitsBelow: w,
+ fitsAbove: f,
+ aboveTop: Math.max(a, g),
+ fitsBelow: y,
belowTop: h,
- left: m
- } : { fitsAbove: y, aboveTop: o, fitsBelow: w, belowTop: r, left: g };
+ left: b
+ } : { fitsAbove: f, aboveTop: o, fitsBelow: y, belowTop: l, left: m };
}
_prepareRenderWidgetAtExactPositionOverflowing(e) {
- return new G0(e.top, e.left + this._contentLeft);
+ return new A0(e.top, e.left + this._contentLeft);
}
/**
* Compute the coordinates above and below the primary and secondary anchors.
@@ -25514,17 +25514,17 @@ class mre {
* The content widget should touch if possible the secondary anchor.
*/
_getAnchorsCoordinates(e) {
- var r, l;
- const t = o(this._primaryAnchor.viewPosition, this._affinity, this._lineHeight), i = ((r = this._secondaryAnchor.viewPosition) == null ? void 0 : r.lineNumber) === ((l = this._primaryAnchor.viewPosition) == null ? void 0 : l.lineNumber) ? this._secondaryAnchor.viewPosition : null, n = o(i, this._affinity, this._lineHeight);
+ var l, r;
+ const t = o(this._primaryAnchor.viewPosition, this._affinity, this._lineHeight), i = ((l = this._secondaryAnchor.viewPosition) == null ? void 0 : l.lineNumber) === ((r = this._primaryAnchor.viewPosition) == null ? void 0 : r.lineNumber) ? this._secondaryAnchor.viewPosition : null, n = o(i, this._affinity, this._lineHeight);
return { primary: t, secondary: n };
- function o(a, c, d) {
- if (!a)
+ function o(c, d, a) {
+ if (!c)
return null;
- const h = e.visibleRangeForPosition(a);
+ const h = e.visibleRangeForPosition(c);
if (!h)
return null;
- const u = a.column === 1 && c === 3 ? 0 : h.left, g = e.getVerticalOffsetForLineNumber(a.lineNumber) - e.scrollTop;
- return new qF(g, u, d);
+ const u = c.column === 1 && d === 3 ? 0 : h.left, m = e.getVerticalOffsetForLineNumber(c.lineNumber) - e.scrollTop;
+ return new VF(m, u, a);
}
}
_reduceAnchorCoordinates(e, t, i) {
@@ -25535,7 +25535,7 @@ class mre {
/* EditorOption.fontInfo */
);
let o = t.left;
- return o < e.left ? o = Math.max(o, e.left - i + n.typicalFullwidthCharacterWidth) : o = Math.min(o, e.left + i - n.typicalFullwidthCharacterWidth), new qF(e.top, o, e.height);
+ return o < e.left ? o = Math.max(o, e.left - i + n.typicalFullwidthCharacterWidth) : o = Math.min(o, e.left + i - n.typicalFullwidthCharacterWidth), new VF(e.top, o, e.height);
}
_prepareRenderWidget(e) {
if (!this._preference || this._preference.length === 0)
@@ -25547,48 +25547,48 @@ class mre {
preserveFocus: this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)
};
if (this._cachedDomNodeOffsetWidth === -1 || this._cachedDomNodeOffsetHeight === -1) {
- let r = null;
- if (typeof this._actual.beforeRender == "function" && (r = ON(this._actual.beforeRender, this._actual)), r)
- this._cachedDomNodeOffsetWidth = r.width, this._cachedDomNodeOffsetHeight = r.height;
+ let l = null;
+ if (typeof this._actual.beforeRender == "function" && (l = rR(this._actual.beforeRender, this._actual)), l)
+ this._cachedDomNodeOffsetWidth = l.width, this._cachedDomNodeOffsetHeight = l.height;
else {
- const a = this.domNode.domNode.getBoundingClientRect();
- this._cachedDomNodeOffsetWidth = Math.round(a.width), this._cachedDomNodeOffsetHeight = Math.round(a.height);
+ const c = this.domNode.domNode.getBoundingClientRect();
+ this._cachedDomNodeOffsetWidth = Math.round(c.width), this._cachedDomNodeOffsetHeight = Math.round(c.height);
}
}
const n = this._reduceAnchorCoordinates(t, i, this._cachedDomNodeOffsetWidth);
let o;
this.allowEditorOverflow ? o = this._layoutBoxInPage(n, this._cachedDomNodeOffsetWidth, this._cachedDomNodeOffsetHeight, e) : o = this._layoutBoxInViewport(n, this._cachedDomNodeOffsetWidth, this._cachedDomNodeOffsetHeight, e);
- for (let r = 1; r <= 2; r++)
- for (const l of this._preference)
- if (l === 1) {
+ for (let l = 1; l <= 2; l++)
+ for (const r of this._preference)
+ if (r === 1) {
if (!o)
return null;
- if (r === 2 || o.fitsAbove)
+ if (l === 2 || o.fitsAbove)
return {
kind: "inViewport",
- coordinate: new G0(o.aboveTop, o.left),
+ coordinate: new A0(o.aboveTop, o.left),
position: 1
/* ContentWidgetPositionPreference.ABOVE */
};
- } else if (l === 2) {
+ } else if (r === 2) {
if (!o)
return null;
- if (r === 2 || o.fitsBelow)
+ if (l === 2 || o.fitsBelow)
return {
kind: "inViewport",
- coordinate: new G0(o.belowTop, o.left),
+ coordinate: new A0(o.belowTop, o.left),
position: 2
/* ContentWidgetPositionPreference.BELOW */
};
} else
return this.allowEditorOverflow ? {
kind: "inViewport",
- coordinate: this._prepareRenderWidgetAtExactPositionOverflowing(new G0(n.top, n.left)),
+ coordinate: this._prepareRenderWidgetAtExactPositionOverflowing(new A0(n.top, n.left)),
position: 0
/* ContentWidgetPositionPreference.EXACT */
} : {
kind: "inViewport",
- coordinate: new G0(n.top, n.left),
+ coordinate: new A0(n.top, n.left),
position: 0
/* ContentWidgetPositionPreference.EXACT */
};
@@ -25606,35 +25606,35 @@ class mre {
render(e) {
var t;
if (!this._renderData || this._renderData.kind === "offViewport") {
- this._isVisible && (this.domNode.removeAttribute("monaco-visible-content-widget"), this._isVisible = !1, ((t = this._renderData) == null ? void 0 : t.kind) === "offViewport" && this._renderData.preserveFocus ? this.domNode.setTop(-1e3) : this.domNode.setVisibility("hidden")), typeof this._actual.afterRender == "function" && ON(this._actual.afterRender, this._actual, null);
+ this._isVisible && (this.domNode.removeAttribute("monaco-visible-content-widget"), this._isVisible = !1, ((t = this._renderData) == null ? void 0 : t.kind) === "offViewport" && this._renderData.preserveFocus ? this.domNode.setTop(-1e3) : this.domNode.setVisibility("hidden")), typeof this._actual.afterRender == "function" && rR(this._actual.afterRender, this._actual, null);
return;
}
- this.allowEditorOverflow ? (this.domNode.setTop(this._renderData.coordinate.top), this.domNode.setLeft(this._renderData.coordinate.left)) : (this.domNode.setTop(this._renderData.coordinate.top + e.scrollTop - e.bigNumbersDelta), this.domNode.setLeft(this._renderData.coordinate.left)), this._isVisible || (this.domNode.setVisibility("inherit"), this.domNode.setAttribute("monaco-visible-content-widget", "true"), this._isVisible = !0), typeof this._actual.afterRender == "function" && ON(this._actual.afterRender, this._actual, this._renderData.position);
+ this.allowEditorOverflow ? (this.domNode.setTop(this._renderData.coordinate.top), this.domNode.setLeft(this._renderData.coordinate.left)) : (this.domNode.setTop(this._renderData.coordinate.top + e.scrollTop - e.bigNumbersDelta), this.domNode.setLeft(this._renderData.coordinate.left)), this._isVisible || (this.domNode.setVisibility("inherit"), this.domNode.setAttribute("monaco-visible-content-widget", "true"), this._isVisible = !0), typeof this._actual.afterRender == "function" && rR(this._actual.afterRender, this._actual, this._renderData.position);
}
}
-class k0 {
+class z0 {
constructor(e, t) {
this.modelPosition = e, this.viewPosition = t;
}
}
-class G0 {
+class A0 {
constructor(e, t) {
this.top = e, this.left = t, this._coordinateBrand = void 0;
}
}
-class qF {
+class VF {
constructor(e, t, i) {
this.top = e, this.left = t, this.height = i, this._anchorCoordinateBrand = void 0;
}
}
-function ON(s, e, ...t) {
+function rR(s, e, ...t) {
try {
return s.call(e, ...t);
} catch {
return null;
}
}
-class RU extends Xm {
+class yQ extends Kb {
constructor(e) {
super(), this._context = e;
const t = this._context.configuration.options, i = t.get(
@@ -25647,7 +25647,7 @@ class RU extends Xm {
), this._renderLineHighlightOnlyWhenFocus = t.get(
98
/* EditorOption.renderLineHighlightOnlyWhenFocus */
- ), this._wordWrap = i.isViewportWrapping, this._contentLeft = i.contentLeft, this._contentWidth = i.contentWidth, this._selectionIsEmpty = !0, this._focused = !1, this._cursorLineNumbers = [1], this._selections = [new fe(1, 1, 1, 1)], this._renderData = null, this._context.addEventHandler(this);
+ ), this._wordWrap = i.isViewportWrapping, this._contentLeft = i.contentLeft, this._contentWidth = i.contentWidth, this._selectionIsEmpty = !0, this._focused = !1, this._cursorLineNumbers = [1], this._selections = [new ge(1, 1, 1, 1)], this._renderData = null, this._context.addEventHandler(this);
}
dispose() {
this._context.removeEventHandler(this), super.dispose();
@@ -25658,7 +25658,7 @@ class RU extends Xm {
for (const o of this._selections)
t.add(o.positionLineNumber);
const i = Array.from(t);
- i.sort((o, r) => o - r), ei(this._cursorLineNumbers, i) || (this._cursorLineNumbers = i, e = !0);
+ i.sort((o, l) => o - l), ti(this._cursorLineNumbers, i) || (this._cursorLineNumbers = i, e = !0);
const n = this._selections.every((o) => o.isEmpty());
return this._selectionIsEmpty !== n && (this._selectionIsEmpty = n, e = !0), e;
}
@@ -25707,26 +25707,26 @@ class RU extends Xm {
return;
}
const t = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, n = [];
- for (let r = t; r <= i; r++) {
- const l = r - t;
- n[l] = "";
+ for (let l = t; l <= i; l++) {
+ const r = l - t;
+ n[r] = "";
}
if (this._wordWrap) {
- const r = this._renderOne(e, !1);
- for (const l of this._cursorLineNumbers) {
- const a = this._context.viewModel.coordinatesConverter, c = a.convertViewPositionToModelPosition(new V(l, 1)).lineNumber, d = a.convertModelPositionToViewPosition(new V(c, 1)).lineNumber, h = a.convertModelPositionToViewPosition(new V(c, this._context.viewModel.model.getLineMaxColumn(c))).lineNumber, u = Math.max(d, t), g = Math.min(h, i);
- for (let m = u; m <= g; m++) {
- const f = m - t;
- n[f] = r;
+ const l = this._renderOne(e, !1);
+ for (const r of this._cursorLineNumbers) {
+ const c = this._context.viewModel.coordinatesConverter, d = c.convertViewPositionToModelPosition(new Y(r, 1)).lineNumber, a = c.convertModelPositionToViewPosition(new Y(d, 1)).lineNumber, h = c.convertModelPositionToViewPosition(new Y(d, this._context.viewModel.model.getLineMaxColumn(d))).lineNumber, u = Math.max(a, t), m = Math.min(h, i);
+ for (let b = u; b <= m; b++) {
+ const g = b - t;
+ n[g] = l;
}
}
}
const o = this._renderOne(e, !0);
- for (const r of this._cursorLineNumbers) {
- if (r < t || r > i)
+ for (const l of this._cursorLineNumbers) {
+ if (l < t || l > i)
continue;
- const l = r - t;
- n[l] = o;
+ const r = l - t;
+ n[r] = o;
}
this._renderData = n;
}
@@ -25743,7 +25743,7 @@ class RU extends Xm {
return (this._renderLineHighlight === "line" || this._renderLineHighlight === "all") && this._selectionIsEmpty && (!this._renderLineHighlightOnlyWhenFocus || this._focused);
}
}
-class pre extends RU {
+class rre extends yQ {
_renderOne(e, t) {
return `
`;
}
@@ -25754,7 +25754,7 @@ class pre extends RU {
return this._shouldRenderInMargin();
}
}
-class fre extends RU {
+class cre extends yQ {
_renderOne(e, t) {
return `
`;
}
@@ -25765,14 +25765,14 @@ class fre extends RU {
return this._shouldRenderInContent();
}
}
-Lr((s, e) => {
- const t = s.getColor(AU);
- if (t && (e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`), e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)), !t || t.isTransparent() || s.defines(QF)) {
- const i = s.getColor(QF);
- i && (e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`), e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`), Ma(s.type) && (e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"), e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")));
+Il((s, e) => {
+ const t = s.getColor(oQ);
+ if (t && (e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`), e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)), !t || t.isTransparent() || s.defines(GF)) {
+ const i = s.getColor(GF);
+ i && (e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`), e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`), Rc(s.type) && (e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"), e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")));
}
});
-class bre extends Xm {
+class dre extends Kb {
constructor(e) {
super(), this._context = e;
const t = this._context.configuration.options;
@@ -25817,77 +25817,77 @@ class bre extends Xm {
prepareRender(e) {
const t = e.getDecorationsInViewport();
let i = [], n = 0;
- for (let a = 0, c = t.length; a < c; a++) {
- const d = t[a];
- d.options.className && (i[n++] = d);
+ for (let c = 0, d = t.length; c < d; c++) {
+ const a = t[c];
+ a.options.className && (i[n++] = a);
}
- i = i.sort((a, c) => {
- if (a.options.zIndex < c.options.zIndex)
+ i = i.sort((c, d) => {
+ if (c.options.zIndex < d.options.zIndex)
return -1;
- if (a.options.zIndex > c.options.zIndex)
+ if (c.options.zIndex > d.options.zIndex)
return 1;
- const d = a.options.className, h = c.options.className;
- return d < h ? -1 : d > h ? 1 : M.compareRangesUsingStarts(a.range, c.range);
+ const a = c.options.className, h = d.options.className;
+ return a < h ? -1 : a > h ? 1 : I.compareRangesUsingStarts(c.range, d.range);
});
- const o = e.visibleRange.startLineNumber, r = e.visibleRange.endLineNumber, l = [];
- for (let a = o; a <= r; a++) {
- const c = a - o;
- l[c] = "";
+ const o = e.visibleRange.startLineNumber, l = e.visibleRange.endLineNumber, r = [];
+ for (let c = o; c <= l; c++) {
+ const d = c - o;
+ r[d] = "";
}
- this._renderWholeLineDecorations(e, i, l), this._renderNormalDecorations(e, i, l), this._renderResult = l;
+ this._renderWholeLineDecorations(e, i, r), this._renderNormalDecorations(e, i, r), this._renderResult = r;
}
_renderWholeLineDecorations(e, t, i) {
const n = e.visibleRange.startLineNumber, o = e.visibleRange.endLineNumber;
- for (let r = 0, l = t.length; r < l; r++) {
- const a = t[r];
- if (!a.options.isWholeLine)
+ for (let l = 0, r = t.length; l < r; l++) {
+ const c = t[l];
+ if (!c.options.isWholeLine)
continue;
- const c = '
', d = Math.max(a.range.startLineNumber, n), h = Math.min(a.range.endLineNumber, o);
- for (let u = d; u <= h; u++) {
- const g = u - n;
- i[g] += c;
+ const d = '
', a = Math.max(c.range.startLineNumber, n), h = Math.min(c.range.endLineNumber, o);
+ for (let u = a; u <= h; u++) {
+ const m = u - n;
+ i[m] += d;
}
}
}
_renderNormalDecorations(e, t, i) {
const n = e.visibleRange.startLineNumber;
- let o = null, r = !1, l = null, a = !1;
- for (let c = 0, d = t.length; c < d; c++) {
- const h = t[c];
+ let o = null, l = !1, r = null, c = !1;
+ for (let d = 0, a = t.length; d < a; d++) {
+ const h = t[d];
if (h.options.isWholeLine)
continue;
- const u = h.options.className, g = !!h.options.showIfCollapsed;
- let m = h.range;
- if (g && m.endColumn === 1 && m.endLineNumber !== m.startLineNumber && (m = new M(m.startLineNumber, m.startColumn, m.endLineNumber - 1, this._context.viewModel.getLineMaxColumn(m.endLineNumber - 1))), o === u && r === g && M.areIntersectingOrTouching(l, m)) {
- l = M.plusRange(l, m);
+ const u = h.options.className, m = !!h.options.showIfCollapsed;
+ let b = h.range;
+ if (m && b.endColumn === 1 && b.endLineNumber !== b.startLineNumber && (b = new I(b.startLineNumber, b.startColumn, b.endLineNumber - 1, this._context.viewModel.getLineMaxColumn(b.endLineNumber - 1))), o === u && l === m && I.areIntersectingOrTouching(r, b)) {
+ r = I.plusRange(r, b);
continue;
}
- o !== null && this._renderNormalDecoration(e, l, o, a, r, n, i), o = u, r = g, l = m, a = h.options.shouldFillLineOnLineBreak ?? !1;
+ o !== null && this._renderNormalDecoration(e, r, o, c, l, n, i), o = u, l = m, r = b, c = h.options.shouldFillLineOnLineBreak ?? !1;
}
- o !== null && this._renderNormalDecoration(e, l, o, a, r, n, i);
+ o !== null && this._renderNormalDecoration(e, r, o, c, l, n, i);
}
- _renderNormalDecoration(e, t, i, n, o, r, l) {
- const a = e.linesVisibleRangesForRange(
+ _renderNormalDecoration(e, t, i, n, o, l, r) {
+ const c = e.linesVisibleRangesForRange(
t,
/*TODO@Alex*/
i === "findMatch"
);
- if (a)
- for (let c = 0, d = a.length; c < d; c++) {
- const h = a[c];
+ if (c)
+ for (let d = 0, a = c.length; d < a; d++) {
+ const h = c[d];
if (h.outsideRenderedLine)
continue;
- const u = h.lineNumber - r;
+ const u = h.lineNumber - l;
if (o && h.ranges.length === 1) {
- const g = h.ranges[0];
- if (g.width < this._typicalHalfwidthCharacterWidth) {
- const m = Math.round(g.left + g.width / 2), f = Math.max(0, Math.round(m - this._typicalHalfwidthCharacterWidth / 2));
- h.ranges[0] = new cI(f, this._typicalHalfwidthCharacterWidth);
+ const m = h.ranges[0];
+ if (m.width < this._typicalHalfwidthCharacterWidth) {
+ const b = Math.round(m.left + m.width / 2), g = Math.max(0, Math.round(b - this._typicalHalfwidthCharacterWidth / 2));
+ h.ranges[0] = new Lx(g, this._typicalHalfwidthCharacterWidth);
}
}
- for (let g = 0, m = h.ranges.length; g < m; g++) {
- const f = n && h.continuesOnNextLine && m === 1, b = h.ranges[g], y = '
';
- l[u] += y;
+ for (let m = 0, b = h.ranges.length; m < b; m++) {
+ const g = n && h.continuesOnNextLine && b === 1, Z = h.ranges[m], f = '
';
+ r[u] += f;
}
}
}
@@ -25898,59 +25898,59 @@ class bre extends Xm {
return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[i];
}
}
-class yre extends wo {
+class are extends Go {
constructor(e, t, i, n) {
super(e);
- const o = this._context.configuration.options, r = o.get(
+ const o = this._context.configuration.options, l = o.get(
104
/* EditorOption.scrollbar */
- ), l = o.get(
+ ), r = o.get(
75
/* EditorOption.mouseWheelScrollSensitivity */
- ), a = o.get(
+ ), c = o.get(
40
/* EditorOption.fastScrollSensitivity */
- ), c = o.get(
+ ), d = o.get(
107
/* EditorOption.scrollPredominantAxis */
- ), d = {
+ ), a = {
listenOnDomNode: i.domNode,
- className: "editor-scrollable " + gv(e.theme.type),
+ className: "editor-scrollable " + Yw(e.theme.type),
useShadows: !1,
lazyRender: !0,
- vertical: r.vertical,
- horizontal: r.horizontal,
- verticalHasArrows: r.verticalHasArrows,
- horizontalHasArrows: r.horizontalHasArrows,
- verticalScrollbarSize: r.verticalScrollbarSize,
- verticalSliderSize: r.verticalSliderSize,
- horizontalScrollbarSize: r.horizontalScrollbarSize,
- horizontalSliderSize: r.horizontalSliderSize,
- handleMouseWheel: r.handleMouseWheel,
- alwaysConsumeMouseWheel: r.alwaysConsumeMouseWheel,
- arrowSize: r.arrowSize,
- mouseWheelScrollSensitivity: l,
- fastScrollSensitivity: a,
- scrollPredominantAxis: c,
- scrollByPage: r.scrollByPage
+ vertical: l.vertical,
+ horizontal: l.horizontal,
+ verticalHasArrows: l.verticalHasArrows,
+ horizontalHasArrows: l.horizontalHasArrows,
+ verticalScrollbarSize: l.verticalScrollbarSize,
+ verticalSliderSize: l.verticalSliderSize,
+ horizontalScrollbarSize: l.horizontalScrollbarSize,
+ horizontalSliderSize: l.horizontalSliderSize,
+ handleMouseWheel: l.handleMouseWheel,
+ alwaysConsumeMouseWheel: l.alwaysConsumeMouseWheel,
+ arrowSize: l.arrowSize,
+ mouseWheelScrollSensitivity: r,
+ fastScrollSensitivity: c,
+ scrollPredominantAxis: d,
+ scrollByPage: l.scrollByPage
};
- this.scrollbar = this._register(new uI(t.domNode, d, this._context.viewLayout.getScrollable())), Tl.write(
+ this.scrollbar = this._register(new xx(t.domNode, a, this._context.viewLayout.getScrollable())), vr.write(
this.scrollbar.getDomNode(),
6
/* PartFingerprint.ScrollableElement */
- ), this.scrollbarDomNode = yt(this.scrollbar.getDomNode()), this.scrollbarDomNode.setPosition("absolute"), this._setLayout();
- const h = (u, g, m) => {
- const f = {};
+ ), this.scrollbarDomNode = ft(this.scrollbar.getDomNode()), this.scrollbarDomNode.setPosition("absolute"), this._setLayout();
+ const h = (u, m, b) => {
+ const g = {};
{
- const b = u.scrollTop;
- b && (f.scrollTop = this._context.viewLayout.getCurrentScrollTop() + b, u.scrollTop = 0);
+ const Z = u.scrollTop;
+ Z && (g.scrollTop = this._context.viewLayout.getCurrentScrollTop() + Z, u.scrollTop = 0);
}
- if (m) {
- const b = u.scrollLeft;
- b && (f.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + b, u.scrollLeft = 0);
+ if (b) {
+ const Z = u.scrollLeft;
+ Z && (g.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + Z, u.scrollLeft = 0);
}
this._context.viewModel.viewLayout.setScrollPosition(
- f,
+ g,
1
/* ScrollType.Immediate */
);
@@ -26003,10 +26003,10 @@ class yre extends wo {
), o = t.get(
40
/* EditorOption.fastScrollSensitivity */
- ), r = t.get(
+ ), l = t.get(
107
/* EditorOption.scrollPredominantAxis */
- ), l = {
+ ), r = {
vertical: i.vertical,
horizontal: i.horizontal,
verticalScrollbarSize: i.verticalScrollbarSize,
@@ -26015,9 +26015,9 @@ class yre extends wo {
handleMouseWheel: i.handleMouseWheel,
mouseWheelScrollSensitivity: n,
fastScrollSensitivity: o,
- scrollPredominantAxis: r
+ scrollPredominantAxis: l
};
- this.scrollbar.updateOptions(l);
+ this.scrollbar.updateOptions(r);
}
return e.hasChanged(
146
@@ -26028,7 +26028,7 @@ class yre extends wo {
return !0;
}
onThemeChanged(e) {
- return this.scrollbar.updateClassName("editor-scrollable " + gv(this._context.theme.type)), !0;
+ return this.scrollbar.updateClassName("editor-scrollable " + Yw(this._context.theme.type)), !0;
}
// --- end event handlers
prepareRender(e) {
@@ -26037,19 +26037,19 @@ class yre extends wo {
this.scrollbar.renderNow();
}
}
-var ur;
+var pl;
(function(s) {
s[s.Left = 1] = "Left", s[s.Center = 2] = "Center", s[s.Right = 4] = "Right", s[s.Full = 7] = "Full";
-})(ur || (ur = {}));
-var Jr;
+})(pl || (pl = {}));
+var Ol;
(function(s) {
s[s.Left = 1] = "Left", s[s.Center = 2] = "Center", s[s.Right = 3] = "Right";
-})(Jr || (Jr = {}));
-var Xr;
+})(Ol || (Ol = {}));
+var zl;
(function(s) {
s[s.Both = 0] = "Both", s[s.Right = 1] = "Right", s[s.Left = 2] = "Left", s[s.None = 3] = "None";
-})(Xr || (Xr = {}));
-class SL {
+})(zl || (zl = {}));
+class vX {
get originalIndentSize() {
return this._indentSizeIsTabSize ? "tabSize" : this.indentSize;
}
@@ -26063,7 +26063,7 @@ class SL {
* @internal
*/
equals(e) {
- return this.tabSize === e.tabSize && this._indentSizeIsTabSize === e._indentSizeIsTabSize && this.indentSize === e.indentSize && this.insertSpaces === e.insertSpaces && this.defaultEOL === e.defaultEOL && this.trimAutoWhitespace === e.trimAutoWhitespace && co(this.bracketPairColorizationOptions, e.bracketPairColorizationOptions);
+ return this.tabSize === e.tabSize && this._indentSizeIsTabSize === e._indentSizeIsTabSize && this.indentSize === e.indentSize && this.insertSpaces === e.insertSpaces && this.defaultEOL === e.defaultEOL && this.trimAutoWhitespace === e.trimAutoWhitespace && uo(this.bracketPairColorizationOptions, e.bracketPairColorizationOptions);
}
/**
* @internal
@@ -26077,7 +26077,7 @@ class SL {
};
}
}
-class t1 {
+class mW {
/**
* @internal
*/
@@ -26085,38 +26085,38 @@ class t1 {
this._findMatchBrand = void 0, this.range = e, this.matches = t;
}
}
-function wre(s) {
+function hre(s) {
return s && typeof s.read == "function";
}
-class HN {
- constructor(e, t, i, n, o, r) {
- this.identifier = e, this.range = t, this.text = i, this.forceMoveMarkers = n, this.isAutoWhitespaceEdit = o, this._isTracked = r;
+class cR {
+ constructor(e, t, i, n, o, l) {
+ this.identifier = e, this.range = t, this.text = i, this.forceMoveMarkers = n, this.isAutoWhitespaceEdit = o, this._isTracked = l;
}
}
-class Cre {
+class ure {
constructor(e, t, i) {
this.regex = e, this.wordSeparators = t, this.simpleSearch = i;
}
}
-class Sre {
+class mre {
constructor(e, t, i) {
this.reverseEdits = e, this.changes = t, this.trimAutoWhitespaceLineNumbers = i;
}
}
-function EU(s) {
+function WQ(s) {
return !s.isTooLargeForSyncing() && !s.isForSimpleWidget;
}
-class Cv {
+class Fw {
constructor(e, t, i, n, o) {
this.startLineNumber = e, this.endLineNumber = t, this.className = i, this.tooltip = n, this._decorationToRenderBrand = void 0, this.zIndex = o ?? 0;
}
}
-class Lre {
+class bre {
constructor(e, t, i) {
this.className = e, this.zIndex = t, this.tooltip = i;
}
}
-class Are {
+class pre {
constructor() {
this.decorations = [];
}
@@ -26127,39 +26127,39 @@ class Are {
return this.decorations;
}
}
-class XU extends Xm {
+class GQ extends Kb {
/**
* Returns an array with an element for each visible line number.
*/
_render(e, t, i) {
const n = [];
- for (let l = e; l <= t; l++) {
- const a = l - e;
- n[a] = new Are();
+ for (let r = e; r <= t; r++) {
+ const c = r - e;
+ n[c] = new pre();
}
if (i.length === 0)
return n;
- i.sort((l, a) => l.className === a.className ? l.startLineNumber === a.startLineNumber ? l.endLineNumber - a.endLineNumber : l.startLineNumber - a.startLineNumber : l.className < a.className ? -1 : 1);
- let o = null, r = 0;
- for (let l = 0, a = i.length; l < a; l++) {
- const c = i[l], d = c.className, h = c.zIndex;
- let u = Math.max(c.startLineNumber, e) - e;
- const g = Math.min(c.endLineNumber, t) - e;
- o === d ? (u = Math.max(r + 1, u), r = Math.max(r, g)) : (o = d, r = g);
- for (let m = u; m <= r; m++)
- n[m].add(new Lre(d, h, c.tooltip));
+ i.sort((r, c) => r.className === c.className ? r.startLineNumber === c.startLineNumber ? r.endLineNumber - c.endLineNumber : r.startLineNumber - c.startLineNumber : r.className < c.className ? -1 : 1);
+ let o = null, l = 0;
+ for (let r = 0, c = i.length; r < c; r++) {
+ const d = i[r], a = d.className, h = d.zIndex;
+ let u = Math.max(d.startLineNumber, e) - e;
+ const m = Math.min(d.endLineNumber, t) - e;
+ o === a ? (u = Math.max(l + 1, u), l = Math.max(l, m)) : (o = a, l = m);
+ for (let b = u; b <= l; b++)
+ n[b].add(new bre(a, h, d.tooltip));
}
return n;
}
}
-class xre extends wo {
+class gre extends Go {
constructor(e) {
super(e), this._widgets = {}, this._context = e;
const t = this._context.configuration.options, i = t.get(
146
/* EditorOption.layoutInfo */
);
- this.domNode = yt(document.createElement("div")), this.domNode.setClassName("glyph-margin-widgets"), this.domNode.setPosition("absolute"), this.domNode.setTop(0), this._lineHeight = t.get(
+ this.domNode = ft(document.createElement("div")), this.domNode.setClassName("glyph-margin-widgets"), this.domNode.setPosition("absolute"), this.domNode.setTop(0), this._lineHeight = t.get(
67
/* EditorOption.lineHeight */
), this._glyphMargin = t.get(
@@ -26211,7 +26211,7 @@ class xre extends wo {
// --- end event handlers
// --- begin widget management
addWidget(e) {
- const t = yt(e.getDomNode());
+ const t = ft(e.getDomNode());
this._widgets[e.getId()] = {
widget: e,
preference: e.getPosition(),
@@ -26221,7 +26221,7 @@ class xre extends wo {
}
setWidgetPosition(e, t) {
const i = this._widgets[e.getId()];
- return i.preference.lane === t.lane && i.preference.zIndex === t.zIndex && M.equalsRange(i.preference.range, t.range) ? !1 : (i.preference = t, this.setShouldRender(), !0);
+ return i.preference.lane === t.lane && i.preference.zIndex === t.zIndex && I.equalsRange(i.preference.range, t.range) ? !1 : (i.preference = t, this.setShouldRender(), !0);
}
removeWidget(e) {
const t = e.getId();
@@ -26232,27 +26232,27 @@ class xre extends wo {
}
// --- end widget management
_collectDecorationBasedGlyphRenderRequest(e, t) {
- var r;
+ var l;
const i = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, o = e.getDecorationsInViewport();
- for (const l of o) {
- const a = l.options.glyphMarginClassName;
- if (!a)
+ for (const r of o) {
+ const c = r.options.glyphMarginClassName;
+ if (!c)
continue;
- const c = Math.max(l.range.startLineNumber, i), d = Math.min(l.range.endLineNumber, n), h = ((r = l.options.glyphMargin) == null ? void 0 : r.position) ?? Jr.Center, u = l.options.zIndex ?? 0;
- for (let g = c; g <= d; g++) {
- const m = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new V(g, 0)), f = this._context.viewModel.glyphLanes.getLanesAtLine(m.lineNumber).indexOf(h);
- t.push(new Mre(g, f, u, a));
+ const d = Math.max(r.range.startLineNumber, i), a = Math.min(r.range.endLineNumber, n), h = ((l = r.options.glyphMargin) == null ? void 0 : l.position) ?? Ol.Center, u = r.options.zIndex ?? 0;
+ for (let m = d; m <= a; m++) {
+ const b = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Y(m, 0)), g = this._context.viewModel.glyphLanes.getLanesAtLine(b.lineNumber).indexOf(h);
+ t.push(new Zre(m, g, u, c));
}
}
}
_collectWidgetBasedGlyphRenderRequest(e, t) {
const i = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber;
for (const o of Object.values(this._widgets)) {
- const r = o.preference.range, { startLineNumber: l, endLineNumber: a } = this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(M.lift(r));
- if (!l || !a || a < i || l > n)
+ const l = o.preference.range, { startLineNumber: r, endLineNumber: c } = this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(I.lift(l));
+ if (!r || !c || c < i || r > n)
continue;
- const c = Math.max(l, i), d = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new V(c, 0)), h = this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(o.preference.lane);
- t.push(new Zre(c, h, o.preference.zIndex, o));
+ const d = Math.max(r, i), a = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Y(d, 0)), h = this._context.viewModel.glyphLanes.getLanesAtLine(a.lineNumber).indexOf(o.preference.lane);
+ t.push(new fre(d, h, o.preference.zIndex, o));
}
}
_collectSortedGlyphRenderRequests(e) {
@@ -26269,27 +26269,27 @@ class xre extends wo {
}
for (const n of Object.values(this._widgets))
n.renderInfo = null;
- const t = new Hc(this._collectSortedGlyphRenderRequests(e)), i = [];
+ const t = new Od(this._collectSortedGlyphRenderRequests(e)), i = [];
for (; t.length > 0; ) {
const n = t.peek();
if (!n)
break;
- const o = t.takeWhile((l) => l.lineNumber === n.lineNumber && l.laneIndex === n.laneIndex);
+ const o = t.takeWhile((r) => r.lineNumber === n.lineNumber && r.laneIndex === n.laneIndex);
if (!o || o.length === 0)
break;
- const r = o[0];
- if (r.type === 0) {
- const l = [];
- for (const a of o) {
- if (a.zIndex !== r.zIndex || a.type !== r.type)
+ const l = o[0];
+ if (l.type === 0) {
+ const r = [];
+ for (const c of o) {
+ if (c.zIndex !== l.zIndex || c.type !== l.type)
break;
- (l.length === 0 || l[l.length - 1] !== a.className) && l.push(a.className);
+ (r.length === 0 || r[r.length - 1] !== c.className) && r.push(c.className);
}
- i.push(r.accept(l.join(" ")));
+ i.push(l.accept(r.join(" ")));
} else
- r.widget.renderInfo = {
- lineNumber: r.lineNumber,
- laneIndex: r.laneIndex
+ l.widget.renderInfo = {
+ lineNumber: l.lineNumber,
+ laneIndex: l.laneIndex
};
}
this._decorationGlyphsToRender = i;
@@ -26313,9 +26313,9 @@ class xre extends wo {
i.domNode.setDisplay("block"), i.domNode.setTop(n), i.domNode.setLeft(o), i.domNode.setWidth(t), i.domNode.setHeight(this._lineHeight);
}
for (let i = 0; i < this._decorationGlyphsToRender.length; i++) {
- const n = this._decorationGlyphsToRender[i], o = e.viewportData.relativeVerticalOffset[n.lineNumber - e.viewportData.startLineNumber], r = this._glyphMarginLeft + n.laneIndex * this._lineHeight;
- let l;
- i < this._managedDomNodes.length ? l = this._managedDomNodes[i] : (l = yt(document.createElement("div")), this._managedDomNodes.push(l), this.domNode.appendChild(l)), l.setClassName("cgmr codicon " + n.combinedClassName), l.setPosition("absolute"), l.setTop(o), l.setLeft(r), l.setWidth(t), l.setHeight(this._lineHeight);
+ const n = this._decorationGlyphsToRender[i], o = e.viewportData.relativeVerticalOffset[n.lineNumber - e.viewportData.startLineNumber], l = this._glyphMarginLeft + n.laneIndex * this._lineHeight;
+ let r;
+ i < this._managedDomNodes.length ? r = this._managedDomNodes[i] : (r = ft(document.createElement("div")), this._managedDomNodes.push(r), this.domNode.appendChild(r)), r.setClassName("cgmr codicon " + n.combinedClassName), r.setPosition("absolute"), r.setTop(o), r.setLeft(l), r.setWidth(t), r.setHeight(this._lineHeight);
}
for (; this._managedDomNodes.length > this._decorationGlyphsToRender.length; ) {
const i = this._managedDomNodes.pop();
@@ -26323,30 +26323,30 @@ class xre extends wo {
}
}
}
-class Mre {
+class Zre {
constructor(e, t, i, n) {
this.lineNumber = e, this.laneIndex = t, this.zIndex = i, this.className = n, this.type = 0;
}
accept(e) {
- return new _re(this.lineNumber, this.laneIndex, e);
+ return new yre(this.lineNumber, this.laneIndex, e);
}
}
-class Zre {
+class fre {
constructor(e, t, i, n) {
this.lineNumber = e, this.laneIndex = t, this.zIndex = i, this.widget = n, this.type = 1;
}
}
-class _re {
+class yre {
constructor(e, t, i) {
this.lineNumber = e, this.laneIndex = t, this.combinedClassName = i;
}
}
-function GA(s, e) {
- const t = Ire(s, e);
+function jV(s, e) {
+ const t = Wre(s, e);
if (t !== -1)
return s[t];
}
-function Ire(s, e, t = s.length - 1) {
+function Wre(s, e, t = s.length - 1) {
for (let i = t; i >= 0; i--) {
const n = s[i];
if (e(n))
@@ -26354,31 +26354,31 @@ function Ire(s, e, t = s.length - 1) {
}
return -1;
}
-function bb(s, e) {
- const t = i1(s, e);
+function VZ(s, e) {
+ const t = bW(s, e);
return t === -1 ? void 0 : s[t];
}
-function i1(s, e, t = 0, i = s.length) {
+function bW(s, e, t = 0, i = s.length) {
let n = t, o = i;
for (; n < o; ) {
- const r = Math.floor((n + o) / 2);
- e(s[r]) ? n = r + 1 : o = r;
+ const l = Math.floor((n + o) / 2);
+ e(s[l]) ? n = l + 1 : o = l;
}
return n - 1;
}
-function Nre(s, e) {
- const t = n1(s, e);
+function Gre(s, e) {
+ const t = pW(s, e);
return t === s.length ? void 0 : s[t];
}
-function n1(s, e, t = 0, i = s.length) {
+function pW(s, e, t = 0, i = s.length) {
let n = t, o = i;
for (; n < o; ) {
- const r = Math.floor((n + o) / 2);
- e(s[r]) ? o = r : n = r + 1;
+ const l = Math.floor((n + o) / 2);
+ e(s[l]) ? o = l : n = l + 1;
}
return n;
}
-const dZ = class dZ {
+const I2 = class I2 {
constructor(e) {
this._array = e, this._findLastMonotonousLastIdx = 0;
}
@@ -26387,7 +26387,7 @@ const dZ = class dZ {
* For subsequent calls, current predicate must be weaker than (or equal to) the previous predicate, i.e. more entries must be `true`.
*/
findLastMonotonous(e) {
- if (dZ.assertInvariants) {
+ if (I2.assertInvariants) {
if (this._prevFindLastPredicate) {
for (const i of this._array)
if (this._prevFindLastPredicate(i) && !e(i))
@@ -26395,13 +26395,13 @@ const dZ = class dZ {
}
this._prevFindLastPredicate = e;
}
- const t = i1(this._array, e, this._findLastMonotonousLastIdx);
+ const t = bW(this._array, e, this._findLastMonotonousLastIdx);
return this._findLastMonotonousLastIdx = t + 1, t === -1 ? void 0 : this._array[t];
}
};
-dZ.assertInvariants = !1;
-let RA = dZ;
-function jE(s, e) {
+I2.assertInvariants = !1;
+let qV = I2;
+function XJ(s, e) {
if (s.length === 0)
return;
let t = s[0];
@@ -26411,7 +26411,7 @@ function jE(s, e) {
}
return t;
}
-function Wre(s, e) {
+function Xre(s, e) {
if (s.length === 0)
return;
let t = s[0];
@@ -26421,10 +26421,10 @@ function Wre(s, e) {
}
return t;
}
-function vre(s, e) {
- return jE(s, (t, i) => -e(t, i));
+function Vre(s, e) {
+ return XJ(s, (t, i) => -e(t, i));
}
-function Tre(s, e) {
+function Lre(s, e) {
if (s.length === 0)
return -1;
let t = 0;
@@ -26434,14 +26434,14 @@ function Tre(s, e) {
}
return t;
}
-function Dre(s, e) {
+function Ire(s, e) {
for (const t of s) {
const i = e(t);
if (i !== void 0)
return i;
}
}
-class FU extends R {
+class XQ extends J {
constructor() {
super(...arguments), this._isDisposed = !1;
}
@@ -26453,7 +26453,7 @@ class FU extends R {
throw new Error("TextModelPart is disposed!");
}
}
-function fI(s, e) {
+function wx(s, e) {
let t = 0, i = 0;
const n = s.length;
for (; i < n; ) {
@@ -26468,22 +26468,22 @@ function fI(s, e) {
}
return i === n ? -1 : t;
}
-var dg;
+var pm;
(function(s) {
s[s.Disabled = 0] = "Disabled", s[s.EnabledForActive = 1] = "EnabledForActive", s[s.Enabled = 2] = "Enabled";
-})(dg || (dg = {}));
-class $u {
- constructor(e, t, i, n, o, r) {
- if (this.visibleColumn = e, this.column = t, this.className = i, this.horizontalLine = n, this.forWrappedLinesAfterColumn = o, this.forWrappedLinesBeforeOrAtColumn = r, e !== -1 == (t !== -1))
+})(pm || (pm = {}));
+class sm {
+ constructor(e, t, i, n, o, l) {
+ if (this.visibleColumn = e, this.column = t, this.className = i, this.horizontalLine = n, this.forWrappedLinesAfterColumn = o, this.forWrappedLinesBeforeOrAtColumn = l, e !== -1 == (t !== -1))
throw new Error();
}
}
-class Ty {
+class Af {
constructor(e, t) {
this.top = e, this.endColumn = t;
}
}
-class Vre extends FU {
+class Sre extends XQ {
constructor(e, t) {
super(), this.textModel = e, this.languageConfigurationService = t;
}
@@ -26491,131 +26491,131 @@ class Vre extends FU {
return this.languageConfigurationService.getLanguageConfiguration(e);
}
_computeIndentLevel(e) {
- return fI(this.textModel.getLineContent(e + 1), this.textModel.getOptions().tabSize);
+ return wx(this.textModel.getLineContent(e + 1), this.textModel.getOptions().tabSize);
}
getActiveIndentGuide(e, t, i) {
this.assertNotDisposed();
const n = this.textModel.getLineCount();
if (e < 1 || e > n)
- throw new mt("Illegal value for lineNumber");
- const o = this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules, r = !!(o && o.offSide);
- let l = -2, a = -1, c = -2, d = -1;
- const h = (Z) => {
- if (l !== -1 && (l === -2 || l > Z - 1)) {
- l = -1, a = -1;
- for (let _ = Z - 2; _ >= 0; _--) {
- const v = this._computeIndentLevel(_);
- if (v >= 0) {
- l = _, a = v;
+ throw new bt("Illegal value for lineNumber");
+ const o = this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules, l = !!(o && o.offSide);
+ let r = -2, c = -1, d = -2, a = -1;
+ const h = (S) => {
+ if (r !== -1 && (r === -2 || r > S - 1)) {
+ r = -1, c = -1;
+ for (let x = S - 2; x >= 0; x--) {
+ const w = this._computeIndentLevel(x);
+ if (w >= 0) {
+ r = x, c = w;
break;
}
}
}
- if (c === -2) {
- c = -1, d = -1;
- for (let _ = Z; _ < n; _++) {
- const v = this._computeIndentLevel(_);
- if (v >= 0) {
- c = _, d = v;
+ if (d === -2) {
+ d = -1, a = -1;
+ for (let x = S; x < n; x++) {
+ const w = this._computeIndentLevel(x);
+ if (w >= 0) {
+ d = x, a = w;
break;
}
}
}
};
- let u = -2, g = -1, m = -2, f = -1;
- const b = (Z) => {
+ let u = -2, m = -1, b = -2, g = -1;
+ const Z = (S) => {
if (u === -2) {
- u = -1, g = -1;
- for (let _ = Z - 2; _ >= 0; _--) {
- const v = this._computeIndentLevel(_);
- if (v >= 0) {
- u = _, g = v;
+ u = -1, m = -1;
+ for (let x = S - 2; x >= 0; x--) {
+ const w = this._computeIndentLevel(x);
+ if (w >= 0) {
+ u = x, m = w;
break;
}
}
}
- if (m !== -1 && (m === -2 || m < Z - 1)) {
- m = -1, f = -1;
- for (let _ = Z; _ < n; _++) {
- const v = this._computeIndentLevel(_);
- if (v >= 0) {
- m = _, f = v;
+ if (b !== -1 && (b === -2 || b < S - 1)) {
+ b = -1, g = -1;
+ for (let x = S; x < n; x++) {
+ const w = this._computeIndentLevel(x);
+ if (w >= 0) {
+ b = x, g = w;
break;
}
}
}
};
- let y = 0, w = !0, C = 0, S = !0, L = 0, x = 0;
- for (let Z = 0; w || S; Z++) {
- const _ = e - Z, v = e + Z;
- Z > 1 && (_ < 1 || _ < t) && (w = !1), Z > 1 && (v > n || v > i) && (S = !1), Z > 5e4 && (w = !1, S = !1);
- let P = -1;
- if (w && _ >= 1) {
- const Y = this._computeIndentLevel(_ - 1);
- Y >= 0 ? (c = _ - 1, d = Y, P = Math.ceil(Y / this.textModel.getOptions().indentSize)) : (h(_), P = this._getIndentLevelForWhitespaceLine(r, a, d));
- }
- let E = -1;
- if (S && v <= n) {
- const Y = this._computeIndentLevel(v - 1);
- Y >= 0 ? (u = v - 1, g = Y, E = Math.ceil(Y / this.textModel.getOptions().indentSize)) : (b(v), E = this._getIndentLevelForWhitespaceLine(r, g, f));
- }
- if (Z === 0) {
- x = P;
+ let f = 0, y = !0, W = 0, G = !0, X = 0, L = 0;
+ for (let S = 0; y || G; S++) {
+ const x = e - S, w = e + S;
+ S > 1 && (x < 1 || x < t) && (y = !1), S > 1 && (w > n || w > i) && (G = !1), S > 5e4 && (y = !1, G = !1);
+ let A = -1;
+ if (y && x >= 1) {
+ const F = this._computeIndentLevel(x - 1);
+ F >= 0 ? (d = x - 1, a = F, A = Math.ceil(F / this.textModel.getOptions().indentSize)) : (h(x), A = this._getIndentLevelForWhitespaceLine(l, c, a));
+ }
+ let H = -1;
+ if (G && w <= n) {
+ const F = this._computeIndentLevel(w - 1);
+ F >= 0 ? (u = w - 1, m = F, H = Math.ceil(F / this.textModel.getOptions().indentSize)) : (Z(w), H = this._getIndentLevelForWhitespaceLine(l, m, g));
+ }
+ if (S === 0) {
+ L = A;
continue;
}
- if (Z === 1) {
- if (v <= n && E >= 0 && x + 1 === E) {
- w = !1, y = v, C = v, L = E;
+ if (S === 1) {
+ if (w <= n && H >= 0 && L + 1 === H) {
+ y = !1, f = w, W = w, X = H;
continue;
}
- if (_ >= 1 && P >= 0 && P - 1 === x) {
- S = !1, y = _, C = _, L = P;
+ if (x >= 1 && A >= 0 && A - 1 === L) {
+ G = !1, f = x, W = x, X = A;
continue;
}
- if (y = e, C = e, L = x, L === 0)
- return { startLineNumber: y, endLineNumber: C, indent: L };
+ if (f = e, W = e, X = L, X === 0)
+ return { startLineNumber: f, endLineNumber: W, indent: X };
}
- w && (P >= L ? y = _ : w = !1), S && (E >= L ? C = v : S = !1);
+ y && (A >= X ? f = x : y = !1), G && (H >= X ? W = w : G = !1);
}
- return { startLineNumber: y, endLineNumber: C, indent: L };
+ return { startLineNumber: f, endLineNumber: W, indent: X };
}
getLinesBracketGuides(e, t, i, n) {
var h;
const o = [];
for (let u = e; u <= t; u++)
o.push([]);
- const r = !0, l = this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new M(e, 1, t, this.textModel.getLineMaxColumn(t))).toArray();
- let a;
- if (i && l.length > 0) {
- const u = (e <= i.lineNumber && i.lineNumber <= t ? l : this.textModel.bracketPairs.getBracketPairsInRange(M.fromPositions(i)).toArray()).filter((g) => M.strictContainsPosition(g.range, i));
- a = (h = GA(u, (g) => r)) == null ? void 0 : h.range;
+ const l = !0, r = this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new I(e, 1, t, this.textModel.getLineMaxColumn(t))).toArray();
+ let c;
+ if (i && r.length > 0) {
+ const u = (e <= i.lineNumber && i.lineNumber <= t ? r : this.textModel.bracketPairs.getBracketPairsInRange(I.fromPositions(i)).toArray()).filter((m) => I.strictContainsPosition(m.range, i));
+ c = (h = jV(u, (m) => l)) == null ? void 0 : h.range;
}
- const c = this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType, d = new YU();
- for (const u of l) {
+ const d = this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType, a = new VQ();
+ for (const u of r) {
if (!u.closingBracketRange)
continue;
- const g = a && u.range.equalsRange(a);
- if (!g && !n.includeInactive)
+ const m = c && u.range.equalsRange(c);
+ if (!m && !n.includeInactive)
continue;
- const m = d.getInlineClassName(u.nestingLevel, u.nestingLevelOfEqualBracketType, c) + (n.highlightActive && g ? " " + d.activeClassName : ""), f = u.openingBracketRange.getStartPosition(), b = u.closingBracketRange.getStartPosition(), y = n.horizontalGuides === dg.Enabled || n.horizontalGuides === dg.EnabledForActive && g;
+ const b = a.getInlineClassName(u.nestingLevel, u.nestingLevelOfEqualBracketType, d) + (n.highlightActive && m ? " " + a.activeClassName : ""), g = u.openingBracketRange.getStartPosition(), Z = u.closingBracketRange.getStartPosition(), f = n.horizontalGuides === pm.Enabled || n.horizontalGuides === pm.EnabledForActive && m;
if (u.range.startLineNumber === u.range.endLineNumber) {
- y && o[u.range.startLineNumber - e].push(new $u(-1, u.openingBracketRange.getEndPosition().column, m, new Ty(!1, b.column), -1, -1));
+ f && o[u.range.startLineNumber - e].push(new sm(-1, u.openingBracketRange.getEndPosition().column, b, new Af(!1, Z.column), -1, -1));
continue;
}
- const w = this.getVisibleColumnFromPosition(b), C = this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()), S = Math.min(C, w, u.minVisibleColumnIndentation + 1);
- let L = !1;
- qn(this.textModel.getLineContent(u.closingBracketRange.startLineNumber)) < u.closingBracketRange.startColumn - 1 && (L = !0);
- const _ = Math.max(f.lineNumber, e), v = Math.min(b.lineNumber, t), P = L ? 1 : 0;
- for (let E = _; E < v + P; E++)
- o[E - e].push(new $u(S, -1, m, null, E === f.lineNumber ? f.column : -1, E === b.lineNumber ? b.column : -1));
- y && (f.lineNumber >= e && C > S && o[f.lineNumber - e].push(new $u(S, -1, m, new Ty(!1, f.column), -1, -1)), b.lineNumber <= t && w > S && o[b.lineNumber - e].push(new $u(S, -1, m, new Ty(!L, b.column), -1, -1)));
+ const y = this.getVisibleColumnFromPosition(Z), W = this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()), G = Math.min(W, y, u.minVisibleColumnIndentation + 1);
+ let X = !1;
+ es(this.textModel.getLineContent(u.closingBracketRange.startLineNumber)) < u.closingBracketRange.startColumn - 1 && (X = !0);
+ const x = Math.max(g.lineNumber, e), w = Math.min(Z.lineNumber, t), A = X ? 1 : 0;
+ for (let H = x; H < w + A; H++)
+ o[H - e].push(new sm(G, -1, b, null, H === g.lineNumber ? g.column : -1, H === Z.lineNumber ? Z.column : -1));
+ f && (g.lineNumber >= e && W > G && o[g.lineNumber - e].push(new sm(G, -1, b, new Af(!1, g.column), -1, -1)), Z.lineNumber <= t && y > G && o[Z.lineNumber - e].push(new sm(G, -1, b, new Af(!X, Z.column), -1, -1)));
}
for (const u of o)
- u.sort((g, m) => g.visibleColumn - m.visibleColumn);
+ u.sort((m, b) => m.visibleColumn - b.visibleColumn);
return o;
}
getVisibleColumnFromPosition(e) {
- return Yi.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber), e.column, this.textModel.getOptions().tabSize) + 1;
+ return zi.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber), e.column, this.textModel.getOptions().tabSize) + 1;
}
getLinesIndentGuides(e, t) {
this.assertNotDisposed();
@@ -26624,44 +26624,44 @@ class Vre extends FU {
throw new Error("Illegal value for startLineNumber");
if (t < 1 || t > i)
throw new Error("Illegal value for endLineNumber");
- const n = this.textModel.getOptions(), o = this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules, r = !!(o && o.offSide), l = new Array(t - e + 1);
- let a = -2, c = -1, d = -2, h = -1;
+ const n = this.textModel.getOptions(), o = this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules, l = !!(o && o.offSide), r = new Array(t - e + 1);
+ let c = -2, d = -1, a = -2, h = -1;
for (let u = e; u <= t; u++) {
- const g = u - e, m = this._computeIndentLevel(u - 1);
- if (m >= 0) {
- a = u - 1, c = m, l[g] = Math.ceil(m / n.indentSize);
+ const m = u - e, b = this._computeIndentLevel(u - 1);
+ if (b >= 0) {
+ c = u - 1, d = b, r[m] = Math.ceil(b / n.indentSize);
continue;
}
- if (a === -2) {
- a = -1, c = -1;
- for (let f = u - 2; f >= 0; f--) {
- const b = this._computeIndentLevel(f);
- if (b >= 0) {
- a = f, c = b;
+ if (c === -2) {
+ c = -1, d = -1;
+ for (let g = u - 2; g >= 0; g--) {
+ const Z = this._computeIndentLevel(g);
+ if (Z >= 0) {
+ c = g, d = Z;
break;
}
}
}
- if (d !== -1 && (d === -2 || d < u - 1)) {
- d = -1, h = -1;
- for (let f = u; f < i; f++) {
- const b = this._computeIndentLevel(f);
- if (b >= 0) {
- d = f, h = b;
+ if (a !== -1 && (a === -2 || a < u - 1)) {
+ a = -1, h = -1;
+ for (let g = u; g < i; g++) {
+ const Z = this._computeIndentLevel(g);
+ if (Z >= 0) {
+ a = g, h = Z;
break;
}
}
}
- l[g] = this._getIndentLevelForWhitespaceLine(r, c, h);
+ r[m] = this._getIndentLevelForWhitespaceLine(l, d, h);
}
- return l;
+ return r;
}
_getIndentLevelForWhitespaceLine(e, t, i) {
const n = this.textModel.getOptions();
return t === -1 || i === -1 ? 0 : t < i ? 1 + Math.floor(t / n.indentSize) : t === i || e ? Math.ceil(i / n.indentSize) : 1 + Math.floor(i / n.indentSize);
}
}
-class YU {
+class VQ {
constructor() {
this.activeClassName = "indent-active";
}
@@ -26672,7 +26672,7 @@ class YU {
return `bracket-indent-guide lvl-${e % 30}`;
}
}
-class kre extends Xm {
+class xre extends Kb {
constructor(e) {
super(), this._context = e, this._primaryPosition = null;
const t = this._context.configuration.options, i = t.get(
@@ -26735,55 +26735,55 @@ class kre extends Xm {
}
// --- end event handlers
prepareRender(e) {
- var a, c;
+ var c, d;
if (!this._bracketPairGuideOptions.indentation && this._bracketPairGuideOptions.bracketPairs === !1) {
this._renderResult = null;
return;
}
- const t = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, n = e.scrollWidth, o = this._primaryPosition, r = this.getGuidesByLine(t, Math.min(i + 1, this._context.viewModel.getLineCount()), o), l = [];
- for (let d = t; d <= i; d++) {
- const h = d - t, u = r[h];
- let g = "";
- const m = ((a = e.visibleRangeForPosition(new V(d, 1))) == null ? void 0 : a.left) ?? 0;
- for (const f of u) {
- const b = f.column === -1 ? m + (f.visibleColumn - 1) * this._spaceWidth : e.visibleRangeForPosition(new V(d, f.column)).left;
- if (b > n || this._maxIndentLeft > 0 && b > this._maxIndentLeft)
+ const t = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, n = e.scrollWidth, o = this._primaryPosition, l = this.getGuidesByLine(t, Math.min(i + 1, this._context.viewModel.getLineCount()), o), r = [];
+ for (let a = t; a <= i; a++) {
+ const h = a - t, u = l[h];
+ let m = "";
+ const b = ((c = e.visibleRangeForPosition(new Y(a, 1))) == null ? void 0 : c.left) ?? 0;
+ for (const g of u) {
+ const Z = g.column === -1 ? b + (g.visibleColumn - 1) * this._spaceWidth : e.visibleRangeForPosition(new Y(a, g.column)).left;
+ if (Z > n || this._maxIndentLeft > 0 && Z > this._maxIndentLeft)
break;
- const y = f.horizontalLine ? f.horizontalLine.top ? "horizontal-top" : "horizontal-bottom" : "vertical", w = f.horizontalLine ? (((c = e.visibleRangeForPosition(new V(d, f.horizontalLine.endColumn))) == null ? void 0 : c.left) ?? b + this._spaceWidth) - b : this._spaceWidth;
- g += `
`;
+ const f = g.horizontalLine ? g.horizontalLine.top ? "horizontal-top" : "horizontal-bottom" : "vertical", y = g.horizontalLine ? (((d = e.visibleRangeForPosition(new Y(a, g.horizontalLine.endColumn))) == null ? void 0 : d.left) ?? Z + this._spaceWidth) - Z : this._spaceWidth;
+ m += `
`;
}
- l[h] = g;
+ r[h] = m;
}
- this._renderResult = l;
+ this._renderResult = r;
}
getGuidesByLine(e, t, i) {
const n = this._bracketPairGuideOptions.bracketPairs !== !1 ? this._context.viewModel.getBracketGuidesInRangeByLine(e, t, i, {
highlightActive: this._bracketPairGuideOptions.highlightActiveBracketPair,
- horizontalGuides: this._bracketPairGuideOptions.bracketPairsHorizontal === !0 ? dg.Enabled : this._bracketPairGuideOptions.bracketPairsHorizontal === "active" ? dg.EnabledForActive : dg.Disabled,
+ horizontalGuides: this._bracketPairGuideOptions.bracketPairsHorizontal === !0 ? pm.Enabled : this._bracketPairGuideOptions.bracketPairsHorizontal === "active" ? pm.EnabledForActive : pm.Disabled,
includeInactive: this._bracketPairGuideOptions.bracketPairs === !0
}) : null, o = this._bracketPairGuideOptions.indentation ? this._context.viewModel.getLinesIndentGuides(e, t) : null;
- let r = 0, l = 0, a = 0;
+ let l = 0, r = 0, c = 0;
if (this._bracketPairGuideOptions.highlightActiveIndentation !== !1 && i) {
const h = this._context.viewModel.getActiveIndentGuide(i.lineNumber, e, t);
- r = h.startLineNumber, l = h.endLineNumber, a = h.indent;
+ l = h.startLineNumber, r = h.endLineNumber, c = h.indent;
}
- const { indentSize: c } = this._context.viewModel.model.getOptions(), d = [];
+ const { indentSize: d } = this._context.viewModel.model.getOptions(), a = [];
for (let h = e; h <= t; h++) {
const u = new Array();
- d.push(u);
- const g = n ? n[h - e] : [], m = new Hc(g), f = o ? o[h - e] : 0;
- for (let b = 1; b <= f; b++) {
- const y = (b - 1) * c + 1, w = (
+ a.push(u);
+ const m = n ? n[h - e] : [], b = new Od(m), g = o ? o[h - e] : 0;
+ for (let Z = 1; Z <= g; Z++) {
+ const f = (Z - 1) * d + 1, y = (
// Disable active indent guide if there are bracket guides.
- (this._bracketPairGuideOptions.highlightActiveIndentation === "always" || g.length === 0) && r <= h && h <= l && b === a
+ (this._bracketPairGuideOptions.highlightActiveIndentation === "always" || m.length === 0) && l <= h && h <= r && Z === c
);
- u.push(...m.takeWhile((S) => S.visibleColumn < y) || []);
- const C = m.peek();
- (!C || C.visibleColumn !== y || C.horizontalLine) && u.push(new $u(y, -1, `core-guide-indent lvl-${(b - 1) % 30}` + (w ? " indent-active" : ""), null, -1, -1));
+ u.push(...b.takeWhile((G) => G.visibleColumn < f) || []);
+ const W = b.peek();
+ (!W || W.visibleColumn !== f || W.horizontalLine) && u.push(new sm(f, -1, `core-guide-indent lvl-${(Z - 1) % 30}` + (y ? " indent-active" : ""), null, -1, -1));
}
- u.push(...m.takeWhile((b) => !0) || []);
+ u.push(...b.takeWhile((Z) => !0) || []);
}
- return d;
+ return a;
}
render(e, t) {
if (!this._renderResult)
@@ -26792,56 +26792,56 @@ class kre extends Xm {
return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[i];
}
}
-function op(s) {
+function ap(s) {
if (!(s && s.isTransparent()))
return s;
}
-Lr((s, e) => {
+Il((s, e) => {
const t = [
- { bracketColor: ZU, guideColor: Poe, guideColorActive: Koe },
- { bracketColor: _U, guideColor: Boe, guideColorActive: Qoe },
- { bracketColor: IU, guideColor: Ooe, guideColorActive: joe },
- { bracketColor: NU, guideColor: Hoe, guideColorActive: qoe },
- { bracketColor: WU, guideColor: Joe, guideColorActive: $oe },
- { bracketColor: vU, guideColor: Uoe, guideColorActive: ere }
- ], i = new YU(), n = [
- { indentColor: SC, indentColorActive: LC },
- { indentColor: Soe, indentColorActive: Zoe },
- { indentColor: Loe, indentColorActive: _oe },
- { indentColor: Aoe, indentColorActive: Ioe },
- { indentColor: xoe, indentColorActive: Noe },
- { indentColor: Moe, indentColorActive: Woe }
- ], o = t.map((l) => {
- const a = s.getColor(l.bracketColor), c = s.getColor(l.guideColor), d = s.getColor(l.guideColorActive), h = op(op(c) ?? (a == null ? void 0 : a.transparent(0.3))), u = op(op(d) ?? a);
+ { bracketColor: cQ, guideColor: kle, guideColorActive: Fle },
+ { bracketColor: dQ, guideColor: vle, guideColorActive: zle },
+ { bracketColor: aQ, guideColor: Jle, guideColorActive: Ale },
+ { bracketColor: hQ, guideColor: Hle, guideColorActive: Kle },
+ { bracketColor: uQ, guideColor: Ele, guideColorActive: Ule },
+ { bracketColor: mQ, guideColor: Dle, guideColorActive: Ple }
+ ], i = new VQ(), n = [
+ { indentColor: YG, indentColorActive: kG },
+ { indentColor: mle, indentColorActive: fle },
+ { indentColor: ble, indentColorActive: yle },
+ { indentColor: ple, indentColorActive: Wle },
+ { indentColor: gle, indentColorActive: Gle },
+ { indentColor: Zle, indentColorActive: Xle }
+ ], o = t.map((r) => {
+ const c = s.getColor(r.bracketColor), d = s.getColor(r.guideColor), a = s.getColor(r.guideColorActive), h = ap(ap(d) ?? (c == null ? void 0 : c.transparent(0.3))), u = ap(ap(a) ?? c);
if (!(!h || !u))
return {
guideColor: h,
guideColorActive: u
};
- }).filter(xa), r = n.map((l) => {
- const a = s.getColor(l.indentColor), c = s.getColor(l.indentColorActive), d = op(a), h = op(c);
- if (!(!d || !h))
+ }).filter(Cc), l = n.map((r) => {
+ const c = s.getColor(r.indentColor), d = s.getColor(r.indentColorActive), a = ap(c), h = ap(d);
+ if (!(!a || !h))
return {
- indentColor: d,
+ indentColor: a,
indentColorActive: h
};
- }).filter(xa);
+ }).filter(Cc);
if (o.length > 0) {
- for (let l = 0; l < 30; l++) {
- const a = o[l % o.length];
- e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(l).replace(/ /g, ".")} { --guide-color: ${a.guideColor}; --guide-color-active: ${a.guideColorActive}; }`);
+ for (let r = 0; r < 30; r++) {
+ const c = o[r % o.length];
+ e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(r).replace(/ /g, ".")} { --guide-color: ${c.guideColor}; --guide-color-active: ${c.guideColorActive}; }`);
}
e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"), e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"), e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"), e.addRule(`.monaco-editor .vertical.${i.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`), e.addRule(`.monaco-editor .horizontal-top.${i.activeClassName} { border-top: 1px solid var(--guide-color-active); }`), e.addRule(`.monaco-editor .horizontal-bottom.${i.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`);
}
- if (r.length > 0) {
- for (let l = 0; l < 30; l++) {
- const a = r[l % r.length];
- e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${l} { --indent-color: ${a.indentColor}; --indent-color-active: ${a.indentColorActive}; }`);
+ if (l.length > 0) {
+ for (let r = 0; r < 30; r++) {
+ const c = l[r % l.length];
+ e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${r} { --indent-color: ${c.indentColor}; --indent-color-active: ${c.indentColorActive}; }`);
}
e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"), e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }");
}
});
-class JN {
+class dR {
get didDomLayout() {
return this._didDomLayout;
}
@@ -26865,9 +26865,9 @@ class JN {
this._didDomLayout = !0;
}
}
-class Gre {
+class Cre {
constructor() {
- this._currentVisibleRange = new M(1, 1, 1, 1);
+ this._currentVisibleRange = new I(1, 1, 1, 1);
}
getCurrentVisibleRange() {
return this._currentVisibleRange;
@@ -26877,35 +26877,35 @@ class Gre {
}
}
class Rre {
- constructor(e, t, i, n, o, r, l) {
- this.minimalReveal = e, this.lineNumber = t, this.startColumn = i, this.endColumn = n, this.startScrollTop = o, this.stopScrollTop = r, this.scrollType = l, this.type = "range", this.minLineNumber = t, this.maxLineNumber = t;
+ constructor(e, t, i, n, o, l, r) {
+ this.minimalReveal = e, this.lineNumber = t, this.startColumn = i, this.endColumn = n, this.startScrollTop = o, this.stopScrollTop = l, this.scrollType = r, this.type = "range", this.minLineNumber = t, this.maxLineNumber = t;
}
}
-class Ere {
+class Nre {
constructor(e, t, i, n, o) {
this.minimalReveal = e, this.selections = t, this.startScrollTop = i, this.stopScrollTop = n, this.scrollType = o, this.type = "selections";
- let r = t[0].startLineNumber, l = t[0].endLineNumber;
- for (let a = 1, c = t.length; a < c; a++) {
- const d = t[a];
- r = Math.min(r, d.startLineNumber), l = Math.max(l, d.endLineNumber);
+ let l = t[0].startLineNumber, r = t[0].endLineNumber;
+ for (let c = 1, d = t.length; c < d; c++) {
+ const a = t[c];
+ l = Math.min(l, a.startLineNumber), r = Math.max(r, a.endLineNumber);
}
- this.minLineNumber = r, this.maxLineNumber = l;
+ this.minLineNumber = l, this.maxLineNumber = r;
}
}
-const hZ = class hZ extends wo {
+const S2 = class S2 extends Go {
constructor(e, t) {
super(e);
const i = this._context.configuration, n = this._context.configuration.options, o = n.get(
50
/* EditorOption.fontInfo */
- ), r = n.get(
+ ), l = n.get(
147
/* EditorOption.wrappingInfo */
);
this._lineHeight = n.get(
67
/* EditorOption.lineHeight */
- ), this._typicalHalfwidthCharacterWidth = o.typicalHalfwidthCharacterWidth, this._isViewportWrapping = r.isViewportWrapping, this._revealHorizontalRightPadding = n.get(
+ ), this._typicalHalfwidthCharacterWidth = o.typicalHalfwidthCharacterWidth, this._isViewportWrapping = l.isViewportWrapping, this._revealHorizontalRightPadding = n.get(
101
/* EditorOption.revealHorizontalRightPadding */
), this._cursorSurroundingLines = n.get(
@@ -26917,17 +26917,17 @@ const hZ = class hZ extends wo {
), this._canUseLayerHinting = !n.get(
32
/* EditorOption.disableLayerHinting */
- ), this._viewLineOptions = new OF(i, this._context.theme.type), this._linesContent = t, this._textRangeRestingSpot = document.createElement("div"), this._visibleLines = new kU({
- createLine: () => new wc(this._viewLineOptions)
- }), this.domNode = this._visibleLines.domNode, Tl.write(
+ ), this._viewLineOptions = new gF(i, this._context.theme.type), this._linesContent = t, this._textRangeRestingSpot = document.createElement("div"), this._visibleLines = new ZQ({
+ createLine: () => new Vd(this._viewLineOptions)
+ }), this.domNode = this._visibleLines.domNode, vr.write(
this.domNode,
8
/* PartFingerprint.ViewLines */
- ), this.domNode.setClassName(`view-lines ${If}`), mn(this.domNode, o), this._maxLineWidth = 0, this._asyncUpdateLineWidths = new Zt(() => {
+ ), this.domNode.setClassName(`view-lines ${Yg}`), pn(this.domNode, o), this._maxLineWidth = 0, this._asyncUpdateLineWidths = new St(() => {
this._updateLineWidthsSlow();
- }, 200), this._asyncCheckMonospaceFontAssumptions = new Zt(() => {
+ }, 200), this._asyncCheckMonospaceFontAssumptions = new St(() => {
this._checkMonospaceFontAssumptions();
- }, 2e3), this._lastRenderedData = new Gre(), this._horizontalRevealRequest = null, this._stickyScrollEnabled = n.get(
+ }, 2e3), this._lastRenderedData = new Cre(), this._horizontalRevealRequest = null, this._stickyScrollEnabled = n.get(
116
/* EditorOption.stickyScroll */
).enabled, this._maxNumberStickyLines = n.get(
@@ -26975,13 +26975,13 @@ const hZ = class hZ extends wo {
).enabled, this._maxNumberStickyLines = t.get(
116
/* EditorOption.stickyScroll */
- ).maxLineCount, mn(this.domNode, i), this._onOptionsMaybeChanged(), e.hasChanged(
+ ).maxLineCount, pn(this.domNode, i), this._onOptionsMaybeChanged(), e.hasChanged(
146
/* EditorOption.layoutInfo */
) && (this._maxLineWidth = 0), !0;
}
_onOptionsMaybeChanged() {
- const e = this._context.configuration, t = new OF(e, this._context.theme.type);
+ const e = this._context.configuration, t = new gF(e, this._context.theme.type);
if (!this._viewLineOptions.equals(t)) {
this._viewLineOptions = t;
const i = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber();
@@ -27027,7 +27027,7 @@ const hZ = class hZ extends wo {
e.revealHorizontal ? e.range && e.range.startLineNumber !== e.range.endLineNumber ? i = {
scrollTop: i.scrollTop,
scrollLeft: 0
- } : e.range ? this._horizontalRevealRequest = new Rre(e.minimalReveal, e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), i.scrollTop, e.scrollType) : e.selections && e.selections.length > 0 && (this._horizontalRevealRequest = new Ere(e.minimalReveal, e.selections, this._context.viewLayout.getCurrentScrollTop(), i.scrollTop, e.scrollType)) : this._horizontalRevealRequest = null;
+ } : e.range ? this._horizontalRevealRequest = new Rre(e.minimalReveal, e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), i.scrollTop, e.scrollType) : e.selections && e.selections.length > 0 && (this._horizontalRevealRequest = new Nre(e.minimalReveal, e.selections, this._context.viewLayout.getCurrentScrollTop(), i.scrollTop, e.scrollType)) : this._horizontalRevealRequest = null;
const o = Math.abs(this._context.viewLayout.getCurrentScrollTop() - i.scrollTop) <= this._lineHeight ? 1 : e.scrollType;
return this._context.viewModel.viewLayout.setScrollPosition(i, o), !0;
}
@@ -27057,17 +27057,17 @@ const hZ = class hZ extends wo {
if (n === -1 || n < 1 || n > this._context.viewModel.getLineCount())
return null;
if (this._context.viewModel.getLineMaxColumn(n) === 1)
- return new V(n, 1);
- const o = this._visibleLines.getStartLineNumber(), r = this._visibleLines.getEndLineNumber();
- if (n < o || n > r)
+ return new Y(n, 1);
+ const o = this._visibleLines.getStartLineNumber(), l = this._visibleLines.getEndLineNumber();
+ if (n < o || n > l)
return null;
- let l = this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e, t);
- const a = this._context.viewModel.getLineMinColumn(n);
- return l < a && (l = a), new V(n, l);
+ let r = this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e, t);
+ const c = this._context.viewModel.getLineMinColumn(n);
+ return r < c && (r = c), new Y(n, r);
}
_getViewLineDomNode(e) {
for (; e && e.nodeType === 1; ) {
- if (e.className === wc.CLASS_NAME)
+ if (e.className === Vd.CLASS_NAME)
return e;
e = e.parentElement;
}
@@ -27089,44 +27089,44 @@ const hZ = class hZ extends wo {
const t = this._visibleLines.getStartLineNumber(), i = this._visibleLines.getEndLineNumber();
if (e < t || e > i)
return -1;
- const n = new JN(this.domNode.domNode, this._textRangeRestingSpot), o = this._visibleLines.getVisibleLine(e).getWidth(n);
+ const n = new dR(this.domNode.domNode, this._textRangeRestingSpot), o = this._visibleLines.getVisibleLine(e).getWidth(n);
return this._updateLineWidthsSlowIfDomDidLayout(n), o;
}
linesVisibleRangesForRange(e, t) {
if (this.shouldRender())
return null;
- const i = e.endLineNumber, n = M.intersectRanges(e, this._lastRenderedData.getCurrentVisibleRange());
+ const i = e.endLineNumber, n = I.intersectRanges(e, this._lastRenderedData.getCurrentVisibleRange());
if (!n)
return null;
const o = [];
- let r = 0;
- const l = new JN(this.domNode.domNode, this._textRangeRestingSpot);
- let a = 0;
- t && (a = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new V(n.startLineNumber, 1)).lineNumber);
- const c = this._visibleLines.getStartLineNumber(), d = this._visibleLines.getEndLineNumber();
+ let l = 0;
+ const r = new dR(this.domNode.domNode, this._textRangeRestingSpot);
+ let c = 0;
+ t && (c = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Y(n.startLineNumber, 1)).lineNumber);
+ const d = this._visibleLines.getStartLineNumber(), a = this._visibleLines.getEndLineNumber();
for (let h = n.startLineNumber; h <= n.endLineNumber; h++) {
- if (h < c || h > d)
+ if (h < d || h > a)
continue;
- const u = h === n.startLineNumber ? n.startColumn : 1, g = h !== n.endLineNumber, m = g ? this._context.viewModel.getLineMaxColumn(h) : n.endColumn, f = this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h, u, m, l);
- if (f) {
+ const u = h === n.startLineNumber ? n.startColumn : 1, m = h !== n.endLineNumber, b = m ? this._context.viewModel.getLineMaxColumn(h) : n.endColumn, g = this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h, u, b, r);
+ if (g) {
if (t && h < i) {
- const b = a;
- a = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new V(h + 1, 1)).lineNumber, b !== a && (f.ranges[f.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth);
+ const Z = c;
+ c = this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Y(h + 1, 1)).lineNumber, Z !== c && (g.ranges[g.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth);
}
- o[r++] = new xse(f.outsideRenderedLine, h, cI.from(f.ranges), g);
+ o[l++] = new goe(g.outsideRenderedLine, h, Lx.from(g.ranges), m);
}
}
- return this._updateLineWidthsSlowIfDomDidLayout(l), r === 0 ? null : o;
+ return this._updateLineWidthsSlowIfDomDidLayout(r), l === 0 ? null : o;
}
_visibleRangesForLineRange(e, t, i) {
if (this.shouldRender() || e < this._visibleLines.getStartLineNumber() || e > this._visibleLines.getEndLineNumber())
return null;
- const n = new JN(this.domNode.domNode, this._textRangeRestingSpot), o = this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e, t, i, n);
+ const n = new dR(this.domNode.domNode, this._textRangeRestingSpot), o = this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e, t, i, n);
return this._updateLineWidthsSlowIfDomDidLayout(n), o;
}
visibleRangeForPosition(e) {
const t = this._visibleRangesForLineRange(e.lineNumber, e.column, e.column);
- return t ? new Mse(t.outsideRenderedLine, t.ranges[0].left) : null;
+ return t ? new Zoe(t.outsideRenderedLine, t.ranges[0].left) : null;
}
/**
* Updates the max line width if it is fast to compute.
@@ -27149,13 +27149,13 @@ const hZ = class hZ extends wo {
_updateLineWidths(e) {
const t = this._visibleLines.getStartLineNumber(), i = this._visibleLines.getEndLineNumber();
let n = 1, o = !0;
- for (let r = t; r <= i; r++) {
- const l = this._visibleLines.getVisibleLine(r);
- if (e && !l.getWidthIsFast()) {
+ for (let l = t; l <= i; l++) {
+ const r = this._visibleLines.getVisibleLine(l);
+ if (e && !r.getWidthIsFast()) {
o = !1;
continue;
}
- n = Math.max(n, l.getWidth(null));
+ n = Math.max(n, r.getWidth(null));
}
return o && t === 1 && i === this._context.viewModel.getLineCount() && (this._maxLineWidth = 0), this._ensureMaxLineWidth(n), o;
}
@@ -27163,10 +27163,10 @@ const hZ = class hZ extends wo {
let e = -1, t = -1;
const i = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber();
for (let o = i; o <= n; o++) {
- const r = this._visibleLines.getVisibleLine(o);
- if (r.needsMonospaceFontCheck()) {
- const l = r.getWidth(null);
- l > t && (t = l, e = o);
+ const l = this._visibleLines.getVisibleLine(o);
+ if (l.needsMonospaceFontCheck()) {
+ const r = l.getWidth(null);
+ r > t && (t = r, e = o);
}
}
if (e !== -1 && !this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())
@@ -27207,107 +27207,107 @@ const hZ = class hZ extends wo {
const t = Math.ceil(e);
this._maxLineWidth < t && (this._maxLineWidth = t, this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth));
}
- _computeScrollTopToRevealRange(e, t, i, n, o, r) {
- const l = e.top, a = e.height, c = l + a;
- let d, h, u;
+ _computeScrollTopToRevealRange(e, t, i, n, o, l) {
+ const r = e.top, c = e.height, d = r + c;
+ let a, h, u;
if (o && o.length > 0) {
- let y = o[0].startLineNumber, w = o[0].endLineNumber;
- for (let C = 1, S = o.length; C < S; C++) {
- const L = o[C];
- y = Math.min(y, L.startLineNumber), w = Math.max(w, L.endLineNumber);
+ let f = o[0].startLineNumber, y = o[0].endLineNumber;
+ for (let W = 1, G = o.length; W < G; W++) {
+ const X = o[W];
+ f = Math.min(f, X.startLineNumber), y = Math.max(y, X.endLineNumber);
}
- d = !1, h = this._context.viewLayout.getVerticalOffsetForLineNumber(y), u = this._context.viewLayout.getVerticalOffsetForLineNumber(w) + this._lineHeight;
+ a = !1, h = this._context.viewLayout.getVerticalOffsetForLineNumber(f), u = this._context.viewLayout.getVerticalOffsetForLineNumber(y) + this._lineHeight;
} else if (n)
- d = !0, h = this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber), u = this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber) + this._lineHeight;
+ a = !0, h = this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber), u = this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber) + this._lineHeight;
else
return -1;
- const g = (t === "mouse" || i) && this._cursorSurroundingLinesStyle === "default";
- let m = 0, f = 0;
- if (g)
- i || (m = this._lineHeight);
+ const m = (t === "mouse" || i) && this._cursorSurroundingLinesStyle === "default";
+ let b = 0, g = 0;
+ if (m)
+ i || (b = this._lineHeight);
else {
- const y = a / this._lineHeight, w = Math.max(this._cursorSurroundingLines, this._stickyScrollEnabled ? this._maxNumberStickyLines : 0), C = Math.min(y / 2, w);
- m = C * this._lineHeight, f = Math.max(0, C - 1) * this._lineHeight;
+ const f = c / this._lineHeight, y = Math.max(this._cursorSurroundingLines, this._stickyScrollEnabled ? this._maxNumberStickyLines : 0), W = Math.min(f / 2, y);
+ b = W * this._lineHeight, g = Math.max(0, W - 1) * this._lineHeight;
}
- i || (r === 0 || r === 4) && (f += this._lineHeight), h -= m, u += f;
- let b;
- if (u - h > a) {
- if (!d)
+ i || (l === 0 || l === 4) && (g += this._lineHeight), h -= b, u += g;
+ let Z;
+ if (u - h > c) {
+ if (!a)
return -1;
- b = h;
- } else if (r === 5 || r === 6)
- if (r === 6 && l <= h && u <= c)
- b = l;
+ Z = h;
+ } else if (l === 5 || l === 6)
+ if (l === 6 && r <= h && u <= d)
+ Z = r;
else {
- const y = Math.max(5 * this._lineHeight, a * 0.2), w = h - y, C = u - a;
- b = Math.max(C, w);
+ const f = Math.max(5 * this._lineHeight, c * 0.2), y = h - f, W = u - c;
+ Z = Math.max(W, y);
}
- else if (r === 1 || r === 2)
- if (r === 2 && l <= h && u <= c)
- b = l;
+ else if (l === 1 || l === 2)
+ if (l === 2 && r <= h && u <= d)
+ Z = r;
else {
- const y = (h + u) / 2;
- b = Math.max(0, y - a / 2);
+ const f = (h + u) / 2;
+ Z = Math.max(0, f - c / 2);
}
else
- b = this._computeMinimumScrolling(
- l,
- c,
+ Z = this._computeMinimumScrolling(
+ r,
+ d,
h,
u,
- r === 3,
- r === 4
+ l === 3,
+ l === 4
/* viewEvents.VerticalRevealType.Bottom */
);
- return b;
+ return Z;
}
_computeScrollLeftToReveal(e) {
const t = this._context.viewLayout.getCurrentViewport(), i = this._context.configuration.options.get(
146
/* EditorOption.layoutInfo */
), n = t.left, o = n + t.width - i.verticalScrollbarWidth;
- let r = 1073741824, l = 0;
+ let l = 1073741824, r = 0;
if (e.type === "range") {
- const c = this._visibleRangesForLineRange(e.lineNumber, e.startColumn, e.endColumn);
- if (!c)
+ const d = this._visibleRangesForLineRange(e.lineNumber, e.startColumn, e.endColumn);
+ if (!d)
return null;
- for (const d of c.ranges)
- r = Math.min(r, Math.round(d.left)), l = Math.max(l, Math.round(d.left + d.width));
+ for (const a of d.ranges)
+ l = Math.min(l, Math.round(a.left)), r = Math.max(r, Math.round(a.left + a.width));
} else
- for (const c of e.selections) {
- if (c.startLineNumber !== c.endLineNumber)
+ for (const d of e.selections) {
+ if (d.startLineNumber !== d.endLineNumber)
return null;
- const d = this._visibleRangesForLineRange(c.startLineNumber, c.startColumn, c.endColumn);
- if (!d)
+ const a = this._visibleRangesForLineRange(d.startLineNumber, d.startColumn, d.endColumn);
+ if (!a)
return null;
- for (const h of d.ranges)
- r = Math.min(r, Math.round(h.left)), l = Math.max(l, Math.round(h.left + h.width));
+ for (const h of a.ranges)
+ l = Math.min(l, Math.round(h.left)), r = Math.max(r, Math.round(h.left + h.width));
}
- return e.minimalReveal || (r = Math.max(0, r - hZ.HORIZONTAL_EXTRA_PX), l += this._revealHorizontalRightPadding), e.type === "selections" && l - r > t.width ? null : {
- scrollLeft: this._computeMinimumScrolling(n, o, r, l),
- maxHorizontalOffset: l
+ return e.minimalReveal || (l = Math.max(0, l - S2.HORIZONTAL_EXTRA_PX), r += this._revealHorizontalRightPadding), e.type === "selections" && r - l > t.width ? null : {
+ scrollLeft: this._computeMinimumScrolling(n, o, l, r),
+ maxHorizontalOffset: r
};
}
- _computeMinimumScrolling(e, t, i, n, o, r) {
- e = e | 0, t = t | 0, i = i | 0, n = n | 0, o = !!o, r = !!r;
- const l = t - e;
- if (n - i < l) {
+ _computeMinimumScrolling(e, t, i, n, o, l) {
+ e = e | 0, t = t | 0, i = i | 0, n = n | 0, o = !!o, l = !!l;
+ const r = t - e;
+ if (n - i < r) {
if (o)
return i;
- if (r)
- return Math.max(0, n - l);
+ if (l)
+ return Math.max(0, n - r);
if (i < e)
return i;
if (n > t)
- return Math.max(0, n - l);
+ return Math.max(0, n - r);
} else
return i;
return e;
}
};
-hZ.HORIZONTAL_EXTRA_PX = 30;
-let Sv = hZ;
-class Xre extends XU {
+S2.HORIZONTAL_EXTRA_PX = 30;
+let zw = S2;
+class wre extends GQ {
constructor(e) {
super(), this._context = e;
const i = this._context.configuration.options.get(
@@ -27352,32 +27352,32 @@ class Xre extends XU {
_getDecorations(e) {
const t = e.getDecorationsInViewport(), i = [];
let n = 0;
- for (let o = 0, r = t.length; o < r; o++) {
- const l = t[o], a = l.options.linesDecorationsClassName, c = l.options.zIndex;
- a && (i[n++] = new Cv(l.range.startLineNumber, l.range.endLineNumber, a, l.options.linesDecorationsTooltip ?? null, c));
- const d = l.options.firstLineDecorationClassName;
- d && (i[n++] = new Cv(l.range.startLineNumber, l.range.startLineNumber, d, l.options.linesDecorationsTooltip ?? null, c));
+ for (let o = 0, l = t.length; o < l; o++) {
+ const r = t[o], c = r.options.linesDecorationsClassName, d = r.options.zIndex;
+ c && (i[n++] = new Fw(r.range.startLineNumber, r.range.endLineNumber, c, r.options.linesDecorationsTooltip ?? null, d));
+ const a = r.options.firstLineDecorationClassName;
+ a && (i[n++] = new Fw(r.range.startLineNumber, r.range.startLineNumber, a, r.options.linesDecorationsTooltip ?? null, d));
}
return i;
}
prepareRender(e) {
- const t = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, n = this._render(t, i, this._getDecorations(e)), o = this._decorationsLeft.toString(), r = this._decorationsWidth.toString(), l = '" style="left:' + o + "px;width:" + r + 'px;">
', a = [];
- for (let c = t; c <= i; c++) {
- const d = c - t, h = n[d].getDecorations();
+ const t = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, n = this._render(t, i, this._getDecorations(e)), o = this._decorationsLeft.toString(), l = this._decorationsWidth.toString(), r = '" style="left:' + o + "px;width:" + l + 'px;">', c = [];
+ for (let d = t; d <= i; d++) {
+ const a = d - t, h = n[a].getDecorations();
let u = "";
- for (const g of h) {
- let m = '');
- const r = s.length;
- let l = e, a = 0;
- const c = [], d = [];
- let h = 0 < r ? s.charCodeAt(0) : 0;
+ const l = s.length;
+ let r = e, c = 0;
+ const d = [], a = [];
+ let h = 0 < l ? s.charCodeAt(0) : 0;
n.appendString("");
- for (let u = 0; u < r; u++) {
- u !== 0 && u % 16384 === 0 && n.appendString(""), c[u] = a, d[u] = l;
- const g = h;
- h = u + 1 < r ? s.charCodeAt(u + 1) : 0;
- let m = 1, f = 1;
- switch (g) {
+ for (let u = 0; u < l; u++) {
+ u !== 0 && u % 16384 === 0 && n.appendString(""), d[u] = c, a[u] = r;
+ const m = h;
+ h = u + 1 < l ? s.charCodeAt(u + 1) : 0;
+ let b = 1, g = 1;
+ switch (m) {
case 9:
- m = t - l % t, f = m;
- for (let b = 1; b <= m; b++)
- b < m ? n.appendCharCode(160) : n.appendASCIICharCode(
+ b = t - r % t, g = b;
+ for (let Z = 1; Z <= b; Z++)
+ Z < b ? n.appendCharCode(160) : n.appendASCIICharCode(
32
/* CharCode.Space */
);
@@ -30776,34 +30776,34 @@ function yle(s, e, t, i, n, o) {
n.appendCharCode(65533);
break;
default:
- Nh(g) && f++, g < 32 ? n.appendCharCode(9216 + g) : n.appendCharCode(g);
+ Mh(m) && g++, m < 32 ? n.appendCharCode(9216 + m) : n.appendCharCode(m);
}
- a += m, l += f;
+ c += b, r += g;
}
- return n.appendString(""), c[s.length] = a, d[s.length] = l, n.appendString("
"), [c, d];
+ return n.appendString("